Platform SDK: Network Management

NetGetDisplayInformationIndex

The NetGetDisplayInformationIndex function returns the index of the first display information entry whose name begins with a specified string or whose name alphabetically follows the string. You can use this function to determine a starting index for subsequent calls to the NetQueryDisplayInformation function.

Security Requirements

No special group membership is required to successfully execute the NetGetDisplayInformationIndex function.

NET_API_STATUS NetGetDisplayInformationIndex(
  LPCWSTR ServerName,  
  DWORD Level,         
  LPCWSTR Prefix,      
  LPDWORD Index        
);

Parameters

ServerName
[in] Pointer to a constant null-terminated Unicode string specifying the name of the remote server on which the function is to execute. The string must begin with \\. If this parameter is NULL, the local computer is used.
Level
[in] Specifies the level of accounts to query. This parameter can be one of the following values.
Value Meaning
1 Query all local and global (normal) user accounts.
2 Query all workstation and server user accounts.
3 Query all global groups.

Prefix
[in] Pointer to a constant null-terminated Unicode string specifying the prefix for which to search.
Index
[out] Pointer to a DWORD value that receives the index of the requested entry.

Return Values

If the function succeeds, the return value is NERR_Success.

If the function fails, the return value can be one of the following error codes.

Value Meaning
ERROR_ACCESS_DENIED The user does not have access to the requested information.
ERROR_INVALID_LEVEL The value specified for the Level parameter is invalid.
ERROR_NO_MORE_ITEMS There were no more items on which to operate.
NERR_InvalidComputer The computer name is invalid.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Unsupported.
  Header: Declared in Lmaccess.h; include Lm.h.
  Library: Use Netapi32.lib.

See Also

Network Management Overview, Network Management Functions, Get Functions, NetQueryDisplayInformation