LinksPoint GPS Toolkit Reference
GpsGetDataBuffer
gpsapi.h | Generic GPS Functions
Returns the latest raw data received from the GPS device
Parameters
Parameters Description
void * pData Pointer to a block of data to be filled with all the most recently received GPS data.
long * plCount Pointer to the number of bytes in the data buffer pointed to by pData. This value will represent the number of bytes that were actually copied to the data block if the function returns successfully.
Return Value
If the GPS data buffer is successfully retrieved, then the return value will be GPSERROR_NONE. If the size of the buffer represented by pData is too small then the return value will be GPSERROR_BUFFER_TOO_SMALL. Otherwise, the return value will be GPSERROR_INVALID_PARAMETER.
Remarks
If the size of the data buffer is too small then the return value will be GPSERROR_BUFFER_TOO_SMALL and the value pointed to by plCount will represent the size of the buffer needed to hold all of the data. The caller might want to add another byte to the returned buffer size to allow for NULL terminating the data if it is NMEA text. GpsGetDataBuffer can be called with pData set to NULL to just return the correct size of the buffer in piCount.

The user is responsible for allocating and freeing the memory for the parameters.

Group
Declaration
GPSERROR GPSAPI GpsGetDataBuffer(void * pData, long * plCount);
File
Links
Copyright ©1998-2005 Links Point Inc.