3.3.4.4 RasRpcGetSystemDirectory (Opnum 11)

The RasRpcGetSystemDirectory method retrieves the path of the system directory.

 UINT RasRpcGetSystemDirectory(
   [in] handle_t h,
   [in, out, string, size_is(uSize)] 
     LPWSTR lpBuffer,
   [in, range(0, RASRPC_MAX_PATH)] UINT uSize
 );

h: An RPC binding handle as specified in [C706] section 2.

lpBuffer: A null-terminated Unicode string that is populated with the path of the system directory. The length of the string MUST be equal to uSize.

uSize: Specifies the size of the lpBuffer in Unicode characters. This value MUST be equal to 260.

Return Values: Specifies the return status as explained in section 2.2.1.2.218 for retcode field.

The return value can be one of the following error codes. All other error values MUST be treated the same by the RRASM client.

Return value

Description

0x00000000

The actual processing to retrieve the system directory on the remote server has failed.

Any other values

Indicate the length of the string in Unicode characters copied to the buffer.

Exceptions Thrown: This method throws an exception with the exception code RPC_S_ACCESS_DENIED (0x00000005) if the client is not an administrator on the RRASM server, with access permission to perform the operation.<336>

The Opnum field value for this method is 11.

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

  • Validate as specified in section 3.3.4 whether this method was called by a client that is an administrator of the RRASM server.<337>

  • If uSize is less than 260, return an error other than one of the errors specified in the preceding table.

  • Call the abstract interface Invoke RASRPC method specifying the operation and the parameters to enable RRAS server to perform the required management task.

  • If all validations are successful, return the processing information result for the RRAS server and populate the lpBuffer with the system directory path returned by the RRAS server. Return the length of the string in Unicode characters populated to the lpBuffer.