The NetServerDiskEnum API retrieves a list of disk drives on a workstation.
The drive names in the list are consecutive strings, each containing a drive letter, a colon (:), and a null string terminator (\0). For example, the following can be returned for a server having two diskette drives (A and B), one hard-disk drive (C), and one RAM drive (E):
A:\0B:\0C:\0E:\0
Restrictions
This API can be called from DLS and OS/2 workstations, but DLS workstations can issue this call only to a remote LAN Server workstation. Administrator authority or server operator privilege are required.
#include <netcons.h> #include <server.h> NetServerDiskEnum(pszServername, sLevel, buf, usBuflen, pusEntriesReturned, pusEntriesAvail); /* 16 bit */ Net32ServerDiskEnum(pszServername, ulLevel, buf, ulBuflen, pulEntriesReturned, pulEntriesAvail); /* 32 bit */Parameters
See Common Parameter Definitions for descriptions of parameters not defined here.
sLevel or ulLevel
The following table lists the return codes most significant to this API.
(See API Return Codes for a complete
list of return codes.) ЪДДДДДДДДДДДДДДДДДДДДДДДДДДДДДВДДДДДДДВДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДїіSYMBOLICCONSTANT
іVALUEіMEANING і
ГДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЕДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і NERR_Success і 0 і No errors were encountered. і
ГДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЕДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і ERROR_ACCESS_DENIED і 5 і Administrator privilege is required. і
ГДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЕДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і ERROR_BAD_NETPATH і 53 і The network path cannot be found. і
ГДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЕДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і ERROR_NETWORK_ACCESS_DENIED і 65 і Network access is denied. і
ГДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЕДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і ERROR_INVALID_LEVEL і 124 і The sLevel parameter is not valid. і
ГДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЕДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і ERROR_MORE_DATA і 234 і Additional data is available, but the і
і і і buffer is too small. і
ГДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЕДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і NERR_NetNotStarted і 2102 і The redirector NETWKSTA.200 has not
і
і і і been started. і
ГДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЕДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і NERR_RemoteErr і 2127 і A remote API error has occurred. і
ГДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЕДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і NERR_WkstaNotStarted і 2138 і The Requester service has not been
і
і і і started. і
ГДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЕДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і NERR_InternalError і 2140 і An internal error has occurred. і
ГДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЕДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і NERR_InvalidAPI і 2142 і The requested API is not supported on
і
і і і the remote server. і
ГДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЕДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і NERR_InvalidComputer і 2351 і The specified computer name is not
і
і і і valid. і
АДДДДДДДДДДДДДДДДДДДДДДДДДДДДДБДДДДДДДБДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЩ
If you call this API with the buffer length parameter equal to zero, the API returns a value for total entries available. This technique is useful if you do not know the exact buffer size required.
For information about: