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.

38 lines
790 B

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. vfmacro.h
  5. Abstract:
  6. This header contains a collection of macros used by the verifier.
  7. Author:
  8. Adrian J. Oney (AdriaO) June 7, 2000.
  9. Revision History:
  10. --*/
  11. //
  12. // This macro takes an array and returns the number of elements in it.
  13. //
  14. #define ARRAY_COUNT(array) (sizeof(array)/sizeof(array[0]))
  15. //
  16. // This macro takes a value and an alignment and rounds the entry up
  17. // appropriately. The alignment MUST be a power of two!
  18. //
  19. #define ALIGN_UP_ULONG(value, alignment) (((value)+(alignment)-1)&(~(alignment-1)))
  20. //
  21. // This macro compares two guids in their binary form for equivalence.
  22. //
  23. #define IS_EQUAL_GUID(a,b) (RtlCompareMemory(a, b, sizeof(GUID)) == sizeof(GUID))