<div class="content"><p> </p><p>The SchRpcGetSecurity method MUST get the <span><a href="efc35aa8-1f40-4609-869a-107dd31bbed0#gt_e5213722-75a9-44e7-b026-8e4833f0d350" data-linktype="relative-path">security
descriptor</a></span> associated with a task or folder.</p><dl>
<dd>
<div><pre> HRESULT SchRpcGetSecurity(
   [in, string] const wchar_t* path,
</pre></div>
</dd>
<dd>
<div><pre>   [in] DWORD securityInformation,
   [out, string] wchar_t** sddl
 );
</pre></div>
</dd></dl><p><b>path: </b>MUST be the full path associated with a
task or folder in the format specified in section <span><a href="fa8809c8-4f0f-4c6d-994a-6c10308757c1" data-linktype="relative-path">2.3.11</a></span>).</p><p><b>securityInformation: </b>MUST contain security
information in the format of a <span><a href="../ms-dtyp/23e75ca3-98fd-4396-84e5-86cd9d40d343" data-linktype="relative-path">SECURITY_INFORMATION</a></span>
structure. The SECURITY_INFORMATION structure is defined in <span><a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a></span>
section 2.4.7.</p><p><b>sddl: </b>MUST point to a buffer that will receive
security information in string format. The string format is specified in
[MS-DTYP] section <span><a href="../ms-dtyp/4f4251cc-23b6-44b6-93ba-69688422cb06" data-linktype="relative-path">2.5.1</a></span>.</p><p><b>Return Values: </b>For more information on return
codes, see section <span><a href="774cd43a-8376-4c8b-a2e3-57aaa6357088" data-linktype="relative-path">2.3.14</a></span>, or Win32
Error Codes in <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>
section <span><a href="../ms-erref/0642cb2f-2075-4469-918c-4441e69c548a" data-linktype="relative-path">2.1</a></span>.</p><p>Upon receipt of the SchRpcGetSecurity call that requires the
server to return the security descriptor of the requested object, the server
MUST:</p><ul><li><p><span><span> 
</span></span>Return E_INVALIDARG if the <i>sddl</i> parameter is NULL.</p>
<p><b>Note</b>  When
passing NULL as a value for parameters, behavior can change based on the RPC
Runtime Check. See <span><a href="535bb46d-f599-4528-9b02-eb2d391fd361" data-linktype="relative-path">RPC Runtime Check
Notes (section 3.3)</a></span>.</p>
</li><li><p><span><span> 
</span></span>Return 0x8007007B, the <span><a href="../ms-dtyp/a9046ed2-bfb2-4d56-a719-2824afce59ac" data-linktype="relative-path">HRESULT</a></span>
form of the Win32 error <b>ERROR_INVALID_NAME</b> if the specified <i>path</i>
is not in the format specified in section 2.3.11.</p>
</li><li><p><span><span> 
</span></span>Return the value 0x80070003, the HRESULT form of the Win32 error
ERROR_PATH_NOT_FOUND if the specified <i>path</i> does not exist on the server
in the <span><a href="efc35aa8-1f40-4609-869a-107dd31bbed0#gt_982b7f8e-d516-4fd5-8d5e-1a836081ed85" data-linktype="relative-path">XML</a></span> <span><a href="efc35aa8-1f40-4609-869a-107dd31bbed0#gt_08035fe7-a786-4b30-ab60-3fd046060617" data-linktype="relative-path">task
store</a></span>.</p>
</li><li><p><span><span> 
</span></span>Return the HRESULT form of the Win32 error ERROR_FILE_NOT_FOUND
if the task does not exist on the server in the XML task store.</p>
</li><li><p><span><span> 
</span></span>Return E_ACCESSDENIED if the caller does not have permission to
read the task or the security descriptor.</p>
</li><li><p><span><span> 
</span></span>Retrieve the security information specified in the <i>securityInformation</i>
parameter from the path in the task store. For more information on the
SECURITY_INFORMATION structure, see [MS-DTYP] section 2.4.7.</p>
</li><li><p><span><span> 
</span></span>Encode security information in <span><a href="efc35aa8-1f40-4609-869a-107dd31bbed0#gt_e013f36f-8a39-4689-ab87-520e389cfee3" data-linktype="relative-path">sddl</a></span> and return the
string in the <i>sddl</i> parameter to the caller.</p>
</li><li><p><span><span> 
</span></span>Return <i>S_OK</i>.</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 Win32
Error Codes in [MS-ERREF] section 2.1.</p></div>