home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Pier Shareware 6
/
The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso
/
035
/
kwclass.zip
/
KWCLASS.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1994-04-18
|
2KB
|
85 lines
/*---------------------------------------------------------------
* kwclass.cpp:
*
* Generated by the KASE:VIP User Interface Class Library
* knowledgebase
*
*--------------------------------------------------------------*/
/*
* Copyright (C) 1994, by KASEWORKS, Inc.
*/
/*---------------------------------------------------------------
* PROFILE INFORMATION:
*
* OBJECT MODIFICATION DATE:
*
*
*
*--------------------------------------------------------------*/
#include <ihandle.hpp>
#include <iapp.hpp>
#include "kwclass.hpp"
#include "kwclass.rch"
IModuleHandle KwclassDloHandle;
extern "C"
int _CRT_init(void);
extern "C"
void __ctordtorInit(void);
extern "C"
unsigned long _System _DLL_InitTerm(unsigned long hModule,
unsigned long ulFlag);
/*-------------------------------------------------------------
* Name: _DLL_InitTerm
*
* Syntax:
*
* _DLL_InitTerm(hModule, ulFlag)
*
* Description:
* DLL initialization routine. Called when the DLL is loaded
* or unloaded by an application. This function initializes
* the runtime environment for C and C++, and saves the DLL's
* module handle for access by DLL components.
*
* Parameters:
* hModule - the module handle for the DLL
* ulFlag - indicates whether the DLL is being loaded or
* unloaded (0 = load, 1 = unload)
*
* Return Value:
* Indicates whether the DLL was loaded successfully. Returning
* nonzero indicates success, zero indicates failure. If the
* function returns zero, the system will not load the DLL.
*
* Notes:
* Global and static objects residing in the DLL are not
* constructed until the function __ctordtorInit is called.
------------------------------------------------------------*/
extern "C"
unsigned long _System _DLL_InitTerm(unsigned long hModule,
unsigned long ulFlag)
{
if (ulFlag == 0)
{
// initialize the C runtime library
if (_CRT_init() == -1)
return 0;
// construct global objects
__ctordtorInit();
// save the DLL's module handle
KwclassDloHandle = hModule;
return 1;
}
}