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.

50 lines
1.9 KiB

  1. #pragma once
  2. //#include <nt.h>
  3. //#include <ntrtl.h>
  4. //#include <nturtl.h>
  5. #include <windows.h>
  6. #include <wtypes.h>
  7. #include <windef.h>
  8. #include <setupapi.h>
  9. #include <winver.h>
  10. #include <tchar.h>
  11. #include <stdio.h>
  12. #include <time.h>
  13. #include "regdiff.h"
  14. #include "top.h"
  15. #define SIZEOF_STRING_W(String) ((wcslen(String) + 1) * sizeof (WCHAR))
  16. #define ELEMSOFARRAY(a) (sizeof(a) / sizeof((a)[0]))
  17. #define MAKEULONGLONG(low,high) ((ULONGLONG)(((DWORD)(low)) | ((ULONGLONG)((DWORD)(high))) << 32))
  18. #define HIULONG(_val_) ((ULONG)(_val_>>32))
  19. #define LOULONG(_val_) ((ULONG)_val_)
  20. #define UNICODE_TO_ANSI(u,uchars,a,asize) \
  21. ::WideCharToMultiByte ( \
  22. CP_ACP, \
  23. 0, \
  24. (u), \
  25. (uchars), \
  26. (a), \
  27. (asize), \
  28. NULL, \
  29. NULL \
  30. ) \
  31. #define ANSI_TO_UNICODE(a,asize,u,uchars) \
  32. ::MultiByteToWideChar ( \
  33. CP_ACP, \
  34. 0, \
  35. (a), \
  36. (asize), \
  37. (u), \
  38. (uchars) \
  39. ) \
  40. #define OOM() SetLastError(ERROR_NOT_ENOUGH_MEMORY)
  41. #define INVALID_PARAM() SetLastError(ERROR_INVALID_PARAMETER)
  42. #define INVALID_FUNC() SetLastError(ERROR_INVALID_FUNCTION)