Bumping manifests a=b2g-bump
[gecko.git] / toolkit / library / nsDllMain.cpp
blob36f1630bf042e2c9b29b00d64ed47b8c4848a365
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include <windows.h>
7 #include "nsToolkit.h"
8 #include "mozilla/Assertions.h"
9 #include "mozilla/WindowsVersion.h"
11 #if defined(__GNUC__)
12 // If DllMain gets name mangled, it won't be seen.
13 extern "C" {
14 #endif
16 BOOL APIENTRY DllMain(
17 HINSTANCE hModule,
18 DWORD reason,
19 LPVOID lpReserved )
21 switch( reason ) {
22 case DLL_PROCESS_ATTACH:
23 nsToolkit::Startup((HINSTANCE)hModule);
24 break;
26 case DLL_THREAD_ATTACH:
27 break;
29 case DLL_THREAD_DETACH:
30 break;
32 case DLL_PROCESS_DETACH:
33 nsToolkit::Shutdown();
34 break;
38 return TRUE;
41 #if defined(__GNUC__)
42 } // extern "C"
43 #endif