Home · All Commands · First Steps · Tutorials · Demos · FAQ | ||
Remote Interface Documentation |
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")) |
const UINT RI_MESSAGE_STOPGPSRECORD = RegisterWindowMessage(TEXT("RI_MESSAGE_STOPGPSRECORD")) |
Message ID for the Request "stop GPS Record":
RI_MESSAGE_STOPGPSRECORD
RI_StopGPSRecord_ReadData(LPARAM id, RI_CStopGPSRecord data );
RI_STOPGPS = Stop GPS recording succeeded
RI_NOTRUN = GPS recording was not running
Stops the GPS record.
#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() ) ) return RI_NAVIGATIONNOTACTIVE; //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 ) { RI_CStopGPSRecord data; //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 AG 2011 | Generated on Fri Oct 14 2011 10:17:32 for RI by 1.7.1 |