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.

105 lines
2.6 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993-1998
  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. // CBMAXPROPSETSTREAM must be a power of 2.
  19. #define CBMAXPROPSETSTREAM (256 * 1024)
  20. #define IsIndirectVarType(vt) \
  21. ((vt) == VT_STREAM || \
  22. (vt) == VT_STREAMED_OBJECT || \
  23. (vt) == VT_STORAGE || \
  24. (vt) == VT_STORED_OBJECT)
  25. // Defines for the high order WORD of dwOSVer:
  26. #define OSKIND_WINDOWS 0x0000
  27. #define OSKIND_MACINTOSH 0x0001
  28. #define OSKIND_WIN32 0x0002
  29. typedef struct tagFORMATIDOFFSET // fo
  30. {
  31. FMTID fmtid;
  32. DWORD dwOffset;
  33. } FORMATIDOFFSET;
  34. #define CB_FORMATIDOFFSET sizeof(FORMATIDOFFSET)
  35. typedef struct tagPROPERTYSETHEADER // ph
  36. {
  37. WORD wByteOrder; // Always 0xfffe
  38. WORD wFormat; // Always 0
  39. DWORD dwOSVer; // System version
  40. CLSID clsid; // Application CLSID
  41. DWORD reserved; // reserved (must be at least 1)
  42. } PROPERTYSETHEADER;
  43. #define CB_PROPERTYSETHEADER sizeof(PROPERTYSETHEADER)
  44. #define PROPSET_BYTEORDER 0xFFFE
  45. typedef struct tagPROPERTYIDOFFSET // po
  46. {
  47. DWORD propid;
  48. DWORD dwOffset;
  49. } PROPERTYIDOFFSET;
  50. #define CB_PROPERTYIDOFFSET sizeof(PROPERTYIDOFFSET)
  51. typedef struct tagPROPERTYSECTIONHEADER // sh
  52. {
  53. DWORD cbSection;
  54. DWORD cProperties;
  55. PROPERTYIDOFFSET rgprop[1];
  56. } PROPERTYSECTIONHEADER;
  57. #define CB_PROPERTYSECTIONHEADER FIELD_OFFSET(PROPERTYSECTIONHEADER, rgprop)
  58. typedef struct tagSERIALIZEDPROPERTYVALUE // prop
  59. {
  60. DWORD dwType;
  61. BYTE rgb[1];
  62. } SERIALIZEDPROPERTYVALUE;
  63. #define CB_SERIALIZEDPROPERTYVALUE FIELD_OFFSET(SERIALIZEDPROPERTYVALUE, rgb)
  64. typedef struct tagENTRY // ent
  65. {
  66. DWORD propid;
  67. DWORD cch; // Includes trailing '\0' or L'\0'
  68. char sz[1]; // WCHAR if UNICODE CodePage
  69. } ENTRY;
  70. #define CB_ENTRY FIELD_OFFSET(ENTRY, sz)
  71. typedef struct tagDICTIONARY // dy
  72. {
  73. DWORD cEntries;
  74. ENTRY rgEntry[1];
  75. } DICTIONARY;
  76. #define CB_DICTIONARY FIELD_OFFSET(DICTIONARY, rgEntry)
  77. #endif // _PROPSET_H_