COM-121
Volker Birk 3 years ago
parent e9ffb4a0d2
commit d88176d92e

@ -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();
}

Binary file not shown.

@ -135,6 +135,7 @@ xcopy /y "..\Dependencies\zlib\zlib1.dll" "$(OutDir)"
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CMainWindow.cpp" />
<ClCompile Include="CpEpEngine.cpp" />
<ClCompile Include="GateKeeper.cpp" />
<ClCompile Include="LocalJSONAdapter.cpp" />
@ -164,6 +165,7 @@ xcopy /y "..\Dependencies\zlib\zlib1.dll" "$(OutDir)"
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\pEpJSONServerAdapter\server\adapter-library.hh" />
<ClInclude Include="CMainWindow.h" />
<ClInclude Include="CpEpEngine.h" />
<ClInclude Include="GateKeeper.h" />
<ClInclude Include="LocalJSONAdapter.h" />
@ -206,6 +208,9 @@ xcopy /y "..\Dependencies\zlib\zlib1.dll" "$(OutDir)"
<Library Include="..\Debug\libpEpWebserver.lib" />
<Library Include="..\Debug\pEpJSONServerAdapterLibrary.lib" />
</ItemGroup>
<ItemGroup>
<Image Include="logo.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\boost.1.72.0.0\build\boost.targets" Condition="Exists('..\packages\boost.1.72.0.0\build\boost.targets')" />

@ -46,6 +46,9 @@
<ClCompile Include="LocalJSONAdapter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="CMainWindow.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
@ -84,6 +87,9 @@
<ClInclude Include="..\pEpJSONServerAdapter\server\adapter-library.hh">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CMainWindow.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="pEpCOMServerAdapter.rc">
@ -117,4 +123,9 @@
<Library Include="..\Debug\libpEpWebserver.lib" />
<Library Include="..\Debug\libpEpAdapter.lib" />
</ItemGroup>
<ItemGroup>
<Image Include="logo.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>

Binary file not shown.

@ -25,6 +25,7 @@
#include <atlcom.h>
#include <atlctl.h>
#include <atlsafe.h>
#include <atlwin.h>
#include <comutil.h>
#include <comdef.h>

Loading…
Cancel
Save