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:
parent
7d96703016
commit
31fa745458
|
@ -1,5 +1,5 @@
|
|||
MODULE = mstask.dll
|
||||
IMPORTS = ole32 oleaut32
|
||||
IMPORTS = rpcrt4 ole32 oleaut32
|
||||
|
||||
C_SRCS = \
|
||||
factory.c \
|
||||
|
@ -9,4 +9,5 @@ C_SRCS = \
|
|||
task_trigger.c
|
||||
|
||||
IDL_SRCS = \
|
||||
atsvc.idl \
|
||||
mstask_local.idl
|
||||
|
|
|
@ -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"
|
|
@ -2,10 +2,10 @@
|
|||
@ stdcall -private DllCanUnloadNow()
|
||||
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
@ stub GetNetScheduleAccountInformation
|
||||
@ stub NetrJobAdd
|
||||
@ stub NetrJobDel
|
||||
@ stub NetrJobEnum
|
||||
@ stub NetrJobGetInfo
|
||||
@ stdcall NetrJobAdd(wstr ptr ptr)
|
||||
@ stdcall NetrJobDel(wstr long long)
|
||||
@ stdcall NetrJobEnum(wstr ptr long ptr ptr)
|
||||
@ stdcall NetrJobGetInfo(wstr long ptr)
|
||||
@ stub SAGetAccountInformation
|
||||
@ stub SAGetNSAccountInformation
|
||||
@ stub SASetAccountInformation
|
||||
|
@ -15,10 +15,10 @@
|
|||
@ stub _DllCanUnloadNow@0
|
||||
@ stub _DllGetClassObject@12
|
||||
@ stub _GetNetScheduleAccountInformation@12
|
||||
@ stub _NetrJobAdd@12
|
||||
@ stub _NetrJobDel@12
|
||||
@ stub _NetrJobEnum@20
|
||||
@ stub _NetrJobGetInfo@12
|
||||
@ stdcall _NetrJobAdd@12(wstr ptr ptr) NetrJobAdd
|
||||
@ stdcall _NetrJobDel@12(wstr long long) NetrJobDel
|
||||
@ stdcall _NetrJobEnum@20(wstr ptr long ptr ptr) NetrJobEnum
|
||||
@ stdcall _NetrJobGetInfo@12(wstr long ptr) NetrJobGetInfo
|
||||
@ stub _SAGetAccountInformation@16
|
||||
@ stub _SAGetNSAccountInformation@12
|
||||
@ stub _SASetAccountInformation@20
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "taskschd.h"
|
||||
#include "mstask.h"
|
||||
#include "mstask_private.h"
|
||||
#include "atsvc.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(mstask);
|
||||
|
@ -77,3 +78,32 @@ HRESULT WINAPI DllUnregisterServer(void)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue