00001 //+-------------------------------------------------------------------------- 00002 // 00003 // Microsoft Windows 00004 // Copyright (C) Microsoft Corporation, 1993-1998 00005 // 00006 // File: propset.h 00007 // 00008 // Contents: OLE Appendix B property set structure definitions 00009 // 00010 // History: 15-Jul-94 brianb created 00011 // 15-Aug-94 SethuR revised 00012 // 22-Feb-96 MikeHill Changed cb in tagENTRY to cch. 00013 // 28-May-96 MikeHill Changed OSVER_* to OSKIND_*. 00014 // 00015 //--------------------------------------------------------------------------- 00016 00017 #ifndef _PROPSET_H_ 00018 #define _PROPSET_H_ 00019 00020 // CBMAXPROPSETSTREAM must be a power of 2. 00021 #define CBMAXPROPSETSTREAM (256 * 1024) 00022 00023 #define IsIndirectVarType(vt) \ 00024 ((vt) == VT_STREAM || \ 00025 (vt) == VT_STREAMED_OBJECT || \ 00026 (vt) == VT_STORAGE || \ 00027 (vt) == VT_STORED_OBJECT) 00028 00029 00030 // Defines for the high order WORD of dwOSVer: 00031 00032 #define OSKIND_WINDOWS 0x0000 00033 #define OSKIND_MACINTOSH 0x0001 00034 #define OSKIND_WIN32 0x0002 00035 00036 00037 typedef struct tagFORMATIDOFFSET // fo 00038 { 00039 FMTID fmtid; 00040 DWORD dwOffset; 00041 } FORMATIDOFFSET; 00042 00043 #define CB_FORMATIDOFFSET sizeof(FORMATIDOFFSET) 00044 00045 00046 typedef struct tagPROPERTYSETHEADER // ph 00047 { 00048 WORD wByteOrder; // Always 0xfffe 00049 WORD wFormat; // Always 0 00050 DWORD dwOSVer; // System version 00051 CLSID clsid; // Application CLSID 00052 DWORD reserved; // reserved (must be at least 1) 00053 } PROPERTYSETHEADER; 00054 00055 #define CB_PROPERTYSETHEADER sizeof(PROPERTYSETHEADER) 00056 #define PROPSET_BYTEORDER 0xFFFE 00057 00058 00059 typedef struct tagPROPERTYIDOFFSET // po 00060 { 00061 DWORD propid; 00062 DWORD dwOffset; 00063 } PROPERTYIDOFFSET; 00064 00065 #define CB_PROPERTYIDOFFSET sizeof(PROPERTYIDOFFSET) 00066 00067 00068 typedef struct tagPROPERTYSECTIONHEADER // sh 00069 { 00070 DWORD cbSection; 00071 DWORD cProperties; 00072 PROPERTYIDOFFSET rgprop[1]; 00073 } PROPERTYSECTIONHEADER; 00074 00075 #define CB_PROPERTYSECTIONHEADER FIELD_OFFSET(PROPERTYSECTIONHEADER, rgprop) 00076 00077 00078 typedef struct tagSERIALIZEDPROPERTYVALUE // prop 00079 { 00080 DWORD dwType; 00081 BYTE rgb[1]; 00082 } SERIALIZEDPROPERTYVALUE; 00083 00084 #define CB_SERIALIZEDPROPERTYVALUE FIELD_OFFSET(SERIALIZEDPROPERTYVALUE, rgb) 00085 00086 00087 typedef struct tagENTRY // ent 00088 { 00089 DWORD propid; 00090 DWORD cch; // Includes trailing '\0' or L'\0' 00091 char sz[1]; // WCHAR if UNICODE CodePage 00092 } ENTRY; 00093 00094 #define CB_ENTRY FIELD_OFFSET(ENTRY, sz) 00095 00096 00097 typedef struct tagDICTIONARY // dy 00098 { 00099 DWORD cEntries; 00100 ENTRY rgEntry[1]; 00101 } DICTIONARY; 00102 00103 #define CB_DICTIONARY FIELD_OFFSET(DICTIONARY, rgEntry) 00104 00105 #endif // _PROPSET_H_