3.1.4.50 RRouterInterfaceSetCredentialsLocal (Opnum 49)

The RRouterInterfaceSetCredentialsLocal method<326> is used to set credentials information for an interface. Specifically, the username, domain name, and password that are used in user authentication are set using this method. 

 DWORD RRouterInterfaceSetCredentialsLocal(
   [in] DIM_HANDLE hDimServer,
   [in, string] LPWSTR lpwsInterfaceName,
   [in, string] LPWSTR lpwsUserName,
   [in, string] LPWSTR lpwsDomainName,
   [in, 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.

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, otherwise an error is returned.

lpwsDomainName: A pointer to a null-terminated Unicode string that contains the domain name. The string length MUST NOT be more than 16 characters, otherwise an error is returned.

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, otherwise an error is returned.

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

0x00000000

ERROR_SUCCESS

The call was successful.

0x00000005

ERROR_ACCESS_DENIED

The calling application does not have sufficient privileges.

The opnum field value for this method is 49.

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 exist on the server, return an error other than those described 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].