[NETAPI32]

- Add the computer browser service client interface.
- Add binding code for the computer browser service client interface.

svn path=/trunk/; revision=75038
This commit is contained in:
Eric Kohl 2017-06-14 13:10:36 +00:00
parent 4d493bb613
commit 243e71c96c
2 changed files with 58 additions and 0 deletions

View file

@ -7,6 +7,7 @@ add_definitions(-D__WINESRC__)
spec2def(netapi32.dll netapi32.spec ADD_IMPORTLIB)
add_rpc_files(client
${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl/atsvc.idl
${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl/browser.idl
${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl/dssetup.idl
${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl/srvsvc.idl
${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl/wkssvc.idl)
@ -34,6 +35,7 @@ list(APPEND SOURCE
wksta_new.c
netapi32.h
${CMAKE_CURRENT_BINARY_DIR}/atsvc_c.c
${CMAKE_CURRENT_BINARY_DIR}/browser_c.c
${CMAKE_CURRENT_BINARY_DIR}/dssetup_c.c
${CMAKE_CURRENT_BINARY_DIR}/srvsvc_c.c
${CMAKE_CURRENT_BINARY_DIR}/wkssvc_c.c)

View file

@ -11,12 +11,68 @@
#include "netapi32.h"
#include <rpc.h>
#include "browser_c.h"
WINE_DEFAULT_DEBUG_CHANNEL(netapi32);
/* FUNCTIONS *****************************************************************/
handle_t __RPC_USER
BROWSER_IDENTIFY_HANDLE_bind(BROWSER_IDENTIFY_HANDLE pszSystemName)
{
handle_t hBinding = NULL;
LPWSTR pszStringBinding;
RPC_STATUS status;
TRACE("BROWSER_IDENTIFY_HANDLE_bind() called\n");
status = RpcStringBindingComposeW(NULL,
L"ncacn_np",
pszSystemName,
L"\\pipe\\browser",
NULL,
&pszStringBinding);
if (status)
{
TRACE("RpcStringBindingCompose returned 0x%x\n", status);
return NULL;
}
/* Set the binding handle that will be used to bind to the server. */
status = RpcBindingFromStringBindingW(pszStringBinding,
&hBinding);
if (status)
{
TRACE("RpcBindingFromStringBinding returned 0x%x\n", status);
}
status = RpcStringFreeW(&pszStringBinding);
if (status)
{
// TRACE("RpcStringFree returned 0x%x\n", status);
}
return hBinding;
}
void __RPC_USER
BROWSER_IDENTIFY_HANDLE_unbind(BROWSER_IDENTIFY_HANDLE pszSystemName,
handle_t hBinding)
{
RPC_STATUS status;
TRACE("BROWSER_IDENTIFY_HANDLE_unbind() called\n");
status = RpcBindingFree(&hBinding);
if (status)
{
TRACE("RpcBindingFree returned 0x%x\n", status);
}
}
NET_API_STATUS
WINAPI
NetServerEnum(