|
@@ -48,7 +48,7 @@ HWND GetMainWnd()
|
|
|
|
|
|
DWORD WINAPI WorkThreadProc(LPVOID lParam)
|
|
|
{
|
|
|
-#ifdef _DEBUG
|
|
|
+#if defined _DEBUG & !defined _CONSOLE
|
|
|
Sleep(15000);
|
|
|
#endif
|
|
|
TCHAR szLog[MAX_PATH] = {0};
|
|
@@ -87,7 +87,7 @@ DWORD WINAPI WorkThreadProc(LPVOID lParam)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+#ifndef _CONSOLE
|
|
|
BOOL APIENTRY DllMain( HMODULE hModule,DWORD ul_reason_for_call,LPVOID lpReserved)
|
|
|
{
|
|
|
switch (ul_reason_for_call)
|
|
@@ -109,4 +109,22 @@ BOOL APIENTRY DllMain( HMODULE hModule,DWORD ul_reason_for_call,LPVOID lpReserv
|
|
|
}
|
|
|
return TRUE;
|
|
|
}
|
|
|
+#else
|
|
|
+int main(int argc, char **argv)
|
|
|
+{
|
|
|
+ Utility::g_hDLLModule = GetModuleHandle(NULL);
|
|
|
+ Utility::GetConfigContent();
|
|
|
+
|
|
|
+ Utility::dprintf(_T("¹ÜµÀÃû³Æ=%s, ´°¿ÚÃû³Æ=%s, ´°¿Ú½ø³ÌÃû³Æ=%s"), Utility::g_cfgCtx.szPipeName, Utility::g_cfgCtx.szWindowTitel, Utility::g_cfgCtx.szWndProcessName);
|
|
|
|
|
|
+ if ( Utility::g_pPipeClient == NULL )
|
|
|
+ {
|
|
|
+ Utility::g_pPipeClient = new CPipeClient(Utility::g_cfgCtx.szPipeName);
|
|
|
+ Utility::g_pPipeClient->StartWork();
|
|
|
+ }
|
|
|
+
|
|
|
+ system("pause");
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+#endif
|