ObjIdl.Idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:72k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //+-------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (c) Microsoft Corporation. All rights reserved.
  5. //
  6. //  File: objidl.idl
  7. //
  8. //--------------------------------------------------------------------------
  9. cpp_quote("//+-------------------------------------------------------------------------")
  10. cpp_quote("//+-------------------------------------------------------------------------")
  11. cpp_quote("//")
  12. cpp_quote("//  Microsoft Windows")
  13. cpp_quote("//  Copyright (c) Microsoft Corporation. All rights reserved.")
  14. cpp_quote("//")
  15. cpp_quote("//--------------------------------------------------------------------------")
  16. #if (__midl >= 501)
  17. midl_pragma warning( disable: 2007 )   // file already imported
  18. midl_pragma warning( disable: 2209 )   // ignored redundantly specified attributes
  19. midl_pragma warning( disable: 2298 )   // version ignored for object interfaces
  20. #endif
  21. cpp_quote("#if ( _MSC_VER >= 800 )")
  22. cpp_quote("#if _MSC_VER >= 1200")
  23. cpp_quote("#pragma warning(push)")
  24. cpp_quote("#endif")
  25. cpp_quote("#pragma warning(disable:4201)")
  26. cpp_quote("#endif")
  27. cpp_quote("#if ( _MSC_VER >= 1020 )")
  28. cpp_quote("#pragma once")
  29. cpp_quote("#endif")
  30. #ifndef DO_NO_IMPORTS
  31. import "unknwn.idl";
  32. import "wtypes.idl";
  33. #endif
  34. interface IStream;
  35. interface IMoniker;
  36. interface IEnumMoniker;
  37. interface IEnumString;
  38. interface IRunningObjectTable;
  39. interface IStorage;
  40. interface IEnumSTATSTG;
  41. interface IAdviseSink;
  42. interface IBindCtx;
  43. interface IEnumMoniker;
  44. interface IAsyncManager;
  45. interface ICallFactory;
  46. interface ISynchronize;
  47. typedef struct _COSERVERINFO
  48. {
  49.     DWORD             dwReserved1;
  50.     LPWSTR            pwszName;
  51.     COAUTHINFO *      pAuthInfo;
  52.     DWORD             dwReserved2;
  53. } COSERVERINFO;
  54. /****************************************************************************
  55.  *  Component Object Interfaces
  56.  ****************************************************************************/
  57. [
  58.     local,
  59.     object,
  60.     uuid(00000003-0000-0000-C000-000000000046)
  61. ]
  62. interface IMarshal : IUnknown
  63. {
  64.     typedef [unique] IMarshal *LPMARSHAL;
  65.     HRESULT GetUnmarshalClass
  66.     (
  67.         [in] REFIID riid,
  68.         [in, unique] void *pv,
  69.         [in] DWORD dwDestContext,
  70.         [in, unique] void *pvDestContext,
  71.         [in] DWORD mshlflags,
  72.         [out] CLSID *pCid
  73.     );
  74.     HRESULT GetMarshalSizeMax
  75.     (
  76.         [in] REFIID riid,
  77.         [in, unique] void *pv,
  78.         [in] DWORD dwDestContext,
  79.         [in, unique] void *pvDestContext,
  80.         [in] DWORD mshlflags,
  81.         [out] DWORD *pSize
  82.     );
  83.     HRESULT MarshalInterface
  84.     (
  85.         [in, unique] IStream *pStm,
  86.         [in] REFIID riid,
  87.         [in, unique] void *pv,
  88.         [in] DWORD dwDestContext,
  89.         [in, unique] void *pvDestContext,
  90.         [in] DWORD mshlflags
  91.     );
  92.     HRESULT UnmarshalInterface
  93.     (
  94.         [in, unique] IStream *pStm,
  95.         [in] REFIID riid,
  96.         [out] void **ppv
  97.     );
  98.     HRESULT ReleaseMarshalData
  99.     (
  100.         [in, unique] IStream *pStm
  101.     );
  102.     HRESULT DisconnectObject
  103.     (
  104.         [in] DWORD dwReserved
  105.     );
  106. }
  107. [
  108.     local,
  109.     object,
  110.     uuid(000001cf-0000-0000-C000-000000000046)
  111. ]
  112. interface IMarshal2 : IMarshal
  113. {
  114.     typedef [unique] IMarshal2 *LPMARSHAL2;
  115. }
  116. [
  117.     local,
  118.     object,
  119.     uuid(00000002-0000-0000-C000-000000000046)
  120. ]
  121. interface IMalloc : IUnknown
  122. {
  123.     typedef [unique] IMalloc *LPMALLOC;
  124.     void *Alloc([in] SIZE_T cb);
  125.     void *Realloc ([in] void *pv,
  126.                    [in] SIZE_T cb);
  127.     void Free([in] void *pv);
  128.     SIZE_T GetSize([in] void *pv);
  129.     int DidAlloc(void *pv);
  130.     void HeapMinimize(void);
  131. }
  132. [
  133.     local,
  134.     object,
  135.     uuid(0000001d-0000-0000-C000-000000000046)
  136. ]
  137. interface IMallocSpy : IUnknown
  138. {
  139.     typedef [unique] IMallocSpy *LPMALLOCSPY;
  140.     SIZE_T PreAlloc
  141.     (
  142.         [in] SIZE_T cbRequest
  143.     );
  144.     void  *PostAlloc
  145.     (
  146.         [in] void *pActual
  147.     );
  148.     void  *PreFree
  149.     (
  150.         [in] void *pRequest,
  151.         [in] BOOL  fSpyed
  152.     );
  153.     void  PostFree
  154.     (
  155.         [in] BOOL  fSpyed
  156.     );
  157.     SIZE_T PreRealloc
  158.     (
  159.         [in] void   *pRequest,
  160.         [in] SIZE_T   cbRequest,
  161.         [out] void **ppNewRequest,
  162.         [in] BOOL    fSpyed
  163.     );
  164.     void  *PostRealloc
  165.     (
  166.         [in] void *pActual,
  167.         [in] BOOL  fSpyed
  168.     );
  169.     void  *PreGetSize
  170.     (
  171.         [in] void *pRequest,
  172.         [in] BOOL  fSpyed
  173.     );
  174.     SIZE_T PostGetSize
  175.     (
  176.         [in] SIZE_T cbActual,
  177.         [in] BOOL  fSpyed
  178.     );
  179.     void  *PreDidAlloc
  180.     (
  181.         [in] void *pRequest,
  182.         [in] BOOL  fSpyed
  183.     );
  184.     int   PostDidAlloc
  185.     (
  186.         [in] void *pRequest,
  187.         [in] BOOL  fSpyed,
  188.         [in] int   fActual
  189.     );
  190.     void  PreHeapMinimize(void);
  191.     void  PostHeapMinimize(void);
  192. }
  193. [
  194.     local,
  195.     object,
  196.     uuid(00000018-0000-0000-C000-000000000046)
  197. ]
  198. interface IStdMarshalInfo : IUnknown
  199. {
  200.     typedef [unique] IStdMarshalInfo * LPSTDMARSHALINFO;
  201.     HRESULT GetClassForHandler
  202.     (
  203.         [in] DWORD dwDestContext,
  204.         [in, unique] void *pvDestContext,
  205.         [out] CLSID *pClsid
  206.     );
  207. }
  208. [
  209.     object,
  210.     local,
  211.     uuid(00000019-0000-0000-C000-000000000046)
  212. ]
  213. interface IExternalConnection : IUnknown
  214. {
  215.     typedef [unique] IExternalConnection* LPEXTERNALCONNECTION;
  216.     // bit flags for IExternalConnection
  217.     typedef enum tagEXTCONN
  218.     {
  219.         EXTCONN_STRONG      = 0x0001,   // strong connection
  220.         EXTCONN_WEAK        = 0x0002,   // weak connection (table, container)
  221.         EXTCONN_CALLABLE    = 0x0004,   // table .vs. callable
  222.     } EXTCONN;
  223.     // *** IExternalConnection methods ***
  224.     DWORD AddConnection
  225.     (
  226.         [in] DWORD extconn,
  227.         [in] DWORD reserved
  228.     );
  229.     DWORD ReleaseConnection
  230.     (
  231.         [in] DWORD extconn,
  232.         [in] DWORD reserved,
  233.         [in] BOOL  fLastReleaseCloses
  234.     );
  235. }
  236. typedef [unique] IMultiQI* LPMULTIQI;
  237. typedef struct tagMULTI_QI
  238. {
  239.     const IID  *pIID; // pass this one in
  240.     IUnknown   *pItf; // get these out (you must set to NULL before calling)
  241.     HRESULT     hr;
  242. } MULTI_QI;
  243. [
  244.     object,
  245.     local,
  246.     uuid(00000020-0000-0000-C000-000000000046),
  247. #if (__midl >= 500)
  248.     async_uuid(000e0020-0000-0000-C000-000000000046)
  249. #endif
  250. ]
  251. interface IMultiQI : IUnknown
  252. {
  253.     HRESULT QueryMultipleInterfaces
  254.     (
  255.         [in]     ULONG      cMQIs,
  256.         [in,out] MULTI_QI  *pMQIs
  257.     );
  258. }
  259. [
  260.  object,
  261.  local,
  262.  uuid(00000021-0000-0000-C000-000000000046)
  263. ]
  264. interface IInternalUnknown : IUnknown
  265. {
  266.     HRESULT QueryInternalInterface(
  267.            [in]  REFIID riid,
  268.            [out] void **ppv);
  269. }
  270. [
  271.     object,
  272.     uuid(00000100-0000-0000-C000-000000000046),
  273.     pointer_default(unique)
  274. ]
  275. interface IEnumUnknown : IUnknown
  276. {
  277.     typedef [unique] IEnumUnknown *LPENUMUNKNOWN;
  278.     [local]
  279.     HRESULT Next(
  280.         [in] ULONG celt,
  281.         [out] IUnknown **rgelt,
  282.         [out] ULONG *pceltFetched);
  283.     [call_as(Next)]
  284.     HRESULT RemoteNext(
  285.         [in] ULONG celt,
  286.         [out, size_is(celt), length_is(*pceltFetched)]
  287.         IUnknown **rgelt,
  288.         [out] ULONG *pceltFetched);
  289.     HRESULT Skip(
  290.         [in] ULONG celt);
  291.     HRESULT Reset();
  292.     HRESULT Clone(
  293.         [out] IEnumUnknown **ppenum);
  294. }
  295. /****************************************************************************
  296.  *  Binding Interfaces
  297.  ****************************************************************************/
  298. [
  299.     object,
  300.     uuid(0000000e-0000-0000-C000-000000000046),
  301.     pointer_default(unique)
  302. ]
  303. interface IBindCtx : IUnknown
  304. {
  305.     typedef [unique] IBindCtx *LPBC;
  306.     typedef [unique] IBindCtx *LPBINDCTX;
  307.     typedef struct tagBIND_OPTS {
  308.     DWORD       cbStruct;       //  sizeof(BIND_OPTS)
  309.     DWORD       grfFlags;
  310.     DWORD       grfMode;
  311.     DWORD       dwTickCountDeadline;
  312.     } BIND_OPTS, * LPBIND_OPTS;
  313. cpp_quote("#if defined(__cplusplus)")
  314. cpp_quote("    typedef struct tagBIND_OPTS2 : tagBIND_OPTS{")
  315. cpp_quote("    DWORD           dwTrackFlags;")
  316. cpp_quote("    DWORD           dwClassContext;")
  317. cpp_quote("    LCID            locale;")
  318. cpp_quote("    COSERVERINFO *  pServerInfo;")
  319. cpp_quote("    } BIND_OPTS2, * LPBIND_OPTS2;")
  320. cpp_quote("#else")
  321.     typedef struct tagBIND_OPTS2 {
  322.     DWORD           cbStruct;       //  sizeof(BIND_OPTS2)
  323.     DWORD           grfFlags;
  324.     DWORD           grfMode;
  325.     DWORD           dwTickCountDeadline;
  326.     DWORD           dwTrackFlags;
  327.     DWORD           dwClassContext;
  328.     LCID            locale;
  329.     COSERVERINFO *  pServerInfo;
  330.     } BIND_OPTS2, * LPBIND_OPTS2;
  331. cpp_quote("#endif")
  332.     typedef enum tagBIND_FLAGS
  333.     {
  334.         BIND_MAYBOTHERUSER = 1,
  335.         BIND_JUSTTESTEXISTENCE = 2
  336.     } BIND_FLAGS;
  337.     HRESULT RegisterObjectBound
  338.     (
  339.         [in, unique] IUnknown *punk
  340.     );
  341.     HRESULT RevokeObjectBound
  342.     (
  343.         [in, unique] IUnknown *punk
  344.     );
  345.     HRESULT ReleaseBoundObjects
  346.     (
  347.         void
  348.     );
  349.     [local]
  350.     HRESULT SetBindOptions
  351.     (
  352.         [in] BIND_OPTS *pbindopts
  353.     );
  354.     [call_as(SetBindOptions)]
  355.     HRESULT RemoteSetBindOptions
  356.     (
  357.         [in] BIND_OPTS2 *pbindopts
  358.     );
  359.     [local]
  360.     HRESULT GetBindOptions
  361.     (
  362.         [in, out] BIND_OPTS *pbindopts
  363.     );
  364.     [call_as(GetBindOptions)]
  365.     HRESULT RemoteGetBindOptions
  366.     (
  367.         [in, out] BIND_OPTS2 *pbindopts
  368.     );
  369.     HRESULT GetRunningObjectTable
  370.     (
  371.         [out] IRunningObjectTable **pprot
  372.     );
  373.     HRESULT RegisterObjectParam(
  374.         [in] LPOLESTR pszKey,
  375.         [in, unique] IUnknown *punk
  376.     );
  377.     HRESULT GetObjectParam(
  378.         [in] LPOLESTR pszKey,
  379.         [out] IUnknown **ppunk
  380.     );
  381.     HRESULT EnumObjectParam
  382.     (
  383.         [out] IEnumString **ppenum
  384.     );
  385.     HRESULT RevokeObjectParam
  386.     (
  387.         [in] LPOLESTR pszKey
  388.     );
  389. }
  390. [
  391.     object,
  392.     uuid(00000102-0000-0000-C000-000000000046),
  393.     pointer_default(unique)
  394. ]
  395. interface IEnumMoniker : IUnknown
  396. {
  397.     typedef [unique] IEnumMoniker *LPENUMMONIKER;
  398.     [local]
  399.     HRESULT Next(
  400.         [in] ULONG celt,
  401.         [out, size_is(celt), length_is(*pceltFetched)]
  402.         IMoniker **rgelt,
  403.         [out] ULONG *pceltFetched);
  404.     [call_as(Next)]
  405.     HRESULT RemoteNext(
  406.         [in] ULONG celt,
  407.         [out, size_is(celt), length_is(*pceltFetched)]
  408.         IMoniker **rgelt,
  409.         [out] ULONG *pceltFetched);
  410.     HRESULT Skip(
  411.         [in] ULONG celt);
  412.     HRESULT Reset();
  413.     HRESULT Clone(
  414.         [out] IEnumMoniker **ppenum);
  415. }
  416. [
  417.     object,
  418.     uuid(00000126-0000-0000-C000-000000000046)
  419. ]
  420. interface IRunnableObject : IUnknown
  421. {
  422.     typedef [unique] IRunnableObject *LPRUNNABLEOBJECT;
  423.     HRESULT GetRunningClass(
  424.         [out] LPCLSID lpClsid);
  425.     HRESULT Run(
  426.         [in] LPBINDCTX pbc);
  427.     [local]
  428.     BOOL IsRunning();
  429.     [call_as(IsRunning)]
  430.     HRESULT RemoteIsRunning();
  431.     HRESULT LockRunning(
  432.         [in] BOOL fLock,
  433.         [in] BOOL fLastUnlockCloses);
  434.     HRESULT SetContainedObject(
  435.         [in] BOOL fContained);
  436. }
  437. [
  438.     object,
  439.     uuid(00000010-0000-0000-C000-000000000046)
  440. ]
  441. interface IRunningObjectTable : IUnknown
  442. {
  443.     typedef [unique] IRunningObjectTable *LPRUNNINGOBJECTTABLE;
  444.     HRESULT Register
  445.     (
  446.         [in] DWORD grfFlags,
  447.         [in, unique] IUnknown *punkObject,
  448.         [in, unique] IMoniker *pmkObjectName,
  449.         [out] DWORD *pdwRegister
  450.     );
  451.     HRESULT Revoke
  452.     (
  453.         [in] DWORD dwRegister
  454.     );
  455.     HRESULT IsRunning
  456.     (
  457.         [in, unique] IMoniker *pmkObjectName
  458.     );
  459.     HRESULT GetObject
  460.     (
  461.         [in, unique] IMoniker *pmkObjectName,
  462.         [out] IUnknown **ppunkObject
  463.     );
  464.     HRESULT NoteChangeTime
  465.     (
  466.         [in] DWORD dwRegister,
  467.         [in] FILETIME *pfiletime
  468.     );
  469.     HRESULT GetTimeOfLastChange
  470.     (
  471.         [in, unique] IMoniker *pmkObjectName,
  472.         [out] FILETIME *pfiletime
  473.     );
  474.     HRESULT EnumRunning
  475.     (
  476.         [out] IEnumMoniker **ppenumMoniker
  477.     );
  478. }
  479. [
  480.     object,
  481.     uuid(0000010c-0000-0000-C000-000000000046)
  482. ]
  483. interface IPersist : IUnknown
  484. {
  485.     typedef [unique] IPersist *LPPERSIST;
  486.     HRESULT GetClassID
  487.     (
  488.         [out] CLSID *pClassID
  489.     );
  490. }
  491. [
  492.     object,
  493.     uuid(00000109-0000-0000-C000-000000000046),
  494.     pointer_default(unique)
  495. ]
  496. interface IPersistStream : IPersist
  497. {
  498.     typedef [unique] IPersistStream *LPPERSISTSTREAM;
  499.     HRESULT IsDirty
  500.     (
  501.         void
  502.     );
  503.     HRESULT Load
  504.     (
  505.         [in, unique] IStream *pStm
  506.     );
  507.     HRESULT Save
  508.     (
  509.         [in, unique] IStream *pStm,
  510.         [in] BOOL fClearDirty
  511.     );
  512.     HRESULT GetSizeMax
  513.     (
  514.         [out] ULARGE_INTEGER *pcbSize
  515.     );
  516. }
  517. [
  518.     object,
  519.     uuid(0000000f-0000-0000-C000-000000000046),
  520.     pointer_default(unique)
  521. ]
  522. interface IMoniker : IPersistStream
  523. {
  524.     typedef [unique] IMoniker *LPMONIKER;
  525.     // system moniker types; returned from IsSystemMoniker.
  526.     typedef enum tagMKSYS
  527.     {
  528.         MKSYS_NONE = 0,
  529.         MKSYS_GENERICCOMPOSITE = 1,
  530.         MKSYS_FILEMONIKER = 2,
  531.         MKSYS_ANTIMONIKER = 3,
  532.         MKSYS_ITEMMONIKER = 4,
  533.         MKSYS_POINTERMONIKER = 5,
  534.     //  MKSYS_URLMONIKER = 6,
  535.         MKSYS_CLASSMONIKER = 7,
  536.         MKSYS_OBJREFMONIKER = 8,
  537.         MKSYS_SESSIONMONIKER = 9
  538.     }MKSYS;
  539.     typedef [v1_enum] enum tagMKREDUCE
  540.     {
  541.         MKRREDUCE_ONE           =   3<<16,
  542.         MKRREDUCE_TOUSER        =   2<<16,
  543.         MKRREDUCE_THROUGHUSER   =   1<<16,
  544.         MKRREDUCE_ALL           =   0
  545.     } MKRREDUCE;
  546.     [local]
  547.     HRESULT BindToObject(
  548.         [in, unique] IBindCtx *pbc,
  549.         [in, unique] IMoniker *pmkToLeft,
  550.         [in] REFIID riidResult,
  551.         [out, iid_is(riidResult)] void **ppvResult);
  552.     [call_as(BindToObject)]
  553.     HRESULT RemoteBindToObject(
  554.         [in, unique] IBindCtx *pbc,
  555.         [in, unique] IMoniker *pmkToLeft,
  556.         [in] REFIID riidResult,
  557.         [out, iid_is(riidResult)] IUnknown **ppvResult);
  558.     [local]
  559.     HRESULT BindToStorage(
  560.         [in, unique] IBindCtx *pbc,
  561.         [in, unique] IMoniker *pmkToLeft,
  562.         [in] REFIID riid,
  563.         [out, iid_is(riid)] void **ppvObj);
  564.     [call_as(BindToStorage)]
  565.     HRESULT RemoteBindToStorage(
  566.         [in, unique] IBindCtx *pbc,
  567.         [in, unique] IMoniker *pmkToLeft,
  568.         [in] REFIID riid,
  569.         [out, iid_is(riid)] IUnknown **ppvObj);
  570.     HRESULT Reduce(
  571.         [in, unique] IBindCtx *pbc,
  572.         [in] DWORD dwReduceHowFar,
  573.         [in, out, unique] IMoniker **ppmkToLeft,
  574.         [out] IMoniker **ppmkReduced);
  575.     HRESULT ComposeWith(
  576.         [in, unique] IMoniker *pmkRight,
  577.         [in] BOOL fOnlyIfNotGeneric,
  578.         [out] IMoniker **ppmkComposite);
  579.     HRESULT Enum(
  580.         [in] BOOL fForward,
  581.         [out] IEnumMoniker **ppenumMoniker);
  582.     HRESULT IsEqual(
  583.         [in, unique] IMoniker *pmkOtherMoniker);
  584.     HRESULT Hash(
  585.         [out] DWORD *pdwHash);
  586.     HRESULT IsRunning(
  587.         [in, unique] IBindCtx *pbc,
  588.         [in, unique] IMoniker *pmkToLeft,
  589.         [in, unique] IMoniker *pmkNewlyRunning);
  590.     HRESULT GetTimeOfLastChange(
  591.         [in, unique] IBindCtx *pbc,
  592.         [in, unique] IMoniker *pmkToLeft,
  593.         [out] FILETIME *pFileTime);
  594.     HRESULT Inverse(
  595.         [out] IMoniker **ppmk);
  596.     HRESULT CommonPrefixWith(
  597.         [in, unique] IMoniker *pmkOther,
  598.         [out] IMoniker **ppmkPrefix);
  599.     HRESULT RelativePathTo(
  600.         [in, unique] IMoniker *pmkOther,
  601.         [out] IMoniker **ppmkRelPath);
  602.     HRESULT GetDisplayName(
  603.         [in, unique] IBindCtx *pbc,
  604.         [in, unique] IMoniker *pmkToLeft,
  605.         [out] LPOLESTR *ppszDisplayName);
  606.     HRESULT ParseDisplayName(
  607.         [in, unique] IBindCtx *pbc,
  608.         [in, unique] IMoniker *pmkToLeft,
  609.         [in] LPOLESTR pszDisplayName,
  610.         [out] ULONG *pchEaten,
  611.         [out] IMoniker **ppmkOut);
  612.     HRESULT IsSystemMoniker(
  613.         [out] DWORD *pdwMksys);
  614. }
  615. [
  616.     object,
  617.     uuid(f29f6bc0-5021-11ce-aa15-00006901293f),
  618.     pointer_default(unique)
  619. ]
  620. interface IROTData : IUnknown
  621. {
  622.     HRESULT GetComparisonData(
  623.         [out, size_is(cbMax)] byte *pbData,
  624.         [in]  ULONG cbMax,
  625.         [out] ULONG *pcbData);
  626. }
  627. [
  628.     object,
  629.     uuid(00000101-0000-0000-C000-000000000046),
  630.     pointer_default(unique)
  631. ]
  632. interface IEnumString : IUnknown
  633. {
  634.     typedef [unique] IEnumString *LPENUMSTRING;
  635.     [local]
  636.     HRESULT Next(
  637.         [in] ULONG celt,
  638.         [out, size_is(celt), length_is(*pceltFetched)]
  639.         LPOLESTR *rgelt,
  640.         [out] ULONG *pceltFetched);
  641.     [call_as(Next)]
  642.     HRESULT RemoteNext(
  643.         [in] ULONG celt,
  644.         [out, size_is(celt), length_is(*pceltFetched)]
  645.         LPOLESTR *rgelt,
  646.         [out] ULONG *pceltFetched);
  647.     HRESULT Skip(
  648.         [in] ULONG celt);
  649.     HRESULT Reset();
  650.     HRESULT Clone(
  651.         [out] IEnumString **ppenum);
  652. }
  653. /****************************************************************************
  654.  *  Structured Storage Interfaces
  655.  ****************************************************************************/
  656. [
  657.     object,
  658.     uuid(0c733a30-2a1c-11ce-ade5-00aa0044773d),
  659.     pointer_default(unique)
  660. ]
  661. interface ISequentialStream : IUnknown
  662. {
  663.     [local]
  664.     HRESULT Read(
  665.         [out, size_is(cb), length_is(*pcbRead)]
  666.         void *pv,
  667.         [in] ULONG cb,
  668.         [out] ULONG *pcbRead);
  669.     [call_as(Read)]
  670.     HRESULT RemoteRead(
  671.         [out, size_is(cb), length_is(*pcbRead)]
  672.         byte *pv,
  673.         [in] ULONG cb,
  674.         [out] ULONG *pcbRead);
  675.     [local]
  676.     HRESULT Write(
  677.         [in, size_is(cb)] void const *pv,
  678.         [in] ULONG cb,
  679.         [out] ULONG *pcbWritten);
  680.     [call_as(Write)]
  681.     HRESULT RemoteWrite(
  682.         [in, size_is(cb)] byte const *pv,
  683.         [in] ULONG cb,
  684.         [out] ULONG *pcbWritten);
  685. }
  686. [
  687.     object,
  688.     uuid(0000000c-0000-0000-C000-000000000046),
  689.     pointer_default(unique)
  690. ]
  691. interface IStream : ISequentialStream
  692. {
  693.     typedef [unique] IStream *LPSTREAM;
  694.     /* Storage stat buffer */
  695. cpp_quote("//FSSpec is Macintosh only, defined in macosfiles.h")
  696. cpp_quote("#ifdef _MAC")
  697. cpp_quote("    typedef struct tagSTATSTG")
  698. cpp_quote("    {                      ")
  699. cpp_quote("        LPOLESTR pwcsName;")
  700. cpp_quote("            FSSpec *pspec;")
  701. cpp_quote("        DWORD type;")
  702. cpp_quote("        ULARGE_INTEGER cbSize;")
  703. cpp_quote("        FILETIME mtime;")
  704. cpp_quote("        FILETIME ctime;")
  705. cpp_quote("        FILETIME atime;")
  706. cpp_quote("        DWORD grfMode;")
  707. cpp_quote("        DWORD grfLocksSupported;")
  708. cpp_quote("        CLSID clsid;")
  709. cpp_quote("        DWORD grfStateBits;")
  710. cpp_quote("        DWORD reserved;")
  711. cpp_quote("    } STATSTG;")
  712. cpp_quote("#else //_MAC")
  713.     typedef struct tagSTATSTG
  714.     {
  715.         LPOLESTR pwcsName;
  716.         DWORD type;
  717.         ULARGE_INTEGER cbSize;
  718.         FILETIME mtime;
  719.         FILETIME ctime;
  720.         FILETIME atime;
  721.         DWORD grfMode;
  722.         DWORD grfLocksSupported;
  723.         CLSID clsid;
  724.         DWORD grfStateBits;
  725.     DWORD reserved;
  726.     } STATSTG;
  727. cpp_quote("#endif //_MAC")
  728.     /* Storage element types */
  729.     typedef enum tagSTGTY
  730.     {
  731.         STGTY_STORAGE   = 1,
  732.         STGTY_STREAM    = 2,
  733.         STGTY_LOCKBYTES = 3,
  734.         STGTY_PROPERTY  = 4
  735.     } STGTY;
  736.     typedef enum tagSTREAM_SEEK
  737.     {
  738.         STREAM_SEEK_SET = 0,
  739.         STREAM_SEEK_CUR = 1,
  740.         STREAM_SEEK_END = 2
  741.     } STREAM_SEEK;
  742.     typedef enum tagLOCKTYPE
  743.     {
  744.         LOCK_WRITE      = 1,
  745.         LOCK_EXCLUSIVE  = 2,
  746.         LOCK_ONLYONCE   = 4
  747.     } LOCKTYPE;
  748.     [local]
  749.     HRESULT Seek(
  750.         [in] LARGE_INTEGER dlibMove,
  751.         [in] DWORD dwOrigin,
  752.         [out] ULARGE_INTEGER *plibNewPosition);
  753.     [call_as(Seek)]
  754.     HRESULT RemoteSeek(
  755.         [in] LARGE_INTEGER dlibMove,
  756.         [in] DWORD dwOrigin,
  757.         [out] ULARGE_INTEGER *plibNewPosition);
  758.     HRESULT SetSize(
  759.         [in] ULARGE_INTEGER libNewSize);
  760.     [local]
  761.     HRESULT CopyTo(
  762.         [in, unique] IStream *pstm,
  763.         [in] ULARGE_INTEGER cb,
  764.         [out] ULARGE_INTEGER *pcbRead,
  765.         [out] ULARGE_INTEGER *pcbWritten);
  766.     [call_as(CopyTo)]
  767.     HRESULT RemoteCopyTo(
  768.         [in, unique] IStream *pstm,
  769.         [in] ULARGE_INTEGER cb,
  770.         [out] ULARGE_INTEGER *pcbRead,
  771.         [out] ULARGE_INTEGER *pcbWritten);
  772.     HRESULT Commit(
  773.         [in] DWORD grfCommitFlags);
  774.     HRESULT Revert();
  775.     HRESULT LockRegion(
  776.         [in] ULARGE_INTEGER libOffset,
  777.         [in] ULARGE_INTEGER cb,
  778.         [in] DWORD dwLockType);
  779.     HRESULT UnlockRegion(
  780.         [in] ULARGE_INTEGER libOffset,
  781.         [in] ULARGE_INTEGER cb,
  782.         [in] DWORD dwLockType);
  783.     HRESULT Stat(
  784.         [out] STATSTG *pstatstg,
  785.         [in] DWORD grfStatFlag);
  786.     HRESULT Clone(
  787.         [out] IStream **ppstm);
  788. }
  789. [
  790.     object,
  791.     uuid(0000000d-0000-0000-C000-000000000046),
  792.     pointer_default(unique)
  793. ]
  794. interface IEnumSTATSTG : IUnknown
  795. {
  796.     typedef [unique] IEnumSTATSTG *LPENUMSTATSTG;
  797.     [local]
  798.     HRESULT Next(
  799.         [in] ULONG celt,
  800.         [out, size_is(celt), length_is(*pceltFetched)]
  801.         STATSTG *rgelt,
  802.         [out] ULONG *pceltFetched);
  803.     [call_as(Next)]
  804.     HRESULT RemoteNext(
  805.         [in] ULONG celt,
  806.         [out, size_is(celt), length_is(*pceltFetched)]
  807.         STATSTG *rgelt,
  808.         [out] ULONG *pceltFetched);
  809.     HRESULT Skip(
  810.         [in] ULONG celt);
  811.     HRESULT Reset();
  812.     HRESULT Clone(
  813.         [out] IEnumSTATSTG **ppenum);
  814. }
  815. [
  816.     object,
  817.     uuid(0000000b-0000-0000-C000-000000000046),
  818.     pointer_default(unique)
  819. ]
  820. interface IStorage : IUnknown
  821. {
  822.     typedef [unique] IStorage * LPSTORAGE;
  823.     typedef struct tagRemSNB
  824.     {
  825.         unsigned long ulCntStr;
  826.         unsigned long ulCntChar;
  827.         [size_is(ulCntChar)] OLECHAR rgString[];
  828.     } RemSNB;
  829.     typedef [unique] RemSNB * wireSNB;
  830.     typedef [wire_marshal(wireSNB)] OLECHAR **SNB;
  831.     HRESULT CreateStream(
  832.         [in, string] const OLECHAR *pwcsName,
  833.         [in] DWORD grfMode,
  834.         [in] DWORD reserved1,
  835.         [in] DWORD reserved2,
  836.         [out] IStream **ppstm);
  837.     [local]
  838.     HRESULT OpenStream(
  839.         [in, string] const OLECHAR *pwcsName,
  840.         [in, unique] void *reserved1,
  841.         [in] DWORD grfMode,
  842.         [in] DWORD reserved2,
  843.         [out] IStream **ppstm);
  844.     [call_as(OpenStream)]
  845.     HRESULT RemoteOpenStream(
  846.         [in, string] const OLECHAR *pwcsName,
  847.         [in] unsigned long cbReserved1,
  848.         [in, unique, size_is(cbReserved1)] byte *reserved1,
  849.         [in] DWORD grfMode,
  850.         [in] DWORD reserved2,
  851.         [out] IStream **ppstm);
  852.     HRESULT CreateStorage(
  853.         [in, string] const OLECHAR *pwcsName,
  854.         [in] DWORD grfMode,
  855.         [in] DWORD reserved1,
  856.         [in] DWORD reserved2,
  857.         [out] IStorage **ppstg);
  858.     HRESULT OpenStorage(
  859.         [in, unique, string] const OLECHAR *pwcsName,
  860.         [in, unique] IStorage *pstgPriority,
  861.         [in] DWORD grfMode,
  862.         [in, unique] SNB snbExclude,
  863.         [in] DWORD reserved,
  864.         [out] IStorage **ppstg);
  865.     HRESULT CopyTo(
  866.         [in] DWORD ciidExclude,
  867.         [in, unique, size_is(ciidExclude)] IID const *rgiidExclude,
  868.         [in, unique] SNB snbExclude,
  869.         [in, unique] IStorage *pstgDest);
  870.     HRESULT MoveElementTo(
  871.         [in, string] const OLECHAR * pwcsName,
  872.         [in, unique] IStorage *pstgDest,
  873.         [in, string] const OLECHAR *pwcsNewName,
  874.         [in] DWORD grfFlags);
  875.     HRESULT Commit(
  876.         [in] DWORD grfCommitFlags);
  877.     HRESULT Revert();
  878.     [local]
  879.     HRESULT EnumElements(
  880.         [in] DWORD reserved1,
  881.         [in, unique, size_is(1)] void *reserved2,
  882.         [in] DWORD reserved3,
  883.         [out] IEnumSTATSTG **ppenum);
  884.     [call_as(EnumElements)]
  885.     HRESULT RemoteEnumElements(
  886.         [in] DWORD reserved1,
  887.         [in] unsigned long cbReserved2,
  888.         [in, unique, size_is(cbReserved2)] byte *reserved2,
  889.         [in] DWORD reserved3,
  890.         [out] IEnumSTATSTG **ppenum);
  891.     HRESULT DestroyElement(
  892.         [in, string] const OLECHAR *pwcsName);
  893.     HRESULT RenameElement(
  894.         [in, string] const OLECHAR *pwcsOldName,
  895.         [in, string] const OLECHAR *pwcsNewName);
  896.     HRESULT SetElementTimes(
  897.         [in, unique, string] const OLECHAR *pwcsName,
  898.         [in, unique] FILETIME const *pctime,
  899.         [in, unique] FILETIME const *patime,
  900.         [in, unique] FILETIME const *pmtime);
  901.     HRESULT SetClass(
  902.         [in] REFCLSID clsid);
  903.     HRESULT SetStateBits(
  904.         [in] DWORD grfStateBits,
  905.         [in] DWORD grfMask);
  906.     HRESULT Stat(
  907.         [out] STATSTG *pstatstg,
  908.         [in] DWORD grfStatFlag);
  909. }
  910. [
  911.     object,
  912.     uuid(0000010b-0000-0000-C000-000000000046),
  913.     pointer_default(unique)
  914. ]
  915. interface IPersistFile : IPersist
  916. {
  917.     typedef [unique] IPersistFile *LPPERSISTFILE;
  918.     HRESULT IsDirty
  919.     (
  920.         void
  921.     );
  922.     HRESULT Load
  923.     (
  924.         [in] LPCOLESTR pszFileName,
  925.         [in] DWORD dwMode
  926.     );
  927.     HRESULT Save
  928.     (
  929.         [in, unique] LPCOLESTR pszFileName,
  930.         [in] BOOL fRemember
  931.     );
  932.     HRESULT SaveCompleted
  933.     (
  934.         [in, unique] LPCOLESTR pszFileName
  935.     );
  936.     HRESULT GetCurFile
  937.     (
  938.         [out] LPOLESTR *ppszFileName
  939.     );
  940. }
  941. [
  942.     object,
  943.     uuid(0000010a-0000-0000-C000-000000000046),
  944.     pointer_default(unique)
  945. ]
  946. interface IPersistStorage : IPersist
  947. {
  948.     typedef [unique] IPersistStorage *LPPERSISTSTORAGE;
  949.     HRESULT IsDirty
  950.     (
  951.         void
  952.     );
  953.     HRESULT InitNew
  954.     (
  955.         [in, unique] IStorage *pStg
  956.     );
  957.     HRESULT Load
  958.     (
  959.         [in, unique] IStorage *pStg
  960.     );
  961.     HRESULT Save
  962.     (
  963.         [in, unique] IStorage *pStgSave,
  964.         [in] BOOL fSameAsLoad
  965.     );
  966.     HRESULT SaveCompleted
  967.     (
  968.         [in, unique] IStorage *pStgNew
  969.     );
  970.     HRESULT HandsOffStorage
  971.     (
  972.         void
  973.     );
  974. }
  975. [
  976.     object,
  977.     uuid(0000000a-0000-0000-C000-000000000046),
  978.     pointer_default(unique)
  979. ]
  980. interface ILockBytes : IUnknown
  981. {
  982.     typedef [unique] ILockBytes *LPLOCKBYTES;
  983.     [local]
  984.     HRESULT ReadAt(
  985.         [in] ULARGE_INTEGER ulOffset,
  986.         [out, size_is(cb), length_is(*pcbRead)]
  987.         void *pv,
  988.         [in] ULONG cb,
  989.         [out] ULONG *pcbRead);
  990.     [call_as(ReadAt)]
  991.     HRESULT _stdcall RemoteReadAt(
  992.         [in] ULARGE_INTEGER ulOffset,
  993.         [out, size_is(cb), length_is(*pcbRead)]
  994.         byte *pv,
  995.         [in] ULONG cb,
  996.         [out] ULONG *pcbRead);
  997.     [local]
  998.     HRESULT WriteAt(
  999.         [in] ULARGE_INTEGER ulOffset,
  1000.         [in, size_is(cb)] void const *pv,
  1001.         [in] ULONG cb,
  1002.         [out] ULONG *pcbWritten);
  1003.     [call_as(WriteAt)]
  1004.     HRESULT RemoteWriteAt(
  1005.         [in] ULARGE_INTEGER ulOffset,
  1006.         [in, size_is(cb)] byte const *pv,
  1007.         [in] ULONG cb,
  1008.         [out] ULONG *pcbWritten);
  1009.     HRESULT Flush();
  1010.     HRESULT SetSize(
  1011.         [in] ULARGE_INTEGER cb);
  1012.     HRESULT LockRegion(
  1013.         [in] ULARGE_INTEGER libOffset,
  1014.         [in] ULARGE_INTEGER cb,
  1015.         [in] DWORD dwLockType);
  1016.     HRESULT UnlockRegion(
  1017.         [in] ULARGE_INTEGER libOffset,
  1018.         [in] ULARGE_INTEGER cb,
  1019.         [in] DWORD dwLockType);
  1020.     HRESULT Stat(
  1021.         [out] STATSTG *pstatstg,
  1022.         [in] DWORD grfStatFlag);
  1023. }
  1024. [
  1025.     object,
  1026.     uuid(00000103-0000-0000-C000-000000000046),
  1027.     pointer_default(unique)
  1028. ]
  1029. interface IEnumFORMATETC : IUnknown
  1030. {
  1031.     typedef [unique] IEnumFORMATETC *LPENUMFORMATETC;
  1032.     typedef struct tagDVTARGETDEVICE {
  1033.         DWORD tdSize;
  1034.         WORD tdDriverNameOffset;
  1035.         WORD tdDeviceNameOffset;
  1036.         WORD tdPortNameOffset;
  1037.         WORD tdExtDevmodeOffset;
  1038.         [size_is(tdSize - sizeof(DWORD) - 4*sizeof(WORD))]
  1039.         BYTE tdData[];
  1040.     }DVTARGETDEVICE;
  1041.     typedef CLIPFORMAT *LPCLIPFORMAT;
  1042.     typedef struct tagFORMATETC {
  1043.         CLIPFORMAT cfFormat;
  1044.         [unique] DVTARGETDEVICE * ptd;
  1045.         DWORD dwAspect;
  1046.         LONG lindex;
  1047.         DWORD tymed;
  1048.     }FORMATETC, *LPFORMATETC;
  1049.     [local]
  1050.     HRESULT Next(
  1051.         [in] ULONG celt,
  1052.         [out, size_is(celt), length_is(*pceltFetched )]
  1053.         FORMATETC *rgelt,
  1054.         [out] ULONG *pceltFetched);
  1055.     [call_as(Next)]
  1056.     HRESULT RemoteNext(
  1057.         [in] ULONG celt,
  1058.         [out, size_is(celt), length_is(*pceltFetched )]
  1059.         FORMATETC *rgelt,
  1060.         [out] ULONG *pceltFetched);
  1061.     HRESULT Skip(
  1062.         [in] ULONG celt);
  1063.     HRESULT Reset();
  1064.     HRESULT Clone(
  1065.         [out] IEnumFORMATETC **ppenum);
  1066. }
  1067. [
  1068.     object,
  1069.     uuid(00000105-0000-0000-C000-000000000046),
  1070.     pointer_default(unique)
  1071. ]
  1072. interface IEnumSTATDATA : IUnknown
  1073. {
  1074.     typedef [unique] IEnumSTATDATA *LPENUMSTATDATA;
  1075.     //Advise Flags
  1076.     typedef enum tagADVF
  1077.     {
  1078.         ADVF_NODATA = 1,
  1079.         ADVF_PRIMEFIRST = 2,
  1080.         ADVF_ONLYONCE = 4,
  1081.         ADVF_DATAONSTOP = 64,
  1082.         ADVFCACHE_NOHANDLER = 8,
  1083.         ADVFCACHE_FORCEBUILTIN = 16,
  1084.         ADVFCACHE_ONSAVE = 32
  1085.     } ADVF;
  1086.     // Stats for data; used by several enumerations and by at least one
  1087.     // implementation of IDataAdviseHolder; if a field is not used, it
  1088.     // will be NULL.
  1089.     typedef struct tagSTATDATA
  1090.     {                              // field used by:
  1091.         FORMATETC formatetc;       // EnumAdvise, EnumData (cache), EnumFormats
  1092.         DWORD advf;                // EnumAdvise, EnumData (cache)
  1093.         [unique] IAdviseSink * pAdvSink; // EnumAdvise
  1094.         DWORD dwConnection;        // EnumAdvise
  1095.     } STATDATA;
  1096.     typedef STATDATA *LPSTATDATA;
  1097.     [local]
  1098.     HRESULT Next(
  1099.         [in] ULONG celt,
  1100.         [out, size_is(celt), length_is(*pceltFetched)]
  1101.         STATDATA *rgelt,
  1102.         [out] ULONG *pceltFetched);
  1103.     [call_as(Next)]
  1104.     HRESULT RemoteNext(
  1105.         [in] ULONG celt,
  1106.         [out, size_is(celt), length_is(*pceltFetched)]
  1107.         STATDATA *rgelt,
  1108.         [out] ULONG *pceltFetched);
  1109.     HRESULT Skip(
  1110.         [in] ULONG celt);
  1111.     HRESULT Reset();
  1112.     HRESULT Clone(
  1113.         [out] IEnumSTATDATA **ppenum);
  1114. }
  1115. [
  1116.     object,
  1117.     uuid(00000012-0000-0000-C000-000000000046),
  1118.     pointer_default(unique)
  1119. ]
  1120. interface IRootStorage : IUnknown
  1121. {
  1122.     typedef [unique] IRootStorage *LPROOTSTORAGE;
  1123.     HRESULT SwitchToFile
  1124.     (
  1125.         [in] LPOLESTR pszFile
  1126.     );
  1127. }
  1128. /****************************************************************************
  1129.  *  Notification Interfaces
  1130.  ****************************************************************************/
  1131. [
  1132.     object,
  1133.     uuid(0000010f-0000-0000-C000-000000000046),
  1134. #if (__midl >= 500)
  1135.     async_uuid(00000150-0000-0000-C000-000000000046),
  1136. #endif
  1137.     pointer_default(unique)
  1138. ]
  1139. interface IAdviseSink : IUnknown
  1140. {
  1141.     typedef IAdviseSink *LPADVISESINK;
  1142.     typedef [v1_enum] enum tagTYMED {
  1143.         TYMED_HGLOBAL = 1,
  1144.         TYMED_FILE = 2,
  1145.         TYMED_ISTREAM = 4,
  1146.         TYMED_ISTORAGE = 8,
  1147.         TYMED_GDI = 16,
  1148.         TYMED_MFPICT = 32,
  1149.         TYMED_ENHMF = 64,
  1150.         TYMED_NULL = 0
  1151.     } TYMED;
  1152.     cpp_quote("#ifndef RC_INVOKED")
  1153.     cpp_quote("#if _MSC_VER >= 1200")
  1154.     cpp_quote("#pragma warning(push)")
  1155.     cpp_quote("#endif")
  1156.     cpp_quote("#pragma warning(disable:4200)")
  1157.     cpp_quote("#endif")
  1158.     typedef struct tagRemSTGMEDIUM {
  1159.         DWORD tymed;
  1160.         DWORD dwHandleType;
  1161.         unsigned long pData;
  1162.         unsigned long pUnkForRelease;
  1163.         unsigned long cbData;
  1164.         [size_is(cbData)] byte data[];
  1165.     } RemSTGMEDIUM;
  1166.     cpp_quote("#ifndef RC_INVOKED")
  1167.     cpp_quote("#if _MSC_VER >= 1200")
  1168.     cpp_quote("#pragma warning(pop)")
  1169.     cpp_quote("#else")
  1170.     cpp_quote("#pragma warning(default:4200)")
  1171.     cpp_quote("#endif")
  1172.     cpp_quote("#endif")
  1173. cpp_quote("#ifdef NONAMELESSUNION")
  1174. cpp_quote("typedef struct tagSTGMEDIUM {")
  1175. cpp_quote("    DWORD tymed;")
  1176. cpp_quote("    union {")
  1177. cpp_quote("        HBITMAP hBitmap;")
  1178. cpp_quote("        HMETAFILEPICT hMetaFilePict;")
  1179. cpp_quote("        HENHMETAFILE hEnhMetaFile;")
  1180. cpp_quote("        HGLOBAL hGlobal;")
  1181. cpp_quote("        LPOLESTR lpszFileName;")
  1182. cpp_quote("        IStream *pstm;")
  1183. cpp_quote("        IStorage *pstg;")
  1184. cpp_quote("        } u;")
  1185. cpp_quote("    IUnknown *pUnkForRelease;")
  1186. cpp_quote("}uSTGMEDIUM;")
  1187. cpp_quote("#else")
  1188.     typedef struct tagSTGMEDIUM {
  1189.     DWORD tymed;
  1190.     [switch_type(DWORD), switch_is((DWORD) tymed)]
  1191.         union
  1192.         {
  1193.         [case(TYMED_GDI)]
  1194.             HBITMAP hBitmap;
  1195.         [case(TYMED_MFPICT)]
  1196.             HMETAFILEPICT hMetaFilePict;
  1197.         [case(TYMED_ENHMF)]
  1198.             HENHMETAFILE hEnhMetaFile;
  1199.         [case(TYMED_HGLOBAL)]
  1200.             HGLOBAL hGlobal;
  1201.         [case(TYMED_FILE)]
  1202.             LPOLESTR lpszFileName;
  1203.         [case(TYMED_ISTREAM)]
  1204.             IStream *pstm;
  1205.         [case(TYMED_ISTORAGE)]
  1206.             IStorage *pstg;
  1207.         [default]
  1208.                 ;
  1209.         };
  1210.         [unique] IUnknown *pUnkForRelease;
  1211.     }uSTGMEDIUM;
  1212. cpp_quote("#endif /* !NONAMELESSUNION */")
  1213. //
  1214. //  wireSTGMEDIUM
  1215. //
  1216. // These flags are #defined (not enumerated) in wingdi.
  1217. // We need to repeat #defines to avoid conflict in the generated file.
  1218. //
  1219. /* Object Definitions for EnumObjects() */
  1220. #define OBJ_PEN             1
  1221. #define OBJ_BRUSH           2
  1222. #define OBJ_DC              3
  1223. #define OBJ_METADC          4
  1224. #define OBJ_PAL             5
  1225. #define OBJ_FONT            6
  1226. #define OBJ_BITMAP          7
  1227. #define OBJ_REGION          8
  1228. #define OBJ_METAFILE        9
  1229. #define OBJ_MEMDC           10
  1230. #define OBJ_EXTPEN          11
  1231. #define OBJ_ENHMETADC       12
  1232. #define OBJ_ENHMETAFILE     13
  1233.     typedef union _GDI_OBJECT switch( DWORD ObjectType ) u
  1234.     {
  1235.         case OBJ_BITMAP:    wireHBITMAP     hBitmap;
  1236.         case OBJ_PAL:       wireHPALETTE    hPalette;
  1237.         default:            wireHGLOBAL     hGeneric;
  1238.     } GDI_OBJECT;
  1239.     typedef struct _userSTGMEDIUM
  1240.     {
  1241.         union _STGMEDIUM_UNION switch( DWORD tymed ) u
  1242.         {
  1243.         case TYMED_NULL:        ;
  1244.         case TYMED_MFPICT:      wireHMETAFILEPICT   hMetaFilePict;
  1245.         case TYMED_ENHMF:       wireHENHMETAFILE    hHEnhMetaFile;
  1246.         case TYMED_GDI:         GDI_OBJECT *        hGdiHandle;
  1247.         case TYMED_HGLOBAL:     wireHGLOBAL         hGlobal;
  1248.         case TYMED_FILE:        LPOLESTR            lpszFileName;
  1249.         case TYMED_ISTREAM:     BYTE_BLOB *         pstm;
  1250.         case TYMED_ISTORAGE:    BYTE_BLOB *         pstg;
  1251.         };
  1252.         IUnknown *              pUnkForRelease;
  1253.     } userSTGMEDIUM;
  1254.     typedef [unique] userSTGMEDIUM  * wireSTGMEDIUM;
  1255.     typedef [wire_marshal( wireSTGMEDIUM )] uSTGMEDIUM STGMEDIUM;
  1256.     typedef [unique] userSTGMEDIUM  * wireASYNC_STGMEDIUM;
  1257.     typedef [wire_marshal( wireASYNC_STGMEDIUM )] STGMEDIUM ASYNC_STGMEDIUM;
  1258.     typedef STGMEDIUM *LPSTGMEDIUM;
  1259.     typedef struct _userFLAG_STGMEDIUM
  1260.     {
  1261.         long                ContextFlags;
  1262.         long                fPassOwnership;
  1263.         userSTGMEDIUM       Stgmed;
  1264.     } userFLAG_STGMEDIUM;
  1265.     typedef [unique] userFLAG_STGMEDIUM  * wireFLAG_STGMEDIUM;
  1266.     typedef [wire_marshal( wireFLAG_STGMEDIUM )]
  1267.         struct _FLAG_STGMEDIUM
  1268.         {
  1269.                 long                ContextFlags;
  1270.                 long                fPassOwnership;
  1271.                 STGMEDIUM           Stgmed;
  1272.         } FLAG_STGMEDIUM;
  1273.     [local]
  1274.     void OnDataChange(
  1275.         [in, unique] FORMATETC *pFormatetc,
  1276.         [in, unique] STGMEDIUM *pStgmed);
  1277.     [local]
  1278.     void OnViewChange(
  1279.         [in] DWORD dwAspect,
  1280.         [in] LONG lindex);
  1281.     [local]
  1282.     void OnRename(
  1283.         [in] IMoniker *pmk);
  1284.     [local]
  1285.     void OnSave();
  1286.     [local]
  1287.     void OnClose();
  1288. #if (__midl >= 500)
  1289. // Currently used temporary definitons.
  1290.     [call_as(OnDataChange)]
  1291.     HRESULT  RemoteOnDataChange(
  1292.         [in, unique] FORMATETC *pFormatetc,
  1293.         [in, unique] ASYNC_STGMEDIUM *pStgmed);
  1294.     [call_as(OnViewChange)]
  1295.     HRESULT  RemoteOnViewChange(
  1296.         [in] DWORD dwAspect,
  1297.         [in] LONG lindex);
  1298.     [call_as(OnRename)]
  1299.     HRESULT  RemoteOnRename(
  1300.         [in] IMoniker *pmk);
  1301.     [call_as(OnSave)]
  1302.     HRESULT  RemoteOnSave(
  1303.         );
  1304. #elif (__midl > 302)
  1305. // Currently used temporary definitons.
  1306.     [call_as(OnDataChange), async]
  1307.     HRESULT  RemoteOnDataChange(
  1308.         [in] IAsyncManager **ppIAM,
  1309.         [in, unique] FORMATETC *pFormatetc,
  1310.         [in, unique] ASYNC_STGMEDIUM *pStgmed);
  1311.     [call_as(OnViewChange), async]
  1312.     HRESULT  RemoteOnViewChange(
  1313.         [in] IAsyncManager **ppIAM,
  1314.         [in] DWORD dwAspect,
  1315.         [in] LONG lindex);
  1316.     [call_as(OnRename), async]
  1317.     HRESULT  RemoteOnRename(
  1318.         [in] IAsyncManager **ppIAM,
  1319.         [in] IMoniker *pmk);
  1320.     [call_as(OnSave), async]
  1321.     HRESULT  RemoteOnSave(
  1322.         [in] IAsyncManager **ppIAM
  1323.         );
  1324. #else
  1325. // Old definitions kept for convenience.
  1326.     [call_as(OnDataChange), async]
  1327.     void RemoteOnDataChange(
  1328.         [in, unique] FORMATETC *pFormatetc,
  1329.         [in, unique] ASYNC_STGMEDIUM *pStgmed);
  1330.     [call_as(OnViewChange), async]
  1331.     void RemoteOnViewChange(
  1332.         [in] DWORD dwAspect,
  1333.         [in] LONG lindex);
  1334.     [call_as(OnRename), async]
  1335.     void RemoteOnRename(
  1336.         [in] IMoniker *pmk);
  1337.     [call_as(OnSave), async]
  1338.     void RemoteOnSave();
  1339. #endif  // MIDL > 302
  1340.     [call_as(OnClose)]
  1341.     HRESULT RemoteOnClose();
  1342. }
  1343. [
  1344.     object,
  1345.     uuid(00000125-0000-0000-C000-000000000046),
  1346. #if (__midl >= 500)
  1347.     async_uuid(00000151-0000-0000-C000-000000000046),
  1348. #endif
  1349.     pointer_default(unique)
  1350. ]
  1351. interface IAdviseSink2 : IAdviseSink
  1352. {
  1353.     typedef [unique] IAdviseSink2 *LPADVISESINK2;
  1354.     [local]
  1355.     void OnLinkSrcChange(
  1356.         [in, unique] IMoniker *pmk);
  1357. #if (__midl >= 500)
  1358. // Currently used temporary definiton
  1359.     [call_as(OnLinkSrcChange)]
  1360.     HRESULT RemoteOnLinkSrcChange(
  1361.         [in, unique] IMoniker *pmk);
  1362. #elif (__midl > 302)
  1363. // Currently used temporary definiton
  1364.     [call_as(OnLinkSrcChange), async]
  1365.     HRESULT RemoteOnLinkSrcChange(
  1366.         [in] IAsyncManager **ppIAM,
  1367.         [in, unique] IMoniker *pmk);
  1368. #else
  1369. // Old one for convenience.
  1370.     [call_as(OnLinkSrcChange), async]
  1371.     void RemoteOnLinkSrcChange(
  1372.         [in, unique] IMoniker *pmk);
  1373. #endif
  1374. }
  1375. [
  1376.     object,
  1377.     uuid(0000010e-0000-0000-C000-000000000046),
  1378.     pointer_default(unique)
  1379. ]
  1380. interface IDataObject : IUnknown
  1381. {
  1382.     typedef [unique] IDataObject *LPDATAOBJECT;
  1383.     //DATA format DIRection
  1384.     typedef enum tagDATADIR
  1385.     {
  1386.         DATADIR_GET = 1,
  1387.         DATADIR_SET = 2
  1388.     } DATADIR;
  1389.     [local]
  1390.     HRESULT GetData(
  1391.         [in, unique] FORMATETC *pformatetcIn,
  1392.         [out] STGMEDIUM *pmedium);
  1393.     [call_as(GetData)]
  1394.     HRESULT RemoteGetData(
  1395.         [in, unique] FORMATETC *pformatetcIn,
  1396.         [out] STGMEDIUM *pRemoteMedium);
  1397.     [local]
  1398.     HRESULT GetDataHere(
  1399.         [in, unique] FORMATETC *pformatetc,
  1400.         [in, out] STGMEDIUM *pmedium);
  1401.     [call_as(GetDataHere)]
  1402.     HRESULT RemoteGetDataHere(
  1403.         [in, unique] FORMATETC *pformatetc,
  1404.         [in, out] STGMEDIUM *pRemoteMedium);
  1405.     HRESULT QueryGetData(
  1406.         [in, unique] FORMATETC *pformatetc);
  1407.     HRESULT GetCanonicalFormatEtc(
  1408.         [in, unique] FORMATETC *pformatectIn,
  1409.         [out] FORMATETC *pformatetcOut);
  1410.     [local]
  1411.     HRESULT SetData(
  1412.         [in, unique] FORMATETC *pformatetc,
  1413.         [in, unique] STGMEDIUM *pmedium,
  1414.         [in] BOOL fRelease);
  1415.     [call_as(SetData)]
  1416.     HRESULT RemoteSetData(
  1417.         [in, unique] FORMATETC *pformatetc,
  1418.         [in, unique] FLAG_STGMEDIUM *pmedium,
  1419.         [in] BOOL fRelease);
  1420.     HRESULT EnumFormatEtc(
  1421.         [in] DWORD dwDirection,
  1422.         [out] IEnumFORMATETC **ppenumFormatEtc);
  1423.     HRESULT DAdvise(
  1424.         [in] FORMATETC *pformatetc,
  1425.         [in] DWORD advf,
  1426.         [in, unique] IAdviseSink *pAdvSink,
  1427.         [out] DWORD *pdwConnection);
  1428.     HRESULT DUnadvise(
  1429.         [in] DWORD dwConnection);
  1430.     HRESULT EnumDAdvise(
  1431.         [out] IEnumSTATDATA **ppenumAdvise);
  1432. }
  1433. [
  1434.     local,
  1435.     object,
  1436.     uuid(00000110-0000-0000-C000-000000000046)
  1437. ]
  1438. interface IDataAdviseHolder : IUnknown
  1439. {
  1440.     typedef [unique] IDataAdviseHolder *LPDATAADVISEHOLDER;
  1441.     HRESULT Advise
  1442.     (
  1443.         [in, unique] IDataObject *pDataObject,
  1444.         [in, unique] FORMATETC *pFetc,
  1445.         [in] DWORD advf,
  1446.         [in, unique] IAdviseSink *pAdvise,
  1447.         [out] DWORD *pdwConnection
  1448.     );
  1449.     HRESULT Unadvise
  1450.     (
  1451.         [in] DWORD dwConnection
  1452.     );
  1453.     HRESULT EnumAdvise
  1454.     (
  1455.         [out] IEnumSTATDATA **ppenumAdvise
  1456.     );
  1457.     HRESULT SendOnDataChange
  1458.     (
  1459.         [in, unique] IDataObject *pDataObject,
  1460.         [in] DWORD dwReserved,
  1461.         [in] DWORD advf
  1462.     );
  1463. }
  1464. [
  1465.     local,
  1466.     object,
  1467.     uuid(00000016-0000-0000-C000-000000000046)
  1468. ]
  1469. interface IMessageFilter : IUnknown
  1470. {
  1471.     typedef [unique] IMessageFilter *LPMESSAGEFILTER;
  1472. // call type used by IMessageFilter::HandleIncomingMessage
  1473. typedef enum tagCALLTYPE
  1474. {
  1475.     CALLTYPE_TOPLEVEL = 1,      // toplevel call - no outgoing call
  1476.     CALLTYPE_NESTED   = 2,      // callback on behalf of previous outgoing call - should always handle
  1477.     CALLTYPE_ASYNC    = 3,      // aysnchronous call - can NOT be rejected
  1478.     CALLTYPE_TOPLEVEL_CALLPENDING = 4,  // new toplevel call with new LID
  1479.     CALLTYPE_ASYNC_CALLPENDING    = 5   // async call - can NOT be rejected
  1480. } CALLTYPE;
  1481. // status of server call - returned by IMessageFilter::HandleIncomingCall
  1482. // and passed to  IMessageFilter::RetryRejectedCall
  1483. typedef enum tagSERVERCALL
  1484. {
  1485.     SERVERCALL_ISHANDLED    = 0,
  1486.     SERVERCALL_REJECTED     = 1,
  1487.     SERVERCALL_RETRYLATER   = 2
  1488. } SERVERCALL;
  1489. // Pending type indicates the level of nesting
  1490. typedef enum tagPENDINGTYPE
  1491. {
  1492.     PENDINGTYPE_TOPLEVEL = 1, // toplevel call
  1493.     PENDINGTYPE_NESTED   = 2  // nested call
  1494. } PENDINGTYPE;
  1495. // return values of MessagePending
  1496. typedef enum tagPENDINGMSG
  1497. {
  1498.     PENDINGMSG_CANCELCALL  = 0, // cancel the outgoing call
  1499.     PENDINGMSG_WAITNOPROCESS  = 1, // wait for the return and don't dispatch the message
  1500.     PENDINGMSG_WAITDEFPROCESS = 2  // wait and dispatch the message
  1501. } PENDINGMSG;
  1502. // additional interface information about the incoming call
  1503. typedef struct tagINTERFACEINFO
  1504. {
  1505.     IUnknown    *pUnk;      // the pointer to the object
  1506.     IID         iid;        // interface id
  1507.     WORD        wMethod;    // interface method
  1508. } INTERFACEINFO, *LPINTERFACEINFO;
  1509.     DWORD HandleInComingCall
  1510.     (
  1511.         [in] DWORD dwCallType,
  1512.         [in] HTASK htaskCaller,
  1513.         [in] DWORD dwTickCount,
  1514.         [in] LPINTERFACEINFO lpInterfaceInfo
  1515.     );
  1516.     DWORD RetryRejectedCall
  1517.     (
  1518.         [in] HTASK htaskCallee,
  1519.         [in] DWORD dwTickCount,
  1520.         [in] DWORD dwRejectType
  1521.     );
  1522.     DWORD MessagePending
  1523.     (
  1524.         [in] HTASK htaskCallee,
  1525.         [in] DWORD dwTickCount,
  1526.         [in] DWORD dwPendingType
  1527.     );
  1528. }
  1529. /****************************************************************************
  1530.  *  Object Remoting Interfaces
  1531.  ****************************************************************************/
  1532. [
  1533.     local,
  1534.     object,
  1535.     uuid(D5F56B60-593B-101A-B569-08002B2DBF7A)
  1536. ]
  1537. interface IRpcChannelBuffer : IUnknown
  1538. {
  1539.     typedef unsigned long RPCOLEDATAREP;
  1540.     typedef struct tagRPCOLEMESSAGE
  1541.     {
  1542.         void             *reserved1;
  1543.         RPCOLEDATAREP     dataRepresentation;
  1544.         void             *Buffer;
  1545.         ULONG             cbBuffer;
  1546.         ULONG             iMethod;
  1547.         void             *reserved2[5];
  1548.         ULONG             rpcFlags;
  1549.     } RPCOLEMESSAGE;
  1550.     typedef RPCOLEMESSAGE *PRPCOLEMESSAGE;
  1551.     HRESULT GetBuffer
  1552.     (
  1553.         [in] RPCOLEMESSAGE *pMessage,
  1554.         [in] REFIID riid
  1555.     );
  1556.     HRESULT SendReceive
  1557.     (
  1558.         [in,out] RPCOLEMESSAGE *pMessage,
  1559.         [out] ULONG *pStatus
  1560.     );
  1561.     HRESULT FreeBuffer
  1562.     (
  1563.         [in] RPCOLEMESSAGE *pMessage
  1564.     );
  1565.     HRESULT GetDestCtx
  1566.     (
  1567.         [out] DWORD *pdwDestContext,
  1568.         [out] void **ppvDestContext
  1569.     );
  1570.     HRESULT IsConnected
  1571.     (
  1572.         void
  1573.     );
  1574. }
  1575. [
  1576.     local,
  1577.     object,
  1578.     uuid(594f31d0-7f19-11d0-b194-00a0c90dc8bf)
  1579. ]
  1580. interface IRpcChannelBuffer2 : IRpcChannelBuffer
  1581. {
  1582.     HRESULT GetProtocolVersion
  1583.     (
  1584.         [in,out] DWORD *pdwVersion
  1585.     );
  1586. }
  1587. [
  1588.     local,
  1589.     object,
  1590.     uuid(a5029fb6-3c34-11d1-9c99-00c04fb998aa),
  1591.     pointer_default(unique)
  1592. ]
  1593. interface IAsyncRpcChannelBuffer : IRpcChannelBuffer2
  1594. {
  1595.     HRESULT Send(
  1596.         [in,out] RPCOLEMESSAGE *pMsg,
  1597.         [in]     ISynchronize *pSync,
  1598.         [out]    ULONG *pulStatus
  1599.         );
  1600.     HRESULT Receive(
  1601.         [in,out] RPCOLEMESSAGE *pMsg,
  1602.         [out]     ULONG *pulStatus);
  1603.     HRESULT GetDestCtxEx
  1604.     (
  1605.         [in] RPCOLEMESSAGE *pMsg,
  1606.         [out] DWORD *pdwDestContext,
  1607.         [out] void **ppvDestContext
  1608.     );
  1609. };
  1610. [
  1611.     local,
  1612.     object,
  1613.     uuid(25B15600-0115-11d0-BF0D-00AA00B8DFD2)
  1614. ]
  1615. interface IRpcChannelBuffer3 : IRpcChannelBuffer2
  1616. {
  1617.     HRESULT Send
  1618.     (
  1619.         [in,out] RPCOLEMESSAGE *pMsg,
  1620.         [out]    ULONG *pulStatus
  1621.     );
  1622.     HRESULT Receive
  1623.     (
  1624.         [in,out] RPCOLEMESSAGE *pMsg,
  1625.         [in]     ULONG ulSize,
  1626.         [out]    ULONG *pulStatus
  1627.     );
  1628.     HRESULT Cancel
  1629.     (
  1630.         [in] RPCOLEMESSAGE *pMsg
  1631.     );
  1632.     HRESULT GetCallContext
  1633.     (
  1634.         [in]  RPCOLEMESSAGE *pMsg,
  1635.         [in]  REFIID riid,
  1636.         [out] void **pInterface
  1637.     );
  1638.     HRESULT GetDestCtxEx
  1639.     (
  1640.         [in] RPCOLEMESSAGE *pMsg,
  1641.         [out] DWORD *pdwDestContext,
  1642.         [out] void **ppvDestContext
  1643.     );
  1644.     HRESULT GetState
  1645.     (
  1646.         [in]  RPCOLEMESSAGE   *pMsg,
  1647.         [out] DWORD           *pState
  1648.     );
  1649.     HRESULT RegisterAsync
  1650.     (
  1651.         [in] RPCOLEMESSAGE *pMsg,
  1652.         [in] IAsyncManager *pAsyncMgr
  1653.     );
  1654. }
  1655. [
  1656.     local,
  1657.     object,
  1658.     uuid(58a08519-24c8-4935-b482-3fd823333a4f)
  1659. ]
  1660. interface IRpcSyntaxNegotiate : IUnknown
  1661. {
  1662.     HRESULT NegotiateSyntax ( [in,out] RPCOLEMESSAGE * pMsg );
  1663. }
  1664. [
  1665.     local,
  1666.     object,
  1667.     uuid(D5F56A34-593B-101A-B569-08002B2DBF7A)
  1668. ]
  1669. interface IRpcProxyBuffer : IUnknown
  1670. {
  1671.     HRESULT Connect
  1672.     (
  1673.         [in, unique] IRpcChannelBuffer *pRpcChannelBuffer
  1674.     );
  1675.     void Disconnect
  1676.     (
  1677.         void
  1678.     );
  1679. }
  1680. [
  1681.     local,
  1682.     object,
  1683.     uuid(D5F56AFC-593B-101A-B569-08002B2DBF7A)
  1684. ]
  1685. interface IRpcStubBuffer : IUnknown
  1686. {
  1687.     HRESULT Connect
  1688.     (
  1689.         [in] IUnknown *pUnkServer
  1690.     );
  1691.     void Disconnect();
  1692.     HRESULT Invoke
  1693.     (
  1694.         [in] RPCOLEMESSAGE *_prpcmsg,
  1695.         [in] IRpcChannelBuffer *_pRpcChannelBuffer
  1696.     );
  1697.     IRpcStubBuffer *IsIIDSupported
  1698.     (
  1699.         [in] REFIID riid
  1700.     );
  1701.     ULONG CountRefs
  1702.     (
  1703.         void
  1704.     );
  1705.     HRESULT DebugServerQueryInterface
  1706.     (
  1707.         void **ppv
  1708.     );
  1709.     void DebugServerRelease
  1710.     (
  1711.         void *pv
  1712.     );
  1713. }
  1714. [
  1715.     local,
  1716.     object,
  1717.     uuid(D5F569D0-593B-101A-B569-08002B2DBF7A)
  1718. ]
  1719. interface IPSFactoryBuffer : IUnknown
  1720. {
  1721.     HRESULT CreateProxy
  1722.     (
  1723.         [in] IUnknown *pUnkOuter,
  1724.         [in] REFIID riid,
  1725.         [out] IRpcProxyBuffer **ppProxy,
  1726.         [out] void **ppv
  1727.     );
  1728.     HRESULT CreateStub
  1729.     (
  1730.         [in] REFIID riid,
  1731.         [in, unique] IUnknown *pUnkServer,
  1732.         [out] IRpcStubBuffer **ppStub
  1733.     );
  1734. }
  1735. cpp_quote( "#if  (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM" )
  1736. cpp_quote( "// This interface is only valid on Windows NT 4.0" )
  1737. // This structure contains additional data for hooks.  As a backward
  1738. // compatability hack, the entire structure is passed in place of the
  1739. // RIID parameter on all hook methods.  Thus the IID must be the first
  1740. // parameter.  As a forward compatability hack the second field is the
  1741. // current size of the structure.
  1742. typedef struct SChannelHookCallInfo
  1743. {
  1744.     IID               iid;
  1745.     DWORD             cbSize;
  1746.     GUID              uCausality;
  1747.     DWORD             dwServerPid;
  1748.     DWORD             iMethod;
  1749.     void             *pObject;
  1750. } SChannelHookCallInfo;
  1751. [
  1752.     local,
  1753.     object,
  1754.     uuid(1008c4a0-7613-11cf-9af1-0020af6e72f4)
  1755. ]
  1756. interface IChannelHook : IUnknown
  1757. {
  1758.     void ClientGetSize(
  1759.         [in]  REFGUID uExtent,
  1760.         [in]  REFIID  riid,
  1761.         [out] ULONG  *pDataSize );
  1762.     void ClientFillBuffer(
  1763.         [in]      REFGUID uExtent,
  1764.         [in]      REFIID  riid,
  1765.         [in, out] ULONG  *pDataSize,
  1766.         [in]      void   *pDataBuffer );
  1767.     void ClientNotify(
  1768.         [in] REFGUID uExtent,
  1769.         [in] REFIID  riid,
  1770.         [in] ULONG   cbDataSize,
  1771.         [in] void   *pDataBuffer,
  1772.         [in] DWORD   lDataRep,
  1773.         [in] HRESULT hrFault );
  1774.     void ServerNotify(
  1775.         [in] REFGUID uExtent,
  1776.         [in] REFIID  riid,
  1777.         [in] ULONG   cbDataSize,
  1778.         [in] void   *pDataBuffer,
  1779.         [in] DWORD   lDataRep );
  1780.     void ServerGetSize(
  1781.         [in]  REFGUID uExtent,
  1782.         [in]  REFIID  riid,
  1783.         [in]  HRESULT hrFault,
  1784.         [out] ULONG  *pDataSize );
  1785.     void ServerFillBuffer(
  1786.         [in]      REFGUID uExtent,
  1787.         [in]      REFIID  riid,
  1788.         [in, out] ULONG  *pDataSize,
  1789.         [in]      void   *pDataBuffer,
  1790.         [in]      HRESULT hrFault );
  1791. };
  1792. cpp_quote( "#endif //DCOM" )
  1793. cpp_quote("")
  1794. cpp_quote("// Well-known Property Set Format IDs")
  1795. extern const FMTID FMTID_SummaryInformation;
  1796. extern const FMTID FMTID_DocSummaryInformation;
  1797. extern const FMTID FMTID_UserDefinedProperties;
  1798. extern const FMTID FMTID_DiscardableInformation;
  1799. extern const FMTID FMTID_ImageSummaryInformation;
  1800. extern const FMTID FMTID_AudioSummaryInformation;
  1801. extern const FMTID FMTID_VideoSummaryInformation;
  1802. extern const FMTID FMTID_MediaFileSummaryInformation;
  1803. /****************************************************************************
  1804.  *  Connection Point Interfaces
  1805.  ****************************************************************************/
  1806. #ifdef __INCLUDE_CPIFS
  1807. interface IConnectionPointContainer;
  1808. interface IConnectionPoint;
  1809. interface IEnumConnections;
  1810. interface IEnumConnectionPoints;
  1811. [
  1812.     object,
  1813.     uuid(B196B286-BAB4-101A-B69C-00AA00341D07),
  1814.     pointer_default(unique)
  1815. ]
  1816. interface IConnectionPoint : IUnknown
  1817. {
  1818.     typedef IConnectionPoint * PCONNECTIONPOINT;
  1819.     typedef IConnectionPoint * LPCONNECTIONPOINT;
  1820.     HRESULT GetConnectionInterface
  1821.     (
  1822.         [out]           IID * piid
  1823.     );
  1824.     HRESULT GetConnectionPointContainer
  1825.     (
  1826.         [out]           IConnectionPointContainer ** ppCPC
  1827.     );
  1828.     HRESULT Advise
  1829.     (
  1830.         [in]    IUnknown * pUnkSink,
  1831.         [out]   DWORD *    pdwCookie
  1832.     );
  1833.     HRESULT Unadvise
  1834.     (
  1835.         [in]    DWORD dwCookie
  1836.     );
  1837.     HRESULT EnumConnections
  1838.     (
  1839.         [out]   IEnumConnections ** ppEnum
  1840.     );
  1841. }
  1842. [
  1843.     object,
  1844.     uuid(B196B284-BAB4-101A-B69C-00AA00341D07),
  1845.     pointer_default(unique)
  1846. ]
  1847. interface IConnectionPointContainer : IUnknown
  1848. {
  1849.     typedef IConnectionPointContainer * PCONNECTIONPOINTCONTAINER;
  1850.     typedef IConnectionPointContainer * LPCONNECTIONPOINTCONTAINER;
  1851.     HRESULT EnumConnectionPoints
  1852.     (
  1853.         [out]   IEnumConnectionPoints ** ppEnum
  1854.     );
  1855.     HRESULT FindConnectionPoint
  1856.     (
  1857.         [in]    REFIID riid,
  1858.         [out]   IConnectionPoint ** ppCP
  1859.     );
  1860. }
  1861. [
  1862.     object,
  1863.     uuid(B196B287-BAB4-101A-B69C-00AA00341D07),
  1864.     pointer_default(unique)
  1865. ]
  1866. interface IEnumConnections : IUnknown
  1867. {
  1868.     typedef IEnumConnections * PENUMCONNECTIONS;
  1869.     typedef IEnumConnections * LPENUMCONNECTIONS;
  1870.     typedef struct tagCONNECTDATA
  1871.     {
  1872.         IUnknown *  pUnk;
  1873.         DWORD       dwCookie;
  1874.     } CONNECTDATA;
  1875.     typedef struct tagCONNECTDATA * PCONNECTDATA;
  1876.     typedef struct tagCONNECTDATA * LPCONNECTDATA;
  1877.     [local]
  1878.     HRESULT Next(
  1879.         [in]                        ULONG           cConnections,
  1880.         [out,
  1881.          size_is(cConnections),
  1882.          length_is(*lpcFetched)]    CONNECTDATA *   rgcd,
  1883.         [out]                       ULONG *         lpcFetched
  1884.     );
  1885.     [call_as(Next)]
  1886.     HRESULT RemoteNext(
  1887.         [in]                            ULONG           cConnections,
  1888.         [out,
  1889.          size_is(cConnections),
  1890.          length_is(*lpcFetched)]        CONNECTDATA *   rgcd,
  1891.         [out]                           ULONG *         lpcFetched
  1892.     );
  1893.     HRESULT Skip
  1894.     (
  1895.         [in]    ULONG cConnections
  1896.     );
  1897.     HRESULT Reset
  1898.     (
  1899.         void
  1900.     );
  1901.     HRESULT Clone
  1902.     (
  1903.         [out]   IEnumConnections ** ppEnum
  1904.     );
  1905. }
  1906. [
  1907.     object,
  1908.     uuid(B196B285-BAB4-101A-B69C-00AA00341D07),
  1909.     pointer_default(unique)
  1910. ]
  1911. interface IEnumConnectionPoints : IUnknown
  1912. {
  1913.     typedef IEnumConnectionPoints * PENUMCONNECTIONPOINTS;
  1914.     typedef IEnumConnectionPoints * LPENUMCONNECTIONPOINTS;
  1915.     [local]
  1916.     HRESULT Next(
  1917.         [in]                        ULONG               cConnections,
  1918.         [out,
  1919.          size_is(cConnections),
  1920.          length_is(*lpcFetched)]    IConnectionPoint ** rgpcn,
  1921.         [out]                       ULONG *             lpcFetched
  1922.     );
  1923.     [call_as(Next)]
  1924.     HRESULT RemoteNext(
  1925.         [in]                        ULONG               cConnections,
  1926.         [out,
  1927.          size_is(cConnections),
  1928.          length_is(*lpcFetched)]    IConnectionPoint ** rgpcn,
  1929.         [out]                       ULONG *             lpcFetched
  1930.     );
  1931.     HRESULT Skip
  1932.     (
  1933.         [in]    ULONG   cConnections
  1934.     );
  1935.     HRESULT Reset
  1936.     (
  1937.         void
  1938.     );
  1939.     HRESULT Clone
  1940.     (
  1941.         [out]   IEnumConnectionPoints **    ppEnum
  1942.     );
  1943. }
  1944. #endif // __INCLUDE_CPIFS
  1945. cpp_quote( "#if  (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM" )
  1946. cpp_quote( "// This interface is only valid on Windows NT 4.0" )
  1947. [
  1948.     local,
  1949.     object,
  1950.     uuid(0000013D-0000-0000-C000-000000000046)
  1951. ]
  1952. interface IClientSecurity : IUnknown
  1953. {
  1954.     typedef struct tagSOLE_AUTHENTICATION_SERVICE
  1955.     {
  1956.         DWORD    dwAuthnSvc;
  1957.         DWORD    dwAuthzSvc;
  1958.         OLECHAR *pPrincipalName;
  1959.         HRESULT  hr;
  1960.     } SOLE_AUTHENTICATION_SERVICE;
  1961.     typedef SOLE_AUTHENTICATION_SERVICE *PSOLE_AUTHENTICATION_SERVICE;
  1962.     typedef enum tagEOLE_AUTHENTICATION_CAPABILITIES
  1963.     {
  1964.         EOAC_NONE             = 0x0,
  1965.         EOAC_MUTUAL_AUTH      = 0x1,
  1966.         EOAC_STATIC_CLOAKING  = 0x20,
  1967.         EOAC_DYNAMIC_CLOAKING = 0x40,
  1968.         EOAC_ANY_AUTHORITY    = 0x80,
  1969.         EOAC_MAKE_FULLSIC     = 0x100,
  1970.         EOAC_DEFAULT          = 0x800,
  1971.         // These are only valid for CoInitializeSecurity
  1972.         EOAC_SECURE_REFS       = 0x2,
  1973.         EOAC_ACCESS_CONTROL    = 0x4,
  1974.         EOAC_APPID             = 0x8,
  1975.         EOAC_DYNAMIC           = 0x10,
  1976.         EOAC_REQUIRE_FULLSIC   = 0x200,
  1977.         EOAC_AUTO_IMPERSONATE  = 0x400,
  1978.         EOAC_NO_CUSTOM_MARSHAL = 0x2000,
  1979.         EOAC_DISABLE_AAA       = 0x1000
  1980.     } EOLE_AUTHENTICATION_CAPABILITIES;
  1981.     const OLECHAR *COLE_DEFAULT_PRINCIPAL = (OLECHAR *) -1;
  1982.     const void    *COLE_DEFAULT_AUTHINFO  = (void *) -1;
  1983.     typedef struct tagSOLE_AUTHENTICATION_INFO
  1984.     {
  1985.         DWORD  dwAuthnSvc;
  1986.         DWORD  dwAuthzSvc;
  1987.         void  *pAuthInfo;
  1988.     } SOLE_AUTHENTICATION_INFO, *PSOLE_AUTHENTICATION_INFO;
  1989.     typedef struct tagSOLE_AUTHENTICATION_LIST
  1990.     {
  1991.         DWORD                     cAuthInfo;
  1992.         SOLE_AUTHENTICATION_INFO *aAuthInfo;
  1993.     } SOLE_AUTHENTICATION_LIST, *PSOLE_AUTHENTICATION_LIST;
  1994.     HRESULT QueryBlanket
  1995.     (
  1996.         [in]  IUnknown                *pProxy,
  1997.         [out] DWORD                   *pAuthnSvc,
  1998.         [out] DWORD                   *pAuthzSvc,
  1999.         [out] OLECHAR                **pServerPrincName,
  2000.         [out] DWORD                   *pAuthnLevel,
  2001.         [out] DWORD                   *pImpLevel,
  2002.         [out] void                   **pAuthInfo,
  2003.         [out] DWORD                   *pCapabilites
  2004.     );
  2005.     HRESULT SetBlanket
  2006.     (
  2007.         [in] IUnknown                 *pProxy,
  2008.         [in] DWORD                     dwAuthnSvc,
  2009.         [in] DWORD                     dwAuthzSvc,
  2010.         [in] OLECHAR                  *pServerPrincName,
  2011.         [in] DWORD                     dwAuthnLevel,
  2012.         [in] DWORD                     dwImpLevel,
  2013.         [in] void                     *pAuthInfo,
  2014.         [in] DWORD                     dwCapabilities
  2015.     );
  2016.     HRESULT CopyProxy
  2017.     (
  2018.         [in]  IUnknown  *pProxy,
  2019.         [out] IUnknown **ppCopy
  2020.     );
  2021. }
  2022. [
  2023.     local,
  2024.     object,
  2025.     uuid(0000013E-0000-0000-C000-000000000046)
  2026. ]
  2027. interface IServerSecurity : IUnknown
  2028. {
  2029.     HRESULT QueryBlanket
  2030.     (
  2031.         [out] DWORD    *pAuthnSvc,
  2032.         [out] DWORD    *pAuthzSvc,
  2033.         [out] OLECHAR **pServerPrincName,
  2034.         [out] DWORD    *pAuthnLevel,
  2035.         [out] DWORD    *pImpLevel,
  2036.         [out] void    **pPrivs,
  2037.         [in,out] DWORD    *pCapabilities
  2038.     );
  2039.     HRESULT ImpersonateClient();
  2040.     HRESULT RevertToSelf();
  2041.     BOOL IsImpersonating();
  2042. }
  2043. [
  2044.     object,
  2045.     uuid(00000140-0000-0000-C000-000000000046)
  2046. ]
  2047. interface IClassActivator : IUnknown
  2048. {
  2049.     HRESULT GetClassObject(
  2050.         [in] REFCLSID rclsid,
  2051.         [in] DWORD dwClassContext,
  2052.         [in] LCID locale,
  2053.         [in] REFIID riid,
  2054.         [out, iid_is(riid)] void **ppv);
  2055. }
  2056. [
  2057. object,
  2058. local,
  2059. uuid(00000144-0000-0000-C000-000000000046)
  2060. ]
  2061. interface IRpcOptions : IUnknown
  2062. {
  2063.     HRESULT Set([in] IUnknown * pPrx,
  2064.                 [in] DWORD dwProperty,
  2065.                 [in] ULONG_PTR dwValue);
  2066.     HRESULT Query([in] IUnknown * pPrx,
  2067.                   [in] DWORD dwProperty,
  2068.                   [out] ULONG_PTR * pdwValue);
  2069. }
  2070. enum {COMBND_RPCTIMEOUT = 0x01};  // Rpc transport-specific timeout.
  2071. cpp_quote( "#endif //DCOM" )
  2072. [
  2073.     object,
  2074.     uuid(99caf010-415e-11cf-8814-00aa00b569f5),
  2075.     pointer_default(unique)
  2076. ]
  2077. interface IFillLockBytes: IUnknown
  2078. {
  2079.     [local]
  2080.     HRESULT FillAppend
  2081.     (
  2082.         [in, size_is(cb)] void const *pv,
  2083.         [in] ULONG cb,
  2084.         [out] ULONG *pcbWritten
  2085.     );
  2086.     [call_as(FillAppend)]
  2087.     HRESULT _stdcall RemoteFillAppend(
  2088.         [in, size_is(cb)] byte const *pv,
  2089.         [in] ULONG cb,
  2090.         [out] ULONG *pcbWritten);
  2091.     [local]
  2092.     HRESULT FillAt
  2093.     (
  2094.         [in] ULARGE_INTEGER ulOffset,
  2095.         [in, size_is(cb)] void const *pv,
  2096.         [in] ULONG cb,
  2097.         [out] ULONG *pcbWritten
  2098.     );
  2099.     [call_as(FillAt)]
  2100.     HRESULT _stdcall RemoteFillAt(
  2101.         [in] ULARGE_INTEGER ulOffset,
  2102.         [in, size_is(cb)] byte const *pv,
  2103.         [in] ULONG cb,
  2104.         [out] ULONG *pcbWritten);
  2105.     HRESULT SetFillSize
  2106.     (
  2107.         [in] ULARGE_INTEGER ulSize
  2108.     );
  2109.     HRESULT Terminate
  2110.     (
  2111.         [in] BOOL bCanceled
  2112.     );
  2113. }
  2114. [
  2115.     object,
  2116.     uuid(a9d758a0-4617-11cf-95fc-00aa00680db4),
  2117.     pointer_default(unique)
  2118. ]
  2119. interface IProgressNotify: IUnknown
  2120. {
  2121.     HRESULT OnProgress
  2122.     (
  2123.         [in] DWORD dwProgressCurrent,
  2124.         [in] DWORD dwProgressMaximum,
  2125.         [in] BOOL  fAccurate,
  2126.         [in] BOOL  fOwner
  2127.     );
  2128. }
  2129. [
  2130.     local,
  2131.     object,
  2132.     uuid(0e6d4d90-6738-11cf-9608-00aa00680db4),
  2133.     pointer_default(unique)
  2134. ]
  2135. interface ILayoutStorage: IUnknown
  2136. {
  2137.         typedef struct tagStorageLayout
  2138.         {
  2139.             DWORD LayoutType;
  2140.             OLECHAR *pwcsElementName;
  2141.             LARGE_INTEGER cOffset;
  2142.             LARGE_INTEGER cBytes;
  2143.         } StorageLayout;
  2144.         HRESULT __stdcall LayoutScript
  2145.         (
  2146.             [in] StorageLayout *pStorageLayout,
  2147.             [in] DWORD nEntries,
  2148.             [in] DWORD glfInterleavedFlag
  2149.         );
  2150.         HRESULT __stdcall BeginMonitor(void);
  2151.         HRESULT __stdcall EndMonitor(void);
  2152.         HRESULT __stdcall ReLayoutDocfile
  2153.         (
  2154.             [in] OLECHAR *pwcsNewDfName
  2155.         );
  2156.         HRESULT __stdcall ReLayoutDocfileOnILockBytes
  2157.         (
  2158.             [in] ILockBytes *pILockBytes
  2159.         );
  2160. }
  2161. [
  2162.  object,
  2163.  uuid(30f3d47a-6447-11d1-8e3c-00c04fb9386d)
  2164. ]
  2165. interface IBlockingLock: IUnknown
  2166. {
  2167.         HRESULT Lock([in] DWORD dwTimeout);
  2168.         HRESULT Unlock(void);
  2169. }
  2170. [
  2171.  object,
  2172.  uuid(bc0bf6ae-8878-11d1-83e9-00c04fc2c6d4)
  2173. ]
  2174. interface ITimeAndNoticeControl: IUnknown
  2175. {
  2176.         HRESULT SuppressChanges([in] DWORD res1,
  2177.                                 [in] DWORD res2);
  2178. }
  2179. [
  2180.  object,
  2181.  uuid(8d19c834-8879-11d1-83e9-00c04fc2c6d4)
  2182. ]
  2183. interface IOplockStorage: IUnknown
  2184. {
  2185.         HRESULT CreateStorageEx([in] LPCWSTR pwcsName,
  2186.                                 [in] DWORD grfMode,
  2187.                                 [in] DWORD stgfmt,
  2188.                                 [in] DWORD grfAttrs,
  2189.                                 [in] REFIID riid,
  2190.                                 [out, iid_is(riid)] void**ppstgOpen);
  2191.         HRESULT OpenStorageEx([in] LPCWSTR pwcsName,
  2192.                               [in] DWORD grfMode,
  2193.                               [in] DWORD stgfmt,
  2194.                               [in] DWORD grfAttrs,
  2195.                               [in] REFIID riid,
  2196.                               [out, iid_is(riid)] void**ppstgOpen);
  2197. }
  2198. [
  2199.  uuid(00000022-0000-0000-C000-000000000046),
  2200.  version(1.0),
  2201.  pointer_default(unique)
  2202.   , object
  2203. ]
  2204. interface ISurrogate : IUnknown
  2205. {
  2206.     typedef [unique] ISurrogate* LPSURROGATE;
  2207.         HRESULT LoadDllServer(
  2208.                 [in] REFCLSID           Clsid);
  2209.         HRESULT FreeSurrogate();
  2210. }
  2211. [
  2212.     local,
  2213.     object,
  2214.     uuid(00000146-0000-0000-C000-000000000046)
  2215. ]
  2216. interface IGlobalInterfaceTable : IUnknown
  2217. {
  2218.     typedef [unique] IGlobalInterfaceTable *LPGLOBALINTERFACETABLE;
  2219.     HRESULT RegisterInterfaceInGlobal
  2220.     (
  2221.         [in]  IUnknown *pUnk,
  2222.         [in]  REFIID    riid,
  2223.         [out] DWORD    *pdwCookie
  2224.     );
  2225.     HRESULT RevokeInterfaceFromGlobal
  2226.     (
  2227.         [in] DWORD      dwCookie
  2228.     );
  2229.     HRESULT GetInterfaceFromGlobal
  2230.     (
  2231.         [in]  DWORD          dwCookie,
  2232.         [in]  REFIID         riid,
  2233.         [out, iid_is(riid)] void **ppv
  2234.     );
  2235. };
  2236. [
  2237.     object,
  2238.     uuid(0e6d4d92-6738-11cf-9608-00aa00680db4),
  2239.     pointer_default(unique)
  2240. ]
  2241. interface IDirectWriterLock : IUnknown
  2242. {
  2243.     HRESULT WaitForWriteAccess ([in] DWORD dwTimeout);
  2244.     HRESULT ReleaseWriteAccess ();
  2245.     HRESULT HaveWriteAccess ();
  2246. }
  2247. [
  2248.     object,
  2249.     uuid(00000030-0000-0000-C000-000000000046)
  2250. ]
  2251. interface ISynchronize : IUnknown
  2252. {
  2253.     HRESULT Wait([in] DWORD dwFlags, [in] DWORD dwMilliseconds);
  2254.     HRESULT Signal();
  2255.     HRESULT Reset();
  2256. }
  2257. [
  2258.  local,
  2259.  object,
  2260.  uuid(00000031-0000-0000-C000-000000000046)
  2261. ]
  2262. interface ISynchronizeHandle : IUnknown
  2263. {
  2264.     HRESULT GetHandle([out] HANDLE *ph );
  2265. }
  2266. [
  2267.  local,
  2268.  object,
  2269.  uuid(00000032-0000-0000-C000-000000000046)
  2270. ]
  2271. interface ISynchronizeEvent : ISynchronizeHandle
  2272. {
  2273.     HRESULT SetEventHandle([in] HANDLE *ph );
  2274. }
  2275. [
  2276.  local,
  2277.  object,
  2278.  uuid(00000033-0000-0000-C000-000000000046)
  2279. ]
  2280. interface ISynchronizeContainer : IUnknown
  2281. {
  2282.     HRESULT AddSynchronize([in] ISynchronize *pSync);
  2283.     HRESULT WaitMultiple([in] DWORD dwFlags,
  2284.                          [in] DWORD dwTimeOut,
  2285.                          [out] ISynchronize **ppSync);
  2286. }
  2287. [
  2288.  local,
  2289.  object,
  2290.  uuid(00000025-0000-0000-C000-000000000046)
  2291. ]
  2292. interface ISynchronizeMutex : ISynchronize
  2293. {
  2294.     HRESULT ReleaseMutex();
  2295. }
  2296. [
  2297.  local,
  2298.  object,
  2299.  uuid(00000029-0000-0000-C000-000000000046)
  2300. ]
  2301. interface ICancelMethodCalls : IUnknown
  2302. {
  2303.     typedef [unique] ICancelMethodCalls *LPCANCELMETHODCALLS;
  2304.     HRESULT Cancel          ([in] ULONG ulSeconds);
  2305.     HRESULT TestCancel      (void);
  2306. }
  2307. [
  2308.  local,
  2309.  object,
  2310.  uuid(0000002A-0000-0000-C000-000000000046)
  2311. ]
  2312. interface IAsyncManager : IUnknown
  2313. {
  2314.     typedef enum tagDCOM_CALL_STATE
  2315.     {
  2316.         DCOM_NONE           = 0x0,
  2317.         DCOM_CALL_COMPLETE  = 0x1,
  2318.         DCOM_CALL_CANCELED  = 0x2,
  2319.     } DCOM_CALL_STATE;
  2320.     HRESULT CompleteCall  ( [in] HRESULT Result );
  2321.     HRESULT GetCallContext( [in] REFIID riid, [out] void **pInterface );
  2322.     HRESULT GetState      ( [out] ULONG *pulStateFlags);
  2323. }
  2324. [
  2325.  local,
  2326.  object,
  2327.  uuid(1c733a30-2a1c-11ce-ade5-00aa0044773d),
  2328.  pointer_default(unique)
  2329. ]
  2330. interface ICallFactory : IUnknown
  2331. {
  2332.     HRESULT CreateCall(
  2333.         [in]  REFIID                riid,
  2334.         [in]  IUnknown             *pCtrlUnk,
  2335.         [in]  REFIID                riid2,
  2336.         [out, iid_is(riid2)] IUnknown **ppv );
  2337. }
  2338. [ uuid(00000149-0000-0000-C000-000000000046),
  2339.   version(0.0),
  2340.   pointer_default(unique),
  2341.   local,
  2342.   object
  2343. ]
  2344. interface IRpcHelper : IUnknown
  2345. {
  2346.     HRESULT GetDCOMProtocolVersion(
  2347.         [out] DWORD *pComVersion);
  2348.     HRESULT GetIIDFromOBJREF(
  2349.          [in] void *pObjRef,
  2350.          [out] IID **piid);
  2351. }
  2352. [local,
  2353.  object,
  2354.  uuid(eb0cb9e8-7996-11d2-872e-0000f8080859),
  2355. ]
  2356. interface IReleaseMarshalBuffers : IUnknown
  2357. {
  2358.     HRESULT ReleaseMarshalBuffer(
  2359.         [in]  RPCOLEMESSAGE         *pMsg,
  2360.         [in]  DWORD                  dwFlags,
  2361.         [in,unique] IUnknown        *pChnl);
  2362. }
  2363. [
  2364.  local,
  2365.  object,
  2366.  uuid(0000002B-0000-0000-C000-000000000046)
  2367. ]
  2368. interface IWaitMultiple : IUnknown
  2369. {
  2370.     HRESULT WaitMultiple  ( [in] DWORD timeout, [out] ISynchronize **pSync );
  2371.     HRESULT AddSynchronize( [in] ISynchronize *pSync );
  2372. }
  2373. [
  2374.  object,
  2375.  uuid(00000026-0000-0000-C000-000000000046)
  2376. ]
  2377. interface IUrlMon : IUnknown
  2378. {
  2379.     HRESULT AsyncGetClassBits(
  2380.         [in]         REFCLSID   rclsid,
  2381.         [in, unique] LPCWSTR    pszTYPE,
  2382.         [in, unique] LPCWSTR    pszExt,
  2383.         [in]         DWORD      dwFileVersionMS,
  2384.         [in]         DWORD      dwFileVersionLS,
  2385.         [in, unique] LPCWSTR    pszCodeBase,
  2386.         [in]         IBindCtx * pbc,
  2387.         [in]         DWORD      dwClassContext,
  2388.         [in]         REFIID     riid,
  2389.         [in]         DWORD      flags);
  2390. }
  2391. [
  2392. local,
  2393. object,
  2394. uuid(00000145-0000-0000-C000-000000000046)
  2395. ]
  2396. interface IForegroundTransfer : IUnknown
  2397. {
  2398.     HRESULT AllowForegroundTransfer(
  2399.         [in] void *lpvReserved);
  2400. }
  2401. [
  2402.     local,
  2403.     object,
  2404.     uuid(00000147-0000-0000-C000-000000000046)
  2405. ]
  2406. interface IAddrTrackingControl : IUnknown
  2407. {
  2408.     typedef [unique] IAddrTrackingControl* LPADDRTRACKINGCONTROL;
  2409.     HRESULT EnableCOMDynamicAddrTracking();
  2410.     HRESULT DisableCOMDynamicAddrTracking();
  2411. };
  2412. [
  2413.     local,
  2414.     object,
  2415.     uuid(00000148-0000-0000-C000-000000000046)
  2416. ]
  2417. interface IAddrExclusionControl : IUnknown
  2418. {
  2419.     typedef [unique] IAddrExclusionControl* LPADDREXCLUSIONCONTROL;
  2420.     HRESULT GetCurrentAddrExclusionList([in]REFIID riid, [out, iid_is(riid)]void** ppEnumerator);
  2421.     HRESULT UpdateAddrExclusionList([in]IUnknown* pEnumerator);
  2422. };
  2423. /****************************************************************************
  2424. * Pipe interfaces
  2425. ****************************************************************************/
  2426. #if (__midl >= 500)
  2427. #define PIPE_ASYNC_UUID(async_iid) async_uuid(async_iid),
  2428. #else
  2429. #define PIPE_ASYNC_UUID(async_iid)
  2430. #endif
  2431. #define NEW_PIPE_INTERFACE(iid, async_iid, name, type)                          
  2432. [                                                                               
  2433.     object,                                                                     
  2434.     uuid(iid),                                                                  
  2435.     PIPE_ASYNC_UUID(async_iid)                                                  
  2436.     pointer_default(unique)                                                     
  2437. ]                                                                               
  2438.     interface IPipe##name : IUnknown                                            
  2439.     {                                                                           
  2440.         HRESULT Pull                                                            
  2441.         (                                                                       
  2442.             [out, size_is(cRequest), length_is(*pcReturned)] type *buf,         
  2443.             [in]  ULONG  cRequest,                                         
  2444.             [out] ULONG *pcReturned                                             
  2445.         );                                                                      
  2446.                                                                                 
  2447.         HRESULT Push                                                            
  2448.         (                                                                       
  2449.             [in, size_is(cSent)] type  *buf,                                    
  2450.             [in] ULONG cSent                                                    
  2451.         );                                                                      
  2452.     }
  2453. NEW_PIPE_INTERFACE( DB2F3ACA-2F86-11d1-8E04-00C04FB9989A,
  2454.                     DB2F3ACB-2F86-11d1-8E04-00C04FB9989A,
  2455.                     Byte,
  2456.                     BYTE)
  2457. NEW_PIPE_INTERFACE( DB2F3ACC-2F86-11d1-8E04-00C04FB9989A,
  2458.                     DB2F3ACD-2F86-11d1-8E04-00C04FB9989A,
  2459.                     Long,
  2460.                     LONG)
  2461. NEW_PIPE_INTERFACE( DB2F3ACE-2F86-11d1-8E04-00C04FB9989A,
  2462.                     DB2F3ACF-2F86-11d1-8E04-00C04FB9989A,
  2463.                     Double,
  2464.                     DOUBLE)
  2465. /****************************************************************************
  2466. * Thumbnail generator interface
  2467. ****************************************************************************/
  2468. [uuid(969dc708-5c76-11d1-8d86-0000f804b057),
  2469.     object
  2470. ]
  2471. interface IThumbnailExtractor : IUnknown
  2472. {
  2473.     HRESULT ExtractThumbnail (
  2474.         [in] IStorage *pStg,
  2475.         [in] ULONG ulLength,
  2476.         [in] ULONG ulHeight,
  2477.         [out] ULONG *pulOutputLength,
  2478.         [out] ULONG *pulOutputHeight,
  2479.         [out] HBITMAP *phOutputBitmap
  2480.         );
  2481.     HRESULT OnFileUpdated (
  2482.         [in] IStorage *pStg
  2483.         );
  2484. }
  2485. /****************************************************************************
  2486. * Dummy Interface to force inclusion of HICON and HDC in proxy/stub code....
  2487. ****************************************************************************/
  2488. [
  2489.     object,
  2490.     pointer_default(unique),
  2491.     uuid(947990de-cc28-11d2-a0f7-00805f858fb1)
  2492. ]
  2493. interface IDummyHICONIncluder : IUnknown
  2494. {
  2495.         HRESULT Dummy([in]HICON h1, [in] HDC h2);
  2496. }
  2497. /****************************************************************************
  2498. * ICOMThreadingInfo and enums
  2499. ****************************************************************************/
  2500. typedef enum _APTTYPE
  2501. {
  2502.     APTTYPE_CURRENT         = -1,
  2503.     APTTYPE_STA             = 0,
  2504.     APTTYPE_MTA             = 1,
  2505.     APTTYPE_NA              = 2,
  2506.     APTTYPE_MAINSTA         = 3
  2507. } APTTYPE;
  2508. typedef enum _THDTYPE
  2509. {
  2510.     THDTYPE_BLOCKMESSAGES   = 0,
  2511.     THDTYPE_PROCESSMESSAGES = 1
  2512. } THDTYPE;
  2513. typedef DWORD APARTMENTID;
  2514. [
  2515.     local,
  2516.     object,
  2517.     uuid(000001ce-0000-0000-C000-000000000046),
  2518.     pointer_default(unique)
  2519. ]
  2520. interface IComThreadingInfo : IUnknown
  2521. {
  2522.     HRESULT GetCurrentApartmentType( [out] APTTYPE* pAptType );
  2523.     HRESULT GetCurrentThreadType( [out] THDTYPE* pThreadType );
  2524.     HRESULT GetCurrentLogicalThreadId( [out] GUID* pguidLogicalThreadId );
  2525.     HRESULT SetCurrentLogicalThreadId( [in] REFGUID rguid );
  2526. };
  2527. [
  2528.     object,
  2529.     pointer_default(unique),
  2530.     uuid(72380d55-8d2b-43a3-8513-2b6ef31434e9)
  2531. ]
  2532. interface IProcessInitControl : IUnknown
  2533. {
  2534.     HRESULT ResetInitializerTimeout([in] DWORD dwSecondsRemaining);
  2535. };
  2536. cpp_quote("#if ( _MSC_VER >= 800 )")
  2537. cpp_quote("#if _MSC_VER >= 1200")
  2538. cpp_quote("#pragma warning(pop)")
  2539. cpp_quote("#else")
  2540. cpp_quote("#pragma warning(default:4201)")
  2541. cpp_quote("#endif")
  2542. cpp_quote("#endif")