Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/netapi32/Makefile.in | 5 ++++- dlls/netapi32/atsvc.idl | 3 +++ dlls/netapi32/netapi32.c | 35 ++++++++++++++++++++++++++++++++--- 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 dlls/netapi32/atsvc.idl
diff --git a/dlls/netapi32/Makefile.in b/dlls/netapi32/Makefile.in index fda9c0e43a..23da4838f9 100644 --- a/dlls/netapi32/Makefile.in +++ b/dlls/netapi32/Makefile.in @@ -1,7 +1,7 @@ EXTRADEFS = -D_SVRAPI_ MODULE = netapi32.dll IMPORTLIB = netapi32 -IMPORTS = iphlpapi ws2_32 advapi32 +IMPORTS = rpcrt4 iphlpapi ws2_32 advapi32
C_SRCS = \ nbcmdqueue.c \ @@ -9,3 +9,6 @@ C_SRCS = \ nbt.c \ netapi32.c \ netbios.c + +IDL_SRCS = \ + atsvc.idl diff --git a/dlls/netapi32/atsvc.idl b/dlls/netapi32/atsvc.idl new file mode 100644 index 0000000000..61bc163a57 --- /dev/null +++ b/dlls/netapi32/atsvc.idl @@ -0,0 +1,3 @@ +#pragma makedep client + +#include "wine/atsvc.idl" diff --git a/dlls/netapi32/netapi32.c b/dlls/netapi32/netapi32.c index 278d4528b0..6185b8041f 100644 --- a/dlls/netapi32/netapi32.c +++ b/dlls/netapi32/netapi32.c @@ -39,7 +39,7 @@ #include "winbase.h" #include "lm.h" #include "lmaccess.h" -#include "lmat.h" +#include "atsvc.h" #include "lmapibuf.h" #include "lmbrowsr.h" #include "lmshare.h" @@ -1141,8 +1141,8 @@ NET_API_STATUS WINAPI NetUseEnum(LMSTR server, DWORD level, LPBYTE* bufptr, DWOR
NET_API_STATUS WINAPI NetScheduleJobAdd(LPCWSTR server, LPBYTE bufptr, LPDWORD jobid) { - FIXME("stub (%s, %p, %p)\n", debugstr_w(server), bufptr, jobid); - return NERR_Success; + TRACE("(%s, %p, %p)\n", debugstr_w(server), bufptr, jobid); + return NetrJobAdd(server, (AT_INFO *)bufptr, jobid); }
NET_API_STATUS WINAPI NetScheduleJobDel(LPCWSTR server, DWORD minjobid, DWORD maxjobid) @@ -3527,3 +3527,32 @@ DWORD WINAPI DavGetUNCFromHTTPPath(const WCHAR *http_path, WCHAR *buf, DWORD *bu
return ERROR_SUCCESS; } + +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); +}