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.

90 lines
1.9 KiB

  1. // cmnhdr.h : This file contains the
  2. // Created: Dec '97
  3. // Author : a-rakeba
  4. // History:
  5. // Copyright (C) 1997 Microsoft Corporation
  6. // All rights reserved.
  7. // Microsoft Confidential
  8. #if !defined ( _CMNHDR_H_ )
  9. #define _CMNHDR_H_
  10. // Disabel some warnings so that the code compiles cleanly
  11. // using warning Level 4 (more to do with code in the windows
  12. // header files )
  13. // nonstandard extension used : nameless struct/union
  14. #pragma warning(disable:4201)
  15. #pragma warning(disable:4514)
  16. // Windows Version Build Option
  17. #ifdef _WIN32_WINNT
  18. #undef _WIN32_WINNT
  19. #endif
  20. #define _WIN32_WINNT 0x0500
  21. // Force all EXEs/DLLs to use STRICT type checking
  22. #ifndef STRICT
  23. #define STRICT
  24. #endif
  25. // Unicode Build Option
  26. #ifndef UNICODE
  27. #define UNICODE
  28. #endif
  29. //When using Unicode Win32 functions, use Unicode C-Runtime functions, too
  30. #ifndef _UNICODE
  31. #ifdef UNICODE
  32. #define _UNICODE
  33. #endif
  34. #endif
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. extern void *SfuZeroMemory(
  40. void *ptr,
  41. unsigned int cnt
  42. );
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. // Zero Variable Macro
  47. // Zero out a structure. If fInitSize is TRUE, initialize the first
  48. // int to the size of the structure.
  49. #define chINITSTRUCT(structure, fInitSize) \
  50. (SfuZeroMemory(&(structure), sizeof(structure)), \
  51. fInitSize ? (*(int*) &(structure) = sizeof(structure)) : 0)
  52. // Pragma message helper macro
  53. /* When the compiler sees a line like this:
  54. #pragma chMSG(Fix this before shipping)
  55. it outputs a line like this:
  56. C:\ons\telnet\utils\cmnhdr.h(37):
  57. Fix this before shipping
  58. Just click on that output line & VC++ will take you to the
  59. corresponding line in the code
  60. */
  61. #define chSTR(x) #x
  62. #define chSTR2(x) chSTR(x)
  63. #define chMSG(desc) \
  64. message(__FILE__ "(" chSTR2(__LINE__) "): " #desc)
  65. #endif // _CMNHDR_H_