2019-09-02 10:28:14 +00:00
|
|
|
#include "StdAfx.h"
|
|
|
|
|
|
|
|
/// Entry point of the the library.
|
|
|
|
BOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID)
|
|
|
|
{
|
|
|
|
// Indicate successful load of the library.
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Starts a NodeRelay.
|
|
|
|
/// @param leaveImmediately if false then waits for Relay to be shut down internally by a C3 API Command.
|
2020-01-07 16:09:52 +00:00
|
|
|
extern "C" __declspec(dllexport) void StartNodeRelay()
|
2019-09-02 10:28:14 +00:00
|
|
|
{
|
2020-03-05 15:30:50 +00:00
|
|
|
FSecure::WinTools::StructuredExceptionHandling::SehWrapper(
|
2020-01-07 16:09:52 +00:00
|
|
|
[]()
|
2019-09-02 10:28:14 +00:00
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2020-03-05 15:30:50 +00:00
|
|
|
auto relay = FSecure::C3::Utils::CreateNodeRelayFromImagePatch(
|
2020-03-06 14:23:57 +00:00
|
|
|
[](FSecure::C3::LogMessage const&, std::string_view) {},
|
2020-03-05 15:30:50 +00:00
|
|
|
FSecure::C3::InterfaceFactory::Instance(),
|
2019-09-02 10:28:14 +00:00
|
|
|
EmbeddedData::Instance()[0],
|
|
|
|
EmbeddedData::Instance()[1],
|
|
|
|
EmbeddedData::Instance()[2],
|
|
|
|
EmbeddedData::Instance().FindMatching(3));
|
|
|
|
|
2020-01-07 16:09:52 +00:00
|
|
|
relay->Join();
|
2019-09-02 10:28:14 +00:00
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}, []() {});
|
|
|
|
}
|