home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l410 / 1.ddi / CDK / PIX / CCINIT.C$ / CCINIT.bin
Encoding:
Text File  |  1992-02-13  |  2.3 KB  |  82 lines

  1. //---------------------------------------------------------------------------
  2. // ccInit.c
  3. //---------------------------------------------------------------------------
  4. // Custom Control DLL Initialization
  5. //---------------------------------------------------------------------------
  6.  
  7. #define  NOCOMM
  8. #include <windows.h>
  9.  
  10. #include <vbapi.h>
  11.  
  12. #define  CTL_DATA        // To declare static data in pix.h
  13. #include "pix.h"
  14.  
  15.  
  16. //---------------------------------------------------------------------------
  17. // Global Variables
  18. //---------------------------------------------------------------------------
  19. HANDLE hmodDLL;
  20.  
  21.  
  22. //---------------------------------------------------------------------------
  23. // Register custom control.
  24. //    This routine is called by VB when the custom control DLL is
  25. //    loaded for use.
  26. //---------------------------------------------------------------------------
  27. BOOL FAR PASCAL _export VBINITCC
  28. (
  29.     USHORT usVersion,
  30.     BOOL   fRuntime
  31. )
  32. {
  33.     // Avoid warnings on unused (but required) formal parameters
  34.     fRuntime  = fRuntime;
  35.     usVersion = usVersion;
  36.  
  37.     // Register control(s)
  38.     return VBRegisterModel(hmodDLL, &modelPix);
  39. }
  40.  
  41.  
  42. //---------------------------------------------------------------------------
  43. // Initialize library.
  44. //    This routine is called from the DLL entry point in LIBINIT.ASM
  45. //    which is called when the first client loads the DLL.
  46. //---------------------------------------------------------------------------
  47. BOOL FAR PASCAL LibMain
  48. (
  49.     HANDLE hmod,
  50.     HANDLE segDS,
  51.     USHORT cbHeapSize
  52. )
  53. {
  54.     // Avoid warnings on unused (but required) formal parameters
  55.     cbHeapSize = cbHeapSize;
  56.     segDS = segDS;
  57.  
  58.     hmodDLL = hmod;
  59.  
  60.     // Leave our DS unlocked when we're not running
  61.     UnlockData( 0 );
  62.  
  63.     return TRUE;
  64. }
  65.  
  66.  
  67. //---------------------------------------------------------------------------
  68. // Handle exit notification from Windows.
  69. //    This routine is called by Windows when the library is freed
  70. //    by its last client.
  71. //---------------------------------------------------------------------------
  72. VOID FAR PASCAL _export WEP
  73. (
  74.     BOOL fSystemExit
  75. )
  76. {
  77.     // Avoid warnings on unused (but required) formal parameters
  78.     fSystemExit = fSystemExit;
  79. }
  80.  
  81. //---------------------------------------------------------------------------
  82.