The RRasAdminPortGetInfo method retrieves the port information for a particular port given in hPort for a specified RRAS server using the handle hDimServer. The dwLevel defines the type of information requested. The caller MUST pass a pointer to a valid DIM_INFORMATION_CONTAINER (section 2.2.1.2.1), where DIM_INFORMATION_CONTAINER.dwBufferSize is initialized to zero (0). The caller SHOULD free the memory pointed to by pInfoStruct

 DWORD RRasAdminPortGetInfo(
   [in] DIM_HANDLE hDimServer,
   [in] DWORD dwLevel,
   [in] DWORD hPort,
   [out] PDIM_INFORMATION_CONTAINER pInfoStruct
 );

hDimServer: A handle to the RRASM server where the call is executed, see section 3.1.3.

dwLevel: This is of type DWORD and MUST be set to any of the following values.

Value

Meaning

0

After the function returns, the memory pointed to by pInfoStruct->pBuffer is typecast to RASI_PORT_0 (section 2.2.1.2.75). The size of the array is determined by lpdwEntriesRead

1

After the function returns, the memory pointed to by pInfoStruct->pBuffer is typecast to RASI_ PORT_1 (section 2.2.1.2.76). The size of the array is determined by lpdwEntriesRead

hPort: This is of type DWORD and MUST be set to the particular port identifier for which the port information is required. Obtain this handle by calling RRasAdminPortEnum (section 3.1.4.5). Since RRASM server does not maintain any port handle information, the validation of this handle SHOULD be done by the RRAS server implementation. 

pInfoStruct: This is a pointer of type DIM_INFORMATION_CONTAINER, and DIM_INFORMATION_CONTAINER.dwBufferSize is initialized to zero (0). Upon successful return, the pInfoStruct->pBuffer is typecast to an array of the RASI_PORT_0 or RASI_ PORT_1 structures, based on the dwLevel value.

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, the value contains an error code, as specified in [MS-ERREF] or section 2.2.4. All values that are not listed 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.

The opnum field value for this method is 5.

When processing this call, the RRASM server MUST do the following:

No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].