diff --git a/reactos/dll/win32/netapi32/CMakeLists.txt b/reactos/dll/win32/netapi32/CMakeLists.txt index ce7bfffb3bf..f0a69573730 100644 --- a/reactos/dll/win32/netapi32/CMakeLists.txt +++ b/reactos/dll/win32/netapi32/CMakeLists.txt @@ -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) diff --git a/reactos/dll/win32/netapi32/browser.c b/reactos/dll/win32/netapi32/browser.c index 17a93f6bb20..b5ab28935aa 100644 --- a/reactos/dll/win32/netapi32/browser.c +++ b/reactos/dll/win32/netapi32/browser.c @@ -11,12 +11,68 @@ #include "netapi32.h" #include +#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(