<div class="content" name="SAGetNSAccountInformation" uuid="0968bf88-578f-4028-b47e-21ecce0d3284"><p>The SAGetNSAccountInformation method MUST return the <a href="4d44c426-fad2-4cc7-9677-bfcd235dca33" data-linktype="relative-path">ATSvc</a> account name.</p><dl>
<dd>
<div><pre> HRESULT SAGetNSAccountInformation(
   [in, string, unique] SASEC_HANDLE Handle,
   [in, range(0,MAX_BUFFER_SIZE)] DWORD ccBufferSize,
   [in, out, size_is(ccBufferSize)] 
     wchar_t wszBuffer[]
 );
</pre></div>
</dd></dl><p><b>Handle: </b>Pointer to a <a href="efc35aa8-1f40-4609-869a-107dd31bbed0#gt_b069acb4-e364-453e-ac83-42d469bb339e" data-linktype="relative-path">Unicode string</a> that MUST
specify the server. The client MUST map this string to an <a href="efc35aa8-1f40-4609-869a-107dd31bbed0#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> <a href="efc35aa8-1f40-4609-869a-107dd31bbed0#gt_44deb72d-c62b-4335-90e4-b9fd4dd782ed" data-linktype="relative-path">Binding handle</a>. The server
MUST ignore this parameter. For more details, see <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a> sections 4.3.5
and 5.1.5.2.</p><p><b>ccBufferSize: </b>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 <i>wszBuffer</i> parameter. MAX_BUFFER_SIZE is
equal to 273. For more information on MAX_BUFFER_SIZE, see the <a href="7849c5ca-a8df-4c1d-8565-41a9b979a63d" data-linktype="relative-path">SaSec</a> interface IDL
(section <a href="084751bc-8ea4-48d7-8681-66a548842ef6" data-linktype="relative-path">6.2</a>).</p><p><b>wszBuffer: </b>Upon input, MUST be an empty array
of size equal to the <i>ccBufferSize</i> parameter. The client SHOULD
initialize the array to contain zeroes. Upon return, the array MUST contain the
ATSvc account name.</p><p><b>Return Values: </b>For more information about
return codes, see section <a href="774cd43a-8376-4c8b-a2e3-57aaa6357088" data-linktype="relative-path">2.3.14</a>,
or Win32 Error Codes in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
section 2.</p><p>Upon receipt of the SAGetNSAccountInformation call, the
server MUST:</p><ul><li><p><span><span> 
</span></span>Return E_INVALIDARG if the <i>wszBuffer</i> parameter is NULL. </p>
<p><b>Note</b>  When
passing NULL as a value for this parameter, behavior can change based upon the
RPC Runtime Check. See RPC Runtime Check Notes (section <a href="535bb46d-f599-4528-9b02-eb2d391fd361" data-linktype="relative-path">3.3</a>).</p>
</li><li><p><span><span> 
</span></span>Return E_ACCESSDENIED if the caller does not have administrative
privileges on the server.</p>
</li><li><p><span><span> 
</span></span>If the ATSvc account name is &#34;LocalSystem&#34;, set <i>wszBuffer</i>
to be the empty string and return S_FALSE.</p>
</li><li><p><span><span> 
</span></span>Return the value 0x0000007A, which is the <a href="../ms-dtyp/a9046ed2-bfb2-4d56-a719-2824afce59ac" data-linktype="relative-path">HRESULT</a>
form of the Win32 error ERROR_INSUFFICIENT_BUFFER, if the ATSvc account name
(including the terminating zero character) is larger than <i>ccBufferSize</i>.</p>
</li><li><p><span><span> 
</span></span>Copy the null-terminated ATSvc account name to <i>wszBuffer</i>
and return S_OK.</p>
</li></ul><p>If any errors are raised during the processing, they are
returned. For more information about return codes, see section 2.3.14 and <a href="../ms-erref/0642cb2f-2075-4469-918c-4441e69c548a" data-linktype="relative-path">Win32 Error
Codes</a> in [MS-ERREF] section 2.1.</p></div>