mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[NETAPI32]
Implement NetBrowserStatisticsGet(). svn path=/trunk/; revision=75187
This commit is contained in:
parent
6317bb3ec2
commit
debf556003
4 changed files with 80 additions and 5 deletions
|
@ -257,6 +257,69 @@ I_BrowserSetNetlogonState(
|
|||
}
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
status = I_RpcMapWin32Status(RpcExceptionCode());
|
||||
}
|
||||
RpcEndExcept;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
NET_API_STATUS
|
||||
WINAPI
|
||||
NetServerEnum(
|
||||
|
@ -270,11 +333,22 @@ NetServerEnum(
|
|||
_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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -72,6 +72,7 @@ NET_API_STATUS WINAPI I_BrowserSetNetlogonState(LPWSTR,LPWSTR,LPWSTR,DWORD);
|
|||
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
|
||||
|
|
|
@ -122,7 +122,7 @@ typedef struct _BROWSER_STATISTICS_STRUCT
|
|||
[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 @@ interface browser
|
|||
/* 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);
|
||||
|
|
Loading…
Reference in a new issue