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.

109 lines
2.7 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993-1999
  5. //
  6. // File: propset.h
  7. //
  8. // Contents: OLE Appendix B property set structure definitions
  9. //
  10. // History: 15-Jul-94 brianb created
  11. // 15-Aug-94 SethuR revised
  12. // 22-Feb-96 MikeHill Changed cb in tagENTRY to cch.
  13. // 28-May-96 MikeHill Changed OSVER_* to OSKIND_*.
  14. //
  15. //---------------------------------------------------------------------------
  16. #ifndef _PROPSET_H_
  17. #define _PROPSET_H_
  18. #if _MSC_VER > 1000
  19. #pragma once
  20. #endif
  21. // CBMAXPROPSETSTREAM must be a power of 2.
  22. #define CBMAXPROPSETSTREAM (1024 * 1024)
  23. #define IsIndirectVarType(vt) \
  24. ((vt) == VT_STREAM || \
  25. (vt) == VT_STREAMED_OBJECT || \
  26. (vt) == VT_STORAGE || \
  27. (vt) == VT_STORED_OBJECT || \
  28. (vt) == VT_VERSIONED_STREAM)
  29. // Defines for the high order WORD of dwOSVer:
  30. #define OSKIND_WINDOWS 0x0000
  31. #define OSKIND_MACINTOSH 0x0001
  32. #define OSKIND_WIN32 0x0002
  33. typedef struct tagFORMATIDOFFSET // fo
  34. {
  35. FMTID fmtid;
  36. DWORD dwOffset;
  37. } FORMATIDOFFSET;
  38. #define CB_FORMATIDOFFSET sizeof(FORMATIDOFFSET)
  39. typedef struct tagPROPERTYSETHEADER // ph
  40. {
  41. WORD wByteOrder; // Always 0xfffe
  42. WORD wFormat; // Always 0
  43. DWORD dwOSVer; // System version
  44. CLSID clsid; // Application CLSID
  45. DWORD reserved; // reserved (must be at least 1)
  46. } PROPERTYSETHEADER;
  47. #define CB_PROPERTYSETHEADER sizeof(PROPERTYSETHEADER)
  48. #define PROPSET_BYTEORDER 0xFFFE
  49. typedef struct tagPROPERTYIDOFFSET // po
  50. {
  51. DWORD propid;
  52. DWORD dwOffset;
  53. } PROPERTYIDOFFSET;
  54. #define CB_PROPERTYIDOFFSET sizeof(PROPERTYIDOFFSET)
  55. typedef struct tagPROPERTYSECTIONHEADER // sh
  56. {
  57. DWORD cbSection;
  58. DWORD cProperties;
  59. PROPERTYIDOFFSET rgprop[1];
  60. } PROPERTYSECTIONHEADER;
  61. #define CB_PROPERTYSECTIONHEADER FIELD_OFFSET(PROPERTYSECTIONHEADER, rgprop)
  62. typedef struct tagSERIALIZEDPROPERTYVALUE // prop
  63. {
  64. DWORD dwType;
  65. BYTE rgb[1];
  66. } SERIALIZEDPROPERTYVALUE;
  67. #define CB_SERIALIZEDPROPERTYVALUE FIELD_OFFSET(SERIALIZEDPROPERTYVALUE, rgb)
  68. typedef struct tagENTRY // ent
  69. {
  70. DWORD propid;
  71. DWORD cch; // Includes trailing '\0' or L'\0'
  72. char sz[1]; // WCHAR if UNICODE CodePage
  73. } ENTRY;
  74. #define CB_DICTIONARY_ENTRY FIELD_OFFSET(ENTRY, sz)
  75. typedef struct tagDICTIONARY // dy
  76. {
  77. DWORD cEntries;
  78. ENTRY rgEntry[1];
  79. } DICTIONARY;
  80. #define CB_DICTIONARY FIELD_OFFSET(DICTIONARY, rgEntry)
  81. #endif // _PROPSET_H_