This source file includes following definitions.
- DllMain
#include <windows.h>
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/logging.h"
namespace {
base::AtExitManager* g_exit_manager = NULL;
}
extern "C" BOOL WINAPI DllMain(HINSTANCE instance,
DWORD reason,
LPVOID reserved) {
if (reason == DLL_PROCESS_ATTACH) {
g_exit_manager = new base::AtExitManager();
CommandLine::Init(0, NULL);
logging::LoggingSettings settings;
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
logging::InitLogging(settings);
} else if (reason == DLL_PROCESS_DETACH) {
CommandLine::Reset();
delete g_exit_manager;
g_exit_manager = NULL;
}
return TRUE;
}