This is used to create an application using interprocess communication.
More...
#include <InterprocessAppClient.h>
|
typedef boost::shared_ptr< boost::thread > | Boost_Thread_ptr_type |
|
typedef std::list< std::string > | Domain_Map_t |
|
|
| CInterprocessAppClient (const char *appName=NULL) |
|
void | SetAppName (const char *appName) |
| set the application name
|
|
virtual int | SetCommandLine (const char *sCmdLine) |
| init command line so that we can use IPC calls before calling Run() method. More...
|
|
int | Run (HINSTANCE hInst, const char *sCmdLine) |
| run the application using a given command line. More...
|
|
void | SetParentWindow (HWND hWndParent) |
| set the parent window
|
|
int | Start (int nMinResolutionWidth=0, int nMinResolutionHeight=0) |
|
int | Stop () |
|
HWND | GetMainHWnd () |
|
virtual bool | SendHostMsg (int nMsg, DWORD param1=0, DWORD param2=0, const char *filename=NULL, const char *sCode=NULL, int nPriority=0) |
| sent interprocess message to the host process. More...
|
|
virtual int | SetAppDir () |
| set working directory More...
|
|
virtual bool | BeginCoreUpdate (const char *sCurVersion, const char *sSessionDir) |
| begin core update. More...
|
|
virtual void | SendError (int nErrorCode, const char *errorMsg=NULL) |
| send error message to host app. More...
|
|
virtual void | SendLog (const char *logMsg) |
| send log message to host app. More...
|
|
virtual bool | IsUrlTrusted (const std::string &sUrl) |
| whether the url is from a trusted web domain. More...
|
|
virtual void | OnProgress (const NPL::IAutoUpdaterClient::ProgressMessage &msg) |
| auto updater call back. More...
|
|
|
static LRESULT CALLBACK | DefaultWinThreadWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
|
static int | MatchFilePattern (const std::string &input, const std::string &sPattern) |
| whether the input string match a given file pattern. More...
|
|
static bool | IsAlphaNumeric (char c) |
|
|
class | CMyProcessAppThread |
|
This is used to create an application using interprocess communication.
§ CheckLoad()
bool ParaEngine::CInterprocessAppClient::CheckLoad |
( |
| ) |
|
|
protected |
load ParaEngineClient.dll if not loaded before.
§ DefaultWinThreadProc()
void ParaEngine::CInterprocessAppClient::DefaultWinThreadProc |
( |
| ) |
|
|
protected |
LiXizhi 2010.4.25: this is extremely tricky. We first create an invisible window using WS_OVERLAPPED style. This will trick the win32 to create IME context for the current thread. Then we will re-parent the window and remove the WS_OVERLAPPED style. And by resizing the window twice afterwards, we will force the win32 window to remove the window title bar. If we do not do this, and create the window using WS_CHILD | WS_VISIBLE style directly, IME messages will not be received by the child window.
§ EnableAutoUpdateWhenComplete()
void ParaEngine::CInterprocessAppClient::EnableAutoUpdateWhenComplete |
( |
bool |
bEnable | ) |
|
|
protected |
enable auto update when complete.
§ handle_mainloop_timer()
void ParaEngine::CInterprocessAppClient::handle_mainloop_timer |
( |
const boost::system::error_code & |
err | ) |
|
|
protected |
the main loop in the main thread.
§ HandleAppMsg()
return 0 if succeed, otherwise we will terminate the application.
Note: for security reasons, it is not advised to use this function. This may be removed in future release.
§ Run()
int ParaEngine::CInterprocessAppClient::Run |
( |
HINSTANCE |
hInst, |
|
|
const char * |
sCmdLine |
|
) |
| |
run the application using a given command line.
§ SendHostMsg()
bool ParaEngine::CInterprocessAppClient::SendHostMsg |
( |
int |
nMsg, |
|
|
DWORD |
param1 = 0 , |
|
|
DWORD |
param2 = 0 , |
|
|
const char * |
filename = NULL , |
|
|
const char * |
sCode = NULL , |
|
|
int |
nPriority = 0 |
|
) |
| |
|
virtual |
§ SetCommandLine()
int ParaEngine::CInterprocessAppClient::SetCommandLine |
( |
const char * |
sCmdLine | ) |
|
|
virtual |
§ StartWindowThread()
HRESULT ParaEngine::CInterprocessAppClient::StartWindowThread |
( |
| ) |
|
|
protected |
create the default win32 windows for rendering.
and assigning to m_hWnd. window is created in another thread. Since windows uses single threaded apartment, the window procedure should also be in that thread.
§ m_app_host
std::string ParaEngine::CInterprocessAppClient::m_app_host |
|
protected |
the interprocess queue name for the host app.
§ m_app_name
std::string ParaEngine::CInterprocessAppClient::m_app_name |
|
protected |
the application name is also the interprocess message queue name.
§ m_bAutoUpdateWhenStart
bool ParaEngine::CInterprocessAppClient::m_bAutoUpdateWhenStart |
|
protected |
whether we will automatically update the client when receiving PEAPP_Start.
This is automatically set to true when command line contains m_sUsage="webplayer"
The documentation for this class was generated from the following files:
- Client/trunk/ParaEngineClientApp/InterprocessAppClient.h
- Client/trunk/ParaEngineClientApp/InterprocessAppClient.cpp