From 22623e265cf5990cb5b613ec81ae1f6639ab8499 Mon Sep 17 00:00:00 2001 From: skulltrail Date: Mon, 7 Jun 2021 02:34:49 -0300 Subject: [PATCH] Enabling and solving taskschd --- sdk/include/reactos/wine/CMakeLists.txt | 1 + sdk/include/reactos/wine/schrpc.idl | 101 ++++++++++ wrappers/includes/CMakeLists.txt | 185 +----------------- wrappers/new-dlls/CMakeLists.txt | 2 +- wrappers/new-dlls/taskschd/CMakeLists.txt | 31 +++ wrappers/new-dlls/taskschd/main.c | 60 ++++++ wrappers/new-dlls/taskschd/regtask.c | 2 +- wrappers/new-dlls/taskschd/version.rc | 26 +++ .../sdk/include/reactos/wine/CMakeLists.txt | 1 + .../sdk/include/reactos/wine/schrpc.idl | 101 ++++++++++ 10 files changed, 325 insertions(+), 185 deletions(-) create mode 100644 sdk/include/reactos/wine/schrpc.idl create mode 100644 wrappers/new-dlls/taskschd/CMakeLists.txt create mode 100644 wrappers/new-dlls/taskschd/main.c create mode 100644 wrappers/new-dlls/taskschd/version.rc create mode 100644 wrappers/to-synch/sdk/include/reactos/wine/schrpc.idl diff --git a/sdk/include/reactos/wine/CMakeLists.txt b/sdk/include/reactos/wine/CMakeLists.txt index e54279bfb0..ba6ea5ee36 100644 --- a/sdk/include/reactos/wine/CMakeLists.txt +++ b/sdk/include/reactos/wine/CMakeLists.txt @@ -16,4 +16,5 @@ add_idl_headers(wineheaders mfmediaengine.idl mfplay.idl mfreadwrite.idl + schrpc.idl ) diff --git a/sdk/include/reactos/wine/schrpc.idl b/sdk/include/reactos/wine/schrpc.idl new file mode 100644 index 0000000000..944f283081 --- /dev/null +++ b/sdk/include/reactos/wine/schrpc.idl @@ -0,0 +1,101 @@ +/* + * Task Scheduler Service definitions + * + * Copyright 2014 Dmitry Timoshkov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +cpp_quote("#define SCHEDSVC_TRANSPORT {'n','c','a','l','r','p','c',0}") +cpp_quote("#define SCH_FLAG_STATE 0x10000000") + +import "oaidl.idl"; +import "ocidl.idl"; + +[ + uuid(86d35949-83c9-4044-b424-db363231fd0c), + implicit_handle(handle_t schrpc_handle), + version(1.0), + pointer_default(unique) +] +interface ITaskSchedulerService +{ + typedef struct _TASK_USER_CRED + { + [string] const WCHAR *user; + [string] const WCHAR *password; + DWORD flags; + } TASK_USER_CRED; + + typedef struct _TASK_XML_ERROR_INFO + { + DWORD line, column; + [string] WCHAR *node; + [string] WCHAR *value; + } TASK_XML_ERROR_INFO; + + typedef [string] WCHAR **TASK_NAMES; + + HRESULT SchRpcHighestVersion([out] DWORD *version); + HRESULT SchRpcRegisterTask([in, string, unique] const WCHAR *path, + [in, string] const WCHAR *xml, [in] DWORD flags, + [in, string, unique] const WCHAR *sddl, + [in] DWORD task_logon_type, [in] DWORD n_creds, + [in, size_is(n_creds), unique] const TASK_USER_CRED *creds, + [out, string] WCHAR **actual_path, + [out] TASK_XML_ERROR_INFO **xml_error_info); + HRESULT SchRpcRetrieveTask([in, string] const WCHAR *path, + [in, string] const WCHAR *languages, + [in] unsigned long *n_languages, [out, string] WCHAR **xml); + HRESULT SchRpcCreateFolder([in, string] const WCHAR *path, + [in, string, unique] const WCHAR *sddl, [in] DWORD flags); + HRESULT SchRpcSetSecurity([in, string] const WCHAR *path, + [in, string] const WCHAR *sddl, [in] DWORD flags); + HRESULT SchRpcGetSecurity([in, string] const WCHAR *path, + [in] DWORD flags, [out, string] WCHAR **sddl); + HRESULT SchRpcEnumFolders([in, string] const WCHAR *path, + [in] DWORD flags, [in, out] DWORD *start_index, + [in] DWORD n_requested, [out] DWORD *n_names, + [out, string, size_is(,*n_names)] TASK_NAMES *names); + HRESULT SchRpcEnumTasks([in, string] const WCHAR *path, + [in] DWORD flags, [in, out] DWORD *start_index, + [in] DWORD n_requested, [out] DWORD *n_names, + [out, string, size_is(,*n_names)] TASK_NAMES *names); + HRESULT SchRpcEnumInstances([in, string, unique] const WCHAR *path, + [in] DWORD flags, [out] DWORD *n_guids, + [out, size_is(,*n_guids)] GUID **guids); + HRESULT SchRpcGetInstanceInfo([in] GUID guid, [out, string] WCHAR **path, + [out] DWORD *task_state, [out, string] WCHAR **action, + [out, string] WCHAR **info, [out] DWORD *n_instances, + [out, size_is(,*n_instances)] GUID **instances, [out] DWORD *pid); + HRESULT SchRpcStopInstance([in] GUID guid, [in] DWORD flags); + HRESULT SchRpcStop([in, string, unique] const WCHAR *path, [in] DWORD flags); + HRESULT SchRpcRun([in, string] const WCHAR *path, + [in] DWORD n_args, [in, size_is(n_args),unique] const WCHAR **args, + [in] DWORD flags, [in] DWORD session_id, + [in, unique, string] const WCHAR *user, [out] GUID *guid); + HRESULT SchRpcDelete([in, string] const WCHAR *path, [in] DWORD flags); + HRESULT SchRpcRename([in, string] const WCHAR *path, [in, string] const WCHAR *name, [in] DWORD flags); + HRESULT SchRpcScheduledRuntimes([in, string] const WCHAR *path, + [in, unique] SYSTEMTIME *start, [in, unique] SYSTEMTIME *end, + [in] DWORD flags, [in] DWORD n_requested, [out] DWORD *n_runtimes, + [out, size_is(,*n_runtimes)] SYSTEMTIME **runtimes); + HRESULT SchRpcGetLastRunInfo([in, string] const WCHAR *path, + [out] SYSTEMTIME *last_runtime, [out] DWORD *last_return_code); + HRESULT SchRpcGetTaskInfo([in, string] const WCHAR *path, [in] DWORD flags, + [out] DWORD *enabled, [out] DWORD *task_state); + HRESULT SchRpcGetNumberOfMissedRuns([in, string] const WCHAR *path, [out] DWORD *runs); + HRESULT SchRpcEnableTask([in, string] const WCHAR *path, [in] DWORD enabled); +} diff --git a/wrappers/includes/CMakeLists.txt b/wrappers/includes/CMakeLists.txt index 98f4947a81..352170524f 100644 --- a/wrappers/includes/CMakeLists.txt +++ b/wrappers/includes/CMakeLists.txt @@ -4,192 +4,11 @@ add_definitions(-D_MIDL_USE_GUIDDEF_) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) list(APPEND SOURCE - # control.idl - # cor.idl - # cordebug.idl -# # crtrow.idl - # ctxtcall.idl - # d2d1.idl - # d2d1_1.idl - # d2d1_2.idl - # d3dcommon.idl - # d3d10.idl - # d3d10_1.idl - # d3d10sdklayers.idl - # d3d11.idl - # d3d11_1.idl - # d3d11_2.idl - # d3d11_3.idl - # d3d11_4.idl - # d3d11sdklayers.idl - # dxgicommon.idl - # dxgiformat.idl - # dxgitype.idl - # dxgi.idl - # dxgi1_2.idl - # dxgi1_3.idl - # dxgi1_4.idl - # dxgi1_5.idl - # dxgi1_6.idl - dxva2api.idl - # d3dx10core.idl - # d3dx11core.idl - # dcommon.idl - # dwrite.idl - # dwrite_1.idl - # dwrite_2.idl - # dwrite_3.idl -# dbccmd.idl -# dbcses.idl -# dbdsad.idl -# dbinit.idl -# dbprop.idl -# dbs.idl - # devenum.idl - # devicetopology.idl - # dimm.idl - # dispex.idl - # docobj.idl - # docobjectservice.idl - # downloadmgr.idl -# # dyngraph.idl - # endpointvolume.idl - #evr.idl + dxva2api.idl evr9.idl - # exdisp.idl - # fusion.idl - # hlink.idl - # htiface.idl - # htiframe.idl - # httprequest.idl - # hstring.idl - # gameux.idl - # iads.idl - # icftypes.idl - # imnact.idl - # imnxport.idl - # indexsrv.idl - # inputscope.idl - # inseng.idl - # inspectable.idl - # metahost.idl mfidl.idl mftransform.idl - # mimeinfo.idl - # mimeole.idl - # mlang.idl - # mmdeviceapi.idl - # mscoree.idl - # msctf.idl - # msdadc.idl - # mshtmhst.idl - # mshtml.idl - # msinkaut.idl - # mstask.idl - # msxml.idl - # msxml2.idl - # msxml6.idl - # netcon.idl - # netfw.idl - # oaidl.idl - # objectarray.idl - # objidl.idl - # objsafe.idl - # ocidl.idl - # ocmm.idl - # oleacc.idl - # oledb.idl - # oleidl.idl -# # opnrst.idl - # optary.idl - # perhist.idl - # propidl.idl - # propsys.idl - # pstore.idl - # richole.idl - # roparameterizediid.idl -# # row.idl -# # rowchg.idl -# # rstbas.idl -# # rstinf.idl -# # rstloc.idl - # sensevts.idl - # servprov.idl -# # sesprp.idl - # shdeprecated.idl - # shldisp.idl - # shobjidl.idl - # shtypes.idl -# # stdole2.idl - # strmif.idl - # structuredquerycondition.idl - # textstor.idl - # tlogstg.idl - # tom.idl - # tuner.idl - # uiautomationclient.idl - # uiautomationcore.idl - # unknwn.idl - # urlhist.idl - # urlmon.idl - # vmr9.idl -# # vmrender.idl - # vss.idl - # wbemcli.idl - # wbemdisp.idl - # wbemprov.idl - # wia_lh.idl - # wia_xp.idl - # wincodec.idl - # wincodecsdk.idl - # winsxs.idl - # wmiutils.idl - # wmsbuffer.idl - # wmsdkidl.idl - # wpcapi.idl - # wtypes.idl - # wuapi.idl - # xmldom.idl - # xmldso.idl - # ctfutb.idl - # xmllite.idl - # dxgi_internal.idl ) add_idl_headers(wsdk ${SOURCE}) -add_dependencies(wsdk xdk) -# add_typelib(stdole2.idl) -# add_custom_target(stdole2 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/stdole2.tlb) - -# add_idl_headers(d3d_idl_headers d3dcommon.idl - # d2d1.idl - # d2d1_1.idl - # d2d1_2.idl - # d3d10.idl - # d3d10_1.idl - # d3d10sdklayers.idl - # d3d11.idl - # d3d11_1.idl - # d3d11_2.idl - # d3d12.idl - # d3d11sdklayers.idl - # dxgi.idl - # dxgi1_2.idl - # dwrite.idl - # dwrite_1.idl - # dwrite_2.idl - # dwrite_3.idl) - -# add_iid_library(dxgi_uuids dxgi.idl dxgi1_2.idl dxgi1_3.idl dxgi1_4.idl dxgi1_5.idl dxgi1_6.idl d3d12.idl dxgi_internal.idl) -# add_iid_library(d2d1_uuids d2d1.idl d2d1_1.idl d2d1_2.idl) -# add_iid_library(d3d10_uuids d3d10.idl d3d10_1.idl d3d10sdklayers.idl) -# add_iid_library(d3d10_1_uuids d3d10_1.idl) -# add_iid_library(d3d11_uuids d3d11.idl d3d11_1.idl d3d11_2.idl d3d11sdklayers.idl) -# add_iid_library(dwrite_uuids dwrite.idl dwrite_1.idl dwrite_2.idl dwrite_3.idl) - -# add_iid_library(wuguid wuapi.idl) -# add_iid_library(xml_uuids msxml2.idl) - -# add_iid_library(activation_uuids activation.idl) - -# generate_idl_iids(wincodec.idl) +add_dependencies(wsdk xdk) \ No newline at end of file diff --git a/wrappers/new-dlls/CMakeLists.txt b/wrappers/new-dlls/CMakeLists.txt index 2a961c8b01..5c7d38b83d 100644 --- a/wrappers/new-dlls/CMakeLists.txt +++ b/wrappers/new-dlls/CMakeLists.txt @@ -20,7 +20,7 @@ add_subdirectory(sas) add_subdirectory(secbase) add_subdirectory(shcore) add_subdirectory(sspicli) -#add_subdirectory(taskschd) +add_subdirectory(taskschd) #add_subdirectory(tdh) add_subdirectory(uiautomationcore) #add_subdirectory(uiribbon) diff --git a/wrappers/new-dlls/taskschd/CMakeLists.txt b/wrappers/new-dlls/taskschd/CMakeLists.txt new file mode 100644 index 0000000000..d48e81847b --- /dev/null +++ b/wrappers/new-dlls/taskschd/CMakeLists.txt @@ -0,0 +1,31 @@ + +add_definitions(-D__WINESRC__) +remove_definitions(-D_WIN32_WINNT=0x502) +add_definitions(-D_WIN32_WINNT=0x600) +include_directories(${REACTOS_BINARY_DIR}/sdk/include/psdk) +include_directories(${REACTOS_BINARY_DIR}/sdk/include/reactos/wine) +include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine) +spec2def(taskschd.dll taskschd.spec) + +add_idl_headers(taskschd_idlheader schrpc.idl taskschd_tlb.idl) +add_rpc_files(client schrpc.idl) + +list(APPEND SOURCE + folder.c + folder_collection.c + main.c + regtask.c + task.c + taskschd.c + version.rc + ${CMAKE_CURRENT_BINARY_DIR}/taskschd_stubs.c + ${CMAKE_CURRENT_BINARY_DIR}/taskschd.def + ${CMAKE_CURRENT_BINARY_DIR}/schrpc_c.c) + +add_library(taskschd SHARED ${SOURCE}) +add_dependencies(taskschd mf_idlheader) +set_module_type(taskschd win32dll) +target_link_libraries(taskschd wine uuid mfuuid) +add_importlibs(taskschd oleaut32 ole32 advapi32 xmllite rpcrt4 msvcrt kernelbase ntdll) + +add_cd_file(TARGET taskschd DESTINATION reactos/system32 FOR all) diff --git a/wrappers/new-dlls/taskschd/main.c b/wrappers/new-dlls/taskschd/main.c new file mode 100644 index 0000000000..bbb404a991 --- /dev/null +++ b/wrappers/new-dlls/taskschd/main.c @@ -0,0 +1,60 @@ +/* + * + * Copyright 2014 Austin English + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#include "wine/config.h" + +#include + +#include "windef.h" +#include "winbase.h" +#include "rpcproxy.h" + +#include "wine/debug.h" +#include "wine/heap.h" +#include "wine/list.h" + +WINE_DEFAULT_DEBUG_CHANNEL(mfplat); + +static HINSTANCE instance; + +BOOL WINAPI DllMain(HINSTANCE hinstance, DWORD reason, LPVOID reserved) +{ + switch (reason) + { + case DLL_PROCESS_ATTACH: + instance = hinstance; + DisableThreadLibraryCalls(hinstance); + break; + } + return TRUE; +} + +HRESULT WINAPI DllCanUnloadNow(void) +{ + return S_FALSE; +} + +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources(instance); +} + +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources(instance); +} \ No newline at end of file diff --git a/wrappers/new-dlls/taskschd/regtask.c b/wrappers/new-dlls/taskschd/regtask.c index 0b4b571765..307c07d14e 100644 --- a/wrappers/new-dlls/taskschd/regtask.c +++ b/wrappers/new-dlls/taskschd/regtask.c @@ -158,7 +158,7 @@ static HRESULT WINAPI regtask_get_State(IRegisteredTask *iface, TASK_STATE *stat if (!state) return E_POINTER; - return SchRpcGetTaskInfo(regtask->path, SCH_FLAG_STATE, &enabled, state); + return SchRpcGetTaskInfo(regtask->path, SCH_FLAG_STATE, &enabled, (DWORD *)state); } static HRESULT WINAPI regtask_get_Enabled(IRegisteredTask *iface, VARIANT_BOOL *v_enabled) diff --git a/wrappers/new-dlls/taskschd/version.rc b/wrappers/new-dlls/taskschd/version.rc new file mode 100644 index 0000000000..cf3650f03c --- /dev/null +++ b/wrappers/new-dlls/taskschd/version.rc @@ -0,0 +1,26 @@ +/* + * Copyright 2009 Henri Verbeet for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WINE_FILEDESCRIPTION_STR "Task Scheduler COM API Compatibility Layer" +#define WINE_FILENAME_STR "taskschd.dll" +#define WINE_FILEVERSION 6,0,6000,16386 +#define WINE_FILEVERSION_STR "6.0.6000.16386(winmain_wrapper_beta1)" +#define WINE_PRODUCTVERSION 6,0,6000,16386 +#define WINE_PRODUCTVERSION_STR "6.0.6000.16386" + +#include "wine/wine_common_ver.rc" diff --git a/wrappers/to-synch/sdk/include/reactos/wine/CMakeLists.txt b/wrappers/to-synch/sdk/include/reactos/wine/CMakeLists.txt index e54279bfb0..ba6ea5ee36 100644 --- a/wrappers/to-synch/sdk/include/reactos/wine/CMakeLists.txt +++ b/wrappers/to-synch/sdk/include/reactos/wine/CMakeLists.txt @@ -16,4 +16,5 @@ add_idl_headers(wineheaders mfmediaengine.idl mfplay.idl mfreadwrite.idl + schrpc.idl ) diff --git a/wrappers/to-synch/sdk/include/reactos/wine/schrpc.idl b/wrappers/to-synch/sdk/include/reactos/wine/schrpc.idl new file mode 100644 index 0000000000..944f283081 --- /dev/null +++ b/wrappers/to-synch/sdk/include/reactos/wine/schrpc.idl @@ -0,0 +1,101 @@ +/* + * Task Scheduler Service definitions + * + * Copyright 2014 Dmitry Timoshkov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +cpp_quote("#define SCHEDSVC_TRANSPORT {'n','c','a','l','r','p','c',0}") +cpp_quote("#define SCH_FLAG_STATE 0x10000000") + +import "oaidl.idl"; +import "ocidl.idl"; + +[ + uuid(86d35949-83c9-4044-b424-db363231fd0c), + implicit_handle(handle_t schrpc_handle), + version(1.0), + pointer_default(unique) +] +interface ITaskSchedulerService +{ + typedef struct _TASK_USER_CRED + { + [string] const WCHAR *user; + [string] const WCHAR *password; + DWORD flags; + } TASK_USER_CRED; + + typedef struct _TASK_XML_ERROR_INFO + { + DWORD line, column; + [string] WCHAR *node; + [string] WCHAR *value; + } TASK_XML_ERROR_INFO; + + typedef [string] WCHAR **TASK_NAMES; + + HRESULT SchRpcHighestVersion([out] DWORD *version); + HRESULT SchRpcRegisterTask([in, string, unique] const WCHAR *path, + [in, string] const WCHAR *xml, [in] DWORD flags, + [in, string, unique] const WCHAR *sddl, + [in] DWORD task_logon_type, [in] DWORD n_creds, + [in, size_is(n_creds), unique] const TASK_USER_CRED *creds, + [out, string] WCHAR **actual_path, + [out] TASK_XML_ERROR_INFO **xml_error_info); + HRESULT SchRpcRetrieveTask([in, string] const WCHAR *path, + [in, string] const WCHAR *languages, + [in] unsigned long *n_languages, [out, string] WCHAR **xml); + HRESULT SchRpcCreateFolder([in, string] const WCHAR *path, + [in, string, unique] const WCHAR *sddl, [in] DWORD flags); + HRESULT SchRpcSetSecurity([in, string] const WCHAR *path, + [in, string] const WCHAR *sddl, [in] DWORD flags); + HRESULT SchRpcGetSecurity([in, string] const WCHAR *path, + [in] DWORD flags, [out, string] WCHAR **sddl); + HRESULT SchRpcEnumFolders([in, string] const WCHAR *path, + [in] DWORD flags, [in, out] DWORD *start_index, + [in] DWORD n_requested, [out] DWORD *n_names, + [out, string, size_is(,*n_names)] TASK_NAMES *names); + HRESULT SchRpcEnumTasks([in, string] const WCHAR *path, + [in] DWORD flags, [in, out] DWORD *start_index, + [in] DWORD n_requested, [out] DWORD *n_names, + [out, string, size_is(,*n_names)] TASK_NAMES *names); + HRESULT SchRpcEnumInstances([in, string, unique] const WCHAR *path, + [in] DWORD flags, [out] DWORD *n_guids, + [out, size_is(,*n_guids)] GUID **guids); + HRESULT SchRpcGetInstanceInfo([in] GUID guid, [out, string] WCHAR **path, + [out] DWORD *task_state, [out, string] WCHAR **action, + [out, string] WCHAR **info, [out] DWORD *n_instances, + [out, size_is(,*n_instances)] GUID **instances, [out] DWORD *pid); + HRESULT SchRpcStopInstance([in] GUID guid, [in] DWORD flags); + HRESULT SchRpcStop([in, string, unique] const WCHAR *path, [in] DWORD flags); + HRESULT SchRpcRun([in, string] const WCHAR *path, + [in] DWORD n_args, [in, size_is(n_args),unique] const WCHAR **args, + [in] DWORD flags, [in] DWORD session_id, + [in, unique, string] const WCHAR *user, [out] GUID *guid); + HRESULT SchRpcDelete([in, string] const WCHAR *path, [in] DWORD flags); + HRESULT SchRpcRename([in, string] const WCHAR *path, [in, string] const WCHAR *name, [in] DWORD flags); + HRESULT SchRpcScheduledRuntimes([in, string] const WCHAR *path, + [in, unique] SYSTEMTIME *start, [in, unique] SYSTEMTIME *end, + [in] DWORD flags, [in] DWORD n_requested, [out] DWORD *n_runtimes, + [out, size_is(,*n_runtimes)] SYSTEMTIME **runtimes); + HRESULT SchRpcGetLastRunInfo([in, string] const WCHAR *path, + [out] SYSTEMTIME *last_runtime, [out] DWORD *last_return_code); + HRESULT SchRpcGetTaskInfo([in, string] const WCHAR *path, [in] DWORD flags, + [out] DWORD *enabled, [out] DWORD *task_state); + HRESULT SchRpcGetNumberOfMissedRuns([in, string] const WCHAR *path, [out] DWORD *runs); + HRESULT SchRpcEnableTask([in, string] const WCHAR *path, [in] DWORD enabled); +}