2 * Copyright 2002 Ove Kaaven
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 interface IEnumString;
24 interface IRunningObjectTable;
26 interface IAdviseSink;
27 interface IAsyncManager;
29 /* FIXME: COSERVERINFO should be moved here from wtypes.idl */
31 /******************** Fundamentals ********************/
36 uuid(00000003-0000-0000-C000-000000000046)
38 interface IMarshal : IUnknown
40 typedef [unique] IMarshal *LPMARSHAL;
42 HRESULT GetUnmarshalClass(
44 [in, unique] void *pv,
45 [in] DWORD dwDestContext,
46 [in, unique] void *pvDestContext,
50 HRESULT GetMarshalSizeMax(
52 [in, unique] void *pv,
53 [in] DWORD dwDestContext,
54 [in, unique] void *pvDestContext,
58 HRESULT MarshalInterface(
59 [in, unique] IStream *pStm,
61 [in, unique] void *pv,
62 [in] DWORD dwDestContext,
63 [in, unique] void *pvDestContext,
64 [in] DWORD mshlflags);
66 HRESULT UnmarshalInterface(
67 [in, unique] IStream *pStm,
71 HRESULT ReleaseMarshalData(
72 [in, unique] IStream *pStm);
74 HRESULT DisconnectObject(
75 [in] DWORD dwReserved);
81 uuid(00000018-0000-0000-C000-000000000046)
83 interface IStdMarshalInfo : IUnknown
85 typedef [unique] IStdMarshalInfo *LPSTDMARSHALINFO;
87 HRESULT GetClassForHandler(
88 [in] DWORD dwDestContext,
89 [in, unique] void *pvDestContext,
96 uuid(00000019-0000-0000-C000-000000000046)
98 interface IExternalConnection : IUnknown
100 typedef [unique] IExternalConnection *LPEXTERNALCONNECTION;
102 typedef enum tagEXTCONN {
103 EXTCONN_STRONG = 0x0001,
104 EXTCONN_WEAK = 0x0002,
105 EXTCONN_CALLABLE = 0x0004
110 [in] DWORD reserved);
112 DWORD ReleaseConnection(
115 [in] BOOL fLastReleaseCloses);
121 uuid(00000020-0000-0000-C000-000000000046)
123 interface IMultiQI : IUnknown
125 typedef [unique] IMultiQI *LPMULTIQI;
127 typedef struct tagMULTI_QI {
133 HRESULT QueryMultipleInterfaces(
135 [in, out] MULTI_QI *pMQIs);
141 uuid(00000002-0000-0000-C000-000000000046)
143 interface IMalloc : IUnknown
145 typedef [unique] IMalloc *LPMALLOC;
160 int DidAlloc(LPVOID pv);
168 uuid(0000001d-0000-0000-C000-000000000046)
170 interface IMallocSpy : IUnknown
172 typedef [unique] IMallocSpy *LPMALLOCSPY;
175 [in] ULONG cbRequest);
178 [in] LPVOID pActual);
181 [in] LPVOID pRequest,
188 [in] LPVOID pRequest,
189 [in] ULONG cbRequest,
190 [out] LPVOID *ppNewRequest,
198 [in] LPVOID pRequest,
206 [in] LPVOID pRequest,
210 [in] LPVOID pRequest,
214 void PreHeapMinimize();
216 void PostHeapMinimize();
221 uuid(00000100-0000-0000-C000-000000000046),
222 pointer_default(unique)
224 interface IEnumUnknown : IUnknown
226 typedef [unique] IEnumUnknown *LPENUMUNKNOWN;
231 [out] IUnknown **rgelt,
232 [out] ULONG *pceltFetched);
237 [out, size_is(celt), length_is(*pceltFetched)]
239 [out] ULONG *pceltFetched);
247 [out] IEnumUnknown **ppenum);
252 uuid(00000022-0000-0000-C000-000000000046),
254 pointer_default(unique)
256 interface ISurrogate : IUnknown
258 typedef [unique] ISurrogate *LPSURROGATE;
260 HRESULT LoadDllServer(
261 [in] REFCLSID Clsid);
262 HRESULT FreeSurrogate();
268 uuid(00000146-0000-0000-C000-000000000046)
270 interface IGlobalInterfaceTable : IUnknown
272 typedef [unique] IGlobalInterfaceTable *LPGLOBALINTERFACETABLE;
274 HRESULT RegisterInterfaceInGlobal(
277 [out] DWORD *pdwCookie);
279 HRESULT RevokeInterfaceFromGlobal(
280 [in] DWORD dwCookie);
282 HRESULT GetInterfaceFromGlobal(
285 [out, iid_is(riid)] void **ppv);
288 /******************** Monikers ********************/
292 uuid(0000000e-0000-0000-C000-000000000046),
293 pointer_default(unique)
295 interface IBindCtx : IUnknown
297 typedef [unique] IBindCtx *LPBINDCTX;
298 typedef [unique] IBindCtx *LPBC;
300 typedef struct tagBIND_OPTS {
304 DWORD dwTickCountDeadline;
305 } BIND_OPTS, *LPBIND_OPTS;
307 /* FIXME: C++ crap */
308 typedef struct tagBIND_OPTS2 {
312 DWORD dwTickCountDeadline;
314 DWORD dwClassContext;
316 COSERVERINFO *pServerInfo;
317 } BIND_OPTS2, *LPBIND_OPTS2;
319 typedef enum tagBIND_FLAGS {
320 BIND_MAYBOTHERUSER = 1,
321 BIND_JUSTTESTEXISTENCE = 2
324 HRESULT RegisterObjectBound(
325 [in, unique] IUnknown *punk);
327 HRESULT RevokeObjectBound(
328 [in, unique] IUnknown *punk);
330 HRESULT ReleaseBoundObjects();
333 HRESULT SetBindOptions(
334 [in] BIND_OPTS *pbindopts);
336 [call_as(SetBindOptions)]
337 HRESULT RemoteSetBindOptions(
338 [in] BIND_OPTS2 *pbindopts);
341 HRESULT GetBindOptions(
342 [in, out] BIND_OPTS *pbindopts);
344 [call_as(GetBindOptions)]
345 HRESULT RemoteGetBindOptions(
346 [in, out] BIND_OPTS2 *pbindopts);
348 HRESULT GetRunningObjectTable(
349 [out] IRunningObjectTable **pprot);
351 HRESULT RegisterObjectParam(
352 [in] LPOLESTR pszKey,
353 [in, unique] IUnknown *punk);
355 HRESULT GetObjectParam(
356 [in] LPOLESTR pszKey,
357 [out] IUnknown **ppunk);
359 HRESULT EnumObjectParam(
360 [out] IEnumString **ppenum);
362 HRESULT RevokeObjectParam(
363 [in] LPOLESTR pszKey);
368 uuid(00000102-0000-0000-C000-000000000046),
369 pointer_default(unique)
371 interface IEnumMoniker : IUnknown
373 typedef [unique] IEnumMoniker *LPENUMMONIKER;
378 [out, size_is(celt), length_is(*pceltFetched)]
380 [out] ULONG *pceltFetched);
385 [out, size_is(celt), length_is(*pceltFetched)]
387 [out] ULONG *pceltFetched);
395 [out] IEnumMoniker **ppenum);
400 uuid(00000126-0000-0000-C000-000000000046)
402 interface IRunnableObject : IUnknown
404 typedef [unique] IRunnableObject *LPRUNNABLEOBJECT;
406 HRESULT GetRunningClass(
407 [out] LPCLSID lpClsid);
416 HRESULT RemoteIsRunning();
420 [in] BOOL fLastUnlockCloses);
422 HRESULT SetContainedObject(
423 [in] BOOL fContained);
426 /* GetObject is defined in wingdi.h as WINELIB_NAME_AW(GetObject),
427 * which resolves to a compilation failure if __WINESRC__ is defined,
428 * but GetObject is used as a valid method name below, so we have
429 * to undefine it if __WINESRC__ is defined */
430 cpp_quote("#ifdef __WINESRC__")
431 cpp_quote("#undef GetObject")
436 uuid(00000010-0000-0000-C000-000000000046)
438 interface IRunningObjectTable : IUnknown
440 typedef [unique] IRunningObjectTable *LPRUNNINGOBJECTTABLE;
444 [in, unique] IUnknown *punkObject,
445 [in, unique] IMoniker *pmkObjectName,
446 [out] DWORD *pdwRegister);
449 [in] DWORD dwRegister);
452 [in, unique] IMoniker *pmkObjectName);
455 [in, unique] IMoniker *pmkObjectName,
456 [out] IUnknown **ppunkObject);
458 HRESULT NoteChangeTime(
459 [in] DWORD dwRegister,
460 [in] FILETIME *pfiletime);
462 HRESULT GetTimeOfLastChange(
463 [in, unique] IMoniker *pmkObjectName,
464 [out] FILETIME *pfiletime);
467 [out] IEnumMoniker **ppenumMoniker);
472 uuid(0000010c-0000-0000-C000-000000000046)
474 interface IPersist : IUnknown
476 typedef [unique] IPersist *LPPERSIST;
479 [out] CLSID *pClassID);
484 uuid(00000109-0000-0000-C000-000000000046),
485 pointer_default(unique)
487 interface IPersistStream : IPersist
489 typedef [unique] IPersistStream *LPPERSISTSTREAM;
494 [in, unique] IStream *pStm);
497 [in, unique] IStream *pStm,
498 [in] BOOL fClearDirty);
501 [out] ULARGE_INTEGER *pcbSize);
506 uuid(0000000f-0000-0000-C000-000000000046),
507 pointer_default(unique)
509 interface IMoniker : IPersistStream
511 typedef [unique] IMoniker *LPMONIKER;
513 typedef enum tagMKSYS {
515 MKSYS_GENERICCOMPOSITE = 1,
516 MKSYS_FILEMONIKER = 2,
517 MKSYS_ANTIMONIKER = 3,
518 MKSYS_ITEMMONIKER = 4,
519 MKSYS_POINTERMONIKER = 5,
520 MKSYS_CLASSMONIKER = 7
523 typedef [v1_enum] enum tagMKREDUCE {
524 MKRREDUCE_ONE = 3 << 16,
525 MKRREDUCE_TOUSER = 2 << 16,
526 MKRREDUCE_THROUGHUSER = 1 << 16,
531 HRESULT BindToObject(
532 [in, unique] IBindCtx *pbc,
533 [in, unique] IMoniker *pmkToLeft,
534 [in] REFIID riidResult,
535 [out, iid_is(riidResult)] void **ppvResult);
537 [call_as(BindToObject)]
538 HRESULT RemoteBindToObject(
539 [in, unique] IBindCtx *pbc,
540 [in, unique] IMoniker *pmkToLeft,
541 [in] REFIID riidResult,
542 [out, iid_is(riidResult)] IUnknown **ppvResult);
545 HRESULT BindToStorage(
546 [in, unique] IBindCtx *pbc,
547 [in, unique] IMoniker *pmkToLeft,
549 [out, iid_is(riid)] void **ppvObj);
551 [call_as(BindToStorage)]
552 HRESULT RemoteBindToStorage(
553 [in, unique] IBindCtx *pbc,
554 [in, unique] IMoniker *pmkToLeft,
556 [out, iid_is(riid)] IUnknown **ppvObj);
559 [in, unique] IBindCtx *pbc,
560 [in] DWORD dwReduceHowFar,
561 [in, out, unique] IMoniker **ppmkToLeft,
562 [out] IMoniker **ppmkReduced);
565 [in, unique] IMoniker *pmkRight,
566 [in] BOOL fOnlyIfNotGeneric,
567 [out] IMoniker **ppmkComposite);
571 [out] IEnumMoniker **ppenumMoniker);
574 [in, unique] IMoniker *pmkOtherMoniker);
577 [out] DWORD *pdwHash);
580 [in, unique] IBindCtx *pbc,
581 [in, unique] IMoniker *pmkToLeft,
582 [in, unique] IMoniker *pmkNewlyRunning);
584 HRESULT GetTimeOfLastChange(
585 [in, unique] IBindCtx *pbc,
586 [in, unique] IMoniker *pmkToLeft,
587 [out] FILETIME *pFileTime);
590 [out] IMoniker **ppmk);
592 HRESULT CommonPrefixWith(
593 [in, unique] IMoniker *pmkOther,
594 [out] IMoniker **ppmkPrefix);
596 HRESULT RelativePathTo(
597 [in, unique] IMoniker *pmkOther,
598 [out] IMoniker **ppmkRelPath);
600 HRESULT GetDisplayName(
601 [in, unique] IBindCtx *pbc,
602 [in, unique] IMoniker *pmkToLeft,
603 [out] LPOLESTR *ppszDisplayName);
605 HRESULT ParseDisplayName(
606 [in, unique] IBindCtx *pbc,
607 [in, unique] IMoniker *pmkToLeft,
608 [in] LPOLESTR pszDisplayName,
609 [out] ULONG *pchEaten,
610 [out] IMoniker **ppmkOut);
612 HRESULT IsSystemMoniker(
613 [out] DWORD *pdwMksys);
618 uuid(f29f6bc0-5021-11ce-aa15-00006901293f),
619 pointer_default(unique)
621 interface IROTData : IUnknown
623 HRESULT GetComparisonData(
624 [out, size_is(cbMax)] byte *pbData,
626 [out] ULONG *pcbData);
631 uuid(00000101-0000-0000-C000-000000000046),
632 pointer_default(unique)
634 interface IEnumString : IUnknown
636 typedef [unique] IEnumString *LPENUMSTRING;
641 [out, size_is(celt), length_is(*pceltFetched)]
643 [out] ULONG *pceltFetched);
648 [out, size_is(celt), length_is(*pceltFetched)]
650 [out] ULONG *pceltFetched);
658 [out] IEnumString **ppenum);
663 uuid(00000140-0000-0000-C000-000000000046)
665 interface IClassActivator : IUnknown
667 HRESULT GetClassObject(
668 [in] REFCLSID rclsid,
669 [in] DWORD dwClassContext,
672 [out, iid_is(riid)] void **ppv);
675 /******************** Storage ********************/
679 uuid(0c733a30-2a1c-11ce-ade5-00aa0044773d),
680 pointer_default(unique)
682 interface ISequentialStream : IUnknown
686 [out, size_is(cb), length_is(*pcbRead)]
689 [out] ULONG *pcbRead);
693 [out, size_is(cb), length_is(*pcbRead)]
696 [out] ULONG *pcbRead);
700 [in, size_is(cb)] const void *pv,
702 [out] ULONG *pcbWritten);
706 [in, size_is(cb)] const byte *pv,
708 [out] ULONG *pcbWritten);
713 uuid(0000000c-0000-0000-C000-000000000046),
714 pointer_default(unique)
716 interface IStream : ISequentialStream
718 typedef [unique] IStream *LPSTREAM;
720 typedef struct tagSTATSTG {
723 ULARGE_INTEGER cbSize;
728 DWORD grfLocksSupported;
734 typedef enum tagSTGTY {
741 typedef enum tagSTREAM_SEEK {
747 /* these are defined in Linux's fcntl.h,
748 * undefine them to avoid conflicts */
749 cpp_quote("#undef LOCK_MAND")
750 cpp_quote("#undef LOCK_READ")
751 cpp_quote("#undef LOCK_WRITE")
752 cpp_quote("#undef LOCK_RW")
754 typedef enum tagLOCKTYPE {
762 [in] LARGE_INTEGER dlibMove,
764 [out] ULARGE_INTEGER *plibNewPosition);
768 [in] LARGE_INTEGER dlibMove,
770 [out] ULARGE_INTEGER *plibNewPosition);
773 [in] ULARGE_INTEGER libNewSize);
777 [in, unique] IStream *pstm,
778 [in] ULARGE_INTEGER cb,
779 [out] ULARGE_INTEGER *pcbRead,
780 [out] ULARGE_INTEGER *pcbWritten);
783 HRESULT RemoteCopyTo(
784 [in, unique] IStream *pstm,
785 [in] ULARGE_INTEGER cb,
786 [out] ULARGE_INTEGER *pcbRead,
787 [out] ULARGE_INTEGER *pcbWritten);
790 [in] DWORD grfCommitFlags);
795 [in] ULARGE_INTEGER libOffset,
796 [in] ULARGE_INTEGER cb,
797 [in] DWORD dwLockType);
799 HRESULT UnlockRegion(
800 [in] ULARGE_INTEGER libOffset,
801 [in] ULARGE_INTEGER cb,
802 [in] DWORD dwLockType);
805 [out] STATSTG *pstatstg,
806 [in] DWORD grfStatFlag);
809 [out] IStream **ppstm);
814 pointer_default(unique)
816 interface IStream16 : ISequentialStream
818 typedef [unique] IStream16 *LPSTREAM16;
820 typedef struct tagSTATSTG16 {
823 ULARGE_INTEGER cbSize;
828 DWORD grfLocksSupported;
836 [in] LARGE_INTEGER dlibMove,
838 [out] ULARGE_INTEGER *plibNewPosition);
842 [in] LARGE_INTEGER dlibMove,
844 [out] ULARGE_INTEGER *plibNewPosition);
847 [in] ULARGE_INTEGER libNewSize);
851 [in, unique] IStream16 *pstm,
852 [in] ULARGE_INTEGER cb,
853 [out] ULARGE_INTEGER *pcbRead,
854 [out] ULARGE_INTEGER *pcbWritten);
857 HRESULT RemoteCopyTo(
858 [in, unique] IStream16 *pstm,
859 [in] ULARGE_INTEGER cb,
860 [out] ULARGE_INTEGER *pcbRead,
861 [out] ULARGE_INTEGER *pcbWritten);
864 [in] DWORD grfCommitFlags);
869 [in] ULARGE_INTEGER libOffset,
870 [in] ULARGE_INTEGER cb,
871 [in] DWORD dwLockType);
873 HRESULT UnlockRegion(
874 [in] ULARGE_INTEGER libOffset,
875 [in] ULARGE_INTEGER cb,
876 [in] DWORD dwLockType);
879 [out] STATSTG *pstatstg,
880 [in] DWORD grfStatFlag);
883 [out] IStream16 **ppstm);
888 uuid(0000000d-0000-0000-C000-000000000046),
889 pointer_default(unique)
891 interface IEnumSTATSTG : IUnknown
893 typedef [unique] IEnumSTATSTG *LPENUMSTATSTG;
898 [out, size_is(celt), length_is(*pceltFetched)]
900 [out] ULONG *pceltFetched);
905 [out, size_is(celt), length_is(*pceltFetched)]
907 [out] ULONG *pceltFetched);
915 [out] IEnumSTATSTG **ppenum);
920 uuid(0000000b-0000-0000-C000-000000000046),
921 pointer_default(unique)
923 interface IStorage : IUnknown
925 typedef [unique] IStorage *LPSTORAGE;
927 typedef struct tagRemSNB {
928 unsigned long ulCntStr;
929 unsigned long ulCntChar;
930 [size_is(ulCntChar)] OLECHAR rgString[];
933 typedef [unique] RemSNB *wireSNB;
934 typedef [wire_marshal(wireSNB)] OLECHAR **SNB;
936 HRESULT CreateStream(
937 [in] LPCOLESTR pwcsName,
939 [in] DWORD reserved1,
940 [in] DWORD reserved2,
941 [out] IStream **ppstm);
945 [in] LPCOLESTR pwcsName,
946 [in, unique] void *reserved1,
948 [in] DWORD reserved2,
949 [out] IStream **ppstm);
951 [call_as(OpenStream)]
952 HRESULT RemoteOpenStream(
953 [in] LPCOLESTR pwcsName,
954 [in] unsigned long cbReserved1,
955 [in, unique, size_is(cbReserved1)] byte *reserved1,
957 [in] DWORD reserved2,
958 [out] IStream **ppstm);
960 HRESULT CreateStorage(
961 [in] LPCOLESTR pwcsName,
964 [in] DWORD reserved2,
965 [out] IStorage **ppstg);
968 [in, unique] LPCOLESTR pwcsName,
969 [in, unique] IStorage *pstgPriority,
971 [in, unique] SNB snbExclude,
973 [out] IStorage **ppstg);
976 [in] DWORD ciidExclude,
977 [in, unique, size_is(ciidExclude)] const IID *rgiidExclude,
978 [in, unique] SNB snbExclude,
979 [in, unique] IStorage *pstgDest);
981 HRESULT MoveElementTo(
982 [in] LPCOLESTR pwcsName,
983 [in, unique] IStorage *pstgDest,
984 [in] LPCOLESTR pwcsNewName,
985 [in] DWORD grfFlags);
988 [in] DWORD grfCommitFlags);
993 HRESULT EnumElements(
994 [in] DWORD reserved1,
995 [in, unique, size_is(1)] void *reserved2,
996 [in] DWORD reserved3,
997 [out] IEnumSTATSTG **ppenum);
999 [call_as(EnumElements)]
1000 HRESULT RemoteEnumElements(
1001 [in] DWORD reserved1,
1002 [in] unsigned long cbReserved2,
1003 [in, unique, size_is(cbReserved2)] byte *reserved2,
1004 [in] DWORD reserved3,
1005 [out] IEnumSTATSTG **ppenum);
1007 HRESULT DestroyElement(
1008 [in] LPCOLESTR pwcsName);
1010 HRESULT RenameElement(
1011 [in] LPCOLESTR pwcsOldName,
1012 [in] LPCOLESTR pwcsNewName);
1014 HRESULT SetElementTimes(
1015 [in, unique] LPCOLESTR pwcsName,
1016 [in, unique] const FILETIME *pctime,
1017 [in, unique] const FILETIME *patime,
1018 [in, unique] const FILETIME *pmtime);
1021 [in] REFCLSID clsid);
1023 HRESULT SetStateBits(
1024 [in] DWORD grfStateBits,
1025 [in] DWORD grfMask);
1028 [out] STATSTG *pstatstg,
1029 [in] DWORD grfStatFlag);
1034 pointer_default(unique)
1036 interface IStorage16 : IUnknown
1038 typedef [unique] IStorage16 *LPSTORAGE16;
1040 typedef struct tagRemSNB16 {
1041 unsigned long ulCntStr;
1042 unsigned long ulCntChar;
1043 [size_is(ulCntChar)] OLECHAR16 rgString[];
1046 typedef [unique] RemSNB16 *wireSNB16;
1047 typedef [wire_marshal(wireSNB16)] OLECHAR16 **SNB16;
1049 HRESULT CreateStream(
1050 [in] LPCOLESTR16 pwcsName,
1052 [in] DWORD reserved1,
1053 [in] DWORD reserved2,
1054 [out] IStream16 **ppstm);
1058 [in] LPCOLESTR16 pwcsName,
1059 [in, unique] void *reserved1,
1061 [in] DWORD reserved2,
1062 [out] IStream16 **ppstm);
1064 [call_as(OpenStream)]
1065 HRESULT RemoteOpenStream(
1066 [in] LPCOLESTR16 pwcsName,
1067 [in] unsigned long cbReserved1,
1068 [in, unique, size_is(cbReserved1)] byte *reserved1,
1070 [in] DWORD reserved2,
1071 [out] IStream16 **ppstm);
1073 HRESULT CreateStorage(
1074 [in] LPCOLESTR16 pwcsName,
1076 [in] DWORD dwStgFmt,
1077 [in] DWORD reserved2,
1078 [out] IStorage16 **ppstg);
1080 HRESULT OpenStorage(
1081 [in, unique] LPCOLESTR16 pwcsName,
1082 [in, unique] IStorage16 *pstgPriority,
1084 [in, unique] SNB16 snbExclude,
1085 [in] DWORD reserved,
1086 [out] IStorage16 **ppstg);
1089 [in] DWORD ciidExclude,
1090 [in, unique, size_is(ciidExclude)] const IID *rgiidExclude,
1091 [in, unique] SNB16 snbExclude,
1092 [in, unique] IStorage16 *pstgDest);
1094 HRESULT MoveElementTo(
1095 [in] LPCOLESTR16 pwcsName,
1096 [in, unique] IStorage16 *pstgDest,
1097 [in] LPCOLESTR16 pwcsNewName,
1098 [in] DWORD grfFlags);
1101 [in] DWORD grfCommitFlags);
1106 HRESULT EnumElements(
1107 [in] DWORD reserved1,
1108 [in, unique, size_is(1)] void *reserved2,
1109 [in] DWORD reserved3,
1110 [out] IEnumSTATSTG **ppenum);
1112 [call_as(EnumElements)]
1113 HRESULT RemoteEnumElements(
1114 [in] DWORD reserved1,
1115 [in] unsigned long cbReserved2,
1116 [in, unique, size_is(cbReserved2)] byte *reserved2,
1117 [in] DWORD reserved3,
1118 [out] IEnumSTATSTG **ppenum);
1120 HRESULT DestroyElement(
1121 [in] LPCOLESTR16 pwcsName);
1123 HRESULT RenameElement(
1124 [in] LPCOLESTR16 pwcsOldName,
1125 [in] LPCOLESTR16 pwcsNewName);
1127 HRESULT SetElementTimes(
1128 [in, unique] LPCOLESTR16 pwcsName,
1129 [in, unique] const FILETIME *pctime,
1130 [in, unique] const FILETIME *patime,
1131 [in, unique] const FILETIME *pmtime);
1134 [in] REFCLSID clsid);
1136 HRESULT SetStateBits(
1137 [in] DWORD grfStateBits,
1138 [in] DWORD grfMask);
1141 [out] STATSTG *pstatstg,
1142 [in] DWORD grfStatFlag);
1147 uuid(0000010b-0000-0000-C000-000000000046),
1148 pointer_default(unique)
1150 interface IPersistFile : IPersist
1152 typedef [unique] IPersistFile *LPPERSISTFILE;
1157 [in] LPCOLESTR pszFileName,
1161 [in, unique] LPCOLESTR pszFileName,
1162 [in] BOOL fRemember);
1164 HRESULT SaveCompleted(
1165 [in, unique] LPCOLESTR pszFileName);
1168 [out] LPOLESTR *ppszFileName);
1173 uuid(0000010a-0000-0000-C000-000000000046),
1174 pointer_default(unique)
1176 interface IPersistStorage : IPersist
1178 typedef [unique] IPersistStorage *LPPERSISTSTORAGE;
1183 [in, unique] IStorage *pStg);
1186 [in, unique] IStorage *pStg);
1189 [in, unique] IStorage *pStgSave,
1190 [in] BOOL fSameAsLoad);
1192 HRESULT SaveCompleted(
1193 [in, unique] IStorage *pStgNew);
1195 HRESULT HandsOffStorage();
1200 uuid(00000012-0000-0000-C000-000000000046),
1201 pointer_default(unique)
1203 interface IRootStorage : IUnknown
1205 typedef [unique] IRootStorage *LPROOTSTORAGE;
1207 HRESULT SwitchToFile(
1208 [in] LPOLESTR pszFile);
1213 uuid(0000000a-0000-0000-C000-000000000046),
1214 pointer_default(unique)
1216 interface ILockBytes : IUnknown
1218 typedef [unique] ILockBytes *LPLOCKBYTES;
1222 [in] ULARGE_INTEGER ulOffset,
1223 [out, size_is(cb), length_is(*pcbRead)]
1226 [out] ULONG *pcbRead);
1229 HRESULT RemoteReadAt(
1230 [in] ULARGE_INTEGER ulOffset,
1231 [out, size_is(cb), length_is(*pcbRead)]
1234 [out] ULONG *pcbRead);
1238 [in] ULARGE_INTEGER ulOffset,
1239 [in, size_is(cb)] const void *pv,
1241 [out] ULONG *pcbWritten);
1244 HRESULT RemoteWriteAt(
1245 [in] ULARGE_INTEGER ulOffset,
1246 [in, size_is(cb)] const byte *pv,
1248 [out] ULONG *pcbWritten);
1253 [in] ULARGE_INTEGER cb);
1256 [in] ULARGE_INTEGER libOffset,
1257 [in] ULARGE_INTEGER cb,
1258 [in] DWORD dwLockType);
1260 HRESULT UnlockRegion(
1261 [in] ULARGE_INTEGER libOffset,
1262 [in] ULARGE_INTEGER cb,
1263 [in] DWORD dwLockType);
1266 [out] STATSTG *pstatstg,
1267 [in] DWORD grfStatFlag);
1272 uuid(99caf010-415e-11cf-8814-00aa00b569f5),
1273 pointer_default(unique)
1275 interface IFillLockBytes : IUnknown
1279 [in, size_is(cb)] const void *pv,
1281 [out] ULONG *pcbWritten);
1283 [call_as(FillAppend)]
1284 HRESULT RemoteFillAppend(
1285 [in, size_is(cb)] const byte *pv,
1287 [out] ULONG *pcbWritten);
1291 [in] ULARGE_INTEGER ulOffset,
1292 [in, size_is(cb)] const void *pv,
1294 [out] ULONG *pcbWritten);
1297 HRESULT RemoteFillAt(
1298 [in] ULARGE_INTEGER ulOffset,
1299 [in, size_is(cb)] const byte *pv,
1301 [out] ULONG *pcbWritten);
1303 HRESULT SetFillSize(
1304 [in] ULARGE_INTEGER ulSize);
1307 [in] BOOL bCanceled);
1312 uuid(a9d758a0-4617-11cf-95fc-00aa00680db4),
1313 pointer_default(unique)
1315 interface IProgressNotify : IUnknown
1318 [in] DWORD dwProgressCurrent,
1319 [in] DWORD dwProgressMaximum,
1320 [in] BOOL fAccurate,
1327 uuid(0e6d4d90-6738-11cf-9608-00aa00680db4),
1328 pointer_default(unique)
1330 interface ILayoutStorage : IUnknown
1332 typedef struct tagStorageLayout {
1334 OLECHAR *pwcsElementName;
1335 LARGE_INTEGER cOffset;
1336 LARGE_INTEGER cBytes;
1339 HRESULT LayoutScript(
1340 [in] StorageLayout *pStorageLayout,
1341 [in] DWORD nEntries,
1342 [in] DWORD glfInterleavedFlag);
1344 HRESULT BeginMonitor();
1346 HRESULT EndMonitor();
1348 HRESULT ReLayoutDocfile(
1349 [in] OLECHAR *pwcsNewDfName);
1351 HRESULT ReLayoutDocfileOnILockBytes(
1352 [in] ILockBytes *pILockBytes);
1355 /******************** Data Object ********************/
1359 uuid(00000103-0000-0000-C000-000000000046),
1360 pointer_default(unique)
1362 interface IEnumFORMATETC : IUnknown
1364 typedef [unique] IEnumFORMATETC *LPENUMFORMATETC;
1366 typedef struct tagDVTARGETDEVICE {
1368 WORD tdDriverNameOffset;
1369 WORD tdDeviceNameOffset;
1370 WORD tdPortNameOffset;
1371 WORD tdExtDevmodeOffset;
1372 [size_is(tdSize - sizeof(DWORD) - 4*sizeof(WORD))]
1376 typedef CLIPFORMAT *LPCLIPFORMAT;
1378 typedef struct tagFORMATETC {
1379 CLIPFORMAT cfFormat;
1380 [unique] DVTARGETDEVICE *ptd;
1384 } FORMATETC, *LPFORMATETC;
1389 [out, size_is(celt), length_is(*pceltFetched)]
1391 [out] ULONG *pceltFetched);
1396 [out, size_is(celt), length_is(*pceltFetched)]
1398 [out] ULONG *pceltFetched);
1406 [out] IEnumFORMATETC **ppenum);
1411 uuid(00000105-0000-0000-C000-000000000046),
1412 pointer_default(unique)
1414 interface IEnumSTATDATA : IUnknown
1416 typedef [unique] IEnumSTATDATA *LPENUMSTATDATA;
1418 typedef enum tagADVF {
1420 ADVF_PRIMEFIRST = 2,
1422 ADVF_DATAONSTOP = 64,
1423 ADVFCACHE_NOHANDLER = 8,
1424 ADVFCACHE_FORCEBUILTIN = 16,
1425 ADVFCACHE_ONSAVE = 32
1428 typedef struct tagSTATDATA
1430 FORMATETC formatetc;
1432 [unique] IAdviseSink *pAdvSink;
1434 } STATDATA, *LPSTATDATA;
1439 [out, size_is(celt), length_is(*pceltFetched)]
1441 [out] ULONG *pceltFetched);
1446 [out, size_is(celt), length_is(*pceltFetched)]
1448 [out] ULONG *pceltFetched);
1456 [out] IEnumSTATDATA **ppenum);
1461 uuid(0000010f-0000-0000-C000-000000000046),
1462 pointer_default(unique)
1464 interface IAdviseSink : IUnknown
1466 typedef IAdviseSink *LPADVISESINK;
1468 typedef [v1_enum] enum tagTYMED {
1479 typedef struct tagRemSTGMEDIUM {
1482 unsigned long pData;
1483 unsigned long pUnkForRelease;
1484 unsigned long cbData;
1485 [size_is(cbData)] byte data[];
1488 /* FIXME: C/C++ nameless union version */
1489 typedef struct tagSTGMEDIUM {
1491 [switch_is(tymed)] union {
1492 [case(TYMED_GDI)] HBITMAP hBitmap;
1493 [case(TYMED_MFPICT)] HMETAFILEPICT hMetaFilePict;
1494 [case(TYMED_ENHMF)] HENHMETAFILE hEnhMetaFile;
1495 [case(TYMED_HGLOBAL)] HGLOBAL hGlobal;
1496 [case(TYMED_FILE)] LPOLESTR lpszFileName;
1497 [case(TYMED_ISTREAM)] IStream *pstm;
1498 [case(TYMED_ISTORAGE)] IStorage *pstg;
1501 [unique] IUnknown *pUnkForRelease;
1504 /* copied from wingdi.h */
1508 #define OBJ_METADC 4
1511 #define OBJ_BITMAP 7
1512 #define OBJ_REGION 8
1513 #define OBJ_METAFILE 9
1514 #define OBJ_MEMDC 10
1515 #define OBJ_EXTPEN 11
1516 #define OBJ_ENHMETADC 12
1517 #define OBJ_ENHMETAFILE 13
1519 typedef union _GDI_OBJECT switch(DWORD ObjectType) u {
1520 case OBJ_BITMAP: wireHBITMAP hBitmap;
1521 case OBJ_PAL: wireHPALETTE hPalette;
1522 default: wireHGLOBAL hGeneric;
1525 typedef struct _userSTGMEDIUM {
1526 union _STGMEDIUM_UNION switch(DWORD tymed) u {
1528 case TYMED_MFPICT: wireHMETAFILEPICT hMetaFilePict;
1529 case TYMED_ENHMF: wireHENHMETAFILE hHEnhMetaFile;
1530 case TYMED_GDI: GDI_OBJECT *hGdiHandle;
1531 case TYMED_HGLOBAL: wireHGLOBAL hGlobal;
1532 case TYMED_FILE: LPOLESTR lpszFileName;
1533 case TYMED_ISTREAM: BYTE_BLOB *pstm;
1534 case TYMED_ISTORAGE: BYTE_BLOB *pstg;
1536 IUnknown *pUnkForRelease;
1539 typedef [unique] userSTGMEDIUM *wireSTGMEDIUM;
1540 typedef [wire_marshal(wireSTGMEDIUM)] uSTGMEDIUM STGMEDIUM;
1542 typedef [unique] userSTGMEDIUM *wireASYNC_STGMEDIUM;
1543 typedef [wire_marshal(wireASYNC_STGMEDIUM)] STGMEDIUM ASYNC_STGMEDIUM;
1545 typedef STGMEDIUM *LPSTGMEDIUM;
1547 typedef struct _userFLAG_STGMEDIUM {
1549 long fPassOwnership;
1550 userSTGMEDIUM Stgmed;
1551 } userFLAG_STGMEDIUM;
1553 typedef [unique] userFLAG_STGMEDIUM *wireFLAG_STGMEDIUM;
1555 typedef [wire_marshal(wireFLAG_STGMEDIUM)] struct _FLAG_STGMEDIUM {
1557 long fPassOwnership;
1563 [in, unique] FORMATETC *pFormatetc,
1564 [in, unique] STGMEDIUM *pStgmed);
1566 [call_as(OnDataChange), async]
1567 HRESULT RemoteOnDataChange(
1568 [in] IAsyncManager **ppIAM,
1569 [in, unique] FORMATETC *pFormatetc,
1570 [in, unique] ASYNC_STGMEDIUM *pStgmed);
1574 [in] DWORD dwAspect,
1577 [call_as(OnViewChange), async]
1578 HRESULT RemoteOnViewChange(
1579 [in] IAsyncManager **ppIAM,
1580 [in] DWORD dwAspect,
1585 [in] IMoniker *pmk);
1587 [call_as(OnRename), async]
1588 HRESULT RemoteOnRename(
1589 [in] IAsyncManager **ppIAM,
1590 [in] IMoniker *pmk);
1595 [call_as(OnSave), async]
1596 HRESULT RemoteOnSave(
1597 [in] IAsyncManager **ppIAM);
1603 HRESULT RemoteOnClose();
1608 uuid(00000125-0000-0000-C000-000000000046),
1609 pointer_default(unique)
1611 interface IAdviseSink2 : IAdviseSink
1613 typedef [unique] IAdviseSink2 *LPADVISESINK2;
1616 void OnLinkSrcChange(
1617 [in, unique] IMoniker *pmk);
1619 [call_as(OnLinkSrcChange), async]
1620 HRESULT RemoteOnLinkSrcChange(
1621 [in] IAsyncManager **ppIAM,
1622 [in, unique] IMoniker *pmk);
1627 uuid(0000010e-0000-0000-C000-000000000046),
1628 pointer_default(unique)
1630 interface IDataObject : IUnknown
1632 typedef [unique] IDataObject *LPDATAOBJECT;
1634 typedef enum tagDATADIR {
1641 [in, unique] FORMATETC *pformatetcIn,
1642 [out] STGMEDIUM *pmedium);
1645 HRESULT RemoteGetData(
1646 [in, unique] FORMATETC *pformatetcIn,
1647 [out] STGMEDIUM *pRemoteMedium);
1650 HRESULT GetDataHere(
1651 [in, unique] FORMATETC *pformatetc,
1652 [in, out] STGMEDIUM *pmedium);
1654 [call_as(GetDataHere)]
1655 HRESULT RemoteGetDataHere(
1656 [in, unique] FORMATETC *pformatetc,
1657 [in, out] STGMEDIUM *pRemoteMedium);
1659 HRESULT QueryGetData(
1660 [in, unique] FORMATETC *pformatetc);
1662 HRESULT GetCanonicalFormatEtc(
1663 [in, unique] FORMATETC *pformatectIn,
1664 [out] FORMATETC *pformatetcOut);
1668 [in, unique] FORMATETC *pformatetc,
1669 [in, unique] STGMEDIUM *pmedium,
1670 [in] BOOL fRelease);
1673 HRESULT RemoteSetData(
1674 [in, unique] FORMATETC *pformatetc,
1675 [in, unique] FLAG_STGMEDIUM *pmedium,
1676 [in] BOOL fRelease);
1678 HRESULT EnumFormatEtc(
1679 [in] DWORD dwDirection,
1680 [out] IEnumFORMATETC **ppenumFormatEtc);
1683 [in] FORMATETC *pformatetc,
1685 [in, unique] IAdviseSink *pAdvSink,
1686 [out] DWORD *pdwConnection);
1689 [in] DWORD dwConnection);
1691 HRESULT EnumDAdvise(
1692 [out] IEnumSTATDATA **ppenumAdvise);
1698 uuid(00000110-0000-0000-C000-000000000046)
1700 interface IDataAdviseHolder : IUnknown
1702 typedef [unique] IDataAdviseHolder *LPDATAADVISEHOLDER;
1705 [in, unique] IDataObject *pDataObject,
1706 [in, unique] FORMATETC *pFetc,
1708 [in, unique] IAdviseSink *pAdvise,
1709 [out] DWORD *pdwConnection);
1712 [in] DWORD dwConnection);
1715 [out] IEnumSTATDATA **ppenumAdvise);
1717 HRESULT SendOnDataChange(
1718 [in, unique] IDataObject *pDataObject,
1719 [in] DWORD dwReserved,
1723 /******************** Remoting ********************/
1728 uuid(00000016-0000-0000-C000-000000000046)
1730 interface IMessageFilter : IUnknown
1732 typedef [unique] IMessageFilter *LPMESSAGEFILTER;
1734 typedef enum tagCALLTYPE {
1735 CALLTYPE_TOPLEVEL = 1,
1736 CALLTYPE_NESTED = 2,
1738 CALLTYPE_TOPLEVEL_CALLPENDING = 4,
1739 CALLTYPE_ASYNC_CALLPENDING = 5
1742 typedef enum tagSERVERCALL {
1743 SERVERCALL_ISHANDLED = 0,
1744 SERVERCALL_REJECTED = 1,
1745 SERVERCALL_RETRYLATER = 2
1748 typedef enum tagPENDINGTYPE {
1749 PENDINGTYPE_TOPLEVEL = 1,
1750 PENDINGTYPE_NESTED = 2
1753 typedef enum tagPENDINGMSG {
1754 PENDINGMSG_CANCELCALL = 0,
1755 PENDINGMSG_WAITNOPROCESS = 1,
1756 PENDINGMSG_WAITDEFPROCESS = 2
1759 typedef struct tagINTERFACEINFO {
1763 } INTERFACEINFO, *LPINTERFACEINFO;
1765 DWORD HandleInComingCall(
1766 [in] DWORD dwCallType,
1767 [in] HTASK htaskCaller,
1768 [in] DWORD dwTickCount,
1769 [in] LPINTERFACEINFO lpInterfaceInfo);
1771 DWORD RetryRejectedCall(
1772 [in] HTASK htaskCallee,
1773 [in] DWORD dwTickCount,
1774 [in] DWORD dwRejectType);
1776 DWORD MessagePending(
1777 [in] HTASK htaskCallee,
1778 [in] DWORD dwTickCount,
1779 [in] DWORD dwPendingType);
1785 uuid(D5F56B60-593B-101A-B569-08002B2DBF7A)
1787 interface IRpcChannelBuffer : IUnknown
1789 typedef [unique] IRpcChannelBuffer *LPRPCCHANNELBUFFER;
1791 typedef unsigned long RPCOLEDATAREP;
1793 typedef struct tagRPCOLEMESSAGE {
1795 RPCOLEDATAREP dataRepresentation;
1803 typedef RPCOLEMESSAGE *PRPCOLEMESSAGE;
1806 [in] RPCOLEMESSAGE *pMessage,
1809 HRESULT SendReceive(
1810 [in,out] RPCOLEMESSAGE *pMessage,
1811 [out] ULONG *pStatus);
1814 [in] RPCOLEMESSAGE *pMessage);
1817 [out] DWORD *pdwDestContext,
1818 [out] void **ppvDestContext);
1820 HRESULT IsConnected();
1826 uuid(594f31d0-7f19-11d0-b194-00a0c90dc8bf)
1828 interface IRpcChannelBuffer2 : IRpcChannelBuffer
1830 typedef [unique] IRpcChannelBuffer2 *LPRPCCHANNELBUFFER2;
1832 HRESULT GetProtocolVersion(
1833 [in,out] DWORD *pdwVersion);
1839 uuid(25B15600-0115-11d0-BF0D-00AA00B8DFD2)
1841 interface IRpcChannelBuffer3 : IRpcChannelBuffer2
1843 typedef [unique] IRpcChannelBuffer3 *LPRPCCHANNELBUFFER3;
1846 [in,out] RPCOLEMESSAGE *pMsg,
1847 [out] ULONG *pulStatus);
1850 [in,out] RPCOLEMESSAGE *pMsg,
1852 [out] ULONG *pulStatus);
1855 [in] RPCOLEMESSAGE *pMsg);
1857 HRESULT GetCallContext(
1858 [in] RPCOLEMESSAGE *pMsg,
1860 [out] void **pInterface);
1862 HRESULT GetDestCtxEx(
1863 [in] RPCOLEMESSAGE *pMsg,
1864 [out] DWORD *pdwDestContext,
1865 [out] void **ppvDestContext);
1868 [in] RPCOLEMESSAGE *pMsg,
1869 [out] DWORD *pState);
1871 HRESULT RegisterAsync(
1872 [in] RPCOLEMESSAGE *pMsg,
1873 [in] IAsyncManager *pAsyncMgr);
1879 uuid(D5F56A34-593B-101A-B569-08002B2DBF7A)
1881 interface IRpcProxyBuffer : IUnknown
1883 typedef [unique] IRpcProxyBuffer *LPRPCPROXYBUFFER;
1886 [in, unique] IRpcChannelBuffer *pRpcChannelBuffer);
1894 uuid(D5F56AFC-593B-101A-B569-08002B2DBF7A)
1896 interface IRpcStubBuffer : IUnknown
1898 typedef [unique] IRpcStubBuffer *LPRPCSTUBBUFFER;
1901 [in] IUnknown *pUnkServer);
1906 [in] RPCOLEMESSAGE *_prpcmsg,
1907 [in] IRpcChannelBuffer *_pRpcChannelBuffer);
1909 IRpcStubBuffer *IsIIDSupported(
1914 HRESULT DebugServerQueryInterface(
1917 void DebugServerRelease(
1924 uuid(D5F569D0-593B-101A-B569-08002B2DBF7A)
1926 interface IPSFactoryBuffer : IUnknown
1928 typedef [unique] IPSFactoryBuffer *LPPSFACTORYBUFFER;
1930 HRESULT CreateProxy(
1931 [in] IUnknown *pUnkOuter,
1933 [out] IRpcProxyBuffer **ppProxy,
1938 [in, unique] IUnknown *pUnkServer,
1939 [out] IRpcStubBuffer **ppStub);
1945 uuid(1008c4a0-7613-11cf-9af1-0020af6e72f4)
1947 interface IChannelHook : IUnknown
1949 typedef [unique] IChannelHook *LPCHANNELHOOK;
1951 typedef struct SChannelHookCallInfo {
1958 } SChannelHookCallInfo;
1961 [in] REFGUID uExtent,
1963 [out] ULONG *pDataSize);
1965 void ClientFillBuffer(
1966 [in] REFGUID uExtent,
1968 [in, out] ULONG *pDataSize,
1969 [in] void *pDataBuffer);
1972 [in] REFGUID uExtent,
1974 [in] ULONG cbDataSize,
1975 [in] void *pDataBuffer,
1976 [in] DWORD lDataRep,
1977 [in] HRESULT hrFault);
1980 [in] REFGUID uExtent,
1982 [in] ULONG cbDataSize,
1983 [in] void *pDataBuffer,
1984 [in] DWORD lDataRep);
1987 [in] REFGUID uExtent,
1989 [in] HRESULT hrFault,
1990 [out] ULONG *pDataSize);
1992 void ServerFillBuffer(
1993 [in] REFGUID uExtent,
1995 [in, out] ULONG *pDataSize,
1996 [in] void *pDataBuffer,
1997 [in] HRESULT hrFault );
2000 /******************** Property Storage ********************/
2002 interface IEnumSTATPROPSTG;
2003 interface IEnumSTATPROPSETSTG;
2007 uuid(00000138-0000-0000-C000-000000000046),
2008 pointer_default(unique)
2010 interface IPropertyStorage : IUnknown
2012 typedef [unique] IPropertyStorage *LPPROPERTYSTORAGE;
2014 extern const FMTID FMTID_SummaryInformation;
2015 extern const FMTID FMTID_DocSummaryInformation;
2016 extern const FMTID FMTID_UserDefinedProperties;
2018 const DWORD PROPSETFLAG_DEFAULT = 0;
2019 const DWORD PROPSETFLAG_NONSIMPLE = 1;
2020 const DWORD PROPSETFLAG_ANSI = 2;
2021 const DWORD PROPSETFLAG_UNBUFFERED = 4;
2023 typedef struct tagPROPVARIANT PROPVARIANT;
2025 #define TYPEDEF_CA(type, name) \
2026 typedef struct tag##name { \
2032 TYPEDEF_CA(unsigned char, CAUB);
2033 TYPEDEF_CA(short, CAI);
2034 TYPEDEF_CA(USHORT, CAUI);
2035 TYPEDEF_CA(long, CAL);
2036 TYPEDEF_CA(ULONG, CAUL);
2037 TYPEDEF_CA(float, CAFLT);
2038 TYPEDEF_CA(double, CADBL);
2039 TYPEDEF_CA(CY, CACY);
2040 TYPEDEF_CA(DATE, CADATE);
2041 TYPEDEF_CA(BSTR, CABSTR);
2042 TYPEDEF_CA(BSTRBLOB, CABSTRBLOB);
2043 TYPEDEF_CA(VARIANT_BOOL, CABOOL);
2044 TYPEDEF_CA(SCODE, CASCODE);
2045 TYPEDEF_CA(PROPVARIANT, CAPROPVARIANT);
2046 TYPEDEF_CA(LARGE_INTEGER, CAH);
2047 TYPEDEF_CA(ULARGE_INTEGER, CAUH);
2048 TYPEDEF_CA(LPSTR, CALPSTR);
2049 TYPEDEF_CA(LPWSTR, CALPWSTR);
2050 TYPEDEF_CA(FILETIME, CAFILETIME);
2051 TYPEDEF_CA(CLIPDATA, CACLIPDATA);
2052 TYPEDEF_CA(CLSID, CACLSID);
2054 struct tagPROPVARIANT {
2059 [switch_is(vt & 0x1fff)] union {
2060 [case(VT_EMPTY, VT_NULL)] ;
2061 [case(VT_I1)] char cVal;
2062 [case(VT_UI1)] UCHAR bVal;
2063 [case(VT_I2)] short iVal;
2064 [case(VT_UI2)] USHORT uiVal;
2065 [case(VT_BOOL)] VARIANT_BOOL boolVal;
2066 #if 0 /* illegal in C++ */
2067 [case(VT_ILLEGAL)] _VARIANT_BOOL bool;
2069 [case(VT_I4)] long lVal;
2070 [case(VT_UI4)] ULONG ulVal;
2071 [case(VT_R4)] float fltVal;
2072 [case(VT_ERROR)] SCODE scode;
2073 [case(VT_I8)] LARGE_INTEGER hVal;
2074 [case(VT_UI8)] ULARGE_INTEGER uhVal;
2075 [case(VT_R8)] double dblVal;
2076 [case(VT_CY)] CY cyVal;
2077 [case(VT_DATE)] DATE date;
2078 [case(VT_FILETIME)] FILETIME filetime;
2079 [case(VT_CLSID)] CLSID *puuid;
2080 [case(VT_BLOB, VT_BLOB_OBJECT)] BLOB blob;
2081 [case(VT_CF)] CLIPDATA *pclipdata;
2082 [case(VT_STREAM, VT_STREAMED_OBJECT)] IStream *pStream;
2083 [case(VT_STORAGE, VT_STORED_OBJECT)] IStorage *pStorage;
2084 [case(VT_BSTR)] BSTR bstrVal;
2085 [case(VT_BSTR_BLOB)] BSTRBLOB bstrblobVal;
2086 [case(VT_LPSTR)] LPSTR pszVal;
2087 [case(VT_LPWSTR)] LPWSTR pwszVal;
2088 [case(VT_UI1|VT_VECTOR)] CAUB caub;
2089 [case(VT_I2|VT_VECTOR)] CAI cai;
2090 [case(VT_UI2|VT_VECTOR)] CAUI caui;
2091 [case(VT_BOOL|VT_VECTOR)] CABOOL cabool;
2092 [case(VT_I4|VT_VECTOR)] CAL cal;
2093 [case(VT_UI4|VT_VECTOR)] CAUL caul;
2094 [case(VT_R4|VT_VECTOR)] CAFLT caflt;
2095 [case(VT_ERROR|VT_VECTOR)] CASCODE cascode;
2096 [case(VT_I8|VT_VECTOR)] CAH cah;
2097 [case(VT_UI8|VT_VECTOR)] CAUH cauh;
2098 [case(VT_R8|VT_VECTOR)] CADBL cadbl;
2099 [case(VT_CY|VT_VECTOR)] CACY cacy;
2100 [case(VT_DATE|VT_VECTOR)] CADATE cadate;
2101 [case(VT_FILETIME|VT_VECTOR)] CAFILETIME cafiletime;
2102 [case(VT_CLSID|VT_VECTOR)] CACLSID cauuid;
2103 [case(VT_CF|VT_VECTOR)] CACLIPDATA caclipdata;
2104 [case(VT_BSTR|VT_VECTOR)] CABSTR cabstr;
2105 [case(VT_BSTR_BLOB|VT_VECTOR)] CABSTRBLOB cabstrblob;
2106 [case(VT_LPSTR|VT_VECTOR)] CALPSTR calpstr;
2107 [case(VT_LPWSTR|VT_VECTOR)] CALPWSTR calpwstr;
2108 [case(VT_VARIANT|VT_VECTOR)] CAPROPVARIANT capropvar;
2112 typedef struct tagPROPVARIANT *LPPROPVARIANT;
2114 /* FIXME: bunches of property IDs */
2116 const ULONG PRSPEC_INVALID = 0xffffffff;
2117 const ULONG PRSPEC_LPWSTR = 0;
2118 const ULONG PRSPEC_PROPID = 1;
2120 typedef struct tagPROPSPEC {
2122 [switch_is(ulKind)] union {
2123 [case(PRSPEC_PROPID)] PROPID propid;
2124 [case(PRSPEC_LPWSTR)] LPOLESTR lpwstr;
2129 typedef struct tagSTATPROPSTG {
2130 LPOLESTR lpwstrName;
2137 typedef struct tagSTATPROPSETSTG {
2147 HRESULT ReadMultiple(
2149 [in, size_is(cpspec)] const PROPSPEC rgpspec[],
2150 [out, size_is(cpspec)] PROPVARIANT rgpropvar[]);
2152 HRESULT WriteMultiple(
2154 [in, size_is(cpspec)] const PROPSPEC rgpspec[],
2155 [in, size_is(cpspec)] const PROPVARIANT rgpropvar[],
2156 [in] PROPID propidNameFirst);
2158 HRESULT DeleteMultiple(
2160 [in, size_is(cpspec)] const PROPSPEC rgpspec[]);
2162 HRESULT ReadPropertyNames(
2164 [in, size_is(cpropid)] const PROPID rgpropid[],
2165 [out, size_is(cpropid)] LPOLESTR rglpwstrName[]);
2167 HRESULT WritePropertyNames(
2169 [in, size_is(cpropid)] const PROPID rgpropid[],
2170 [in, size_is(cpropid)] const LPOLESTR rglpwstrName[]);
2172 HRESULT DeletePropertyNames(
2174 [in, size_is(cpropid)] const PROPID rgpropid[]);
2177 [in] DWORD grfCommitFlags);
2182 [out] IEnumSTATPROPSTG **ppenum);
2185 [in] const FILETIME *pctime,
2186 [in] const FILETIME *patime,
2187 [in] const FILETIME *pmtime);
2190 [in] REFCLSID clsid);
2193 [out] STATPROPSETSTG *statpsstg);
2198 uuid(0000013A-0000-0000-C000-000000000046),
2199 pointer_default(unique)
2201 interface IPropertySetStorage : IUnknown
2203 typedef [unique] IPropertySetStorage *LPPROPERTYSETSTORAGE;
2206 [in] REFFMTID rfmtid,
2207 [in, unique] const CLSID *pclsid,
2208 [in] DWORD grfFlags,
2210 [out] IPropertyStorage **ppprstg);
2213 [in] REFFMTID rfmtid,
2215 [out] IPropertyStorage **ppprstg);
2218 [in] REFFMTID rfmtid);
2221 [out] IEnumSTATPROPSETSTG **ppenum);
2226 uuid(00000139-0000-0000-C000-000000000046),
2227 pointer_default(unique)
2229 interface IEnumSTATPROPSTG : IUnknown
2231 typedef [unique] IEnumSTATPROPSTG *LPENUMSTATPROPSTG;
2236 [out, size_is(celt), length_is(*pceltFetched)]
2238 [out] ULONG *pceltFetched);
2243 [out, size_is(celt), length_is(*pceltFetched)]
2245 [out] ULONG *pceltFetched);
2253 [out] IEnumSTATPROPSTG **ppenum);
2258 uuid(0000013B-0000-0000-C000-000000000046),
2259 pointer_default(unique)
2261 interface IEnumSTATPROPSETSTG : IUnknown
2263 typedef [unique] IEnumSTATPROPSETSTG *LPENUMSTATPROPSETSTG;
2268 [out, size_is(celt), length_is(*pceltFetched)]
2269 STATPROPSETSTG *rgelt,
2270 [out] ULONG *pceltFetched);
2275 [out, size_is(celt), length_is(*pceltFetched)]
2276 STATPROPSETSTG *rgelt,
2277 [out] ULONG *pceltFetched);
2285 [out] IEnumSTATPROPSETSTG **ppenum);
2288 /******************** Connection Points ********************/
2291 /******************** DCOM ********************/
2296 uuid(0000013D-0000-0000-C000-000000000046)
2298 interface IClientSecurity : IUnknown
2300 typedef struct tagSOLE_AUTHENTICATION_SERVICE {
2303 OLECHAR *pPrincipalName;
2305 } SOLE_AUTHENTICATION_SERVICE;
2307 typedef SOLE_AUTHENTICATION_SERVICE *PSOLE_AUTHENTICATION_SERVICE;
2309 typedef enum tagEOLE_AUTHENTICATION_CAPABILITIES {
2311 EOAC_MUTUAL_AUTH = 0x1,
2312 EOAC_CLOAKING = 0x10,
2313 EOAC_SECURE_REFS = 0x2,
2314 EOAC_ACCESS_CONTROL = 0x4,
2316 } EOLE_AUTHENTICATION_CAPABILITIES;
2318 HRESULT QueryBlanket(
2319 [in] IUnknown *pProxy,
2320 [out] DWORD *pAuthnSvc,
2321 [out] DWORD *pAuthzSvc,
2322 [out] OLECHAR **pServerPrincName,
2323 [out] DWORD *pAuthnLevel,
2324 [out] DWORD *pImpLevel,
2325 [out] void **pAuthInfo,
2326 [out] DWORD *pCapabilites);
2329 [in] IUnknown *pProxy,
2330 [in] DWORD AuthnSvc,
2331 [in] DWORD AuthzSvc,
2332 [in] OLECHAR *pServerPrincName,
2333 [in] DWORD AuthnLevel,
2334 [in] DWORD ImpLevel,
2335 [in] void *pAuthInfo,
2336 [in] DWORD Capabilities);
2339 [in] IUnknown *pProxy,
2340 [out] IUnknown **ppCopy);
2346 uuid(0000013E-0000-0000-C000-000000000046)
2348 interface IServerSecurity : IUnknown
2350 HRESULT QueryBlanket(
2351 [out] DWORD *pAuthnSvc,
2352 [out] DWORD *pAuthzSvc,
2353 [out] OLECHAR **pServerPrincName,
2354 [out] DWORD *pAuthnLevel,
2355 [out] DWORD *pImpLevel,
2356 [out] void **pPrivs,
2357 [out] DWORD *pCapabilities);
2359 HRESULT ImpersonateClient();
2361 HRESULT RevertToSelf();
2363 BOOL IsImpersonating();
2369 uuid(00000024-0000-0000-C000-000000000046)
2371 interface IAsyncSetup : IUnknown
2373 HRESULT GetAsyncManager(
2375 [in] IUnknown *pOuter,
2377 [out] IUnknown **ppInner,
2378 [out] IAsyncManager **ppAsyncMgr);
2384 uuid(0000002A-0000-0000-C000-000000000046)
2386 interface IAsyncManager : IUnknown
2388 typedef enum tagDCOM_CALL_STATE {
2390 DCOM_CALL_COMPLETE = 1,
2391 DCOM_CALL_CANCELED = 2
2394 HRESULT CompleteCall(
2395 [in] HRESULT Result);
2396 HRESULT GetCallContext(
2398 [out] void **pInterface);
2400 [out] ULONG *pulStateFlags);