<div class="content"><p> </p><p>The ElfrOldestRecord (Opnum 5) method instructs the server
to report the record number of the oldest record in the <span><a href="e74c8719-c30e-4f7a-bef7-82753cc0e159#gt_bb3fad7e-60bf-46d4-9c3f-7caea47a743e" data-linktype="relative-path">event log</a></span>.</p><dl>
<dd>
<div><pre> NTSTATUS ElfrOldestRecord(
   [in] IELF_HANDLE LogHandle,
   [out] unsigned long* OldestRecordNumber
 );
</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>OldestRecordNumber: </b>The number of the oldest record
in the specified event log. The chronology is based on the time that records
are written (not the record generation time specified by the <span><a href="e74c8719-c30e-4f7a-bef7-82753cc0e159#gt_efdc035d-100a-4568-a67f-69fb726fadcb" data-linktype="relative-path">event
source</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.</p><p>If the handle is valid, the method MUST retrieve the record
number of the oldest record in the associated log and return the number via the
<i>OldestRecordNumber</i> parameter, and return success. If the log is empty, the
server MUST set the <i>OldestRecordNumber</i> parameter to 0.<a id="Appendix_A_Target_38"></a><a aria-label="Product behavior note 38" href="4acc4fbc-1378-4120-83d1-cfb4ae0240e0#Appendix_A_38" data-linktype="relative-path">&lt;38&gt;</a> This call MUST NOT update the
internal state of the server.</p></div>