1use shared::basetsd::DWORD_PTR;
7use shared::guiddef::GUID;
8use shared::minwindef::{DWORD, WORD};
9use shared::winerror::HRESULT;
10use shared::wtypes::{BSTR, VARIANT_BOOL, VARTYPE};
11use um::oaidl::{DISPID, DISPID_UNKNOWN, DISPPARAMS, EXCEPINFO, IDispatch, IDispatchVtbl, VARIANT};
12use um::servprov::IServiceProvider;
13use um::unknwnbase::{IUnknown, IUnknownVtbl};
14use um::winnt::LCID;
15DEFINE_GUID!{IID_IDispatchEx,
16 0xa6ef9860, 0xc720, 0x11d0, 0x93, 0x37, 0x0, 0xa0, 0xc9, 0xd, 0xca, 0xa9}
17DEFINE_GUID!{IID_IDispError,
18 0xa6ef9861, 0xc720, 0x11d0, 0x93, 0x37, 0x0, 0xa0, 0xc9, 0xd, 0xca, 0xa9}
19DEFINE_GUID!{IID_IVariantChangeType,
20 0xa6ef9862, 0xc720, 0x11d0, 0x93, 0x37, 0x0, 0xa0, 0xc9, 0xd, 0xca, 0xa9}
21DEFINE_GUID!{SID_VariantConversion,
22 0x1f101481, 0xbccd, 0x11d0, 0x93, 0x36, 0x0, 0xa0, 0xc9, 0xd, 0xca, 0xa9}
23DEFINE_GUID!{SID_GetCaller,
24 0x4717cc40, 0xbcb9, 0x11d0, 0x93, 0x36, 0x0, 0xa0, 0xc9, 0xd, 0xca, 0xa9}
25DEFINE_GUID!{SID_ProvideRuntimeContext,
26 0x74a5040c, 0xdd0c, 0x48f0, 0xac, 0x85, 0x19, 0x4c, 0x32, 0x59, 0x18, 0xa}
27DEFINE_GUID!{IID_IProvideRuntimeContext,
28 0x10e2414a, 0xec59, 0x49d2, 0xbc, 0x51, 0x5a, 0xdd, 0x2c, 0x36, 0xfe, 0xbc}
29DEFINE_GUID!{IID_IObjectIdentity,
30 0xca04b7e6, 0xd21, 0x11d1, 0x8c, 0xc5, 0x0, 0xc0, 0x4f, 0xc2, 0xb0, 0x85}
31DEFINE_GUID!{IID_ICanHandleException,
32 0xc5598e60, 0xb307, 0x11d1, 0xb2, 0x7d, 0x0, 0x60, 0x08, 0xc3, 0xfb, 0xfb}
33pub const fdexNameCaseSensitive: DWORD = 0x00000001;
35pub const fdexNameEnsure: DWORD = 0x00000002;
36pub const fdexNameImplicit: DWORD = 0x00000004;
37pub const fdexNameCaseInsensitive: DWORD = 0x00000008;
38pub const fdexNameInternal: DWORD = 0x00000010;
39pub const fdexNameNoDynamicProperties: DWORD = 0x00000020;
40pub const fdexPropCanGet: DWORD = 0x00000001;
41pub const fdexPropCannotGet: DWORD = 0x00000002;
42pub const fdexPropCanPut: DWORD = 0x00000004;
43pub const fdexPropCannotPut: DWORD = 0x00000008;
44pub const fdexPropCanPutRef: DWORD = 0x00000010;
45pub const fdexPropCannotPutRef: DWORD = 0x00000020;
46pub const fdexPropNoSideEffects: DWORD = 0x00000040;
47pub const fdexPropDynamicType: DWORD = 0x00000080;
48pub const fdexPropCanCall: DWORD = 0x00000100;
49pub const fdexPropCannotCall: DWORD = 0x00000200;
50pub const fdexPropCanConstruct: DWORD = 0x00000400;
51pub const fdexPropCannotConstruct: DWORD = 0x00000800;
52pub const fdexPropCanSourceEvents: DWORD = 0x00001000;
53pub const fdexPropCannotSourceEvents: DWORD = 0x00002000;
54pub const grfdexPropCanAll: DWORD = fdexPropCanGet | fdexPropCanPut | fdexPropCanPutRef
55 | fdexPropCanCall | fdexPropCanConstruct | fdexPropCanSourceEvents;
56pub const grfdexPropCannotAll: DWORD = fdexPropCannotGet | fdexPropCannotPut | fdexPropCannotPutRef
57 | fdexPropCannotCall | fdexPropCannotConstruct | fdexPropCannotSourceEvents;
58pub const grfdexPropExtraAll: DWORD = fdexPropNoSideEffects | fdexPropDynamicType;
59pub const grfdexPropAll: DWORD = grfdexPropCanAll | grfdexPropCannotAll | grfdexPropExtraAll;
60pub const fdexEnumDefault: DWORD = 0x00000001;
61pub const fdexEnumAll: DWORD = 0x00000002;
62pub const DISPATCH_CONSTRUCT: DWORD = 0x4000;
63pub const DISPID_THIS: DISPID = -613;
64pub const DISPID_STARTENUM: DISPID = DISPID_UNKNOWN;
65RIDL!{#[uuid(0xa6ef9860, 0xc720, 0x11d0, 0x93, 0x37, 0x00, 0xa0, 0xc9, 0x0d, 0xca, 0xa9)]
69interface IDispatchEx(IDispatchExVtbl): IDispatch(IDispatchVtbl) {
70 fn GetDispID(
71 bstrName: BSTR,
72 grfdex: DWORD,
73 pid: *mut DISPID,
74 ) -> HRESULT,
75 fn InvokeEx(
76 id: DISPID,
77 lcid: LCID,
78 wFlags: WORD,
79 pdp: *mut DISPPARAMS,
80 pvarRes: *mut VARIANT,
81 pei: *mut EXCEPINFO,
82 pspCaller: *mut IServiceProvider,
83 ) -> HRESULT,
84 fn DeleteMemberByName(
85 bstrName: BSTR,
86 grfdex: DWORD,
87 ) -> HRESULT,
88 fn DeleteMemberByDispID(
89 id: DISPID,
90 ) -> HRESULT,
91 fn GetMemberProperties(
92 id: DISPID,
93 grfdexFetch: DWORD,
94 pgrfdex: *mut DWORD,
95 ) -> HRESULT,
96 fn GetMemberName(
97 id: DISPID,
98 pbstrName: *mut BSTR,
99 ) -> HRESULT,
100 fn GetNextDispID(
101 grfdex: DWORD,
102 id: DISPID,
103 pid: *mut DISPID,
104 ) -> HRESULT,
105 fn GetNameSpaceParent(
106 ppunk: *mut *mut IUnknown,
107 ) -> HRESULT,
108}}
109RIDL!{#[uuid(0xa6ef9861, 0xc720, 0x11d0, 0x93, 0x37, 0x00, 0xa0, 0xc9, 0x0d, 0xca, 0xa9)]
128interface IDispError(IDispErrorVtbl): IUnknown(IUnknownVtbl) {
129 fn QueryErrorInfo(
130 guidErrorType: GUID,
131 ppde: *mut *mut IDispError,
132 ) -> HRESULT,
133 fn GetNext(
134 ppde: *mut *mut IDispError,
135 ) -> HRESULT,
136 fn GetHresult(
137 phr: *mut HRESULT,
138 ) -> HRESULT,
139 fn GetSource(
140 pbstrSource: *mut BSTR,
141 ) -> HRESULT,
142 fn GetHelpInfo(
143 pbstrFileName: *mut BSTR,
144 pdwContext: *mut DWORD,
145 ) -> HRESULT,
146 fn GetDescription(
147 pbstrDescription: *mut BSTR,
148 ) -> HRESULT,
149}}
150RIDL!{#[uuid(0xa6ef9862, 0xc720, 0x11d0, 0x93, 0x37, 0x00, 0xa0, 0xc9, 0x0d, 0xca, 0xa9)]
152interface IVariantChangeType(IVariantChangeTypeVtbl): IUnknown(IUnknownVtbl) {
153 fn ChangeType(
154 pvarDst: *mut VARIANT,
155 pvarSrc: *mut VARIANT,
156 lcid: LCID,
157 vtNew: VARTYPE,
158 ) -> HRESULT,
159}}
160RIDL!{#[uuid(0xca04b7e6, 0x0d21, 0x11d1, 0x8c, 0xc5, 0x00, 0xc0, 0x4f, 0xc2, 0xb0, 0x85)]
162interface IObjectIdentity(IObjectIdentityVtbl): IUnknown(IUnknownVtbl) {
163 fn IsEqualObject(
164 punk: *mut IUnknown,
165 ) -> HRESULT,
166}}
167RIDL!{#[uuid(0xc5598e60, 0xb307, 0x11d1, 0xb2, 0x7d, 0x00, 0x60, 0x08, 0xc3, 0xfb, 0xfb)]
169interface ICanHandleException(ICanHandleExceptionVtbl): IUnknown(IUnknownVtbl) {
170 fn CanHandleException(
171 pExcepInfo: *mut EXCEPINFO,
172 pvar: *mut VARIANT,
173 ) -> HRESULT,
174}}
175RIDL!{#[uuid(0x10e2414a, 0xec59, 0x49d2, 0xbc, 0x51, 0x5a, 0xdd, 0x2c, 0x36, 0xfe, 0xbc)]
177interface IProvideRuntimeContext(IProvideRuntimeContextVtbl): IUnknown(IUnknownVtbl) {
178 fn GetCurrentSourceContext(
179 pdwContext: *mut DWORD_PTR,
180 pfExecutingGlobalCode: *mut VARIANT_BOOL,
181 ) -> HRESULT,
182}}
183