3.1.4.9 RRasAdminPortDisconnect (Opnum 8)
The RRasAdminPortDisconnect method initiates the disconnect of the connection on a specified port. The port SHOULD have been associated with a connection. For the disconnection to be successful, the connection SHOULD have been in the connected state. The connection is the established dial-up or VPN connection that has the RRAS server as its endpoint.
-
DWORD RRasAdminPortDisconnect( [in] DIM_HANDLE hDimServer, [in] DWORD hPort );
hDimServer: A handle to the RRASM server where the call is executed, see section 3.1.3.
hPort: This is of type DWORD and MUST be set to the port identifier of the port that is to be disconnected. Obtain this handle by calling RRasAdminPortEnum (section 3.1.4.5). Since RRASM server does not maintain port handle information, the validation of this handle SHOULD be done by the RRAS server implementation.
Return Values: A 32-bit, unsigned integer value that indicates return status. A return value of ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully; otherwise, it contains an error code, as specified in [MS-ERREF] or in section 2.2.4. All values that are not in the table that follows MUST be treated the same by the RRASM client.
-
Return value/code
Description
ERROR_SUCCESS
0x00000000
The call was successful.
ERROR_ACCESS_DENIED
0x00000005
The calling application does not have sufficient privileges.
The opnum field value for this method is 8.
When processing this call, the RRASM server MUST do the following:
Validate, as specified in section 2.1.1.1, whether this method was called by a client that has access to the method. If the client does not have access, then return error ERROR_ACCESS_DENIED (0x00000005).
If RouterType is ROUTER_TYPE_LAN, return an error other than those in the preceding table.
Use the RRasAdminPortEnum method to ensure that hPort is a valid port handle of an active connection. If it is not, return an error other than those in the preceding table.
Call the abstract interface Invoke DIMSVC method specifying the operation and the parameters to enable RRAS server to perform the required management task.
Return any error that the RRAS server returns as a part of processing this request. Otherwise return ERROR_SUCCESS (0x00000000).
No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].