mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[NETAPI32]
- Implement NetServerDiskEnum, NetServerGetInfo and NetServerSetInfo. These functions call their counterparts in the server service. - The new NetServerGetInfo function is disabled because its server side (NetrServerGetInfo) must be implemented before we can replace the Wine implemenation without loss of functionality. svn path=/trunk/; revision=74948
This commit is contained in:
parent
2252393eeb
commit
312c89f38e
3 changed files with 121 additions and 19 deletions
|
@ -84,24 +84,6 @@ NET_API_STATUS WINAPI NetServerEnumEx(
|
|||
return ERROR_NO_BROWSER_SERVERS_FOUND;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* NetServerDiskEnum (NETAPI32.@)
|
||||
*/
|
||||
NET_API_STATUS WINAPI NetServerDiskEnum(
|
||||
LMSTR ServerName,
|
||||
DWORD Level,
|
||||
LPBYTE *Bufptr,
|
||||
DWORD PrefMaxlen,
|
||||
LPDWORD EntriesRead,
|
||||
LPDWORD totalentries,
|
||||
LPDWORD Resume_Handle)
|
||||
{
|
||||
FIXME("Stub (%s %d %p %d %p %p %p)\n", debugstr_w(ServerName),
|
||||
Level, Bufptr, PrefMaxlen, EntriesRead, totalentries, Resume_Handle);
|
||||
|
||||
return ERROR_NO_BROWSER_SERVERS_FOUND;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* NetServerGetInfo (NETAPI32.@)
|
||||
*/
|
||||
|
|
|
@ -211,7 +211,7 @@
|
|||
@ stdcall NetServerEnum(wstr long ptr long ptr ptr long wstr ptr)
|
||||
@ stdcall NetServerEnumEx(wstr long ptr long ptr ptr long wstr wstr)
|
||||
@ stdcall NetServerGetInfo(wstr long ptr)
|
||||
@ stub NetServerSetInfo
|
||||
@ stdcall NetServerSetInfo(wstr long ptr ptr)
|
||||
@ stub NetServerTransportAdd
|
||||
@ stub NetServerTransportAddEx
|
||||
@ stub NetServerTransportDel
|
||||
|
|
|
@ -232,6 +232,126 @@ NetRemoteTOD(
|
|||
}
|
||||
|
||||
|
||||
NET_API_STATUS
|
||||
WINAPI
|
||||
NetServerDiskEnum(
|
||||
_In_ LMSTR servername,
|
||||
_In_ DWORD level,
|
||||
_Out_ LPBYTE *bufptr,
|
||||
_In_ DWORD prefmaxlen,
|
||||
_Out_ LPDWORD entriesread,
|
||||
_Out_ LPDWORD totalentries,
|
||||
_Inout_ LPDWORD resume_handle)
|
||||
{
|
||||
DISK_ENUM_CONTAINER EnumContainer;
|
||||
NET_API_STATUS status;
|
||||
|
||||
TRACE("NetServerDiskEnum(%s %lu %p %lu %p %p %p)\n",
|
||||
debugstr_w(servername), level, bufptr, prefmaxlen,
|
||||
entriesread, totalentries, resume_handle);
|
||||
|
||||
EnumContainer.EntriesRead = 0;
|
||||
EnumContainer.Buffer = NULL;
|
||||
|
||||
RpcTryExcept
|
||||
{
|
||||
status = NetrServerDiskEnum(servername,
|
||||
level,
|
||||
&EnumContainer,
|
||||
prefmaxlen,
|
||||
totalentries,
|
||||
resume_handle);
|
||||
|
||||
if (EnumContainer.Buffer != NULL)
|
||||
{
|
||||
*bufptr = (LPBYTE)EnumContainer.Buffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
*bufptr = NULL;
|
||||
}
|
||||
|
||||
if (EnumContainer.EntriesRead > 0)
|
||||
{
|
||||
*entriesread = EnumContainer.EntriesRead - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
*entriesread = 0;
|
||||
}
|
||||
}
|
||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
status = I_RpcMapWin32Status(RpcExceptionCode());
|
||||
}
|
||||
RpcEndExcept;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
NET_API_STATUS
|
||||
WINAPI
|
||||
NetServerGetInfo(
|
||||
LMSTR servername,
|
||||
DWORD level,
|
||||
LPBYTE *bufptr)
|
||||
{
|
||||
NET_API_STATUS status;
|
||||
|
||||
TRACE("NetServerGetInfo(%s %lu %p)\n",
|
||||
debugstr_w(servername), level, bufptr);
|
||||
|
||||
*bufptr = NULL;
|
||||
|
||||
RpcTryExcept
|
||||
{
|
||||
status = NetrServerGetInfo(servername,
|
||||
level,
|
||||
(LPSERVER_INFO)bufptr);
|
||||
}
|
||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
status = I_RpcMapWin32Status(RpcExceptionCode());
|
||||
}
|
||||
RpcEndExcept;
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
NET_API_STATUS
|
||||
WINAPI
|
||||
NetServerSetInfo(
|
||||
_In_ LPWSTR servername,
|
||||
_In_ DWORD level,
|
||||
_In_ LPBYTE buf,
|
||||
_Out_ LPDWORD parm_err)
|
||||
{
|
||||
NET_API_STATUS status;
|
||||
|
||||
TRACE("NetServerSetInfo(%s %lu %p %p)\n",
|
||||
debugstr_w(servername), level, buf, parm_err);
|
||||
|
||||
RpcTryExcept
|
||||
{
|
||||
status = NetrServerSetInfo(servername,
|
||||
level,
|
||||
(LPSERVER_INFO)&buf,
|
||||
parm_err);
|
||||
}
|
||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
status = I_RpcMapWin32Status(RpcExceptionCode());
|
||||
}
|
||||
RpcEndExcept;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
NET_API_STATUS
|
||||
WINAPI
|
||||
NetSessionDel(
|
||||
|
|
Loading…
Reference in a new issue