diff --git a/pEpCOMServerAdapter.cpp b/pEpCOMServerAdapter.cpp index eaa72a9..19ae502 100644 --- a/pEpCOMServerAdapter.cpp +++ b/pEpCOMServerAdapter.cpp @@ -8,6 +8,7 @@ #include "GateKeeper.h" #include "pEpCOMServerAdapter.h" #include "LocalJSONAdapter.h" +#include "CMainWindow.h" using namespace ATL; using namespace std; @@ -21,6 +22,7 @@ void CpEpCOMServerAdapterModule::gatekeeper(CpEpCOMServerAdapterModule * self) CpEpCOMServerAdapterModule _AtlModule; LocalJSONAdapter* ljs = nullptr; pEp::PassphraseCache cache; +CMainWindow mainWindow; extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpCmdLine, int nShowCmd) @@ -35,11 +37,15 @@ extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/ ljs = &LocalJSONAdapter::createInstance(); ljs->startup(pEp::CallbackDispatcher::messageToSend); pEp::callback_dispatcher.add(JsonAdapter::messageToSend, JsonAdapter::notifyHandshake); + auto mw = mainWindow.Create(HWND_MESSAGE); + assert(mw); } auto rv = _AtlModule.WinMain(nShowCmd); if (ljs) { + BOOL r = true; + mainWindow.OnDestroy(0, 0, 0, r); pEp::callback_dispatcher.remove(JsonAdapter::messageToSend); ljs->shutdown_now(); } diff --git a/pEpCOMServerAdapter.rc b/pEpCOMServerAdapter.rc index d77b71a..a07575a 100644 Binary files a/pEpCOMServerAdapter.rc and b/pEpCOMServerAdapter.rc differ diff --git a/pEpCOMServerAdapter.vcxproj b/pEpCOMServerAdapter.vcxproj index bc34b8b..d960497 100644 --- a/pEpCOMServerAdapter.vcxproj +++ b/pEpCOMServerAdapter.vcxproj @@ -135,6 +135,7 @@ xcopy /y "..\Dependencies\zlib\zlib1.dll" "$(OutDir)" + @@ -164,6 +165,7 @@ xcopy /y "..\Dependencies\zlib\zlib1.dll" "$(OutDir)" + @@ -206,6 +208,9 @@ xcopy /y "..\Dependencies\zlib\zlib1.dll" "$(OutDir)" + + + diff --git a/pEpCOMServerAdapter.vcxproj.filters b/pEpCOMServerAdapter.vcxproj.filters index 95e6a85..86cfb4b 100644 --- a/pEpCOMServerAdapter.vcxproj.filters +++ b/pEpCOMServerAdapter.vcxproj.filters @@ -46,6 +46,9 @@ Source Files + + Source Files + @@ -84,6 +87,9 @@ Header Files + + Header Files + @@ -117,4 +123,9 @@ + + + Resource Files + + \ No newline at end of file diff --git a/resource.h b/resource.h index 13a8af0..d64f556 100644 Binary files a/resource.h and b/resource.h differ diff --git a/stdafx.h b/stdafx.h index 895b7fe..d1e5bb9 100644 --- a/stdafx.h +++ b/stdafx.h @@ -25,6 +25,7 @@ #include #include #include +#include #include #include