toolkit/library/nsDllMain.cpp

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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 )
    20 {
    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;
    36     }
    38     return TRUE;
    39 }
    41 #if defined(__GNUC__)
    42 } // extern "C"
    43 #endif

mercurial