Classes | Functions | Variables
StopGPSRecord: Stop GPS recording

Classes

struct  RI_CStopGPSRecord
 Data structure for the Request "StopGPSRecord". More...
 

Functions

LRESULT RI_StopGPSRecord_ReadData (LPARAM, RI_CStopGPSRecord &)
 Read data from shared memory for "Stop GPS Record".
 

Variables

const UINT RI_MESSAGE_STOPGPSRECORD = RegisterWindowMessage(TEXT("RI_MESSAGE_STOPGPSRECORD"))
 

Detailed Description

Variable Documentation

const UINT RI_MESSAGE_STOPGPSRECORD = RegisterWindowMessage(TEXT("RI_MESSAGE_STOPGPSRECORD"))

Message ID for the Request "stop GPS Record":
RI_MESSAGE_STOPGPSRECORD

    <H3>Read Memory:</H3>
    RI_StopGPSRecord_ReadData(LPARAM id, RI_CStopGPSRecord data );
    <BR>
    <H3>Return Values for StopGPSRecord:</H3>
    RI_STOPGPS = Stop GPS recording succeeded<BR>
    RI_NOTRUN = GPS recording was not running<BR><BR>

    <h2>Description:</h2>Stops the GPS record.
<h3>Returns a single package</h3>
    <H2>Example:</H2>
#define USE_LOADLIBRARY
#include "TNSRemoteInterfaceDll.h"
LPARAM GetUniqueID()
{
//generate unique ID
static LPARAM id = 0;
if (++id == 0) ++id; // do not use 0 !!!!!
return id;
}
inline LRESULT RI_MESSAGE( const UINT request, HWND h_client, LPARAM id )
{
//check if RI handle is valid
if ( !IsWindow( RI_GetTNS() ) )
//send the request
PostMessage( RI_GetTNS(), request, WPARAM(h_client), id );
return RI_NOERROR;
}
LRESULT CDlgMFC_StopGPSRecord::WindowProc ( UINT message , WPARAM wParam , LPARAM lParam )
{
//check messages for answer from RI
if ( message == RI_MESSAGE_STOPGPSRECORD )
{
if ( (LRESULT)wParam == RI_STOPGPS )
{
//read data from shared memory
LRESULT read_suc = RI_StopGPSRecord_ReadData( lParam, data );
//Stop GPS recording succeeded. errorcode(16)
TRACE(TEXT("Number Entries: %i"),data.m_NumberEntries );
TRACE(TEXT("File Size: %i"),data.m_FileSize );
}
else if ( (LRESULT)wParam == RI_NOTRUN )
//GPS recording was not running. errorcode(17)
}
return CDialog::WindowProc( message, wParam, lParam );
}
void CDlgMFC_StopGPSRecord::foo()
{
LPARAM id = GetUniqueID();
if ( RI_MESSAGE( RI_MESSAGE_STOPGPSRECORD, GetSafeHwnd(), id ) == RI_NOERROR )
//message sending succeeded
else
//navigation software not running
}

© PTV Group 2020 Generated on Wed Apr 15 2020 12:47:52 for by doxygen 1.8.8