mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[NETAPI32]
Implement NetConnectionEnum(). This function calls its counterpart in the server service. svn path=/trunk/; revision=75111
This commit is contained in:
parent
6607c27063
commit
3138c9072b
2 changed files with 75 additions and 1 deletions
|
@ -113,7 +113,7 @@
|
|||
@ stdcall NetConfigGet(wstr wstr wstr ptr)
|
||||
@ stdcall NetConfigGetAll(wstr wstr ptr)
|
||||
@ stdcall NetConfigSet(wstr wstr wstr long long ptr long)
|
||||
@ stub NetConnectionEnum
|
||||
@ stdcall NetConnectionEnum(wstr wstr long ptr long ptr ptr ptr)
|
||||
@ stub NetDfsAdd
|
||||
@ stub NetDfsAddFtRoot
|
||||
@ stub NetDfsAddStdRoot
|
||||
|
|
|
@ -70,6 +70,80 @@ SRVSVC_HANDLE_unbind(SRVSVC_HANDLE pszSystemName,
|
|||
}
|
||||
|
||||
|
||||
NET_API_STATUS
|
||||
WINAPI
|
||||
NetConnectionEnum(
|
||||
_In_ LMSTR servername,
|
||||
_In_ LMSTR qualifier,
|
||||
_In_ DWORD level,
|
||||
_Out_ LPBYTE *bufptr,
|
||||
_In_ DWORD prefmaxlen,
|
||||
_Out_ LPDWORD entriesread,
|
||||
_Out_ LPDWORD totalentries,
|
||||
_Inout_ LPDWORD resume_handle)
|
||||
{
|
||||
CONNECT_ENUM_STRUCT EnumStruct;
|
||||
CONNECT_INFO_0_CONTAINER Level0Container = {0, NULL};
|
||||
CONNECT_INFO_1_CONTAINER Level1Container = {0, NULL};
|
||||
NET_API_STATUS status = 0;
|
||||
|
||||
TRACE("NetConnectionEnum(%s %s %s %lu %p %lu %p %p %p)\n",
|
||||
debugstr_w(servername), debugstr_w(qualifier), level, bufptr,
|
||||
prefmaxlen, entriesread, totalentries, resume_handle);
|
||||
|
||||
if (level > 1)
|
||||
return ERROR_INVALID_LEVEL;
|
||||
|
||||
EnumStruct.Level = level;
|
||||
switch (level)
|
||||
{
|
||||
case 0:
|
||||
EnumStruct.ConnectInfo.Level0 = &Level0Container;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
EnumStruct.ConnectInfo.Level1 = &Level1Container;
|
||||
break;
|
||||
}
|
||||
|
||||
RpcTryExcept
|
||||
{
|
||||
status = NetrConnectionEnum(servername,
|
||||
qualifier,
|
||||
&EnumStruct,
|
||||
prefmaxlen,
|
||||
totalentries,
|
||||
resume_handle);
|
||||
|
||||
switch (level)
|
||||
{
|
||||
case 0:
|
||||
if (EnumStruct.ConnectInfo.Level0->Buffer != NULL)
|
||||
{
|
||||
*bufptr = (LPBYTE)EnumStruct.ConnectInfo.Level0->Buffer;
|
||||
*entriesread = EnumStruct.ConnectInfo.Level0->EntriesRead;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (EnumStruct.ConnectInfo.Level1->Buffer != NULL)
|
||||
{
|
||||
*bufptr = (LPBYTE)EnumStruct.ConnectInfo.Level1->Buffer;
|
||||
*entriesread = EnumStruct.ConnectInfo.Level1->EntriesRead;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
status = I_RpcMapWin32Status(RpcExceptionCode());
|
||||
}
|
||||
RpcEndExcept;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
NET_API_STATUS
|
||||
WINAPI
|
||||
NetFileClose(
|
||||
|
|
Loading…
Reference in a new issue