<div class="content"><p> </p><p>The ElfrDeregisterEventSource (Opnum 3) method instructs the
server to close a handle to the <span><a href="e74c8719-c30e-4f7a-bef7-82753cc0e159#gt_bb3fad7e-60bf-46d4-9c3f-7caea47a743e" data-linktype="relative-path">event log</a></span>, freeing
resources on the server that maintained an association between the handle and
the corresponding event log. This handle MUST have been obtained via the <span><a href="9b18521f-98cb-44f9-ab5c-84f03b790b44" data-linktype="relative-path">ElfrRegisterEventSourceW (section 3.1.4.5)</a></span>
method or the <span><a href="85c31da0-b47f-4776-9024-4f0fb09a046c" data-linktype="relative-path">ElfrRegisterEventSourceA (section 3.1.4.6)</a></span>
method.</p><dl>
<dd>
<div><pre> NTSTATUS ElfrDeregisterEventSource(
   [in, out] IELF_HANDLE* LogHandle
 );
</pre></div>
</dd></dl><p><b>LogHandle: </b>Handle to an event log. This parameter is
a server context handle, as specified in section <span><a href="de54bfbc-fbe4-43b8-b8e1-b8a6b2189604" data-linktype="relative-path">2.2.6</a></span>.</p><p><b>Return Values: </b>The method MUST return STATUS_SUCCESS
(0x00000000) on success; otherwise, it MUST return an implementation-based,
nonzero NTSTATUS value specified in <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>.</p><p>In response to this request from the client, the server MUST
first check that the handle is valid. The server MUST fail the operation with
the error STATUS_INVALID_HANDLE (0xC0000008) if the handle is invalid. The
server MUST treat a handle opened by the ElfrRegisterEventSourceW (section 3.1.4.5)
method or the ElfrRegisterEventSourceA (section 3.1.4.6) method as
valid. The server MAY add a flag to the handle returned by
ElfrRegisterEventSourceW (section 3.1.4.5) or ElfrRegisterEventSourceA (section 3.1.4.6)
and then use it to check if the handle that is passed in the
ElfrDeregisterEventSource method has come from one of those two methods.<a id="Appendix_A_Target_41"></a><a aria-label="Product behavior note 41" href="4acc4fbc-1378-4120-83d1-cfb4ae0240e0#Appendix_A_41" data-linktype="relative-path">&lt;41&gt;</a></p><p>If the handle is valid, the server MUST free the resources
taken by this handle in the server. </p></div>