Author: ekohl
Date: Mon Jun 19 14:06:04 2017
New Revision: 75124
URL:
http://svn.reactos.org/svn/reactos?rev=75124&view=rev
Log:
[NETAPI32]
Implement I_BrowserQueryEmulatedDomains, I_BrowserResetStatistics and
I_BrowserSetNetlogonState. This functions calls their counterpart in the computer browser
service.
Modified:
trunk/reactos/dll/win32/netapi32/browser.c
trunk/reactos/dll/win32/netapi32/netapi32.spec
trunk/reactos/sdk/include/reactos/idl/browser.idl
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] Mon Jun 19 14:06:04 2017
@@ -81,10 +81,57 @@
_Out_ PBROWSER_EMULATED_DOMAIN *EmulatedDomains,
_Out_ LPDWORD EntriesRead)
{
- FIXME("I_BrowserQueryEmulatedDomains(%s %p %p)\n",
+ BROWSER_EMULATED_DOMAIN_CONTAINER Container = {0, NULL};
+ NET_API_STATUS status;
+
+ TRACE("I_BrowserQueryEmulatedDomains(%s %p %p)\n",
debugstr_w(ServerName), EmulatedDomains, EntriesRead);
- return ERROR_NOT_SUPPORTED;
+ *EmulatedDomains = NULL;
+ *EntriesRead = 0;
+
+ RpcTryExcept
+ {
+ status = I_BrowserrQueryEmulatedDomains(ServerName,
+ &Container);
+
+ if (status == NERR_Success)
+ {
+ *EmulatedDomains = (PBROWSER_EMULATED_DOMAIN)Container.Buffer;
+ *EntriesRead = Container.EntriesRead;
+ }
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+}
+
+
+NET_API_STATUS
+WINAPI
+I_BrowserResetStatistics(
+ _In_opt_ LPCWSTR ServerName)
+{
+ NET_API_STATUS status;
+
+ TRACE("I_BrowserResetStatistics(%s)\n",
+ debugstr_w(ServerName));
+
+ RpcTryExcept
+ {
+ status = I_BrowserrResetStatistics((PWSTR)ServerName);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
}
@@ -96,11 +143,26 @@
_In_ LPWSTR EmulatedServerName,
_In_ DWORD Role)
{
- FIXME("I_BrowserSetNetlogonState(%s %s %s %lu)\n",
+ NET_API_STATUS status;
+
+ TRACE("I_BrowserSetNetlogonState(%s %s %s %lu)\n",
debugstr_w(ServerName), debugstr_w(ServerName),
debugstr_w(EmulatedServerName), Role);
- return ERROR_NOT_SUPPORTED;
+ RpcTryExcept
+ {
+ status = I_BrowserrSetNetlogonState(ServerName,
+ DomainName,
+ EmulatedServerName,
+ Role);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
}
Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] Mon Jun 19 14:06:04 2017
@@ -44,7 +44,7 @@
@ stub I_BrowserQueryOtherDomains
@ stub I_BrowserQueryStatistics
@ stub I_BrowserResetNetlogonState
-@ stub I_BrowserResetStatistics
+@ stdcall I_BrowserResetStatistics(wstr)
@ stub I_BrowserServerEnum
@ stdcall I_BrowserSetNetlogonState(wstr wstr wstr long)
@ stub I_NetAccountDeltas
Modified: trunk/reactos/sdk/include/reactos/idl/browser.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/idl/br…
==============================================================================
--- trunk/reactos/sdk/include/reactos/idl/browser.idl [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/reactos/idl/browser.idl [iso-8859-1] Mon Jun 19 14:06:04
2017
@@ -5,6 +5,21 @@
#include <ms-dtyp.idl>
typedef [handle] wchar_t *BROWSER_IDENTIFY_HANDLE;
+
+cpp_quote("#ifndef _LMBROWSR_")
+typedef struct _BROWSER_EMULATED_DOMAIN
+{
+ LPWSTR DomainName;
+ LPWSTR EmulatedServerName;
+ DWORD Role;
+} BROWSER_EMULATED_DOMAIN, *PBROWSER_EMULATED_DOMAIN;
+cpp_quote("#endif")
+
+typedef struct _BROWSER_EMULATED_DOMAIN_CONTAINER
+{
+ DWORD EntriesRead;
+ [size_is(EntriesRead)] PBROWSER_EMULATED_DOMAIN Buffer;
+} BROWSER_EMULATED_DOMAIN_CONTAINER, *PBROWSER_EMULATED_DOMAIN_CONTAINER;
typedef struct _SERVER_INFO_100
{
@@ -76,10 +91,11 @@
__stdcall
BrowserOpnum5NotUsedOnWire(void);
- /* Function 6 (BrowserrResetStatistics) */
+ /* Function 6 */
NET_API_STATUS
__stdcall
- BrowserOpnum6NotUsedOnWire(void);
+ I_BrowserrResetStatistics(
+ [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName);
/* Function 7 (NetrBrowserStatisticsClear) */
NET_API_STATUS
@@ -91,15 +107,21 @@
__stdcall
BrowserOpnum8NotUsedOnWire(void);
- /* Function 9 (BrowserrSetNetlogonState) */
+ /* Function 9 */
NET_API_STATUS
__stdcall
- BrowserOpnum9NotUsedOnWire(void);
+ I_BrowserrSetNetlogonState(
+ [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
+ [in, string] LPWSTR DomainName,
+ [in, string, unique] LPWSTR EmulatedComputerName,
+ [in] DWORD Role);
- /* Function 10 (BrowserrQueryEmulatedDomains) */
+ /* Function 10 */
NET_API_STATUS
__stdcall
- BrowserOpnum10NotUsedOnWire(void);
+ I_BrowserrQueryEmulatedDomains(
+ [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
+ [in, out] PBROWSER_EMULATED_DOMAIN_CONTAINER EmulatedDomains);
/* Function 11 (BrowserrServerEnumEx) */
NET_API_STATUS