3.1.4.22 RRouterInterfaceConnect (Opnum 21)
The RRouterInterfaceConnect method<281> establishes a connection for the specified interface hInterface if it is not already connected. The hDimServer handle specifies the RRASM server on which the call is to be executed.
-
DWORD RRouterInterfaceConnect( [in] DIM_HANDLE hDimServer, [in] DWORD hInterface, [in] ULONG_PTR hEvent, [in] DWORD fBlocking, [in] DWORD dwCallersProcessId );
hDimServer: A handle to the RRASM server where the call is to be executed, see section 3.1.3.
hInterface: The unique identifier of an interface. This can be obtained from RRouterInterfaceCreate or RRouterInterfaceGetHandle (section 3.1.4.12). Since the RRASM server does not maintain the interface handles, the RRAS server SHOULD check and ensure that this handle is a valid interface handle.
hEvent: The calling application MUST specify NULL for this.
fBlocking: If this parameter is set to 1, the function does not return until the connection attempt has completed.
-
If this parameter is set to 0, the function will return immediately. A return value of PENDING (0x00000258) indicates that the connection attempt was successfully initiated.
dwCallersProcessId: This is for internal use and SHOULD be ignored by the server.
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, as specified in section 2.1.1.1.
PENDING
0x00000258
An operation is pending.
The opnum field value for this method is 21. Whether the call returns immediately or is blocked is decided by fBlocking as previously described.
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.
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 status or PENDING status that the RRAS server returns as a part of its processing. The RRAS server MUST return PENDING if fBlocking is set to FALSE and the task of connecting the interface is not complete. Otherwise return ERROR_SUCCESS (0x00000000).
No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].