File Operations

Functions

kmeFileHandle kvmKmeOpenFile (const char *filename, kvmStatus *status, int32 fileType)
 
kvmStatus kvmKmeScanFileType (const char *filename, int32 *fileType)
 
kmeFileHandle kvmKmeCreateFile (const char *filename, kvmStatus *status, int32 fileType)
 
kvmStatus kvmKmeReadEvent (kmeFileHandle h, kvmLogEventEx *e)
 
kvmStatus kvmKmeWriteEvent (kmeFileHandle h, kvmLogEventEx *e)
 
kvmStatus kvmKmeCountEvents (kmeFileHandle h, uint32 *eventCount)
 
kvmStatus kvmKmeCountEventsEx (kmeFileHandle h, int64 *eventCount)
 
kvmStatus kvmKmeCloseFile (kmeFileHandle h)
 

Detailed Description

Function Documentation

◆ kvmKmeCloseFile()

kvmStatus kvmKmeCloseFile ( kmeFileHandle  h)
C#
static Kvmlib.STATUS KmeCloseFile(Handle h);

Close an open KME file opened with kvmKmeOpenFile() or created with kvmKmeCreateFile(). The handle becomes invalid.

Parameters
[in]hAn open handle to a KME file.
Returns
kvmOK (zero) if success
kvmERR_xxx (negative) if failure
See also
kvmKmeOpenFile(), kvmKmeCreateFile()

◆ kvmKmeCountEvents()

kvmStatus kvmKmeCountEvents ( kmeFileHandle  h,
uint32 eventCount 
)
C#
static Kvmlib.STATUS KmeCountEvents(Handle h, out Int32 eventCount);
Deprecated:
Use kvmKmeCountEventsEx instead.

Count the number of events in a KME file.

Parameters
[in]hAn open handle to a KME file.
[out]eventCountApproximate number of events in a KME file.
Returns
kvmOK (zero) if success
kvmERR_xxx (negative) if failure
Note
if return value is kvmERR_RESULT_TOO_BIG, use kvmKmeCountEventsEx instead.
See also
kvmKmeOpenFile(), kvmKmeCreateFile()

◆ kvmKmeCountEventsEx()

kvmStatus kvmKmeCountEventsEx ( kmeFileHandle  h,
int64 eventCount 
)
C#
static Kvmlib.STATUS KmeCountEventsEx(Handle h, out Int64 eventCount);

Count the number of events in a KME file.

Parameters
[in]hAn open handle to a KME file.
[out]eventCountApproximate number of events in a KME file.
Returns
kvmOK (zero) if success
kvmERR_xxx (negative) if failure
See also
kvmKmeOpenFile(), kvmKmeCreateFile()

◆ kvmKmeCreateFile()

kmeFileHandle kvmKmeCreateFile ( const char *  filename,
kvmStatus status,
int32  fileType 
)
C#
static Kvmlib.Handle KmeCreateFile(String filename, out Status status, Int32 filetype);

Open a KME file for writing and obtain a handle for subsequent operations. Note that kvmKmeCreateFile() will overwrite any existing file and that kvmFILE_KME24 and kvmFILE_KME25 are deprecated formats. Please use kvmFILE_KME40.

Parameters
[in]filenameThe full path and name of the KME file, e.g. C:\temp\myfile.kme
[in]fileTypekvmFILE_xxx
[out]statuskvmOK (zero) if success kvmERR_xxx (negative) if failure
Returns
Returns an open handle to a KME file on success.
See also
kvmKmeWriteEvent(), kvmKmeCountEventsEx(), kvmKmeCloseFile()

◆ kvmKmeOpenFile()

kmeFileHandle kvmKmeOpenFile ( const char *  filename,
kvmStatus status,
int32  fileType 
)
C#
static Kvmlib.Handle KmeOpenFile(String filename, out Status status, Int32 filetype);

Open a KME file for reading and obtain a handle for subsequent operations.

Parameters
[in]filenameThe full path and name of the KME file, e.g. C:\temp\myfile.kme
[in]fileTypekvmFILE_xxx
[out]statuskvmOK (zero) if success kvmERR_xxx (negative) if failure
Returns
Returns an open handle to a KME file on success.
See also
kvmKmeReadEvent(), kvmKmeCountEventsEx(), kvmKmeCloseFile()

◆ kvmKmeReadEvent()

kvmStatus kvmKmeReadEvent ( kmeFileHandle  h,
kvmLogEventEx e 
)
C#
static Kvmlib.STATUS KmeReadEvent(Handle h, out Log e);

Read an event from a KME file opened with kvmKmeOpenFile().

Parameters
[in]hAn open handle to a KME file.
[out]eEvent from a KME file.
Returns
kvmOK (zero) if success
kvmERR_NOLOGMSG on EOF
kvmERR_xxx (negative) if failure
See also
kvmKmeOpenFile(), kvmKmeCountEventsEx(), kvmKmeCloseFile()

◆ kvmKmeScanFileType()

kvmStatus kvmKmeScanFileType ( const char *  filename,
int32 fileType 
)
C#
static Kvmlib.STATUS KmeScanFileType(String filename, out Int32 filetype);

Open a KME file and obtain the file format type.

Parameters
[in]filenameThe full path and name of the KME file, e.g. C:\temp\myfile.kme
[out]fileTypekvmFILE_xxx
Returns
kvmOK (zero) if success
kvmERR_xxx (negative) if failure
See also
kvmKmeOpenFile()

◆ kvmKmeWriteEvent()

kvmStatus kvmKmeWriteEvent ( kmeFileHandle  h,
kvmLogEventEx e 
)
C#
static Kvmlib.STATUS KmeWriteEvent(Handle h, Log e);

Write an event to a KME file created with kvmKmeCreateFile().

Parameters
[in]hAn open handle to a KME file.
[in]eEvent to write.
Returns
kvmOK (zero) if success
kvmERR_xxx (negative) if failure
See also
kvmKmeCreateFile(), kvmKmeCountEventsEx(), kvmKmeCloseFile()