Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
os2entry.cpp File Reference
#include <os2.h>
#include "xp.h"
#include "guiprefs.h"
#include "loadstatus.h"
#include "os2utils.h"

Go to the source code of this file.

Functions

int _CRT_init (void)
void _CRT_term (void)
void __ctordtorInit (void)
void __ctordtorTerm (void)
unsigned long _System _DLL_InitTerm (unsigned long hModule, unsigned long ulFlag)

Variables

HMODULE hInst = NULL
HWND hWndLoadStatus = NULL

Function Documentation

unsigned long _System _DLL_InitTerm ( unsigned long  hModule,
unsigned long  ulFlag 
)

Definition at line 61 of file os2entry.cpp.

{
 APIRET rc; 

 switch (ulFlag) {
   case 0:
    // Init: Prime compiler run-time and construct static C++ objects.
     if ( _CRT_init() == -1 ) {
       return 0UL;
     } else {
       __ctordtorInit();
       hInst = hModule;
       char szFileName[_MAX_PATH];
       GetINIFileName(hInst, szFileName, sizeof(szFileName));
       char sz[256];
       XP_GetPrivateProfileString(SECTION_PREFERENCES, KEY_LOADSTATUS_WINDOW, ENTRY_NO, sz, sizeof(sz), szFileName);
       if (stricmp(sz, ENTRY_YES) == 0)
         hWndLoadStatus = ShowLoadStatus("Tester dll is loaded");
     }
     break;
     
   case 1 :
     __ctordtorTerm();
     _CRT_term();
     hInst = NULLHANDLE;
     if (hWndLoadStatus)
       DestroyLoadStatus(hWndLoadStatus);

     break;
     
   default  :
     return 0UL;
 }

 return 1;
}

Here is the call graph for this function:


Variable Documentation

HMODULE hInst = NULL

Definition at line 50 of file os2entry.cpp.

Definition at line 51 of file os2entry.cpp.