3.2.5.3.6 SAGetNSAccountInformation (Opnum 2)

The SAGetNSAccountInformation method MUST return the ATSvc account name.

 HRESULT SAGetNSAccountInformation(
   [in, string, unique] SASEC_HANDLE Handle,
   [in, range(0,MAX_BUFFER_SIZE)] DWORD ccBufferSize,
   [in, out, size_is(ccBufferSize)] 
     wchar_t wszBuffer[]
 );

Handle: Pointer to a Unicode string that MUST specify the server. The client MUST map this string to an RPC Binding handle. The server MUST ignore this parameter. For more details, see [C706] sections 4.3.5 and 5.1.5.2.

ccBufferSize: MUST contain the number of characters in the array supplied by the client and filled by the server. This value MUST be the size of the wszBuffer parameter. MAX_BUFFER_SIZE is equal to 273. For more information on MAX_BUFFER_SIZE, see the SaSec interface IDL (section 6.2).

wszBuffer: Upon input, MUST be an empty array of size equal to the ccBufferSize parameter. The client SHOULD initialize the array to contain zeroes. Upon return, the array MUST contain the ATSvc account name.

Return Values: For more information about return codes, see section 2.3.14, or Win32 Error Codes in [MS-ERREF] section 2.

Upon receipt of the SAGetNSAccountInformation call, the server MUST:

  • Return E_INVALIDARG if the wszBuffer parameter is NULL.

    Note When passing NULL as a value for this parameter, behavior can change based upon the RPC Runtime Check. See RPC Runtime Check Notes (section 3.3).

  • Return E_ACCESSDENIED if the caller does not have administrative privileges on the server.

  • If the ATSvc account name is "LocalSystem", set wszBuffer to be the empty string and return S_FALSE.

  • Return the value 0x0000007A, which is the HRESULT form of the Win32 error ERROR_INSUFFICIENT_BUFFER, if the ATSvc account name (including the terminating zero character) is larger than ccBufferSize.

  • Copy the null-terminated ATSvc account name to wszBuffer and return S_OK.

If any errors are raised during the processing, they are returned. For more information about return codes, see section 2.3.14 and Win32 Error Codes in [MS-ERREF] section 2.1.