ptserver.idl
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 16k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. //-------------------------------------------------------------------------//
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (C) Microsoft Corporation, 1992 - 1996.
  5. //
  6. //  PTServer.idl : IDL source for advanced property server interface and 
  7. // supporting type definitions.
  8. //
  9. //-------------------------------------------------------------------------//
  10. cpp_quote("//-------------------------------------------------------------------------//")
  11. cpp_quote("//")
  12. cpp_quote("//  Microsoft Windows")
  13. cpp_quote("//  Copyright (C) Microsoft Corporation, 1992 - 1996.")
  14. cpp_quote("//")
  15. cpp_quote("//-------------------------------------------------------------------------//")
  16. import "oaidl.idl";
  17. import "ocidl.idl";
  18. import "propidl.idl";
  19. //-------------------------------------------------------------------------//
  20. //  BUGBUG - all property identifiers should eventually be publicized 
  21. //           in propidl.idl
  22. cpp_quote("")
  23. cpp_quote("//  FMTID_ImageSummaryInfo - Property IDs")
  24. cpp_quote("")
  25. cpp_quote("#define PIDISI_FILETYPE                 0x00000002L  // VT_LPWSTR")
  26. cpp_quote("#define PIDISI_CX                       0x00000003L  // VT_UI4")
  27. cpp_quote("#define PIDISI_CY                       0x00000004L  // VT_UI4")
  28. cpp_quote("#define PIDISI_RESOLUTIONX              0x00000005L  // VT_UI4")
  29. cpp_quote("#define PIDISI_RESOLUTIONY              0x00000006L  // VT_UI4")
  30. cpp_quote("#define PIDISI_BITDEPTH                 0x00000007L  // VT_UI4")
  31. cpp_quote("#define PIDISI_COLORSPACE               0x00000008L  // VT_LPWSTR")
  32. cpp_quote("#define PIDISI_COMPRESSION              0x00000009L  // VT_LPWSTR")
  33. cpp_quote("#define PIDISI_TRANSPARENCY             0x0000000AL  // VT_UI4")
  34. cpp_quote("#define PIDISI_GAMMAVALUE               0x0000000BL  // VT_UI4") 
  35. cpp_quote("")
  36. cpp_quote("")
  37. cpp_quote("//  FMTID_FaxSummaryInfo - Property IDs")
  38. cpp_quote("")
  39. cpp_quote("#define PIDFSI_TIME                0x00000002L  // VT_FILETIME")
  40. cpp_quote("#define PIDFSI_RECIPIENTNAME            0x00000003L  // VT_LPWSTR")
  41. cpp_quote("#define PIDFSI_RECIPIENTNUMBER          0x00000004L  // VT_LPWSTR")
  42. cpp_quote("#define PIDFSI_SENDERNAME               0x00000005L  // VT_LPWSTR")
  43. cpp_quote("#define PIDFSI_CALLERID                 0x00000006L  // VT_LPWSTR")
  44. cpp_quote("#define PIDFSI_TSID                     0x00000007L  // VT_LPWSTR")
  45. cpp_quote("#define PIDFSI_CSID                     0x00000008L  // VT_LPWSTR")
  46. cpp_quote("#define PIDFSI_ROUTING                  0x00000009L  // VT_LPWSTR")
  47. //-------------------------------------------------------------------------//
  48. cpp_quote( "// Source descriptor bits" )
  49. cpp_quote( "#define PTSD_DISKFILE 0x00000001" )
  50. cpp_quote( "#define PTSD_STORAGE 0x00000002" )
  51. cpp_quote( "#define PTSD_NSS 0x00000004" )
  52. cpp_quote( "#define PTSD_DATAOBJ 0x00000008" )
  53. //-------------------------------------------------------------------------//
  54. typedef struct tagPROPSERVERINFO
  55. {
  56. ULONG cbStruct ;
  57. ULONG mask ;
  58. ULONG ver ;
  59. ULONG dwSupport ; // source descriptor bits
  60. } PROPSERVERINFO, *PPROPSERVERINFO, *LPPROPSERVERINFO;
  61. //-------------------------------------------------------------------------//
  62. typedef struct tagPROPITEMHDR
  63. {
  64. ULONG cbStruct ;
  65. ULONG mask ;
  66. BSTR bstrName ;
  67. BSTR bstrDisplayName ;
  68. BSTR bstrQtip ;
  69. ULONG dwAccess ;
  70. LONG iOrder ;
  71. LONG lParam ;
  72. } PROPITEMHDR, *PPROPITEMHDR, *LPPROPITEMHDR ;
  73. cpp_quote( "// 'mask' member bit defs:" )
  74. cpp_quote( "#define PTI_NAME 0x00000001" )
  75. cpp_quote( "#define PTI_DISPLAYNAME 0x00000002" )
  76. cpp_quote( "#define PTI_QTIP 0x00000004" )
  77. cpp_quote( "#define PTI_ACCESS 0x00000008" )
  78. cpp_quote( "#define PTI_ORDER 0x00000010" )
  79. cpp_quote( "#define PTI_PARAM 0x00000020" )
  80. cpp_quote( "// 'dwAccess' bit defs" )
  81. cpp_quote( "#define PTIA_VISIBLE 0x00000001 // The property is displayed in the advanced property control" )
  82. cpp_quote( "#define PTIA_READ 0x00000010 // The property's value may be read" )
  83. cpp_quote( "#define PTIA_WRITE 0x00000020 // The property's value may be edited by the user" )
  84. cpp_quote( "#define PTIA_READWRITE PTIA_VISIBLE|PTIA_READ|PTIA_WRITE" )
  85. cpp_quote( "#define PTIA_READONLY PTIA_VISIBLE|PTIA_READ" )
  86. cpp_quote( "#define PTIA_WRITEONLY PTIA_VISIBLE|PTIA_WRITE" )
  87. cpp_quote("" )
  88. cpp_quote("//  Property Folder ID" )
  89. typedef GUID PFID ;
  90. typedef PFID *LPPFID ;
  91. cpp_quote("#define PFID_NULL GUID_NULL" )
  92. cpp_quote("#define IsEqualPFID(rpfid1, rpfid2)   IsEqualGUID((rpfid1), (rpfid2))" )
  93. cpp_quote("#if defined(__cplusplus)")
  94. cpp_quote("#ifndef _REFPFID_DEFINED")
  95. cpp_quote("#define _REFPFID_DEFINED")
  96. cpp_quote("#define REFPFID    const PFID&")
  97. cpp_quote("#endif // !_REFPFID_DEFINED")
  98. cpp_quote("#else // !__cplusplus")
  99. cpp_quote("#ifndef _REFPFID_DEFINED")
  100. cpp_quote("#define _REFPFID_DEFINED")
  101. cpp_quote("#define REFGUID             const PFID * const")
  102. cpp_quote("#endif // !_REFPFID_DEFINED")
  103. cpp_quote("#endif // !__cplusplus")
  104. cpp_quote("")
  105. cpp_quote("// Well-known Property Folder IDs")
  106. extern const PFID PFID_Description ;
  107. extern const PFID PFID_Origin ;
  108. extern const PFID PFID_ImageProperties ;
  109. extern const PFID PFID_AudioProperties ;
  110. extern const PFID PFID_VideoProperties ;
  111. extern const PFID PFID_MidiProperties ;
  112. extern const PFID PFID_FaxProperties ;
  113. //-------------------------------------------------------------------------//
  114. cpp_quote( "// PROPFOLDERITEM - advanced property folder item descriptor block." )
  115. typedef struct tagPROPFOLDERITEM
  116. {
  117. // (sync with PROPITEMHDR members)
  118. ULONG cbStruct ;
  119. ULONG mask ;
  120. BSTR bstrName ;
  121. BSTR bstrDisplayName ;
  122. BSTR bstrQtip ;
  123. ULONG dwAccess ;
  124. LONG iOrder ;
  125. LPARAM lParam ;
  126. // Folder-specific attributes:
  127. PFID pfid ;
  128. ULONG dwFlags ;
  129. } PROPFOLDERITEM, *PPROPFOLDERITEM, *LPPROPFOLDERITEM ;
  130. cpp_quote( "// PROPFOLDERITEM 'mask' bit defs:" )
  131. cpp_quote( "#define PTFI_NAME PTI_NAME" )
  132. cpp_quote( "#define PTFI_DISPLAYNAME PTI_DISPLAYNAME" )
  133. cpp_quote( "#define PTFI_QTIP PTI_QTIP" )
  134. cpp_quote( "#define PTFI_ACCESS PTI_ACCESS" )
  135. cpp_quote( "#define PTFI_ORDER PTI_ORDER" )
  136. cpp_quote( "#define PTFI_PARAM PTI_PARAM" )
  137. cpp_quote( "#define PTFI_FOLDERID 0x00000100" )
  138. cpp_quote( "#define PTFI_FLAGS 0x00000200" )
  139. cpp_quote( "#define PTFI_ALL 0xFFFFFFFF" )
  140. cpp_quote( "// PROPFOLDERITEM 'dwFlags' bit defs" )
  141. cpp_quote( "#define PTFIF_USERDEFINED 0x10000000 // The property is a user-defined folder" )
  142. //-------------------------------------------------------------------------//
  143. cpp_quote( "// PUID - property unique identifier." )
  144. cpp_quote( "// (devnote: do not modify order of members!)" )
  145. typedef struct tagPUID
  146. {
  147. FMTID   fmtid ;
  148. PROPID   propid ;
  149. VARTYPE   vt ;
  150. } PUID, *PPUID, *LPPUID ;
  151. //-------------------------------------------------------------------------//
  152. cpp_quote( "// Basic Property descriptor block" )
  153. typedef struct tagBASICPROPITEM
  154. {
  155. ULONG cbStruct ;
  156. ULONG dwAccess ;
  157. BOOL bDirty ;
  158. PUID puid ;
  159. PROPVARIANT val ;
  160. } BASICPROPITEM, *PBASICPROPITEM, *LPBASICPROPITEM ;
  161. //-------------------------------------------------------------------------//
  162. cpp_quote( "// PROPERTYITEM - advanced property item descriptor block." )
  163. typedef struct tagPROPERTYITEM
  164. {
  165. // (sync with PROPITEMHDR members)
  166. ULONG  cbStruct ;
  167. ULONG  mask ;
  168. BSTR  bstrName ;
  169. BSTR  bstrDisplayName ;
  170. BSTR  bstrQtip ;
  171. ULONG  dwAccess ;
  172. LONG  iOrder ;
  173. LPARAM  lParam ;
  174. // Property item-specific attributes:
  175. PUID  puid ;
  176. PFID  pfid ;
  177. ULONG  dwFlags ;
  178. ULONG  ctlID ;
  179. BSTR  bstrDisplayFmt ;
  180. ULONG  Reserved0 ;
  181. PROPVARIANT  val ;
  182. } PROPERTYITEM, *PPROPERTYITEM, *LPPROPERTYITEM ;
  183. cpp_quote( "// PROPERTYITEM 'mask' bit defs:" )
  184. cpp_quote( "#define PTPI_NAME PTI_NAME" )
  185. cpp_quote( "#define PTPI_DISPLAYNAME PTI_DISPLAYNAME" )
  186. cpp_quote( "#define PTPI_QTIP PTI_QTIP" )
  187. cpp_quote( "#define PTPI_ACCESS PTI_ACCESS" )
  188. cpp_quote( "#define PTPI_ORDER PTI_ORDER" )
  189. cpp_quote( "#define PTPI_PARAM PTI_PARAM" )
  190. cpp_quote( "#define PTPI_FMTID 0x00000100" )
  191. cpp_quote( "#define PTPI_PROPID 0x00000200" )
  192. cpp_quote( "#define PTPI_FOLDERID 0x00000400" )
  193. cpp_quote( "#define PTPI_FLAGS 0x00000800" )
  194. cpp_quote( "#define PTPI_VARTYPE 0x00001000" )
  195. cpp_quote( "#define PTPI_DISPLAYFMT 0x00002000" )
  196. cpp_quote( "#define PTPI_VALUE 0x00004000" )
  197. cpp_quote( "#define PTPI_ALL 0xFFFFFFFF" )
  198. cpp_quote( "// PROPERTYITEM 'dwFlags' bit defs" )
  199. cpp_quote( "#define PTPIF_BASIC         0x00000000  // The property control exhibits fundamental characteristics." )
  200. cpp_quote( "#define PTPIF_MRU           0x00000001  // The property control maintains a list of MRU values for the property." )
  201. cpp_quote( "#define PTPIF_ENUM          0x00000002  // The property control maintains a defined list of possible values." )
  202. cpp_quote( "#define PTPIF_TYPEMASK 0x0000000F  // mask for mutually exclusive values in low byte" )
  203. cpp_quote( "#define PTPIF_RANGED 0x00000010  // The property control validates a new value against a range of valid values" )
  204. cpp_quote( "#define PTPIF_INNATE     0x00000020 // The property's value is innate to its source, and cannot be modified." )
  205. cpp_quote( "#define PTPIF_USERDEFINED 0x10000000 // The property is a user-defined property (otherwise, the property is a 'stock' property." )
  206. cpp_quote( "// PROPERTYITEM 'ctlID' edit control specifiers" )
  207. typedef enum tagPTCTLID
  208. {
  209. PTCTLID_SINGLELINE_EDIT,
  210. PTCTLID_MULTILINE_EDIT,
  211. PTCTLID_DROPDOWN_COMBO,
  212. PTCTLID_DROPLIST_COMBO,
  213. PTCTLID_CALENDARTIME,
  214. PTCTLID_CALENDAR,
  215. PTCTLID_TIME,
  216. } PTCTLID, *PPTCTLID, *LPPTCTLID ;
  217. cpp_quote( "// PROPVARIANT_DISPLAY type: PROPVARIANT value + display string" )
  218. typedef struct tagPROPVARIANT_DISPLAY
  219. {
  220. PROPVARIANT val ;
  221. BSTR bstrDisplay ;
  222. } PROPVARIANT_DISPLAY, *PPROPVARIANT_DISPLAY, *LPPROPVARIANT_DISPLAY ;
  223. cpp_quote( "// IAdvancedPropertyServer::ReleaseProperties() 'dwFlags' argument values" )
  224. cpp_quote( "#define PTREL_DONE_ENUMERATING 0x00000001 // The control is finished enumerating property information for the source." )
  225. cpp_quote( "#define PTREL_CLOSE_SOURCE 0x00000002 // The source should be closed, if applicable." )
  226. cpp_quote( "#define PTREL_SOURCE_REMOVED 0xFFFFFFFF // The source has been removed from the control.  The server should release source resources permanently." )
  227. //-------------------------------------------------------------------------//
  228. // IBasicPropertyServer interface
  229. [
  230. uuid(C63D658C-7451-11d2-BE75-00A0C9A83DA1),
  231. helpstring("IBasicPropertyServer Interface"),
  232. pointer_default(unique)
  233. ]
  234. interface IBasicPropertyServer : IUnknown
  235. {
  236. [helpstring( "method AcquireBasic" )] 
  237. HRESULT AcquireBasic( [in] const VARIANT* pvarSrc, 
  238.   [in,out,size_is(cItems)] BASICPROPITEM rgItems[], 
  239.   [in]LONG cItems ) ;
  240.   
  241. [helpstring( "method PersistBasic" )] 
  242. HRESULT PersistBasic( [in] const VARIANT* pvarSrc, 
  243.   [in,out,size_is(cItems)] BASICPROPITEM rgItems[], 
  244.   [in]LONG cItems ) ;
  245. } ;
  246. //-------------------------------------------------------------------------//
  247. // IEnumPROPFOLDERITEM interface
  248. [
  249. uuid(1F183F5B-5C4D-11D1-8B83-080036B11A03),
  250. helpstring("IEnumPROPFOLDERITEM Interface"),
  251. pointer_default(unique)
  252. ]
  253. interface IEnumPROPFOLDERITEM : IUnknown
  254. {
  255. [helpstring( "method Next" )] 
  256. HRESULT Next( [in] ULONG cItems, 
  257.   [out,size_is(cItems), length_is(*pcItemsFetched)] PROPFOLDERITEM* rgFolderItem, 
  258.   [out] ULONG* pcItemsFetched ) ;
  259. [helpstring( "method Skip" )] 
  260. HRESULT Skip( [in] ULONG cItems ) ;
  261. [helpstring("method Reset")] 
  262. HRESULT Reset( ) ;
  263. [helpstring("method Clone")] 
  264. HRESULT Clone( [out] IEnumPROPFOLDERITEM ** ppEnum ) ;
  265. };
  266. //-------------------------------------------------------------------------//
  267. // IEnumPROPERTYITEM interface
  268. [
  269. uuid(1F183F5D-5C4D-11D1-8B83-080036B11A03),
  270. helpstring("IEnumPROPERTYITEM Interface"),
  271. pointer_default(unique)
  272. ]
  273. interface IEnumPROPERTYITEM : IUnknown
  274. {
  275. [helpstring( "method Next" )] 
  276. HRESULT Next( [in] ULONG cItems, 
  277.   [out,size_is(cItems), length_is(*pcItemsFetched)] PROPERTYITEM* rgPropertyItem, 
  278.   [out] ULONG* pcItemsFetched ) ;
  279. [helpstring( "method Skip" )] 
  280. HRESULT Skip( [in] ULONG cItems ) ;
  281. [helpstring("method Reset")] 
  282. HRESULT Reset( ) ;
  283. [helpstring("method Clone")] 
  284. HRESULT Clone( [out] IEnumPROPERTYITEM ** ppEnum ) ;
  285. };
  286. //-------------------------------------------------------------------------//
  287. // IEnumPROPVARIANT_DISPLAY interface
  288. [
  289. uuid(1F183F5F-5C4D-11D1-8B83-080036B11A03),
  290. helpstring("IEnumPROPVARIANT Interface"),
  291. pointer_default(unique)
  292. ]
  293. interface IEnumPROPVARIANT_DISPLAY : IUnknown
  294. {
  295. [helpstring("method Next"), local] 
  296. HRESULT Next( [in]  ULONG celt, 
  297.   [out] PROPVARIANT_DISPLAY* rgVar, 
  298.   [out] ULONG *pCeltFetched ) ;
  299. [helpstring("method RemoteNext"), call_as(Next) ] 
  300. HRESULT RemoteNext( [in] ULONG celt, 
  301.     [out, size_is(celt), length_is(*pCeltFetched)] PROPVARIANT_DISPLAY* rgVar, 
  302.     [out] ULONG *pCeltFetched ) ;
  303. [helpstring("method Skip")] 
  304. HRESULT Skip( [in] ULONG celt ) ;
  305. [helpstring("method Reset")] 
  306. HRESULT Reset() ;
  307. [helpstring("method Clone")] 
  308. HRESULT Clone( [out] IEnumPROPVARIANT_DISPLAY ** ppEnum ) ;
  309. };
  310. //-------------------------------------------------------------------------//
  311. // IAdvancedPropertyServer interface
  312. [
  313. uuid(1F183F59-5C4D-11D1-8B83-080036B11A03),
  314. helpstring("IAdvancedPropertyServer Interface"),
  315. pointer_default(unique)
  316. ]
  317. interface IAdvancedPropertyServer : IUnknown
  318. {
  319. [helpstring("method QueryServerInfo")] 
  320. HRESULT QueryServerInfo( [in,out] PROPSERVERINFO* pInfo ) ;
  321. [helpstring("method AcquireAdvanced")] 
  322. HRESULT AcquireAdvanced( [in] const VARIANT* pvarSrc,
  323.   [out]LPARAM * plParamSrc );
  324. [helpstring("method EnumFolderItems")] 
  325. HRESULT EnumFolderItems( [in]LPARAM lParamSrc, [out] IEnumPROPFOLDERITEM** ppEnum ) ;
  326. [helpstring("method EnumPropertyItems")] 
  327. HRESULT EnumPropertyItems( [in] const PROPFOLDERITEM* pFolderItem, 
  328.  [out] IEnumPROPERTYITEM ** ppEnum ) ;
  329. [helpstring("method EnumValidValues")]
  330. HRESULT EnumValidValues( [in] const PROPERTYITEM* pItem, 
  331.    [out] IEnumPROPVARIANT_DISPLAY ** ppEnum ) ;
  332. [helpstring("method PersistAdvanced")] 
  333. HRESULT PersistAdvanced( [in, out] PROPERTYITEM* pItem ) ;
  334. [helpstring("method ReleaseAdvanced")] 
  335. HRESULT ReleaseAdvanced( [in]LPARAM lParamSrc, [in] ULONG dwFlags ) ;
  336. } ;
  337. cpp_quote( "// STGFMT_NONE flag" )
  338. cpp_quote( "#define STGFMT_NONE 0xFFFFFFFF" )
  339. cpp_quote( "#define STGFMT_ERROR STGFMT_NONE" )
  340. cpp_quote( "// IPropertyServer::AcquireMultiple aValFlags flags" )
  341. cpp_quote( "#define AMPF_COMPOSITE 0x00000001" )
  342. cpp_quote( "#define AMPF_COMPOSITE_MISMATCH 0x00000002" )
  343. //-------------------------------------------------------------------------//
  344. // IPropertyServer interface - provides generic property services
  345. [
  346. uuid(1F183F58-5C4D-11D1-8B83-080036B11A03),
  347. helpstring("IPropertyServer Interface"),
  348. pointer_default(unique)
  349. ]
  350. interface IPropertyServer : IUnknown
  351. {
  352. [helpstring("method AcquireMultiple")] 
  353. HRESULT AcquireMultiple( [in]LONG cSrcs, 
  354.  [in]VARIANT* aSrcs,
  355.  [out]ULONG *aStgFmts,
  356.  [out]HRESULT *aResults,
  357.  [in]REFFMTID fmtid,
  358.  [in]LONG cProps,
  359.  [in]PROPSPEC* aSpecs, 
  360.  [out]PROPVARIANT* aVals,
  361.  [out]ULONG* aPropFlags ) ;
  362. [helpstring("method PersistMultiple")] 
  363. HRESULT PersistMultiple( [in]LONG cSrcs, 
  364.  [in]VARIANT* aSrcs,
  365.  [out]HRESULT *aResults,
  366.  [in]REFFMTID fmtid,
  367.  [in]LONG cProps,
  368.  [in]PROPSPEC* aSpecs, 
  369.  [in]PROPVARIANT* aVals,
  370.  [in]PROPID propidNameFirst ) ;
  371. HRESULT GetDisplayText( [in]REFFMTID fmtid,
  372. [in]LONG cProps,
  373. [in]PROPSPEC* aSpecs,
  374. [in]PROPVARIANT* aVals,
  375. [in]BSTR*  abstrFmt,
  376. [in]ULONG* adwFlags,
  377. [out] BSTR* abstrDisplay ) ;
  378. HRESULT AssignFromDisplayText( [in]REFFMTID fmtid,
  379.    [in]LONG cProps,
  380.    [in]PROPSPEC* aSpecs,
  381.    [in]BSTR* abstrDisplay,
  382.    [in]BSTR*  abstrFmt,
  383.    [in]ULONG* adwFlags,
  384.    [out]PROPVARIANT* aVals ) ;
  385. } ;