<div class="content"><p> </p><p>The SchRpcStop MUST stop all currently running instances of
a task specified by a path.</p><dl>
<dd>
<div><pre> HRESULT SchRpcStop(
   [in, string, unique] const wchar_t* path,
   [in] DWORD flags
 );
</pre></div>
</dd></dl><p><b>path: </b>MUST contain the full path to a task
using 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>flags: </b>Unused. The client MUST set 0, and the
server MUST return an error if nonzero.</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 SchRpcStop call, the server MUST:</p><ul><li><p><span><span> 
</span></span>Return E_INVALIDARG if the <i>flags</i> parameter is nonzero or
the <i>path</i> parameter is NULL.</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 path specified in the
<i>path</i> parameter is not in the format specified in section 2.3.11.</p>
</li><li><p><span><span> 
</span></span>Return the value 0x80070002, the HRESULT form of the Win32 error
ERROR_FILE_NOT_FOUND if the task specified in the <i>path</i> parameter does
not exist in the Task Schedule store on the server or the file specified by the
<i>path</i> parameter does not exist 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>.<a id="Appendix_A_Target_74"></a><a aria-label="Product behavior note 74" href="2d1fbbab-fe6c-4ae5-bdf5-41dc526b2439#Appendix_A_74" data-linktype="relative-path">&lt;74&gt;</a></p>
</li><li><p><span><span> 
</span></span>Examine the running task list for all entries whose path matches
the <i>path</i> parameter, and stop them (section <span><a href="1cf5d910-4b90-46db-9644-7cf9225ee4ee" data-linktype="relative-path">3.2.5.1.3</a></span>) if the
caller has execute access to the task. </p>
</li><li><p><span><span> 
</span></span>Not stop the task and return S_OK when the task is a hidden task.<a id="Appendix_A_Target_75"></a><a aria-label="Product behavior note 75" href="2d1fbbab-fe6c-4ae5-bdf5-41dc526b2439#Appendix_A_75" data-linktype="relative-path">&lt;75&gt;</a></p>
</li><li><p><span><span> 
</span></span>Return S_FALSE if no running task instances were stopped,
otherwise 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 Win32
Error Codes in [MS-ERREF] section 2.1.</p></div>