Group: Network Management - Library: netapi32
The NetWkstaUserEnum function lists information about all users currently logged on to the workstation. This list includes interactive, service and batch logons.
Retrieving information about all users currently logged on to the workstation (WinNT only)
NET_API_STATUS NetWkstaUserEnum(
LPWSTR servername,
DWORD level,
LPBYTE *bufptr,
DWORD prefmaxlen,
LPDWORD entriesread,
LPDWORD totalentries,
LPDWORD resumehandle
); DECLARE INTEGER NetWkstaUserEnum IN netapi32;
STRING servername,;
INTEGER level,;
INTEGER @ bufptr,;
INTEGER prefmaxlen,;
INTEGER @ entriesread,;
INTEGER @ totalentries,;
INTEGER @ resumehandle servername [in] Pointer to a Unicode string specifying the name of the remote server on which the function is to execute.
level [in] Specifies the information level of the data.
bufptr [out] Pointer to the buffer that receives the data.
prefmaxlen [in] Specifies the preferred maximum length of returned data, in bytes. If you specify MAX_PREFERRED_LENGTH (-1), the function allocates the amount of memory required for the data.
entriesread [out] Pointer to a DWORD value that receives the count of elements actually enumerated.
totalentries [out] Pointer to a DWORD value that receives the total number of entries that could have been enumerated from the current resume position.
resumehandle [in/out] Pointer to a DWORD value that contains a resume handle which is used to continue an existing search.
If the function succeeds, the return value is NERR_Success (0).
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Unsupported.
Home