Author: ekohl
Date: Sun Jun 25 12:14:35 2017
New Revision: 75196
URL:
http://svn.reactos.org/svn/reactos?rev=75196&view=rev
Log:
[NETAPI32]
Implement I_BrowserrDebugTrace and I_BrowserServerEnum. 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] Sun Jun 25 12:14:35 2017
@@ -77,6 +77,32 @@
NET_API_STATUS
WINAPI
+I_BrowserDebugTrace(
+ _In_opt_ LPWSTR ServerName,
+ _In_ PCHAR Buffer)
+{
+ NET_API_STATUS status;
+
+ TRACE("I_BrowserDebugTrace(%s %s)\n",
+ debugstr_w(ServerName), Buffer);
+
+ RpcTryExcept
+ {
+ status = I_BrowserrDebugTrace(ServerName,
+ Buffer);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+}
+
+
+NET_API_STATUS
+WINAPI
I_BrowserQueryEmulatedDomains(
_In_opt_ LPWSTR ServerName,
_Out_ PBROWSER_EMULATED_DOMAIN *EmulatedDomains,
@@ -135,6 +161,61 @@
status = I_BrowserrQueryOtherDomains((PWSTR)ServerName,
&EnumStruct,
TotalEntries);
+
+ if (status == NERR_Success || status == ERROR_MORE_DATA)
+ {
+ *BufPtr = (LPBYTE)EnumStruct.ServerInfo.Level100->Buffer;
+ *EntriesRead = EnumStruct.ServerInfo.Level100->EntriesRead;
+ }
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+}
+
+
+NET_API_STATUS
+WINAPI
+I_BrowserServerEnum(
+ _In_opt_ LPCWSTR ServerName,
+ _In_opt_ LPCWSTR Transport,
+ _In_opt_ LPCWSTR ClientName,
+ _In_ DWORD Level,
+ _Out_ LPBYTE *BufPtr,
+ _In_ DWORD PrefMaxLen,
+ _Out_ LPDWORD EntriesRead,
+ _Out_ LPDWORD TotalEntries,
+ _In_ DWORD ServerType,
+ _In_opt_ LPCWSTR Domain,
+ _Inout_opt_ LPDWORD ResumeHandle)
+{
+ SERVER_INFO_100_CONTAINER Level100Container = {0, NULL};
+ SERVER_ENUM_STRUCT EnumStruct;
+ NET_API_STATUS status;
+
+ TRACE("I_BrowserServerEnum(%s %s %s %lu %p %lu %p %p %lu %s %p)\n",
+ debugstr_w(ServerName), debugstr_w(Transport), debugstr_w(ClientName),
+ Level, BufPtr, PrefMaxLen, EntriesRead, TotalEntries, ServerType,
+ debugstr_w(Domain), ResumeHandle);
+
+ EnumStruct.Level = 100;
+ EnumStruct.ServerInfo.Level100 = &Level100Container;
+
+ RpcTryExcept
+ {
+ status = I_BrowserrServerEnum((PWSTR)ServerName,
+ (PWSTR)Transport,
+ (PWSTR)ClientName,
+ &EnumStruct,
+ PrefMaxLen,
+ TotalEntries,
+ ServerType,
+ (PWSTR)Domain,
+ ResumeHandle);
if (status == NERR_Success || status == ERROR_MORE_DATA)
{
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] Sun Jun 25 12:14:35 2017
@@ -39,13 +39,13 @@
@ stub DsValidateSubnetNameA
@ stub DsValidateSubnetNameW
@ stub I_BrowserDebugCall
-@ stub I_BrowserDebugTrace
+@ stdcall I_BrowserDebugTrace(wstr str)
@ stdcall I_BrowserQueryEmulatedDomains(wstr ptr ptr)
@ stdcall I_BrowserQueryOtherDomains(wstr ptr ptr ptr)
@ stdcall I_BrowserQueryStatistics(wstr ptr)
@ stdcall I_BrowserResetNetlogonState(wstr)
@ stdcall I_BrowserResetStatistics(wstr)
-@ stub I_BrowserServerEnum
+@ stdcall I_BrowserServerEnum(wstr wstr wstr long ptr long ptr ptr long wstr ptr)
@ stdcall I_BrowserSetNetlogonState(wstr wstr wstr long)
@ stub I_NetAccountDeltas
@ stub I_NetAccountSync
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] Sun Jun 25 12:14:35
2017
@@ -138,10 +138,19 @@
]
interface browser
{
- /* Function 0 (BrowserrServerEnum) */
- NET_API_STATUS
- __stdcall
- BrowserOpnum0NotUsedOnWire(void);
+ /* Function 0 */
+ NET_API_STATUS
+ __stdcall
+ I_BrowserrServerEnum(
+ [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
+ [in, string, unique] LPWSTR Transport,
+ [in, string, unique] LPWSTR ClientName,
+ [in, out] LPSERVER_ENUM_STRUCT EnumStruct,
+ [in] DWORD PreferedMaximumLength,
+ [out] LPDWORD TotalEntries,
+ [in] DWORD ServerType,
+ [in, string, unique] LPWSTR Domain,
+ [in, out, unique] LPDWORD ResumeHandle);
/* Function 1 (BrowserrDebugCall) */
NET_API_STATUS
@@ -153,7 +162,7 @@
__stdcall
I_BrowserrQueryOtherDomains(
[in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
- [in, out] LPSERVER_ENUM_STRUCT InfoStruct,
+ [in, out] LPSERVER_ENUM_STRUCT EnumStruct,
[out] LPDWORD TotalEntries);
/* Function 3 */
@@ -162,10 +171,12 @@
I_BrowserrResetNetlogonState(
[in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName);
- /* Function 4 (BrowserrDebugTrace) */
- NET_API_STATUS
- __stdcall
- BrowserOpnum4NotUsedOnWire(void);
+ /* Function 4 */
+ NET_API_STATUS
+ __stdcall
+ I_BrowserrDebugTrace(
+ [in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
+ [in, string] LPSTR String);
/* Function 5 */
NET_API_STATUS