mstask: Export the AT Service RPC API.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2018-05-08 17:40:43 +08:00 committed by Alexandre Julliard
parent 7d96703016
commit 31fa745458
4 changed files with 61 additions and 9 deletions

View File

@ -1,5 +1,5 @@
MODULE = mstask.dll MODULE = mstask.dll
IMPORTS = ole32 oleaut32 IMPORTS = rpcrt4 ole32 oleaut32
C_SRCS = \ C_SRCS = \
factory.c \ factory.c \
@ -9,4 +9,5 @@ C_SRCS = \
task_trigger.c task_trigger.c
IDL_SRCS = \ IDL_SRCS = \
atsvc.idl \
mstask_local.idl mstask_local.idl

21
dlls/mstask/atsvc.idl Normal file
View File

@ -0,0 +1,21 @@
/*
* Copyright 2018 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
*/
#pragma makedep client
#include "wine/atsvc.idl"

View File

@ -2,10 +2,10 @@
@ stdcall -private DllCanUnloadNow() @ stdcall -private DllCanUnloadNow()
@ stdcall -private DllGetClassObject(ptr ptr ptr) @ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stub GetNetScheduleAccountInformation @ stub GetNetScheduleAccountInformation
@ stub NetrJobAdd @ stdcall NetrJobAdd(wstr ptr ptr)
@ stub NetrJobDel @ stdcall NetrJobDel(wstr long long)
@ stub NetrJobEnum @ stdcall NetrJobEnum(wstr ptr long ptr ptr)
@ stub NetrJobGetInfo @ stdcall NetrJobGetInfo(wstr long ptr)
@ stub SAGetAccountInformation @ stub SAGetAccountInformation
@ stub SAGetNSAccountInformation @ stub SAGetNSAccountInformation
@ stub SASetAccountInformation @ stub SASetAccountInformation
@ -15,10 +15,10 @@
@ stub _DllCanUnloadNow@0 @ stub _DllCanUnloadNow@0
@ stub _DllGetClassObject@12 @ stub _DllGetClassObject@12
@ stub _GetNetScheduleAccountInformation@12 @ stub _GetNetScheduleAccountInformation@12
@ stub _NetrJobAdd@12 @ stdcall _NetrJobAdd@12(wstr ptr ptr) NetrJobAdd
@ stub _NetrJobDel@12 @ stdcall _NetrJobDel@12(wstr long long) NetrJobDel
@ stub _NetrJobEnum@20 @ stdcall _NetrJobEnum@20(wstr ptr long ptr ptr) NetrJobEnum
@ stub _NetrJobGetInfo@12 @ stdcall _NetrJobGetInfo@12(wstr long ptr) NetrJobGetInfo
@ stub _SAGetAccountInformation@16 @ stub _SAGetAccountInformation@16
@ stub _SAGetNSAccountInformation@12 @ stub _SAGetNSAccountInformation@12
@ stub _SASetAccountInformation@20 @ stub _SASetAccountInformation@20

View File

@ -27,6 +27,7 @@
#include "taskschd.h" #include "taskschd.h"
#include "mstask.h" #include "mstask.h"
#include "mstask_private.h" #include "mstask_private.h"
#include "atsvc.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(mstask); WINE_DEFAULT_DEBUG_CHANNEL(mstask);
@ -77,3 +78,32 @@ HRESULT WINAPI DllUnregisterServer(void)
{ {
return __wine_unregister_resources( hInst ); return __wine_unregister_resources( hInst );
} }
DECLSPEC_HIDDEN void __RPC_FAR *__RPC_USER MIDL_user_allocate(SIZE_T n)
{
return HeapAlloc(GetProcessHeap(), 0, n);
}
DECLSPEC_HIDDEN void __RPC_USER MIDL_user_free(void __RPC_FAR *p)
{
HeapFree(GetProcessHeap(), 0, p);
}
DECLSPEC_HIDDEN handle_t __RPC_USER ATSVC_HANDLE_bind(ATSVC_HANDLE str)
{
static unsigned char ncalrpc[] = "ncalrpc";
unsigned char *binding_str;
handle_t rpc_handle = 0;
if (RpcStringBindingComposeA(NULL, ncalrpc, NULL, NULL, NULL, &binding_str) == RPC_S_OK)
{
RpcBindingFromStringBindingA(binding_str, &rpc_handle);
RpcStringFreeA(&binding_str);
}
return rpc_handle;
}
DECLSPEC_HIDDEN void __RPC_USER ATSVC_HANDLE_unbind(ATSVC_HANDLE ServerName, handle_t rpc_handle)
{
RpcBindingFree(&rpc_handle);
}