3.1.4.18 ElfrNumberOfRecords (Opnum 4)

The ElfrNumberOfRecords (Opnum 4) method instructs the server to report the number of records currently in the event log.

 NTSTATUS ElfrNumberOfRecords(
   [in] IELF_HANDLE LogHandle,
   [out] unsigned long* NumberOfRecords
 );

LogHandle: Handle to an event log. This parameter is a server context handle, as specified in section 2.2.6.

NumberOfRecords: Total number of records in the specified event log.

Return Values: The method MUST return STATUS_SUCCESS (0x00000000) on success; otherwise, it MUST return an implementation-based, nonzero NTSTATUS value specified in [MS-ERREF].

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.

If the handle is valid, the method MUST retrieve the number of records in the associated log and return the number via the NumberOfRecords parameter, and return success.<37> This call MUST NOT update the internal state of the server.