home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- // ccInit.c
- //---------------------------------------------------------------------------
- // Custom Control DLL Initialization
- //---------------------------------------------------------------------------
-
- #define NOCOMM
- #include <windows.h>
-
- #include <vbapi.h>
-
-
- //---------------------------------------------------------------------------
- // Global Variables
- //---------------------------------------------------------------------------
- extern MODEL modelPush; // From push.h
- HANDLE hmodDLL;
-
-
- //---------------------------------------------------------------------------
- // Register custom control.
- // This routine is called by VB when the custom control DLL is
- // loaded for use.
- //---------------------------------------------------------------------------
- BOOL FAR PASCAL _export VBINITCC
- (
- USHORT usVersion,
- BOOL fRuntime
- )
- {
- // Avoid warnings on unused (but required) formal parameters
- fRuntime = fRuntime;
- usVersion = usVersion;
-
- // Register control(s)
- return VBRegisterModel(hmodDLL, &modelPush);
- }
-
-
- //---------------------------------------------------------------------------
- // Initialize library.
- // This routine is called from the DLL entry point in LIBINIT.ASM
- // which is called when the first client loads the DLL.
- //---------------------------------------------------------------------------
- BOOL FAR PASCAL LibMain
- (
- HANDLE hmod,
- HANDLE segDS,
- USHORT cbHeapSize
- )
- {
- // Avoid warnings on unused (but required) formal parameters
- cbHeapSize = cbHeapSize;
- segDS = segDS;
-
- hmodDLL = hmod;
-
- // Leave our DS unlocked when we're not running
- UnlockData( 0 );
-
- return TRUE;
- }
-
-
- //---------------------------------------------------------------------------
- // Handle exit notification from Windows.
- // This routine is called by Windows when the library is freed
- // by its last client.
- //---------------------------------------------------------------------------
- VOID FAR PASCAL _export WEP
- (
- BOOL fSystemExit
- )
- {
- // Avoid warnings on unused (but required) formal parameters
- fSystemExit = fSystemExit;
- }
-
- //---------------------------------------------------------------------------
-