home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / ios_dll.c < prev    next >
C/C++ Source or Header  |  1998-06-17  |  1KB  |  52 lines

  1. /***
  2. *IOS_DLL.c - Old Iostreams CRTL DLL initialization and termination routine (Win32)
  3. *
  4. *       Copyright (c) 1996-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *       This module contains initialization entry point for the "old" Iostreams
  8. *       C Run-Time Library DLL.
  9. *
  10. *******************************************************************************/
  11.  
  12. #ifdef CRTDLL
  13.  
  14. #include <windows.h>
  15.  
  16. /***
  17. *BOOL DllMain(hDllHandle, dwReason, lpreserved) - C DLL initialization.
  18. *
  19. *Purpose:
  20. *       This routine does the C runtime initialization.  It disables Thread
  21. *       Attach/Detach notifications for this DLL since they are not used.
  22. *
  23. *Entry:
  24. *
  25. *Exit:
  26. *
  27. *******************************************************************************/
  28.  
  29.  
  30. BOOL WINAPI DllMain(
  31.         HANDLE  hDllHandle,
  32.         DWORD   dwReason,
  33.         LPVOID  lpreserved
  34.         )
  35. {
  36.         if ( dwReason == DLL_PROCESS_ATTACH )
  37.                 DisableThreadLibraryCalls(hDllHandle);
  38.  
  39.         return TRUE ;
  40. }
  41.  
  42.  
  43. /*
  44.  * The following variable is exported just so that the forwarder DLL can import it.
  45.  * The forwarder DLL needs to have at least one import from this DLL to ensure that
  46.  * this DLL will be fully initialized.
  47.  */
  48.  
  49. __declspec(dllexport) int __dummy_export = 0x420;
  50.  
  51. #endif  /* CRTDLL */
  52.