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.

44 lines
696 B

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. macros.hxx
  5. Abstract:
  6. commonly used macros
  7. Author:
  8. Larry Zhu (LZhu) December 1, 2001
  9. Environment:
  10. User Mode
  11. Revision History:
  12. --*/
  13. #ifndef MACROS_HXX
  14. #define MACROS_HXX
  15. //
  16. // General arrary count.
  17. //
  18. #ifndef COUNTOF
  19. #define COUNTOF(s) ( sizeof( (s) ) / sizeof( *(s) ) )
  20. #endif // COUNTOF
  21. //
  22. // Following macro is used to initialize UNICODE strings
  23. //
  24. #ifndef CONSTANT_UNICODE_STRING
  25. #define CONSTANT_UNICODE_STRING(s) { sizeof( s ) - sizeof( WCHAR ), sizeof( s ), s }
  26. #endif // CONSTANT_UNICODE_STRING
  27. #endif // #ifndef MACROS_HXX