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.

85 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. precomp.hxx
  5. Abstract:
  6. Precompiled header for the Service Controller. Pulls in all the
  7. system headers and local headers appearing in 13 or more files.
  8. This precompiled header is used only when compiling C++ files,
  9. not C files.
  10. Author:
  11. Anirudh Sahnni (anirudhs) 14-Aug-1996
  12. Revision History:
  13. --*/
  14. #ifndef __PRECOMP_HXX
  15. #define __PRECOMP_HXX
  16. extern "C"
  17. {
  18. #include <scpragma.h>
  19. #include <nt.h> // for ntrtl.h
  20. #include <ntrtl.h> // DbgPrint prototype
  21. #include <nturtl.h> // needed for windows.h when I have nt.h
  22. }
  23. #include <windows.h>
  24. #include <stdlib.h>
  25. #include <rpc.h> // Data types and runtime APIs
  26. #include <tstr.h> // WCSSIZE and other Unicode string macros
  27. #include <svcctl.h> // MIDL-generated header file
  28. #include <scdebug.h> // SC_LOG, SC_ASSERT
  29. #include "dataman.h" // Data types
  30. #include "lock.h" // Database locks
  31. #include "scopen.h" // Handle types, signatures, also needed for scsec.h
  32. #include "svcctrl.h" // ScLogEvent, ScShutdownInProgress, ScRemoveServiceBits
  33. #include "ScLastGood.h" // Last known good support
  34. #include "NCEvents.h" // Non-COM WMI events
  35. //+-------------------------------------------------------------------------
  36. //
  37. // Operator: new
  38. //
  39. // Synopsis: Allocates memory. Defined to avoid pulling in both the CRT
  40. // and the Win32 implementations of the heap.
  41. //
  42. // Arguments: [cb] - a count of bytes to allocate
  43. //
  44. // Returns: a pointer to the allocated block.
  45. //
  46. //--------------------------------------------------------------------------
  47. inline void * __cdecl operator new(size_t cb)
  48. {
  49. return LocalAlloc(LPTR, cb);
  50. }
  51. //+-------------------------------------------------------------------------
  52. //
  53. // Operator: delete
  54. //
  55. // Synopsis: Frees memory allocated with new.
  56. //
  57. // Arguments: [ptr] - a pointer to the allocated memory.
  58. //
  59. //--------------------------------------------------------------------------
  60. inline void __cdecl operator delete(void * ptr)
  61. {
  62. if (ptr != NULL)
  63. {
  64. LocalFree(ptr);
  65. }
  66. }
  67. #endif