Platform SDK: Network Management

NetRemoteComputerSupports

The NetRemoteComputerSupports function queries the redirector to retrieve the optional features the remote system supports. Features include Unicode, Remote Procedure Call (RPC), and Remote Administration Protocol support. The function establishes a network connection if one does not exist.

Security Requirements

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

NET_API_STATUS NetRemoteComputerSupports(
  LPCWSTR UncServerName, 
  DWORD OptionsWanted, 
  LPDWORD OptionsSupported 
);

Parameters

UncServerName
[in] Pointer to a constant null-terminated Unicode character string that specifies the name of the remote server to query. The string must begin with \\. If this parameter is NULL, the local computer is used.
OptionsWanted
[in] Specifies a DWORD value that contains a set of bit flags indicating the features of interest. This parameter must be at least one of the following values.
Value Meaning
SUPPORTS_REMOTE_ADMIN_PROTOCOL Requests Remote Administration Protocol support.
SUPPORTS_RPC Requests RPC support.
SUPPORTS_SAM_PROTOCOL Requests Security Account Manager (SAM) support.
SUPPORTS_UNICODE Requests Unicode standard support.
SUPPORTS_LOCAL Requests support for the first three values listed in this table. If UNICODE is defined by the calling application, requests the four features listed previously.

OptionsSupported
[out] Pointer to a DWORD value that receives a set of bit flags. The flags indicate which features specified by the OptionsWanted parameter are implemented on the computer specified by the UncServerName parameter. (All other bits are set to zero.)

The value of this parameter is valid only when the NetRemoteComputerSupports function returns NERR_Success.

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_INVALID_PARAMETER Either the OptionsWanted parameter or the OptionsSupported parameter is NULL; both parameters are required.
ERROR_NOT_ENOUGH_MEMORY Insufficient memory is available.

Requirements

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

See Also

Network Management Overview, Network Management Functions, Remote Utility Functions, NetServerGetInfo