3.1.4.51 RRouterInterfaceGetCredentialsLocal (Opnum 50)
The RRouterInterfaceGetCredentialsLocal method<327> is used to get credentials information for an interface. Specifically, the username, domain name, and password used in user authentication are retrieved with this method.
-
DWORD RRouterInterfaceGetCredentialsLocal( [in] DIM_HANDLE hDimServer, [in, string] LPWSTR lpwsInterfaceName, [out] [string] LPWSTR *lpwsUserName, [out] [string] LPWSTR *lpwsDomainName, [out] [string] LPWSTR *lpwsPassword );
hDimServer: A handle to the RRASM server where the call is to be executed, see section 3.1.3.
lpwsInterfaceName: A pointer to a null-terminated Unicode string that contains the name of the interface for which credentials need to be set. The length of the string MUST NOT be more than 256 characters, otherwise an error is returned. The client SHOULD free this memory.
lpwsUserName: A pointer to a null-terminated Unicode string that contains the name of the user on this connection. The string length MUST NOT be more than 256 characters. The client SHOULD free the memory pointed to by lpwsUserName.
lpwsDomainName: A pointer to a null-terminated Unicode string that contains the domain name. The string length MUST NOT be more than 16 characters. The client SHOULD free the memory pointed to by lpwsDomainName.
lpwsPassword: A pointer to a null-terminated Unicode string that contains the password of the user on this connection. The string length MUST NOT be more than 256 characters. The client SHOULD free the memory pointed to by lpwsPassword.
Return Values: A 32-bit unsigned integer value that indicates return status. A return value of ERROR_SUCCESS (0x00000000) indicates 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 50.
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 an interface with the name lpwsInterfaceName does not exists on the server, return an error other than one of the errors listed 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 the RRAS server returns. Otherwise return ERROR_SUCCESS (0x00000000).
No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].