p≡p COM server adapter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2 KiB

// pEpCOMServerAdapter.cpp : Implementation of WinMain
#include "stdafx.h"
#include "resource.h"
#include "xdlldata.h"
#include "GateKeeper.h"
#include "pEpCOMServerAdapter.h"
#include "LocalJSONAdapter.h"
#include "../libpEpAdapter/callback_dispatcher.hh"
using namespace ATL;
using namespace std;
void CpEpCOMServerAdapterModule::gatekeeper(CpEpCOMServerAdapterModule * self)
pEp::GateKeeper keeper(self);
CpEpCOMServerAdapterModule _AtlModule;
LocalJSONAdapter* ljs = nullptr;
extern pEp::CallbackDispatcher callback_dispatcher;
extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/,
LPTSTR lpCmdLine, int nShowCmd)
PEP_SESSION first_session;
PEP_STATUS status = ::init(&first_session, NULL, NULL);
if (!boost::algorithm::iequals(lpCmdLine, "/regserver")) {
ljs = &LocalJSONAdapter::createInstance();
auto rv = _AtlModule.WinMain(nShowCmd);
if (ljs) {
return rv;