blob: 7b7b68da9d755dd60a6aaf419f52d73baed38da5 [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <windows.h>
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/logging.h"
// Visual Studio needs at least one C++ file in project
namespace {
base::AtExitManager* g_exit_manager = NULL;
// DLL Entry Point - This is necessary to initialize basic things like the
// CommandLine and Logging components needed by functions in the DLL.
extern "C" BOOL WINAPI DllMain(HINSTANCE instance,
DWORD reason,
LPVOID reserved) {
if (reason == DLL_PROCESS_ATTACH) {
g_exit_manager = new base::AtExitManager();
base::CommandLine::Init(0, NULL);
logging::LoggingSettings settings;
settings.logging_dest =
} else if (reason == DLL_PROCESS_DETACH) {
delete g_exit_manager;
g_exit_manager = NULL;
return TRUE;