RouteTrak API
CRTEngine::RTOpenLogFile
CRTEngine | See Also
RTERROR RTOpenLogFile(LPCTSTR lpszLogFile = NULL, LPCTSTR lpszDriverID = NULL, LPCTSTR lpszVehicleID = NULL, LPCTSTR lpszRouteID = NULL, BOOL fTrailContinuation = FALSE, DWORD dwExtendedRecordSize = 0, DWORD dwExtendedHeaderSize = 0);
Parameters
Parameters Description
lpszLogFile A pointer to a TCHAR buffer containing the path and filename of the log file to be opened or created
lpszDriverID A pointer to a TCHAR buffer containing the optional driver name
lpszVehicleID A pointer to a TCHAR buffer containing the optional vehicle name
lpszRouteID A pointer to a TCHAR buffer containing the optional route name
fTrailContinuation Specifies whether this file represents a continuation of a trail started in another file (TRUE) or a new trail (FALSE)
dwExtendedRecordSize A DWORD value indicating the size of any extended data in the records section of the log file
dwExtendedHeaderSize A DWORD value indicating the size of any extended data in the header section of the log file

Return Values
Return Values Description
RTE_NONE The file opened successfully
RTE_INVALID_PARAMETER NULL pointer passed for lpszLogFile
RTE_LOG_FILE_OPEN There was an error opening the Log File specified

Description
Opens the RouteTrak log file
Remarks
  • This method creates a new file if lpszLogFile does not exist, or opens for append if it does. Driver, Vehicle, and Route information can be provided, or NULL pointers can be passed to skip the assignments.

  • If dwExtendedHeaderSize is greater than zero, you should call RTWriteExtendedHeader some time before RTCloseLogFile to fill in the application specific header information.

  • If your application will be adding extended data records, indicate the size of the data with dwExtendedRecordSize. You can decide whether or not to extend individual records in OnRTGetExtendedDataRecord, but the size must match the size passed in dwExtendedRecordSize.
See Also
Class
Links

Copyright (c) 2001-2004 Links Point Inc.