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.

67 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 1997-1999 Microsoft Corporation
  3. Module Name:
  4. p64_nt4.h
  5. Abstract:
  6. P64 Type Definitions for NT4. (This header file is
  7. used so our NT5 source tree can be compiled for NT4.)
  8. Revision History:
  9. 04/21/98 -fengy-
  10. Created it.
  11. --*/
  12. #ifndef _P64_NT4_H_
  13. #define _P64_NT4_H_
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. //
  18. // The LONG_PTR is guaranteed to be the same size as a pointer. Its
  19. // size with change with pointer size (32/64). It should be used
  20. // anywhere that a pointer is cast to an integer type. ULONG_PTR is
  21. // the unsigned variation.
  22. //
  23. typedef long LONG_PTR, *PLONG_PTR;
  24. typedef unsigned long ULONG_PTR, *PULONG_PTR;
  25. #ifndef _BASETSD_H_
  26. //
  27. // This is to resolve the typedef conflict with VC++ 6's basetsd.h,
  28. // which uses "typedef long INT_PTR, *PINT_PTR;".
  29. //
  30. typedef int INT_PTR, *PINT_PTR;
  31. #endif // _BASETSD_H_
  32. #define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
  33. #define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
  34. #define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
  35. #define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
  36. #define PtrToShort( p ) ((short)(LONG_PTR)(p) )
  37. #define IntToPtr( i ) ((VOID *)(INT_PTR)((int)i))
  38. #define ULongToPtr( ul ) ((VOID *)(ULONG_PTR)((unsigned long)ul))
  39. #define GWLP_USERDATA GWL_USERDATA
  40. #define DWLP_USER DWL_USER
  41. #define SetWindowLongPtr SetWindowLong
  42. #define GetWindowLongPtr GetWindowLong
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. #endif // _P64_NT4_H_