Variables
EndApplication: Quit the Application

Variables

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

Detailed Description

Variable Documentation

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

Message ID for the Request "end application":
RI_MESSAGE_ENDAPPLICATION

Write Memory:

This function has no writer.

Read Memory:

This function has no reader.

Return Values for EndApplication:

RI_NOERROR = End Application succeeded.

Description:

Sending this message will end the application.

Example:

#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() ) )
PostMessage( RI_GetTNS(), request, WPARAM(h_client), id );
return RI_NOERROR;
}
LRESULT CDlgMFC_EndApplication::WindowProc ( UINT message , WPARAM wParam , LPARAM lParam )
{
//check messages for answer from RI
//RI_MESSAGE_ENDAPPLICATION
if ( message == RI_MESSAGE_ENDAPPLICATION )
{
if ( (LRESULT)wParam == RI_NOERROR )
//End Application succeeded. errorcode (0)
else
//End Application not succeeded. errorcode (-1)
}
return CDialog::WindowProc( message, wParam, lParam );
}
void CDlgMFC_EndApplication::foo()
{
//funktion end application
LPARAM id = GetUniqueID();
//RI_MESSAGE_ENDAPPLICATION
if ( RI_MESSAGE( RI_MESSAGE_ENDAPPLICATION, 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