Extended __wine_enter_vm86 to handle pending interrupts.
[wine/multimedia.git] / include / oleauto.h
blob9f42b45e8303404612949234cb4fbb93f460cf95
1 #ifndef __WINE_OLEAUTO_H
2 #define __WINE_OLEAUTO_H
4 #include "wtypes.h"
5 #include "wine/obj_base.h"
6 #include "wine/obj_oleaut.h"
7 #include "wine/obj_errorinfo.h"
9 #ifndef __WINE__
10 #include "oaidl.h"
11 #endif
13 struct tagSAFEARRAY;
14 struct tagSAFEARRAYBOUND;
15 struct tagVARIANT;
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
23 * BSTR API
26 BSTR WINAPI SysAllocString(const OLECHAR*);
27 BSTR WINAPI SysAllocStringByteLen(LPCSTR,UINT);
28 BSTR WINAPI SysAllocStringLen(const OLECHAR*,UINT);
29 void WINAPI SysFreeString(BSTR);
30 INT WINAPI SysReAllocString(LPBSTR,const OLECHAR*);
31 int WINAPI SysReAllocStringLen(BSTR*,const OLECHAR*,UINT);
32 int WINAPI SysStringByteLen(BSTR);
33 int WINAPI SysStringLen(BSTR);
36 /*****************************************************************
37 * ErrorInfo API
40 HRESULT WINAPI SetErrorInfo(ULONG dwReserved, IErrorInfo *perrinfo);
41 HRESULT WINAPI GetErrorInfo(ULONG dwReserved, IErrorInfo **pperrinfo);
42 HRESULT WINAPI CreateErrorInfo(ICreateErrorInfo **pperrinfo);
44 /*****************************************************************
45 * SafeArray API
48 HRESULT WINAPI
49 SafeArrayAllocDescriptor(UINT cDims, struct tagSAFEARRAY **ppsaOut);
51 HRESULT WINAPI
52 SafeArrayAllocData(struct tagSAFEARRAY *psa);
54 struct tagSAFEARRAY WINAPI
55 *SafeArrayCreate(VARTYPE vt, UINT cDims, struct tagSAFEARRAYBOUND *rgsabound);
57 HRESULT WINAPI
58 SafeArrayDestroyDescriptor(struct tagSAFEARRAY *psa);
60 HRESULT WINAPI
61 SafeArrayPutElement(struct tagSAFEARRAY *psa, LONG *rgIndices, void *pv);
63 HRESULT WINAPI
64 SafeArrayGetElement(struct tagSAFEARRAY *psa, LONG *rgIndices, void *pv);
66 HRESULT WINAPI
67 SafeArrayLock(struct tagSAFEARRAY *psa);
69 HRESULT WINAPI
70 SafeArrayUnlock(struct tagSAFEARRAY *psa);
72 HRESULT WINAPI
73 SafeArrayGetUBound(struct tagSAFEARRAY *psa, UINT nDim, LONG *plUbound);
75 HRESULT WINAPI
76 SafeArrayGetLBound(struct tagSAFEARRAY *psa, UINT nDim, LONG *plLbound);
78 UINT WINAPI
79 SafeArrayGetDim(struct tagSAFEARRAY *psa);
81 UINT WINAPI
82 SafeArrayGetElemsize(struct tagSAFEARRAY *psa);
84 HRESULT WINAPI
85 SafeArrayAccessData(struct tagSAFEARRAY *psa, void **ppvData);
87 HRESULT WINAPI
88 SafeArrayUnaccessData(struct tagSAFEARRAY *psa);
90 HRESULT WINAPI
91 SafeArrayPtrOfIndex(struct tagSAFEARRAY *psa, LONG *rgIndices, void **ppvData);
93 HRESULT WINAPI
94 SafeArrayCopyData(struct tagSAFEARRAY *psaSource, struct tagSAFEARRAY **psaTarget);
96 HRESULT WINAPI
97 SafeArrayDestroyData(struct tagSAFEARRAY *psa);
99 HRESULT WINAPI
100 SafeArrayDestroy(struct tagSAFEARRAY *psa);
102 HRESULT WINAPI
103 SafeArrayCopy(struct tagSAFEARRAY *psa, struct tagSAFEARRAY **ppsaOut);
105 struct tagSAFEARRAY WINAPI
106 *SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements);
108 HRESULT WINAPI
109 SafeArrayRedim(struct tagSAFEARRAY *psa, struct tagSAFEARRAYBOUND *psaboundNew);
112 /* These are macros that help accessing the VARIANT date type.
114 #ifdef __cplusplus
115 #define V_UNION(A, B) ((A)->B)
116 #define V_VT(A) ((A)->vt)
117 #else
118 #define V_UNION(A, B) ((A)->u.B)
119 #define V_VT(A) ((A)->vt)
120 #endif /* cplusplus */
122 #define V_ISBYREF(A) (V_VT(A)&VT_BYREF)
123 #define V_ISARRAY(A) (V_VT(A)&VT_ARRAY)
124 #define V_ISVECTOR(A) (V_VT(A)&VT_VECTOR)
125 #define V_NONE(A) V_I2(A)
127 #define V_UI1(A) V_UNION(A, bVal)
128 #define V_UI1REF(A) V_UNION(A, pbVal)
129 #define V_I2(A) V_UNION(A, iVal)
130 #define V_I2REF(A) V_UNION(A, piVal)
131 #define V_I4(A) V_UNION(A, lVal)
132 #define V_I4REF(A) V_UNION(A, plVal)
133 #define V_R4(A) V_UNION(A, fltVal)
134 #define V_R4REF(A) V_UNION(A, pfltVal)
135 #define V_R8(A) V_UNION(A, dblVal)
136 #define V_R8REF(A) V_UNION(A, pdblVal)
137 #define V_I1(A) V_UNION(A, cVal)
138 #define V_I1REF(A) V_UNION(A, pcVal)
139 #define V_UI2(A) V_UNION(A, uiVal)
140 #define V_UI2REF(A) V_UNION(A, puiVal)
141 #define V_UI4(A) V_UNION(A, ulVal)
142 #define V_UI4REF(A) V_UNION(A, pulVal)
143 #define V_INT(A) V_UNION(A, intVal)
144 #define V_INTREF(A) V_UNION(A, pintVal)
145 #define V_UINT(A) V_UNION(A, uintVal)
146 #define V_UINTREF(A) V_UNION(A, puintVal)
147 #define V_CY(A) V_UNION(A, cyVal)
148 #define V_CYREF(A) V_UNION(A, pcyVal)
149 #define V_DATE(A) V_UNION(A, date)
150 #define V_DATEREF(A) V_UNION(A, pdate)
151 #define V_BSTR(A) V_UNION(A, bstrVal)
152 #define V_BSTRREF(A) V_UNION(A, pbstrVal)
153 #define V_DISPATCH(A) V_UNION(A, pdispVal)
154 #define V_DISPATCHREF(A) V_UNION(A, ppdispVal)
155 #define V_ERROR(A) V_UNION(A, scode)
156 #define V_ERRORREF(A) V_UNION(A, pscode)
157 #define V_BOOL(A) V_UNION(A, boolVal)
158 #define V_BOOLREF(A) V_UNION(A, pboolVal)
159 #define V_UNKNOWN(A) V_UNION(A, punkVal)
160 #define V_UNKNOWNREF(A) V_UNION(A, ppunkVal)
161 #define V_VARIANTREF(A) V_UNION(A, pvarVal)
162 #define V_ARRAY(A) V_UNION(A, parray)
163 #define V_ARRAYREF(A) V_UNION(A, pparray)
164 #define V_BYREF(A) V_UNION(A, byref)
165 #define V_DECIMAL(A) V_UNION(A, decVal)
166 #define V_DECIMALREF(A) V_UNION(A, pdecVal)
169 * VARIANT API
172 void WINAPI VariantInit(struct tagVARIANT* pvarg);
173 HRESULT WINAPI VariantClear(struct tagVARIANT* pvarg);
174 HRESULT WINAPI VariantCopy(struct tagVARIANT* pvargDest, struct tagVARIANT* pvargSrc);
175 HRESULT WINAPI VariantCopyInd(struct tagVARIANT* pvargDest, struct tagVARIANT* pvargSrc);
176 HRESULT WINAPI VariantChangeType(struct tagVARIANT* pvargDest, struct tagVARIANT* pvargSrc,
177 USHORT wFlags, VARTYPE vt);
178 HRESULT WINAPI VariantChangeTypeEx(struct tagVARIANT* pvargDest, struct tagVARIANT* pvargSrc,
179 LCID lcid, USHORT wFlags, VARTYPE vt);
182 * These flags are used for the VariantChangeType and VariantChangeTypeEx APIs.
186 * This one is of general use.
188 #define VARIANT_NOVALUEPROP 0x1
190 * This one is used for conversions of VT_BOOL to VT_BSTR,
191 * the API will convert to "True"|"False" instead of "-1"|"0".
193 #define VARIANT_ALPHABOOL 0x2
195 * This one is used for conversions to or from a VT_BSTR string,
196 * it passes LOCALE_NOUSEROVERRIDE to the core (low-level) coercion routines.
197 * This means it will use the system default locale settings instead of custom
198 * local settings.
200 #define VARIANT_NOUSEROVERRIDE 0x4
204 * VARTYPE Coercion API
207 /* Omits the date portion and return only the time value.
209 #define VAR_TIMEVALUEONLY ((DWORD)0x00000001)
210 /* Omits the time portion and return only the date value.
212 #define VAR_DATEVALUEONLY ((DWORD)0x00000002)
215 HRESULT WINAPI VarUI1FromI2(short sIn, BYTE* pbOut);
216 HRESULT WINAPI VarUI1FromI4(LONG lIn, BYTE* pbOut);
217 HRESULT WINAPI VarUI1FromR4(FLOAT fltIn, BYTE* pbOut);
218 HRESULT WINAPI VarUI1FromR8(double dblIn, BYTE* pbOut);
219 HRESULT WINAPI VarUI1FromDate(DATE dateIn, BYTE* pbOut);
220 HRESULT WINAPI VarUI1FromBool(VARIANT_BOOL boolIn, BYTE* pbOut);
221 HRESULT WINAPI VarUI1FromI1(CHAR cIn, BYTE*pbOut);
222 HRESULT WINAPI VarUI1FromUI2(USHORT uiIn, BYTE*pbOut);
223 HRESULT WINAPI VarUI1FromUI4(ULONG ulIn, BYTE*pbOut);
224 HRESULT WINAPI VarUI1FromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, BYTE* pbOut);
225 HRESULT WINAPI VarUI1FromCy(CY cyIn, BYTE* pbOut);
226 HRESULT WINAPI VarUI1FromDec(DECIMAL* pdecIn, BYTE* pbOut);
227 HRESULT WINAPI VarUI1FromDisp(IDispatch* pdispIn, LCID lcid, BYTE* pbOut);
229 HRESULT WINAPI VarI2FromUI1(BYTE bIn, short* psOut);
230 HRESULT WINAPI VarI2FromI4(LONG lIn, short* psOut);
231 HRESULT WINAPI VarI2FromR4(FLOAT fltIn, short* psOut);
232 HRESULT WINAPI VarI2FromR8(double dblIn, short* psOut);
233 HRESULT WINAPI VarI2FromDate(DATE dateIn, short* psOut);
234 HRESULT WINAPI VarI2FromBool(VARIANT_BOOL boolIn, short* psOut);
235 HRESULT WINAPI VarI2FromI1(CHAR cIn, short*psOut);
236 HRESULT WINAPI VarI2FromUI2(USHORT uiIn, short*psOut);
237 HRESULT WINAPI VarI2FromUI4(ULONG ulIn, short*psOut);
238 HRESULT WINAPI VarI2FromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, short* psOut);
239 HRESULT WINAPI VarI2FromCy(CY cyIn, short* psOut);
240 HRESULT WINAPI VarI2FromDec(DECIMAL* pdecIn, short* psOut);
241 HRESULT WINAPI VarI2FromDisp(IDispatch* pdispIn, LCID lcid, short* psOut);
243 HRESULT WINAPI VarI4FromUI1(BYTE bIn, LONG* plOut);
244 HRESULT WINAPI VarI4FromI2(short sIn, LONG* plOut);
245 HRESULT WINAPI VarI4FromR4(FLOAT fltIn, LONG* plOut);
246 HRESULT WINAPI VarI4FromR8(double dblIn, LONG* plOut);
247 HRESULT WINAPI VarI4FromDate(DATE dateIn, LONG* plOut);
248 HRESULT WINAPI VarI4FromBool(VARIANT_BOOL boolIn, LONG* plOut);
249 HRESULT WINAPI VarI4FromI1(CHAR cIn, LONG* plOut);
250 HRESULT WINAPI VarI4FromUI2(USHORT uiIn, LONG*plOut);
251 HRESULT WINAPI VarI4FromUI4(ULONG ulIn, LONG*plOut);
252 HRESULT WINAPI VarI4FromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, LONG* plOut);
253 HRESULT WINAPI VarI4FromCy(CY cyIn, LONG* plOut);
254 HRESULT WINAPI VarI4FromDec(DECIMAL* pdecIn, LONG* plOut);
255 HRESULT WINAPI VarI4FromDisp(IDispatch* pdispIn, LCID lcid, LONG* plOut);
257 HRESULT WINAPI VarR4FromUI1(BYTE bIn, FLOAT* pfltOut);
258 HRESULT WINAPI VarR4FromI2(short sIn, FLOAT* pfltOut);
259 HRESULT WINAPI VarR4FromI4(LONG lIn, FLOAT* pfltOut);
260 HRESULT WINAPI VarR4FromR8(double dblIn, FLOAT* pfltOut);
261 HRESULT WINAPI VarR4FromDate(DATE dateIn, FLOAT* pfltOut);
262 HRESULT WINAPI VarR4FromBool(VARIANT_BOOL boolIn, FLOAT* pfltOut);
263 HRESULT WINAPI VarR4FromI1(CHAR cIn, FLOAT*pfltOut);
264 HRESULT WINAPI VarR4FromUI2(USHORT uiIn, FLOAT*pfltOut);
265 HRESULT WINAPI VarR4FromUI4(ULONG ulIn, FLOAT*pfltOut);
266 HRESULT WINAPI VarR4FromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, FLOAT*pfltOut);
267 HRESULT WINAPI VarR4FromCy(CY cyIn, FLOAT* pfltOut);
268 HRESULT WINAPI VarR4FromDec(DECIMAL* pdecIn, FLOAT* pfltOut);
269 HRESULT WINAPI VarR4FromDisp(IDispatch* pdispIn, LCID lcid, FLOAT* pfltOut);
271 HRESULT WINAPI VarR8FromUI1(BYTE bIn, double* pdblOut);
272 HRESULT WINAPI VarR8FromI2(short sIn, double* pdblOut);
273 HRESULT WINAPI VarR8FromI4(LONG lIn, double* pdblOut);
274 HRESULT WINAPI VarR8FromR4(FLOAT fltIn, double* pdblOut);
275 HRESULT WINAPI VarR8FromDate(DATE dateIn, double* pdblOut);
276 HRESULT WINAPI VarR8FromBool(VARIANT_BOOL boolIn, double* pdblOut);
277 HRESULT WINAPI VarR8FromI1(CHAR cIn, double*pdblOut);
278 HRESULT WINAPI VarR8FromUI2(USHORT uiIn, double*pdblOut);
279 HRESULT WINAPI VarR8FromUI4(ULONG ulIn, double*pdblOut);
280 HRESULT WINAPI VarR8FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, double*pdblOut);
281 HRESULT WINAPI VarR8FromCy(CY cyIn, double* pdblOut);
282 HRESULT WINAPI VarR8FromDec(DECIMAL* pdecIn, double* pdblOut);
283 HRESULT WINAPI VarR8FromDisp(IDispatch* pdispIn, LCID lcid, double* pdblOut);
285 HRESULT WINAPI VarDateFromUI1(BYTE bIn, DATE* pdateOut);
286 HRESULT WINAPI VarDateFromI2(short sIn, DATE* pdateOut);
287 HRESULT WINAPI VarDateFromI4(LONG lIn, DATE* pdateOut);
288 HRESULT WINAPI VarDateFromR4(FLOAT fltIn, DATE* pdateOut);
289 HRESULT WINAPI VarDateFromR8(double dblIn, DATE* pdateOut);
290 HRESULT WINAPI VarDateFromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, DATE*pdateOut);
291 HRESULT WINAPI VarDateFromI1(CHAR cIn, DATE*pdateOut);
292 HRESULT WINAPI VarDateFromUI2(USHORT uiIn, DATE*pdateOut);
293 HRESULT WINAPI VarDateFromUI4(ULONG ulIn, DATE*pdateOut);
294 HRESULT WINAPI VarDateFromBool(VARIANT_BOOL boolIn, DATE* pdateOut);
295 HRESULT WINAPI VarDateFromCy(CY cyIn, DATE* pdateOut);
296 HRESULT WINAPI VarDateFromDec(DECIMAL* pdecIn, DATE* pdateOut);
297 HRESULT WINAPI VarDateFromDisp(IDispatch* pdispIn, LCID lcid, DATE* pdateOut);
299 HRESULT WINAPI VarCyFromUI1(BYTE bIn, CY* pcyOut);
300 HRESULT WINAPI VarCyFromI2(short sIn, CY* pcyOut);
301 HRESULT WINAPI VarCyFromI4(LONG lIn, CY* pcyOut);
302 HRESULT WINAPI VarCyFromR4(FLOAT fltIn, CY* pcyOut);
303 HRESULT WINAPI VarCyFromR8(double dblIn, CY* pcyOut);
304 HRESULT WINAPI VarCyFromDate(DATE dateIn, CY* pcyOut);
305 HRESULT WINAPI VarCyFromStr(OLECHAR *strIn, LCID lcid, ULONG dwFlags, CY *pcyOut);
306 HRESULT WINAPI VarCyFromBool(VARIANT_BOOL boolIn, CY* pcyOut);
307 HRESULT WINAPI VarCyFromI1(signed char cIn, CY*pcyOut);
308 HRESULT WINAPI VarCyFromUI2(USHORT uiIn, CY*pcyOut);
309 HRESULT WINAPI VarCyFromUI4(ULONG ulIn, CY*pcyOut);
310 HRESULT WINAPI VarCyFromDec(DECIMAL*pdecIn, CY*pcyOut);
311 HRESULT WINAPI VarCyFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, CY* pcyOut);
312 HRESULT WINAPI VarCyFromDisp(IDispatch* pdispIn, LCID lcid, CY* pcyOut);
314 HRESULT WINAPI VarBstrFromUI1(BYTE bVal, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
315 HRESULT WINAPI VarBstrFromI2(short iVal, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
316 HRESULT WINAPI VarBstrFromI4(LONG lIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
317 HRESULT WINAPI VarBstrFromR4(FLOAT fltIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
318 HRESULT WINAPI VarBstrFromR8(double dblIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
319 HRESULT WINAPI VarBstrFromDate(DATE dateIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
320 HRESULT WINAPI VarBstrFromBool(VARIANT_BOOL boolIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
321 HRESULT WINAPI VarBstrFromI1(CHAR cIn, LCID lcid, ULONG dwFlags, BSTR*pbstrOut);
322 HRESULT WINAPI VarBstrFromUI2(USHORT uiIn, LCID lcid, ULONG dwFlags, BSTR*pbstrOut);
323 HRESULT WINAPI VarBstrFromUI4(ULONG ulIn, LCID lcid, ULONG dwFlags, BSTR*pbstrOut);
324 HRESULT WINAPI VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
325 HRESULT WINAPI VarBstrFromDec(DECIMAL* pdecIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
326 HRESULT WINAPI VarBstrFromDisp(IDispatch* pdispIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
328 HRESULT WINAPI VarBoolFromUI1(BYTE bIn, VARIANT_BOOL* pboolOut);
329 HRESULT WINAPI VarBoolFromI2(short sIn, VARIANT_BOOL* pboolOut);
330 HRESULT WINAPI VarBoolFromI4(LONG lIn, VARIANT_BOOL* pboolOut);
331 HRESULT WINAPI VarBoolFromR4(FLOAT fltIn, VARIANT_BOOL* pboolOut);
332 HRESULT WINAPI VarBoolFromR8(double dblIn, VARIANT_BOOL* pboolOut);
333 HRESULT WINAPI VarBoolFromDate(DATE dateIn, VARIANT_BOOL* pboolOut);
334 HRESULT WINAPI VarBoolFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, VARIANT_BOOL* pboolOut);
335 HRESULT WINAPI VarBoolFromI1(CHAR cIn, VARIANT_BOOL*pboolOut);
336 HRESULT WINAPI VarBoolFromUI2(USHORT uiIn, VARIANT_BOOL*pboolOut);
337 HRESULT WINAPI VarBoolFromUI4(ULONG ulIn, VARIANT_BOOL*pboolOut);
338 HRESULT WINAPI VarBoolFromCy(CY cyIn, VARIANT_BOOL* pboolOut);
339 HRESULT WINAPI VarBoolFromDec(DECIMAL* pdecIn, VARIANT_BOOL* pboolOut);
340 HRESULT WINAPI VarBoolFromDisp(IDispatch* pdispIn, LCID lcid, VARIANT_BOOL* pboolOut);
342 HRESULT WINAPI VarI1FromUI1(BYTE bIn, CHAR*pcOut);
343 HRESULT WINAPI VarI1FromI2(short uiIn, CHAR*pcOut);
344 HRESULT WINAPI VarI1FromI4(LONG lIn, CHAR*pcOut);
345 HRESULT WINAPI VarI1FromR4(FLOAT fltIn, CHAR*pcOut);
346 HRESULT WINAPI VarI1FromR8(double dblIn, CHAR*pcOut);
347 HRESULT WINAPI VarI1FromDate(DATE dateIn, CHAR*pcOut);
348 HRESULT WINAPI VarI1FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, CHAR*pcOut);
349 HRESULT WINAPI VarI1FromBool(VARIANT_BOOL boolIn, CHAR*pcOut);
350 HRESULT WINAPI VarI1FromUI2(USHORT uiIn, CHAR*pcOut);
351 HRESULT WINAPI VarI1FromUI4(ULONG ulIn, CHAR*pcOut);
352 HRESULT WINAPI VarI1FromCy(CY cyIn, CHAR*pcOut);
353 HRESULT WINAPI VarI1FromDec(DECIMAL* pdecIn, CHAR* pcOut);
354 HRESULT WINAPI VarI1FromDisp(IDispatch* pdispIn, LCID lcid, CHAR* pcOut);
356 HRESULT WINAPI VarUI2FromUI1(BYTE bIn, USHORT*puiOut);
357 HRESULT WINAPI VarUI2FromI2(short uiIn, USHORT*puiOut);
358 HRESULT WINAPI VarUI2FromI4(LONG lIn, USHORT*puiOut);
359 HRESULT WINAPI VarUI2FromR4(FLOAT fltIn, USHORT*puiOut);
360 HRESULT WINAPI VarUI2FromR8(double dblIn, USHORT*puiOut);
361 HRESULT WINAPI VarUI2FromDate(DATE dateIn, USHORT*puiOut);
362 HRESULT WINAPI VarUI2FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, USHORT*puiOut);
363 HRESULT WINAPI VarUI2FromBool(VARIANT_BOOL boolIn, USHORT*puiOut);
364 HRESULT WINAPI VarUI2FromI1(CHAR cIn, USHORT*puiOut);
365 HRESULT WINAPI VarUI2FromUI4(ULONG ulIn, USHORT*puiOut);
366 HRESULT WINAPI VarUI2FromCy(CY cyIn, USHORT*puiOut);
367 HRESULT WINAPI VarUI2FromDec(DECIMAL* pdecIn, USHORT* puiOut);
368 HRESULT WINAPI VarUI2FromDisp(IDispatch* pdispIn, LCID lcid, USHORT* puiOut);
370 HRESULT WINAPI VarUI4FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, ULONG*pulOut);
371 HRESULT WINAPI VarUI4FromUI1(BYTE bIn, ULONG*pulOut);
372 HRESULT WINAPI VarUI4FromI2(short uiIn, ULONG*pulOut);
373 HRESULT WINAPI VarUI4FromI4(LONG lIn, ULONG*pulOut);
374 HRESULT WINAPI VarUI4FromR4(FLOAT fltIn, ULONG*pulOut);
375 HRESULT WINAPI VarUI4FromR8(double dblIn, ULONG*pulOut);
376 HRESULT WINAPI VarUI4FromDate(DATE dateIn, ULONG*pulOut);
377 HRESULT WINAPI VarUI4FromBool(VARIANT_BOOL boolIn, ULONG*pulOut);
378 HRESULT WINAPI VarUI4FromI1(CHAR cIn, ULONG*pulOut);
379 HRESULT WINAPI VarUI4FromUI2(USHORT uiIn, ULONG*pulOut);
380 HRESULT WINAPI VarUI4FromCy(CY cyIn, ULONG*pulOut);
381 HRESULT WINAPI VarUI4FromDec(DECIMAL* pdecIn, ULONG* pulOut);
382 HRESULT WINAPI VarUI4FromDisp(IDispatch* pdispIn, LCID lcid, ULONG* pulOut);
384 HRESULT WINAPI VarDecFromUI1(BYTE bIn, DECIMAL*pdecOut);
385 HRESULT WINAPI VarDecFromI2(short uiIn, DECIMAL*pdecOut);
386 HRESULT WINAPI VarDecFromI4(LONG lIn, DECIMAL*pdecOut);
387 HRESULT WINAPI VarDecFromR4(FLOAT fltIn, DECIMAL*pdecOut);
388 HRESULT WINAPI VarDecFromR8(double dblIn, DECIMAL*pdecOut);
389 HRESULT WINAPI VarDecFromDate(DATE dateIn, DECIMAL*pdecOut);
390 HRESULT WINAPI VarDecFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, DECIMAL* pdecOut);
391 HRESULT WINAPI VarDecFromBool(VARIANT_BOOL boolIn, DECIMAL* pdecOut);
392 HRESULT WINAPI VarDecFromI1(CHAR cIn, DECIMAL* pdecOut);
393 HRESULT WINAPI VarDecFromUI2(USHORT uiIn, DECIMAL* pdecOut);
394 HRESULT WINAPI VarDecFromUI4(ULONG ulIn, DECIMAL* pdecOut);
395 HRESULT WINAPI VarDecFromCy(CY cyIn, DECIMAL* pdecOut);
396 HRESULT WINAPI VarDecFromDisp(IDispatch* pdispIn, LCID lcid, DECIMAL* pdecOut);
400 #define VarUI4FromUI4( in, pOut ) ( *(pOut) = (in) )
401 #define VarI4FromI4( in, pOut ) ( *(pOut) = (in) )
403 #define VarUI1FromInt VarUI1FromI4
404 #define VarUI1FromUint VarUI1FromUI4
405 #define VarI2FromInt VarI2FromI4
406 #define VarI2FromUint VarI2FromUI4
407 #define VarI4FromInt VarI4FromI4
408 #define VarI4FromUint VarI4FromUI4
409 #define VarR4FromInt VarR4FromI4
410 #define VarR4FromUint VarR4FromUI4
411 #define VarR8FromInt VarR8FromI4
412 #define VarR8FromUint VarR8FromUI4
413 #define VarDateFromInt VarDateFromI4
414 #define VarDateFromUint VarDateFromUI4
415 #define VarCyFromInt VarCyFromI4
416 #define VarCyFromUint VarCyFromUI4
417 #define VarBstrFromInt VarBstrFromI4
418 #define VarBstrFromUint VarBstrFromUI4
419 #define VarBoolFromInt VarBoolFromI4
420 #define VarBoolFromUint VarBoolFromUI4
421 #define VarI1FromInt VarI1FromI4
422 #define VarI1FromUint VarI1FromUI4
423 #define VarUI2FromInt VarUI2FromI4
424 #define VarUI2FromUint VarUI2FromUI4
425 #define VarUI4FromInt VarUI4FromI4
426 #define VarUI4FromUint VarUI4FromUI4
427 #define VarDecFromInt VarDecFromI4
428 #define VarDecFromUint VarDecFromUI4
429 #define VarIntFromUI1 VarI4FromUI1
430 #define VarIntFromI2 VarI4FromI2
431 #define VarIntFromI4 VarI4FromI4
432 #define VarIntFromR4 VarI4FromR4
433 #define VarIntFromR8 VarI4FromR8
434 #define VarIntFromDate VarI4FromDate
435 #define VarIntFromCy VarI4FromCy
436 #define VarIntFromStr VarI4FromStr
437 #define VarIntFromDisp VarI4FromDisp
438 #define VarIntFromBool VarI4FromBool
439 #define VarIntFromI1 VarI4FromI1
440 #define VarIntFromUI2 VarI4FromUI2
441 #define VarIntFromUI4 VarI4FromUI4
442 #define VarIntFromDec VarI4FromDec
443 #define VarIntFromUint VarI4FromUI4
444 #define VarUintFromUI1 VarUI4FromUI1
445 #define VarUintFromI2 VarUI4FromI2
446 #define VarUintFromI4 VarUI4FromI4
447 #define VarUintFromR4 VarUI4FromR4
448 #define VarUintFromR8 VarUI4FromR8
449 #define VarUintFromDate VarUI4FromDate
450 #define VarUintFromCy VarUI4FromCy
451 #define VarUintFromStr VarUI4FromStr
452 #define VarUintFromDisp VarUI4FromDisp
453 #define VarUintFromBool VarUI4FromBool
454 #define VarUintFromI1 VarUI4FromI1
455 #define VarUintFromUI2 VarUI4FromUI2
456 #define VarUintFromUI4 VarUI4FromUI4
457 #define VarUintFromDec VarUI4FromDec
458 #define VarUintFromInt VarUI4FromI4
461 * Variant Math operations
463 #define VARCMP_LT 0
464 #define VARCMP_EQ 1
465 #define VARCMP_GT 2
466 #define VARCMP_NULL 3
468 HRESULT WINAPI VarAdd(LPVARIANT,LPVARIANT,LPVARIANT);
469 HRESULT WINAPI VarAnd(LPVARIANT,LPVARIANT,LPVARIANT);
470 HRESULT WINAPI VarCat(LPVARIANT,LPVARIANT,LPVARIANT);
471 HRESULT WINAPI VarDiv(LPVARIANT,LPVARIANT,LPVARIANT);
472 HRESULT WINAPI VarEqv(LPVARIANT,LPVARIANT,LPVARIANT);
473 HRESULT WINAPI VarIdiv(LPVARIANT,LPVARIANT,LPVARIANT);
474 HRESULT WINAPI VarImp(LPVARIANT,LPVARIANT,LPVARIANT);
475 HRESULT WINAPI VarMod(LPVARIANT,LPVARIANT,LPVARIANT);
476 HRESULT WINAPI VarMul(LPVARIANT,LPVARIANT,LPVARIANT);
477 HRESULT WINAPI VarOr(LPVARIANT,LPVARIANT,LPVARIANT);
478 HRESULT WINAPI VarPow(LPVARIANT,LPVARIANT,LPVARIANT);
479 HRESULT WINAPI VarSub(LPVARIANT,LPVARIANT,LPVARIANT);
480 HRESULT WINAPI VarXor(LPVARIANT,LPVARIANT,LPVARIANT);
482 HRESULT WINAPI VarAbs(LPVARIANT,LPVARIANT);
483 HRESULT WINAPI VarFix(LPVARIANT,LPVARIANT);
484 HRESULT WINAPI VarInt(LPVARIANT,LPVARIANT);
485 HRESULT WINAPI VarNeg(LPVARIANT,LPVARIANT);
486 HRESULT WINAPI VarNot(LPVARIANT,LPVARIANT);
488 HRESULT WINAPI VarRound(LPVARIANT,int,LPVARIANT);
490 HRESULT WINAPI VarCmp(LPVARIANT,LPVARIANT,LCID,ULONG);
494 typedef struct tagPARAMDATA {
495 OLECHAR * szName; /* parameter name */
496 VARTYPE vt; /* parameter type */
497 } PARAMDATA, * LPPARAMDATA;
499 typedef struct tagMETHODDATA {
500 OLECHAR * szName; /* method name */
501 PARAMDATA * ppdata; /* pointer to an array of PARAMDATAs */
502 DISPID dispid; /* method ID */
503 UINT iMeth; /* method index */
504 CALLCONV cc; /* calling convention */
505 UINT cArgs; /* count of arguments */
506 WORD wFlags; /* same wFlags as on IDispatch::Invoke() */
507 VARTYPE vtReturn;
508 } METHODDATA, * LPMETHODDATA;
510 typedef struct tagINTERFACEDATA {
511 METHODDATA * pmethdata; /* pointer to an array of METHODDATAs */
512 UINT cMembers; /* count of members */
513 } INTERFACEDATA, * LPINTERFACEDATA;
515 typedef enum tagREGKIND
517 REGKIND_DEFAULT,
518 REGKIND_REGISTER,
519 REGKIND_NONE
520 } REGKIND;
523 INT WINAPI DosDateTimeToVariantTime(USHORT,USHORT,DATE*);
525 ULONG WINAPI LHashValOfNameSysA(SYSKIND syskind,LCID lcid,LPCSTR szName);
526 ULONG WINAPI LHashValOfNameSys (SYSKIND syskind,LCID lcid,LPCOLESTR szName);
528 HRESULT WINAPI DispGetParam(DISPPARAMS* pdispparams, UINT position,
529 VARTYPE vtTarg, VARIANT* pvarResult, UINT* puArgErr);
530 HRESULT WINAPI DispGetIDsOfNames(ITypeInfo* ptinfo, OLECHAR** rgszNames,
531 UINT cNames, DISPID* rgdispid);
532 HRESULT WINAPI DispInvoke(void* _this, ITypeInfo* ptinfo, DISPID dispidMember,
533 WORD wFlags, DISPPARAMS* pparams, VARIANT* pvarResult,
534 EXCEPINFO* pexcepinfo, UINT* puArgErr);
535 HRESULT WINAPI CreateDispTypeInfo(INTERFACEDATA* pidata, LCID lcid,
536 ITypeInfo** pptinfo);
537 HRESULT WINAPI CreateStdDispatch(IUnknown* punkOuter, void* pvThis,
538 ITypeInfo* ptinfo, IUnknown** ppunkStdDisp);
539 HRESULT WINAPI DispCallFunc(void* pvInstance, ULONG oVft, CALLCONV cc,
540 VARTYPE vtReturn, UINT cActuals, VARTYPE* prgvt,
541 VARIANTARG** prgpvarg, VARIANT* pvargResult);
545 * TypeLib API
548 HRESULT WINAPI CreateTypeLib(SYSKIND,const OLECHAR*,ICreateTypeLib**);
549 HRESULT WINAPI CreateTypeLib2(SYSKIND,LPCOLESTR,ICreateTypeLib2**);
550 HRESULT WINAPI LoadRegTypeLib(REFGUID,WORD,WORD,LCID,ITypeLib**);
551 HRESULT WINAPI LoadTypeLib(const OLECHAR*,ITypeLib**);
552 HRESULT WINAPI LoadTypeLibEx(LPCOLESTR,REGKIND,ITypeLib**);
553 HRESULT WINAPI QueryPathOfRegTypeLib(REFGUID,WORD,WORD,LCID,LPBSTR);
554 HRESULT WINAPI RegisterTypeLib(ITypeLib*,OLECHAR*,OLECHAR*);
555 HRESULT WINAPI UnRegisterTypeLib(REFGUID,WORD,WORD,LCID,SYSKIND);
557 #ifdef __cplusplus
558 } /* extern "C" */
559 #endif
562 #endif /*__WINE_OLEAUTO_H*/