mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[NETAPI32]
Implement I_BrowserrDebugTrace and I_BrowserServerEnum. This functions calls their counterpart in the computer browser service. svn path=/trunk/; revision=75196
This commit is contained in:
parent
81eba8d3e7
commit
31f03442d0
3 changed files with 99 additions and 7 deletions
|
@ -75,6 +75,32 @@ BROWSER_IDENTIFY_HANDLE_unbind(BROWSER_IDENTIFY_HANDLE pszSystemName,
|
|||
}
|
||||
|
||||
|
||||
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(
|
||||
|
@ -152,6 +178,61 @@ I_BrowserQueryOtherDomains(
|
|||
}
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
*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_BrowserQueryStatistics(
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -138,10 +138,19 @@ typedef struct _BROWSER_STATISTICS_STRUCT
|
|||
]
|
||||
interface browser
|
||||
{
|
||||
/* Function 0 (BrowserrServerEnum) */
|
||||
/* Function 0 */
|
||||
NET_API_STATUS
|
||||
__stdcall
|
||||
BrowserOpnum0NotUsedOnWire(void);
|
||||
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 @@ interface browser
|
|||
__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 @@ interface browser
|
|||
I_BrowserrResetNetlogonState(
|
||||
[in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName);
|
||||
|
||||
/* Function 4 (BrowserrDebugTrace) */
|
||||
/* Function 4 */
|
||||
NET_API_STATUS
|
||||
__stdcall
|
||||
BrowserOpnum4NotUsedOnWire(void);
|
||||
I_BrowserrDebugTrace(
|
||||
[in, string, unique] BROWSER_IDENTIFY_HANDLE ServerName,
|
||||
[in, string] LPSTR String);
|
||||
|
||||
/* Function 5 */
|
||||
NET_API_STATUS
|
||||
|
|
Loading…
Reference in a new issue