Author: ekohl
Date: Sat Jun 24 21:47:27 2017
New Revision: 75187
URL:
http://svn.reactos.org/svn/reactos?rev=75187&view=rev
Log:
[NETAPI32]
Implement NetBrowserStatisticsGet().
Modified:
trunk/reactos/dll/win32/netapi32/browser.c
trunk/reactos/dll/win32/netapi32/netapi32.spec
trunk/reactos/sdk/include/psdk/lmbrowsr.h
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] Sat Jun 24 21:47:27 2017
@@ -246,6 +246,69 @@
DomainName,
EmulatedServerName,
Role);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+}
+
+
+NET_API_STATUS
+WINAPI
+NetBrowserStatisticsGet(
+ _In_ LPWSTR ServerName,
+ _In_ DWORD Level,
+ _Out_ LPBYTE *Buffer)
+{
+ BROWSER_STATISTICS_STRUCT StatisticsStruct;
+ BROWSER_STATISTICS_100_CONTAINER Level100Container = {0, NULL};
+ BROWSER_STATISTICS_101_CONTAINER Level101Container = {0, NULL};
+ NET_API_STATUS status;
+
+ TRACE("NetBrowserStatisticsGet(%s %lu %p)\n",
+ debugstr_w(ServerName), Level, Buffer);
+
+ if (Level != 100 && Level != 101)
+ return ERROR_INVALID_LEVEL;
+
+ StatisticsStruct.Level = Level;
+ switch (Level)
+ {
+ case 100:
+ StatisticsStruct.Statistics.Level100 = &Level100Container;
+ break;
+
+ case 101:
+ StatisticsStruct.Statistics.Level101 = &Level101Container;
+ break;
+ }
+
+ RpcTryExcept
+ {
+ status = NetrBrowserStatisticsGet(ServerName,
+ Level,
+ &StatisticsStruct);
+
+ switch (Level)
+ {
+ case 100:
+ if (StatisticsStruct.Statistics.Level100->Buffer != NULL)
+ {
+ *Buffer = (LPBYTE)StatisticsStruct.Statistics.Level100->Buffer;
+ }
+ break;
+
+ case 101:
+ if (StatisticsStruct.Statistics.Level101->Buffer != NULL)
+ {
+ *Buffer = (LPBYTE)StatisticsStruct.Statistics.Level101->Buffer;
+ }
+ break;
+ }
}
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
{
@@ -270,11 +333,22 @@
_In_opt_ LMCSTR domain,
_Inout_opt_ LPDWORD resume_handle)
{
- FIXME("NetServerEnum(%s %lu %p %lu %p %p %lu %s %p)\n",
+ TRACE("NetServerEnum(%s %lu %p %lu %p %p %lu %s %p)\n",
debugstr_w(servername), level, bufptr, prefmaxlen, entriesread,
totalentries, servertype, debugstr_w(domain), resume_handle);
- return ERROR_NO_BROWSER_SERVERS_FOUND;
+ if (resume_handle != NULL)
+ *resume_handle = 0;
+
+ return NetServerEnumEx(servername,
+ level,
+ bufptr,
+ prefmaxlen,
+ entriesread,
+ totalentries,
+ servertype,
+ domain,
+ NULL);
}
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] Sat Jun 24 21:47:27 2017
@@ -109,7 +109,7 @@
@ stdcall NetAuditClear(wstr wstr wstr)
@ stdcall NetAuditRead(wstr wstr ptr long ptr long long ptr long ptr ptr)
@ stdcall NetAuditWrite(long ptr long wstr ptr)
-@ stub NetBrowserStatisticsGet
+@ stdcall NetBrowserStatisticsGet(wstr long ptr)
@ stdcall NetConfigGet(wstr wstr wstr ptr)
@ stdcall NetConfigGetAll(wstr wstr ptr)
@ stdcall NetConfigSet(wstr wstr wstr long long ptr long)
Modified: trunk/reactos/sdk/include/psdk/lmbrowsr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/lmbrowsr.…
==============================================================================
--- trunk/reactos/sdk/include/psdk/lmbrowsr.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/psdk/lmbrowsr.h [iso-8859-1] Sat Jun 24 21:47:27 2017
@@ -72,6 +72,7 @@
NET_API_STATUS WINAPI I_BrowserQueryStatistics(LPCWSTR,LPBROWSER_STATISTICS*);
NET_API_STATUS WINAPI I_BrowserResetStatistics(LPCWSTR);
NET_API_STATUS WINAPI I_BrowserDebugTrace(PWCHAR,PCHAR);
+NET_API_STATUS WINAPI NetBrowserStatisticsGet(PWSTR,DWORD,PBYTE*);
#ifdef __cplusplus
}
#endif
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] Sat Jun 24 21:47:27
2017
@@ -122,7 +122,7 @@
[case(101)] PBROWSER_STATISTICS_101_CONTAINER Level101;
[default] ;
} Statistics;
-}BROWSER_STATISTICS_STRUCT, *PBROWSER_STATISTICS_STRUCT, *LPBROWSER_STATISTICS_STRUCT;
+} BROWSER_STATISTICS_STRUCT, *PBROWSER_STATISTICS_STRUCT, *LPBROWSER_STATISTICS_STRUCT;
[
uuid(6BFFD098-A112-3610-9833-012892020162),
@@ -188,7 +188,7 @@
/* Function 8 */
NET_API_STATUS
__stdcall
- I_BrowserrStatisticsGet(
+ NetrBrowserStatisticsGet(
[in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
[in] DWORD Level,
[in, out] LPBROWSER_STATISTICS_STRUCT StatisticsStruct);