home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 April / PCWorld_2000-04_cd.bin / Software / Servis / Devc / _SETUP.4 / Group3 / olectl.h < prev    next >
C/C++ Source or Header  |  1999-11-07  |  25KB  |  697 lines

  1. #ifndef _OLECTL_H
  2. #define _OLECTL_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6.  
  7. #include <olectlid.h>
  8.  
  9. #define STD_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR,FACILITY_CONTROL,n)
  10. #define CTL_E_ILLEGALFUNCTIONCALL STD_CTL_SCODE(5)
  11. #define CTL_E_OVERFLOW STD_CTL_SCODE(6)
  12. #define CTL_E_OUTOFMEMORY STD_CTL_SCODE(7)
  13. #define CTL_E_DIVISIONBYZERO STD_CTL_SCODE(11)
  14. #define CTL_E_OUTOFSTRINGSPACE STD_CTL_SCODE(14)
  15. #define CTL_E_OUTOFSTACKSPACE STD_CTL_SCODE(28)
  16. #define CTL_E_BADFILENAMEORNUMBER STD_CTL_SCODE(52)
  17. #define CTL_E_FILENOTFOUND STD_CTL_SCODE(53)
  18. #define CTL_E_BADFILEMODE STD_CTL_SCODE(54)
  19. #define CTL_E_FILEALREADYOPEN STD_CTL_SCODE(55)
  20. #define CTL_E_DEVICEIOERROR STD_CTL_SCODE(57)
  21. #define CTL_E_FILEALREADYEXISTS STD_CTL_SCODE(58)
  22. #define CTL_E_BADRECORDLENGTH STD_CTL_SCODE(59)
  23. #define CTL_E_DISKFULL STD_CTL_SCODE(61)
  24. #define CTL_E_BADRECORDNUMBER STD_CTL_SCODE(63)
  25. #define CTL_E_BADFILENAME STD_CTL_SCODE(64)
  26. #define CTL_E_TOOMANYFILES STD_CTL_SCODE(67)
  27. #define CTL_E_DEVICEUNAVAILABLE STD_CTL_SCODE(68)
  28. #define CTL_E_PERMISSIONDENIED STD_CTL_SCODE(70)
  29. #define CTL_E_DISKNOTREADY STD_CTL_SCODE(71)
  30. #define CTL_E_PATHFILEACCESSERROR STD_CTL_SCODE(75)
  31. #define CTL_E_PATHNOTFOUND STD_CTL_SCODE(76)
  32. #define CTL_E_INVALIDPATTERNSTRING STD_CTL_SCODE(93)
  33. #define CTL_E_INVALIDUSEOFNULL STD_CTL_SCODE(94)
  34. #define CTL_E_INVALIDFILEFORMAT STD_CTL_SCODE(321)
  35. #define CTL_E_INVALIDPROPERTYVALUE STD_CTL_SCODE(380)
  36. #define CTL_E_INVALIDPROPERTYARRAYINDEX STD_CTL_SCODE(381)
  37. #define CTL_E_SETNOTSUPPORTEDATRUNTIME STD_CTL_SCODE(382)
  38. #define CTL_E_SETNOTSUPPORTED STD_CTL_SCODE(383)
  39. #define CTL_E_NEEDPROPERTYARRAYINDEX STD_CTL_SCODE(385)
  40. #define CTL_E_SETNOTPERMITTED STD_CTL_SCODE(387)
  41. #define CTL_E_GETNOTSUPPORTEDATRUNTIME STD_CTL_SCODE(393)
  42. #define CTL_E_GETNOTSUPPORTED STD_CTL_SCODE(394)
  43. #define CTL_E_PROPERTYNOTFOUND STD_CTL_SCODE(422)
  44. #define CTL_E_INVALIDCLIPBOARDFORMAT STD_CTL_SCODE(460)
  45. #define CTL_E_INVALIDPICTURE STD_CTL_SCODE(481)
  46. #define CTL_E_PRINTERERROR STD_CTL_SCODE(482)
  47. #define CTL_E_CANTSAVEFILETOTEMP STD_CTL_SCODE(735)
  48. #define CTL_E_SEARCHTEXTNOTFOUND STD_CTL_SCODE(744)
  49. #define CTL_E_REPLACEMENTSTOOLONG STD_CTL_SCODE(746)
  50. #define CUSTOM_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR,FACILITY_CONTROL,n)
  51. #define CTL_E_CUSTOM_FIRST CUSTOM_CTL_SCODE(600)
  52. #define CLASS_E_NOTLICENSED (CLASSFACTORY_E_FIRST+2)
  53. #define CONNECT_E_FIRST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x200)
  54. #define CONNECT_E_LAST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x20F)
  55. #define CONNECT_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x200)
  56. #define CONNECT_S_LAST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x20F)
  57. #define CONNECT_E_NOCONNECTION (CONNECT_E_FIRST+0)
  58. #define CONNECT_E_ADVISELIMIT (CONNECT_E_FIRST+1)
  59. #define CONNECT_E_CANNOTCONNECT (CONNECT_E_FIRST+2)
  60. #define CONNECT_E_OVERRIDDEN (CONNECT_E_FIRST+3)
  61. #define SELFREG_E_FIRST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x200)
  62. #define SELFREG_E_LAST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x20F)
  63. #define SELFREG_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x200)
  64. #define SELFREG_S_LAST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x20F)
  65. #define SELFREG_E_TYPELIB (SELFREG_E_FIRST+0)
  66. #define SELFREG_E_CLASS (SELFREG_E_FIRST+1)
  67. #define PERPROP_E_FIRST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x200)
  68. #define PERPROP_E_LAST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x20F)
  69. #define PERPROP_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x200)
  70. #define PERPROP_S_LAST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x20F)
  71. #define PERPROP_E_NOPAGEAVAILABLE PERPROP_E_FIRST
  72. #define OLEMISC_RECOMPOSEONRESIZE 0x1
  73. #define OLEMISC_ONLYICONIC 0x2
  74. #define OLEMISC_INSERTNOTREPLACE 0x4
  75. #define OLEMISC_STATIC 0x8
  76. #define OLEMISC_CANTLINKINSIDE 0x10
  77. #define OLEMISC_CANLINKBYOLE1 0x20
  78. #define OLEMISC_ISLINKOBJECT 0x40
  79. #define OLEMISC_INSIDEOUT 0x80
  80. #define OLEMISC_ACTIVATEWHENVISIBLE 0x100
  81. #define OLEMISC_RENDERINGISDEVICEINDEPENDENT 0x200
  82. #define OLEMISC_INVISIBLEATRUNTIME 0x400
  83. #define OLEMISC_ALWAYSRUN 0x800
  84. #define OLEMISC_ACTSLIKEBUTTON 0x1000
  85. #define OLEMISC_ACTSLIKELABEL 0x2000
  86. #define OLEMISC_NOUIACTIVATE 0x4000
  87. #define OLEMISC_ALIGNABLE 0x8000
  88. #define OLEMISC_SIMPLEFRAME 0x10000
  89. #define OLEMISC_SETCLIENTSITEFIRST 0x20000
  90. #define OLEMISC_IMEMODE 0x40000
  91. #define OLEMISC_IGNOREACTIVATEWHENVISIBLE 0x80000
  92. #define OLEMISC_WANTSTOMENUMERGE 0x100000
  93. #define OLEMISC_SUPPORTSMULTILEVELUNDO 0x200000
  94. #define OLEIVERB_PROPERTIES (-7)
  95. #define VT_STREAMED_PROPSET 73
  96. #define VT_STORED_PROPSET 74
  97. #define VT_BLOB_PROPSET 75
  98. #define VT_VERBOSE_ENUM    76
  99. #define VT_COLOR VT_I4
  100. #define VT_XPOS_PIXELS VT_I4
  101. #define VT_YPOS_PIXELS VT_I4
  102. #define VT_XSIZE_PIXELS VT_I4
  103. #define VT_YSIZE_PIXELS VT_I4
  104. #define VT_XPOS_HIMETRIC VT_I4
  105. #define VT_YPOS_HIMETRIC VT_I4
  106. #define VT_XSIZE_HIMETRIC VT_I4
  107. #define VT_YSIZE_HIMETRIC VT_I4
  108. #define VT_TRISTATE VT_I2
  109. #define VT_OPTEXCLUSIVE VT_BOOL
  110. #define VT_FONT VT_DISPATCH
  111. #define VT_PICTURE VT_DISPATCH
  112. #define VT_HANDLE VT_I4
  113. #define OCM__BASE (WM_USER+0x1c00)
  114. #define OCM_COMMAND (OCM__BASE+WM_COMMAND)
  115. #define OCM_CTLCOLORBTN (OCM__BASE+WM_CTLCOLORBTN)
  116. #define OCM_CTLCOLOREDIT (OCM__BASE+WM_CTLCOLOREDIT)
  117. #define OCM_CTLCOLORDLG (OCM__BASE+WM_CTLCOLORDLG)
  118. #define OCM_CTLCOLORLISTBOX (OCM__BASE+WM_CTLCOLORLISTBOX)
  119. #define OCM_CTLCOLORMSGBOX (OCM__BASE+WM_CTLCOLORMSGBOX)
  120. #define OCM_CTLCOLORSCROLLBAR (OCM__BASE+WM_CTLCOLORSCROLLBAR)
  121. #define OCM_CTLCOLORSTATIC (OCM__BASE+WM_CTLCOLORSTATIC)
  122. #define OCM_DRAWITEM (OCM__BASE+WM_DRAWITEM)
  123. #define OCM_MEASUREITEM (OCM__BASE+WM_MEASUREITEM)
  124. #define OCM_DELETEITEM (OCM__BASE+WM_DELETEITEM)
  125. #define OCM_VKEYTOITEM (OCM__BASE+WM_VKEYTOITEM)
  126. #define OCM_CHARTOITEM (OCM__BASE+WM_CHARTOITEM)
  127. #define OCM_COMPAREITEM (OCM__BASE+WM_COMPAREITEM)
  128. #define OCM_HSCROLL (OCM__BASE+WM_HSCROLL)
  129. #define OCM_VSCROLL (OCM__BASE+WM_VSCROLL)
  130. #define OCM_PARENTNOTIFY (OCM__BASE+WM_PARENTNOTIFY)
  131. #define OCM_NOTIFY (OCM__BASE+WM_NOTIFY)
  132. #define CTRLINFO_EATS_RETURN 1 
  133. #define CTRLINFO_EATS_ESCAPE 2 
  134. #define XFORMCOORDS_POSITION 1
  135. #define XFORMCOORDS_SIZE 2
  136. #define XFORMCOORDS_HIMETRICTOCONTAINER 4
  137. #define XFORMCOORDS_CONTAINERTOHIMETRIC 8
  138. #define GUIDKIND_DEFAULT_SOURCE_DISP_IID 1
  139. #define PROPPAGESTATUS_DIRTY 1
  140. #define PROPPAGESTATUS_VALIDATE 2
  141. #define FONTSIZE(n) {n##0000,0}
  142. #define PICTURE_SCALABLE 1
  143. #define PICTURE_TRANSPARENT 2
  144. #define PICTYPE_UNINITIALIZED (-1)
  145. #define PICTYPE_NONE    0
  146. #define PICTYPE_BITMAP    1
  147. #define PICTYPE_METAFILE    2
  148. #define PICTYPE_ICON    3
  149. #define PICTYPE_ENHMETAFILE    4
  150. #define DISPID_AUTOSIZE (-500)
  151. #define DISPID_BACKCOLOR (-501)
  152. #define DISPID_BACKSTYLE (-502)
  153. #define DISPID_BORDERCOLOR (-503)
  154. #define DISPID_BORDERSTYLE (-504)
  155. #define DISPID_BORDERWIDTH (-505)
  156. #define DISPID_DRAWMODE (-507)
  157. #define DISPID_DRAWSTYLE (-508)
  158. #define DISPID_DRAWWIDTH (-509)
  159. #define DISPID_FILLCOLOR (-510)
  160. #define DISPID_FILLSTYLE (-511)
  161. #define DISPID_FONT (-512)
  162. #define DISPID_FORECOLOR (-513)
  163. #define DISPID_ENABLED (-514)
  164. #define DISPID_HWND (-515)
  165. #define DISPID_TABSTOP (-516)
  166. #define DISPID_TEXT (-517)
  167. #define DISPID_CAPTION (-518)
  168. #define DISPID_BORDERVISIBLE (-519)
  169. #define DISPID_APPEARANCE    (-520)
  170. #define DISPID_REFRESH (-550)
  171. #define DISPID_DOCLICK (-551)
  172. #define DISPID_ABOUTBOX (-552)
  173. #define DISPID_CLICK (-600)
  174. #define DISPID_DBLCLICK (-601)
  175. #define DISPID_KEYDOWN (-602)
  176. #define DISPID_KEYPRESS (-603)
  177. #define DISPID_KEYUP (-604)
  178. #define DISPID_MOUSEDOWN (-605)
  179. #define DISPID_MOUSEMOVE (-606)
  180. #define DISPID_MOUSEUP (-607)
  181. #define DISPID_ERROREVENT (-608)
  182. #define DISPID_AMBIENT_BACKCOLOR (-701)
  183. #define DISPID_AMBIENT_DISPLAYNAME (-702)
  184. #define DISPID_AMBIENT_FONT (-703)
  185. #define DISPID_AMBIENT_FORECOLOR (-704)
  186. #define DISPID_AMBIENT_LOCALEID (-705)
  187. #define DISPID_AMBIENT_MESSAGEREFLECT (-706)
  188. #define DISPID_AMBIENT_SCALEUNITS (-707)
  189. #define DISPID_AMBIENT_TEXTALIGN (-708)
  190. #define DISPID_AMBIENT_USERMODE (-709)
  191. #define DISPID_AMBIENT_UIDEAD (-710)
  192. #define DISPID_AMBIENT_SHOWGRABHANDLES (-711)
  193. #define DISPID_AMBIENT_SHOWHATCHING (-712)
  194. #define DISPID_AMBIENT_DISPLAYASDEFAULT (-713)
  195. #define DISPID_AMBIENT_SUPPORTSMNEMONICS (-714)
  196. #define DISPID_AMBIENT_AUTOCLIP (-715)
  197. #define DISPID_AMBIENT_APPEARANCE    (-716)
  198. #define DISPID_FONT_NAME 0
  199. #define DISPID_FONT_SIZE 2
  200. #define DISPID_FONT_BOLD 3
  201. #define DISPID_FONT_ITALIC 4
  202. #define DISPID_FONT_UNDER 5
  203. #define DISPID_FONT_STRIKE 6
  204. #define DISPID_FONT_WEIGHT 7
  205. #define DISPID_FONT_CHARSET 8
  206. #define DISPID_PICT_HANDLE 0
  207. #define DISPID_PICT_HPAL 2
  208. #define DISPID_PICT_TYPE 3
  209. #define DISPID_PICT_WIDTH 4
  210. #define DISPID_PICT_HEIGHT 5
  211. #define DISPID_PICT_RENDER 6
  212.  
  213. #pragma pack(push,8)
  214. #ifndef OLE2ANSI
  215. typedef TEXTMETRICW TEXTMETRICOLE;
  216. #else
  217. typedef TEXTMETRIC TEXTMETRICOLE;
  218. #endif
  219. typedef TEXTMETRICOLE *LPTEXTMETRICOLE;
  220. typedef interface IOleControl *LPOLECONTROL;
  221. typedef interface IOleControlSite *LPOLECONTROLSITE;
  222. typedef interface ISimpleFrameSite *LPSIMPLEFRAMESITE;
  223. typedef interface IErrorLog *LPERRORLOG;
  224. typedef interface IPropertyBag *LPPROPERTYBAG;
  225. typedef interface IPersistPropertyBag *LPPERSISTPROPERTYBAG;
  226. typedef interface IPersistStreamInit *LPPERSISTSTREAMINIT;
  227. typedef interface IPersistMemory *LPPERSISTMEMORY;
  228. typedef interface IPropertyNotifySink* LPPROPERTYNOTIFYSINK;
  229. typedef interface IProvideClassInfo *LPPROVIDECLASSINFO;
  230. typedef interface IProvideClassInfo2 *LPPROVIDECLASSINFO2;
  231. typedef interface IConnectionPointContainer *LPCONNECTIONPOINTCONTAINER;
  232. typedef interface IEnumConnectionPoints *LPENUMCONNECTIONPOINTS;
  233. typedef interface IConnectionPoint *LPCONNECTIONPOINT;
  234. typedef interface IEnumConnections *LPENUMCONNECTIONS;
  235. typedef interface IClassFactory2 *LPCLASSFACTORY2;
  236. typedef interface ISpecifyPropertyPages *LPSPECIFYPROPERTYPAGES;
  237. typedef interface IPerPropertyBrowsing *LPPERPROPERTYBROWSING;
  238. typedef interface IPropertyPageSite *LPPROPERTYPAGESITE;
  239. typedef interface IPropertyPage *LPPROPERTYPAGE;
  240. typedef interface IPropertyPage2 *LPPROPERTYPAGE2;
  241. typedef interface IFont *LPFONT;
  242. typedef interface IFontDisp *LPFONTDISP;
  243. typedef interface IPicture *LPPICTURE;
  244. typedef interface IPictureDisp *LPPICTUREDISP;
  245. typedef DWORD OLE_COLOR;
  246. typedef long OLE_XPOS_PIXELS;
  247. typedef long OLE_YPOS_PIXELS;
  248. typedef long OLE_XSIZE_PIXELS;
  249. typedef long OLE_YSIZE_PIXELS;
  250. typedef long OLE_XPOS_HIMETRIC;
  251. typedef long OLE_YPOS_HIMETRIC;
  252. typedef long OLE_XSIZE_HIMETRIC;
  253. typedef long OLE_YSIZE_HIMETRIC;
  254. typedef float OLE_XPOS_CONTAINER;
  255. typedef float OLE_YPOS_CONTAINER;
  256. typedef float OLE_XSIZE_CONTAINER;
  257. typedef float OLE_YSIZE_CONTAINER;
  258. typedef VARIANT_BOOL OLE_OPTEXCLUSIVE;
  259. typedef VARIANT_BOOL OLE_CANCELBOOL;
  260. typedef VARIANT_BOOL OLE_ENABLEDEFAULTBOOL;
  261. typedef UINT OLE_HANDLE;
  262. typedef enum { triUnchecked,triChecked1,triGray } OLE_TRISTATE;
  263. typedef struct tagPOINTF {
  264.     float x;
  265.     float y;
  266. } POINTF,*LPPOINTF;
  267. typedef struct tagCONTROLINFO {
  268.     ULONG cb;
  269.     HACCEL hAccel;
  270.     USHORT cAccel;
  271.     DWORD dwFlags;
  272. } CONTROLINFO,*LPCONTROLINFO;
  273. typedef struct tagCONNECTDATA {
  274.     LPUNKNOWN pUnk;
  275.     DWORD dwCookie;
  276. } CONNECTDATA,*LPCONNECTDATA;
  277. typedef struct tagLICINFO {
  278.     long cbLicInfo;
  279.     BOOL fRuntimeKeyAvail;
  280.     BOOL fLicVerified;
  281. } LICINFO,*LPLICINFO;
  282. typedef struct tagCAUUID {
  283.     ULONG cElems;
  284.     GUID *pElems;
  285. } CAUUID,*LPCAUUID;
  286. typedef struct tagCALPOLESTR {
  287.     ULONG cElems;
  288.     LPOLESTR *pElems;
  289. } CALPOLESTR,*LPCALPOLESTR;
  290. typedef struct tagCADWORD {
  291.     ULONG cElems;
  292.     DWORD *pElems;
  293. } CADWORD,*LPCADWORD;
  294. typedef struct tagOCPFIPARAMS {
  295.     ULONG cbStructSize;
  296.     HWND hWndOwner;
  297.     int x;
  298.     int y;
  299.     LPCOLESTR lpszCaption;
  300.     ULONG cObjects;
  301.     LPUNKNOWN *lplpUnk;
  302.     ULONG cPages;
  303.     CLSID *lpPages;
  304.     LCID lcid;
  305.     DISPID dispidInitialProperty;
  306. } OCPFIPARAMS,*LPOCPFIPARAMS;
  307. typedef struct tagPROPPAGEINFO {
  308.     size_t cb;
  309.     LPOLESTR pszTitle;
  310.     SIZE size;
  311.     LPOLESTR pszDocString;
  312.     LPOLESTR pszHelpFile;
  313.     DWORD dwHelpContext;
  314. } PROPPAGEINFO,*LPPROPPAGEINFO;
  315. typedef struct tagFONTDESC {
  316.     UINT cbSizeofstruct;
  317.     LPOLESTR lpstrName;
  318.     CY cySize;
  319.     SHORT sWeight;
  320.     SHORT sCharset;
  321.     BOOL fItalic;
  322.     BOOL fUnderline;
  323.     BOOL fStrikethrough;
  324. } FONTDESC,*LPFONTDESC;
  325. typedef struct tagPICTDESC {
  326.     UINT cbSizeofstruct;
  327.     UINT picType;
  328.     union {
  329.         struct {
  330.             HBITMAP hbitmap;
  331.             HPALETTE hpal;
  332.         } bmp;
  333.         struct {
  334.             HMETAFILE hmeta;
  335.             int xExt;
  336.             int yExt;
  337.         } wmf;
  338.         struct {
  339.             HICON hicon;
  340.         } icon;
  341.         struct {
  342.             HENHMETAFILE hemf;
  343.         } emf;
  344.     } DUMMYUNIONNAME;
  345. } PICTDESC,*LPPICTDESC;
  346.  
  347. #undef INTERFACE
  348. #define INTERFACE IOleControl
  349. DECLARE_INTERFACE_(IOleControl,IUnknown)
  350. {
  351.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  352.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  353.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  354.     STDMETHOD(GetControlInfo)(THIS_ LPCONTROLINFO) PURE;
  355.     STDMETHOD(OnMnemonic)(THIS_ LPMSG) PURE;
  356.     STDMETHOD(OnAmbientPropertyChange)(THIS_ DISPID) PURE;
  357.     STDMETHOD(FreezeEvents)(THIS_ BOOL) PURE;
  358. };
  359. #undef INTERFACE
  360. #define INTERFACE IOleControlSite
  361. DECLARE_INTERFACE_(IOleControlSite,IUnknown)
  362. {
  363.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  364.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  365.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  366.     STDMETHOD(OnControlInfoChanged)(THIS) PURE;
  367.     STDMETHOD(LockInPlaceActive)(THIS_ BOOL) PURE;
  368.     STDMETHOD(GetExtendedControl)(THIS_ LPDISPATCH*) PURE;
  369.     STDMETHOD(TransformCoords)(THIS_ POINTL*,POINTF*,DWORD) PURE;
  370.     STDMETHOD(TranslateAccelerator)(THIS_ LPMSG,DWORD) PURE;
  371.     STDMETHOD(OnFocus)(THIS_ BOOL) PURE;
  372.     STDMETHOD(ShowPropertyFrame)(THIS) PURE;
  373. };
  374. #undef INTERFACE
  375. #define INTERFACE ISimpleFrameSite
  376. DECLARE_INTERFACE_(ISimpleFrameSite,IUnknown)
  377. {
  378.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  379.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  380.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  381.     STDMETHOD(PreMessageFilter)(THIS_ HWND,UINT,WPARAM,LPARAM,LRESULT*,PDWORD) PURE;
  382.     STDMETHOD(PostMessageFilter)(THIS_ HWND,UINT,WPARAM,LPARAM,LRESULT*,DWORD) PURE;
  383. };
  384. #undef INTERFACE
  385. #define INTERFACE IErrorLog
  386. DECLARE_INTERFACE_(IErrorLog,IUnknown)
  387. {
  388.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  389.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  390.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  391.     STDMETHOD(AddError)(THIS_ LPCOLESTR,LPEXCEPINFO) PURE;
  392. };
  393. #undef INTERFACE
  394. #define INTERFACE IPropertyBag
  395. DECLARE_INTERFACE_(IPropertyBag,IUnknown)
  396. {
  397.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  398.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  399.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  400.     STDMETHOD(Read)(THIS_ LPCOLESTR,LPVARIANT,LPERRORLOG) PURE;
  401.     STDMETHOD(Write)(THIS_ LPCOLESTR,LPVARIANT) PURE;
  402. };
  403. #undef INTERFACE
  404. #define INTERFACE IPersistPropertyBag
  405. DECLARE_INTERFACE_(IPersistPropertyBag,IPersist)
  406. {
  407.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  408.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  409.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  410.     STDMETHOD(GetClassID)(THIS_ LPCLSID) PURE;
  411.     STDMETHOD(InitNew)(THIS) PURE;
  412.     STDMETHOD(Load)(THIS_ LPPROPERTYBAG,LPERRORLOG) PURE;
  413.     STDMETHOD(Save)(THIS_ LPPROPERTYBAG,BOOL,BOOL) PURE;
  414. };
  415. #undef INTERFACE
  416. #define INTERFACE IPersistStreamInit
  417. DECLARE_INTERFACE_(IPersistStreamInit,IPersist)
  418. {
  419.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  420.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  421.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  422.     STDMETHOD(GetClassID)(THIS_ LPCLSID) PURE;
  423.     STDMETHOD(IsDirty)(THIS) PURE;
  424.     STDMETHOD(Load)(THIS_ LPSTREAM) PURE;
  425.     STDMETHOD(Save)(THIS_ LPSTREAM,BOOL) PURE;
  426.     STDMETHOD(GetSizeMax)(THIS_ PULARGE_INTEGER) PURE;
  427.     STDMETHOD(InitNew)(THIS) PURE;
  428. };
  429. #undef INTERFACE
  430. #define INTERFACE IPersistMemory
  431. DECLARE_INTERFACE_(IPersistMemory,IPersist)
  432. {
  433.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  434.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  435.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  436.     STDMETHOD(GetClassID)(THIS_ LPCLSID) PURE;
  437.     STDMETHOD(IsDirty)(THIS) PURE;
  438.     STDMETHOD(Load)(THIS_ PVOID,ULONG) PURE;
  439.     STDMETHOD(Save)(THIS_ PVOID,BOOL,ULONG) PURE;
  440.     STDMETHOD(GetSizeMax)(THIS_ PULONG) PURE;
  441.     STDMETHOD(InitNew)(THIS) PURE;
  442. };
  443. #undef INTERFACE
  444. #define INTERFACE IPropertyNotifySink
  445. DECLARE_INTERFACE_(IPropertyNotifySink,IUnknown)
  446. {
  447.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  448.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  449.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  450.     STDMETHOD(OnChanged)(THIS_ DISPID) PURE;
  451.     STDMETHOD(OnRequestEdit)(THIS_ DISPID) PURE;
  452. };
  453. #undef INTERFACE
  454. #define INTERFACE IProvideClassInfo
  455. DECLARE_INTERFACE_(IProvideClassInfo,IUnknown)
  456. {
  457.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  458.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  459.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  460.     STDMETHOD(GetClassInfo)(THIS_ LPTYPEINFO*) PURE;
  461. };
  462. #undef INTERFACE
  463. #define INTERFACE IProvideClassInfo2
  464. DECLARE_INTERFACE_(IProvideClassInfo2,IProvideClassInfo)
  465. {
  466.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  467.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  468.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  469.     STDMETHOD(GetClassInfo)(THIS_ LPTYPEINFO*) PURE;
  470.     STDMETHOD(GetGUID)(THIS_ DWORD,GUID*) PURE;
  471. };
  472. #undef INTERFACE
  473. #define INTERFACE IConnectionPointContainer
  474. DECLARE_INTERFACE_(IConnectionPointContainer,IUnknown)
  475. {
  476.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  477.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  478.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  479.     STDMETHOD(EnumConnectionPoints)(THIS_ LPENUMCONNECTIONPOINTS*) PURE;
  480.     STDMETHOD(FindConnectionPoint)(THIS_ REFIID,LPCONNECTIONPOINT*) PURE;
  481. };
  482. #undef INTERFACE
  483. #define INTERFACE IEnumConnectionPoints
  484. DECLARE_INTERFACE_(IEnumConnectionPoints,IUnknown)
  485. {
  486.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  487.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  488.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  489.     STDMETHOD(Next)(THIS_ ULONG,LPCONNECTIONPOINT*,ULONG*) PURE;
  490.     STDMETHOD(Skip)(THIS_ ULONG) PURE;
  491.     STDMETHOD(Reset)(THIS) PURE;
  492.     STDMETHOD(Clone)(THIS_ LPENUMCONNECTIONPOINTS*) PURE;
  493. };
  494. #undef INTERFACE
  495. #define INTERFACE IConnectionPoint
  496. DECLARE_INTERFACE_(IConnectionPoint,IUnknown)
  497. {
  498.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  499.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  500.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  501.     STDMETHOD(GetConnectionInterface)(THIS_ IID*) PURE;
  502.     STDMETHOD(GetConnectionPointContainer)(THIS_ IConnectionPointContainer**) PURE;
  503.     STDMETHOD(Advise)(THIS_ LPUNKNOWN,PDWORD) PURE;
  504.     STDMETHOD(Unadvise)(THIS_ DWORD) PURE;
  505.     STDMETHOD(EnumConnections)(THIS_ LPENUMCONNECTIONS*) PURE;
  506. };
  507. #undef INTERFACE
  508. #define INTERFACE IEnumConnections
  509. DECLARE_INTERFACE_(IEnumConnections,IUnknown)
  510. {
  511.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  512.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  513.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  514.     STDMETHOD(Next)(THIS_ ULONG,LPCONNECTDATA,PULONG) PURE;
  515.     STDMETHOD(Skip)(THIS_ ULONG) PURE;
  516.     STDMETHOD(Reset)(THIS) PURE;
  517.     STDMETHOD(Clone)(THIS_ LPENUMCONNECTIONS*) PURE;
  518. };
  519. #undef INTERFACE
  520. #define INTERFACE IClassFactory2
  521. DECLARE_INTERFACE_(IClassFactory2,IClassFactory)
  522. {
  523.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  524.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  525.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  526.     STDMETHOD(CreateInstance)(THIS_ LPUNKNOWN,REFIID,PVOID*) PURE;
  527.     STDMETHOD(LockServer)(THIS_ BOOL) PURE;
  528.     STDMETHOD(GetLicInfo)(THIS_ LPLICINFO) PURE;
  529.     STDMETHOD(RequestLicKey)(THIS_ DWORD,BSTR*) PURE;
  530.     STDMETHOD(CreateInstanceLic)(THIS_ LPUNKNOWN,LPUNKNOWN,REFIID,BSTR,PVOID*) PURE;
  531. };
  532. #undef INTERFACE
  533. #define INTERFACE ISpecifyPropertyPages
  534. DECLARE_INTERFACE_(ISpecifyPropertyPages,IUnknown)
  535. {
  536.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  537.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  538.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  539.     STDMETHOD(GetPages)(THIS_ CAUUID*) PURE;
  540. };
  541. #undef INTERFACE
  542. #define INTERFACE IPerPropertyBrowsing
  543. DECLARE_INTERFACE_(IPerPropertyBrowsing,IUnknown)
  544. {
  545.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  546.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  547.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  548.     STDMETHOD(GetDisplayString)(THIS_ DISPID,BSTR*) PURE;
  549.     STDMETHOD(MapPropertyToPage)(THIS_ DISPID,LPCLSID) PURE;
  550.     STDMETHOD(GetPredefinedStrings)(THIS_ DISPID,CALPOLESTR*,CADWORD*) PURE;
  551.     STDMETHOD(GetPredefinedValue)(THIS_ DISPID,DWORD,VARIANT*) PURE;
  552. };
  553. #undef INTERFACE
  554. #define INTERFACE IPropertyPageSite
  555. DECLARE_INTERFACE_(IPropertyPageSite,IUnknown)
  556. {
  557.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  558.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  559.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  560.     STDMETHOD(OnStatusChange)(THIS_ DWORD) PURE;
  561.     STDMETHOD(GetLocaleID)(THIS_ LCID*) PURE;
  562.     STDMETHOD(GetPageContainer)(THIS_ LPUNKNOWN*) PURE;
  563.     STDMETHOD(TranslateAccelerator)(THIS_ LPMSG) PURE;
  564. };
  565. #undef INTERFACE
  566. #define INTERFACE IPropertyPage
  567. DECLARE_INTERFACE_(IPropertyPage,IUnknown)
  568. {
  569.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  570.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  571.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  572.     STDMETHOD(SetPageSite)(THIS_ LPPROPERTYPAGESITE) PURE;
  573.     STDMETHOD(Activate)(THIS_ HWND,LPCRECT,BOOL) PURE;
  574.     STDMETHOD(Deactivate)(THIS) PURE;
  575.     STDMETHOD(GetPageInfo)(THIS_ LPPROPPAGEINFO) PURE;
  576.     STDMETHOD(SetObjects)(THIS_ ULONG,LPUNKNOWN*) PURE;
  577.     STDMETHOD(Show)(THIS_ UINT) PURE;
  578.     STDMETHOD(Move)(THIS_ LPCRECT) PURE;
  579.     STDMETHOD(IsPageDirty)(THIS) PURE;
  580.     STDMETHOD(Apply)(THIS) PURE;
  581.     STDMETHOD(Help)(THIS_ LPCOLESTR) PURE;
  582.     STDMETHOD(TranslateAccelerator)(THIS_ LPMSG) PURE;
  583. };
  584. #undef INTERFACE
  585. #define INTERFACE IPropertyPage2
  586. DECLARE_INTERFACE_(IPropertyPage2,IPropertyPage)
  587. {
  588.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  589.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  590.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  591.     STDMETHOD(SetPageSite)(THIS_ LPPROPERTYPAGESITE) PURE;
  592.     STDMETHOD(Activate)(THIS_ HWND,LPCRECT,BOOL) PURE;
  593.     STDMETHOD(Deactivate)(THIS) PURE;
  594.     STDMETHOD(GetPageInfo)(THIS_ LPPROPPAGEINFO) PURE;
  595.     STDMETHOD(SetObjects)(THIS_ ULONG,LPUNKNOWN*) PURE;
  596.     STDMETHOD(Show)(THIS_ UINT) PURE;
  597.     STDMETHOD(Move)(THIS_ LPCRECT) PURE;
  598.     STDMETHOD(IsPageDirty)(THIS) PURE;
  599.     STDMETHOD(Apply)(THIS) PURE;
  600.     STDMETHOD(Help)(THIS_ LPCOLESTR) PURE;
  601.     STDMETHOD(TranslateAccelerator)(THIS_ LPMSG) PURE;
  602.     STDMETHOD(EditProperty)(THIS_ DISPID) PURE;
  603. };
  604. #undef INTERFACE
  605. #define INTERFACE IFont
  606. DECLARE_INTERFACE_(IFont,IUnknown)
  607. {
  608.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  609.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  610.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  611.     STDMETHOD(get_Name)(THIS_ BSTR*) PURE;
  612.     STDMETHOD(put_Name)(THIS_ BSTR) PURE;
  613.     STDMETHOD(get_Size)(THIS_ CY*) PURE;
  614.     STDMETHOD(put_Size)(THIS_ CY) PURE;
  615.     STDMETHOD(get_Bold)(THIS_ BOOL*) PURE;
  616.     STDMETHOD(put_Bold)(THIS_ BOOL) PURE;
  617.     STDMETHOD(get_Italic)(THIS_ BOOL*) PURE;
  618.     STDMETHOD(put_Italic)(THIS_ BOOL) PURE;
  619.     STDMETHOD(get_Underline)(THIS_ BOOL*) PURE;
  620.     STDMETHOD(put_Underline)(THIS_ BOOL) PURE;
  621.     STDMETHOD(get_Strikethrough)(THIS_ BOOL*) PURE;
  622.     STDMETHOD(put_Strikethrough)(THIS_ BOOL) PURE;
  623.     STDMETHOD(get_Weight)(THIS_ short*) PURE;
  624.     STDMETHOD(put_Weight)(THIS_ short) PURE;
  625.     STDMETHOD(get_Charset)(THIS_ short*) PURE;
  626.     STDMETHOD(put_Charset)(THIS_ short) PURE;
  627.     STDMETHOD(get_hFont)(THIS_ HFONT*) PURE;
  628.     STDMETHOD(Clone)(THIS_ IFont**) PURE;
  629.     STDMETHOD(IsEqual)(THIS_ IFont*) PURE;
  630.     STDMETHOD(SetRatio)(THIS_ long,long) PURE;
  631.     STDMETHOD(QueryTextMetrics)(THIS_ LPTEXTMETRICOLE) PURE;
  632.     STDMETHOD(AddRefHfont)(THIS_ HFONT) PURE;
  633.     STDMETHOD(ReleaseHfont)(THIS_ HFONT) PURE;
  634.     STDMETHOD(SetHdc)(THIS_ HDC) PURE;
  635. };
  636. #undef INTERFACE
  637. #define INTERFACE IFontDisp
  638. DECLARE_INTERFACE_(IFontDisp,IDispatch)
  639. {
  640.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  641.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  642.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  643.     STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
  644.     STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
  645.     STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
  646.     STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
  647. };
  648. #undef INTERFACE
  649. #define INTERFACE IPicture
  650. DECLARE_INTERFACE_(IPicture,IUnknown)
  651. {
  652.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  653.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  654.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  655.     STDMETHOD(get_Handle)(THIS_ OLE_HANDLE*) PURE;
  656.     STDMETHOD(get_hPal)(THIS_ OLE_HANDLE*) PURE;
  657.     STDMETHOD(get_Type)(THIS_ short*) PURE;
  658.     STDMETHOD(get_Width)(THIS_ OLE_XSIZE_HIMETRIC*) PURE;
  659.     STDMETHOD(get_Height)(THIS_ OLE_YSIZE_HIMETRIC*) PURE;
  660.     STDMETHOD(Render)(THIS_ HDC,long,long,long,long,OLE_XPOS_HIMETRIC,OLE_YPOS_HIMETRIC,OLE_XSIZE_HIMETRIC,OLE_YSIZE_HIMETRIC,LPCRECT) PURE;
  661.     STDMETHOD(set_hPal)(THIS_ OLE_HANDLE) PURE;
  662.     STDMETHOD(get_CurDC)(THIS_ HDC*) PURE;
  663.     STDMETHOD(SelectPicture)(THIS_ HDC,HDC*,OLE_HANDLE*) PURE;
  664.     STDMETHOD(get_KeepOriginalFormat)(THIS_ BOOL*) PURE;
  665.     STDMETHOD(put_KeepOriginalFormat)(THIS_ BOOL) PURE;
  666.     STDMETHOD(PictureChanged)(THIS) PURE;
  667.     STDMETHOD(SaveAsFile)(THIS_ LPSTREAM,BOOL,LONG*) PURE;
  668.     STDMETHOD(get_Attributes)(THIS_ PDWORD) PURE;
  669. };
  670. #undef INTERFACE
  671. #define INTERFACE IPictureDisp
  672. DECLARE_INTERFACE_(IPictureDisp,IDispatch)
  673. {
  674.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  675.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  676.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  677.     STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
  678.     STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
  679.     STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
  680.     STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
  681. };
  682. #pragma pack(pop)
  683.  
  684. STDAPI DllRegisterServer(void);
  685. STDAPI DllUnregisterServer(void);
  686. STDAPI OleCreateFontIndirect(LPFONTDESC,REFIID,PVOID*);
  687. STDAPI OleCreatePictureIndirect(LPPICTDESC,REFIID,BOOL,PVOID*);
  688. STDAPI OleCreatePropertyFrame(HWND,UINT,UINT,LPCOLESTR,ULONG,LPUNKNOWN*,ULONG,LPCLSID,LCID,DWORD,PVOID);
  689. STDAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS);
  690. STDAPI_(HCURSOR) OleIconToCursor(HINSTANCE,HICON);
  691. STDAPI OleLoadPicture(LPSTREAM,LONG,BOOL,REFIID,PVOID*);
  692. STDAPI OleTranslateColor(OLE_COLOR,HPALETTE,COLORREF*);
  693. #ifdef __cplusplus
  694. }
  695. #endif
  696. #endif 
  697.