Source code of Windows XP (NT5)
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.

51 lines
1.4 KiB

  1. #include "precomp.hxx"
  2. #include <irtldbg.h>
  3. #include "alloc.h"
  4. /////////////////////////////////////////////////////////////////////////////
  5. // Globals
  6. // We always define these variables so that they exist in both free and
  7. // checked versions of iisrtl2.lib
  8. #ifndef _NO_TRACING_
  9. #include <initguid.h>
  10. DEFINE_GUID(IisRtlGuid,
  11. 0x784d8900, 0xaa8c, 0x11d2, 0x92, 0x5e, 0x00, 0xc0, 0x4f, 0x72, 0xd9, 0x0e);
  12. DECLARE_DEBUG_PRINTS_OBJECT()
  13. DECLARE_PLATFORM_TYPE()
  14. // NOTE: Anything that is initialized in IISRTLs DLLMAIN needs to be done here
  15. // too, the same for terminates.
  16. extern "C" CRITICAL_SECTION g_csGuidList;
  17. extern "C" LIST_ENTRY g_pGuidList;
  18. extern "C" DWORD g_dwSequenceNumber;
  19. // NOTE: It is mandatory that any program using the IISRTL2 calls the
  20. // initialize and terminate functions below at program startup and shutdown.
  21. extern "C" void InitializeIISRTL2()
  22. {
  23. InitializeCriticalSection(&g_csGuidList);
  24. InitializeListHead(&g_pGuidList);
  25. IisHeapInitialize();
  26. InitializeStringFunctions();
  27. }
  28. extern "C" void TerminateIISRTL2()
  29. {
  30. IisHeapTerminate();
  31. DeleteCriticalSection(&g_csGuidList);
  32. }
  33. #else
  34. // DECLARE_DEBUG_VARIABLE();
  35. extern "C" DWORD g_dwDebugFlags = DEBUG_ERROR;
  36. // DECLARE_DEBUG_PRINTS_OBJECT();
  37. extern "C" DEBUG_PRINTS* g_pDebug = NULL;
  38. // DECLARE_PLATFORM_TYPE();
  39. extern "C" PLATFORM_TYPE g_PlatformType = PtInvalid;
  40. #endif