The R_IISDisconnectUser method is called by the client. In response, the server disconnects the specified user from the specified Internet protocol server.
DWORD R_IISDisconnectUser( [in, string, unique] INET_INFO_IMPERSONATE_HANDLE pszServer, [in] DWORD dwServiceId, [in] DWORD dwInstance, [in] DWORD dwIdUser );
pszServer: The custom binding handle for the target system, as specified in section 2.1.1. The value MUST NOT be used by the server implementation.
dwServiceId: The identifier for the specified Internet protocol server, as specified in section 2.2.2.
dwInstance: The ID of the Internet protocol server instance whose user is being disconnected.
dwIdUser: The identifier of the user to disconnect, as found in the idUser field of the IIS_USER_INFO_1 structure returned by the R_IISEnumerateUsers method. A value of 0 for this parameter indicates that the server implementation MUST attempt to disconnect all users from this Internet protocol server instance.
Return Values: The method returns 0 (ERROR_SUCCESS) to indicate success; otherwise, it returns a nonzero error code, as specified in [MS-ERREF] section 2.2 or[MS-ERREF] section 2.3.1. The most common error codes are listed in the following table.
|
Return value/code |
Description |
|---|---|
|
0x00000002 ERROR_FILE_NOT_FOUND |
The system cannot find the specified file. |
|
0x00000005 ERROR_ACCESS_DENIED |
Access is denied. |
|
0x00000426 ERROR_SERVICE_NOT_ACTIVE |
The service is not running. |
|
0x000008AD NERR_UserNotFound |
The user name could not be found. |
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol, as specified in [MS-RPCE].
In response to this request from the client, the server MAY disconnect a specific user if the dwIdUser value specifies that user and SHOULD attempt to disconnect all users if dwIdUser is 0.<16>