Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
971 B

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. gs_dllmain.c
  5. Abstract:
  6. This module contains the support for the compiler /GS switch
  7. Authors:
  8. Jonathan Schwartz (JSchwart) 27-Nov-2001
  9. Bryan Tuttle (bryant)
  10. Revision History:
  11. Code to support the /GS compiler switch that is specific to user-mode
  12. --*/
  13. #include <nt.h>
  14. #include <ntrtl.h>
  15. #include <nturtl.h>
  16. #include <windows.h>
  17. #include <overflow.h>
  18. void __cdecl __security_init_cookie(void);
  19. BOOL WINAPI
  20. _DllMainCRTStartupForGS(
  21. HANDLE hDllHandle,
  22. DWORD dwReason,
  23. LPVOID lpReserved
  24. )
  25. {
  26. //
  27. // Do pretty much nothing here. This DllMain exists simply to run through
  28. // initialization of the CRT data section and let us set things up.
  29. //
  30. if (dwReason == DLL_PROCESS_ATTACH)
  31. {
  32. DisableThreadLibraryCalls(hDllHandle);
  33. __security_init_cookie();
  34. }
  35. return TRUE;
  36. }