Author: ekohl
Date: Wed Jun 14 13:10:36 2017
New Revision: 75038
URL:
http://svn.reactos.org/svn/reactos?rev=75038&view=rev
Log:
[NETAPI32]
- Add the computer browser service client interface.
- Add binding code for the computer browser service client interface.
Modified:
trunk/reactos/dll/win32/netapi32/CMakeLists.txt
trunk/reactos/dll/win32/netapi32/browser.c
Modified: trunk/reactos/dll/win32/netapi32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/CMakeLi…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/CMakeLists.txt [iso-8859-1] Wed Jun 14 13:10:36 2017
@@ -7,6 +7,7 @@
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 @@
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)
Modified: trunk/reactos/dll/win32/netapi32/browser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/browser…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/browser.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/browser.c [iso-8859-1] Wed Jun 14 13:10:36 2017
@@ -11,11 +11,67 @@
#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