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.

96 lines
2.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1998 - 1999
  5. //
  6. // File: ci64.hxx
  7. //
  8. // Contents: Content index specific 32 <-> 64 bit portability definitions
  9. //
  10. // History: 22-Apr-98 vikasman Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #pragma once
  14. #include <basetsd.h>
  15. #include <limits.h>
  16. #include "cidebnot.h"
  17. inline LONG CiPtrToLong( LONG_PTR p )
  18. {
  19. Win4Assert( p <= LONG_MAX && p >= LONG_MIN );
  20. return PtrToLong( (PVOID)p );
  21. }
  22. #define CiPtrToInt( p ) CiPtrToLong( p )
  23. inline ULONG CiPtrToUlong( ULONG_PTR p )
  24. {
  25. Win4Assert( p <= ULONG_MAX );
  26. return PtrToUlong( (PVOID)p );
  27. }
  28. #define CiPtrToUint( p ) CiPtrToUlong( p )
  29. //
  30. // On Win64 a PROPVARIANT is 24 bytes
  31. // 2 for vartype
  32. // 6 for packing
  33. // 4 for ULONG count
  34. // 4 for alignment
  35. // 8 for pointer
  36. //
  37. // On Win32 a PROPVARIANT is 16 bytes
  38. // 2 for vartype
  39. // 6 for packing
  40. // 4 for ULONG count
  41. // 4 for pointer
  42. //
  43. #define SizeOfWin32PROPVARIANT 16
  44. #ifdef _WIN64
  45. #define PTR32 DWORD
  46. #else
  47. #define PTR32 LPVOID
  48. #endif
  49. typedef struct tagBLOB32
  50. {
  51. ULONG cbSize; // number of bytes
  52. PTR32 pBlob; // 32 pointer
  53. } BLOB32;
  54. typedef struct tagPROPVARIANT32
  55. {
  56. VARTYPE vt;
  57. WORD wReserved1;
  58. WORD wReserved2;
  59. WORD wReserved3;
  60. union
  61. {
  62. PTR32 p; // 32 bit pointer
  63. BLOB32 blob; // blob data
  64. ULONGLONG uhVal; // 64 bit data
  65. };
  66. }PROPVARIANT32;
  67. typedef struct tagSAFEARRAY32
  68. {
  69. USHORT cDims;
  70. USHORT fFeatures;
  71. ULONG cbElements;
  72. ULONG cLocks;
  73. PTR32 pvData; // 32-bit pointer
  74. SAFEARRAYBOUND rgsabound[ 1 ];
  75. } SAFEARRAY32;
  76. typedef struct tagCLIPDATA32
  77. {
  78. ULONG cbSize;
  79. long ulClipFmt;
  80. /* [size_is] */ PTR32 pClipData;
  81. } CLIPDATA32;