Move comm16.c to the 16-bit sources.
[wine/multimedia.git] / include / oleauto.h
blobbc9ae0e393b7116a0c488f0726b8ad7534ce97a1
1 /*
2 * Copyright (C) the Wine project
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
19 #ifndef __WINE_OLEAUTO_H
20 #define __WINE_OLEAUTO_H
22 #include "winbase.h"
23 #define __WINE_INCLUDE_OAIDL
24 #include "oaidl.h"
25 #undef __WINE_INCLUDE_OAIDL
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 DEFINE_OLEGUID(IID_StdOle, 0x00020430,0,0);
34 * BSTR API
37 BSTR WINAPI SysAllocString(const OLECHAR*);
38 BSTR WINAPI SysAllocStringByteLen(LPCSTR,UINT);
39 BSTR WINAPI SysAllocStringLen(const OLECHAR*,UINT);
40 void WINAPI SysFreeString(BSTR);
41 INT WINAPI SysReAllocString(LPBSTR,const OLECHAR*);
42 int WINAPI SysReAllocStringLen(BSTR*,const OLECHAR*,UINT);
43 int WINAPI SysStringByteLen(BSTR);
44 int WINAPI SysStringLen(BSTR);
47 /*****************************************************************
48 * ErrorInfo API
51 HRESULT WINAPI SetErrorInfo(ULONG,IErrorInfo*);
52 HRESULT WINAPI GetErrorInfo(ULONG,IErrorInfo**);
53 HRESULT WINAPI CreateErrorInfo(ICreateErrorInfo**);
55 /*****************************************************************
56 * SafeArray API
59 SAFEARRAY* WINAPI SafeArrayCreate(VARTYPE,UINT,SAFEARRAYBOUND*);
60 SAFEARRAY* WINAPI SafeArrayCreateEx(VARTYPE,UINT,SAFEARRAYBOUND*,LPVOID);
61 SAFEARRAY* WINAPI SafeArrayCreateVector(VARTYPE,LONG,ULONG);
62 SAFEARRAY* WINAPI SafeArrayCreateVectorEx(VARTYPE,LONG,ULONG,LPVOID);
64 HRESULT WINAPI SafeArrayAllocDescriptor(UINT,SAFEARRAY**);
65 HRESULT WINAPI SafeArrayAllocDescriptorEx(VARTYPE,UINT,SAFEARRAY**);
66 HRESULT WINAPI SafeArrayAllocData(SAFEARRAY*);
67 HRESULT WINAPI SafeArrayDestroyDescriptor(SAFEARRAY*);
68 HRESULT WINAPI SafeArrayPutElement(SAFEARRAY*,LONG*,void*);
69 HRESULT WINAPI SafeArrayGetElement(SAFEARRAY*,LONG*,void*);
70 HRESULT WINAPI SafeArrayLock(SAFEARRAY*);
71 HRESULT WINAPI SafeArrayUnlock(SAFEARRAY*);
72 HRESULT WINAPI SafeArrayGetUBound(SAFEARRAY*,UINT,LONG*);
73 HRESULT WINAPI SafeArrayGetLBound(SAFEARRAY*,UINT,LONG*);
74 UINT WINAPI SafeArrayGetDim(SAFEARRAY*);
75 UINT WINAPI SafeArrayGetElemsize(SAFEARRAY*);
76 HRESULT WINAPI SafeArrayGetVartype(SAFEARRAY*,VARTYPE*);
77 HRESULT WINAPI SafeArrayAccessData(SAFEARRAY*,void**);
78 HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY*);
79 HRESULT WINAPI SafeArrayPtrOfIndex(SAFEARRAY*,LONG*,void **);
80 HRESULT WINAPI SafeArrayCopyData(SAFEARRAY*,SAFEARRAY*);
81 HRESULT WINAPI SafeArrayDestroyData(SAFEARRAY*);
82 HRESULT WINAPI SafeArrayDestroy(SAFEARRAY*);
83 HRESULT WINAPI SafeArrayCopy(SAFEARRAY*,SAFEARRAY**);
84 HRESULT WINAPI SafeArrayRedim(SAFEARRAY*,SAFEARRAYBOUND*);
85 HRESULT WINAPI SafeArraySetRecordInfo(SAFEARRAY*,IRecordInfo*);
86 HRESULT WINAPI SafeArrayGetRecordInfo(SAFEARRAY*,IRecordInfo**);
87 HRESULT WINAPI SafeArraySetIID(SAFEARRAY*,REFGUID);
88 HRESULT WINAPI SafeArrayGetIID(SAFEARRAY*,GUID*);
90 /* These are macros that help accessing the VARIANT date type.
92 #if (__STDC__ && !defined(_FORCENAMELESSUNION)) || defined(NONAMELESSUNION)
93 #define V_UNION(A, B) ((A)->n1.n2.n3.B)
94 #define V_VT(A) ((A)->n1.n2.vt)
95 #else
96 #define V_UNION(A, B) ((A)->B)
97 #define V_VT(A) ((A)->vt)
98 #endif /* cplusplus */
100 #define V_ISBYREF(A) (V_VT(A)&VT_BYREF)
101 #define V_ISARRAY(A) (V_VT(A)&VT_ARRAY)
102 #define V_ISVECTOR(A) (V_VT(A)&VT_VECTOR)
103 #define V_NONE(A) V_I2(A)
105 #define V_UI1(A) V_UNION(A, bVal)
106 #define V_UI1REF(A) V_UNION(A, pbVal)
107 #define V_I2(A) V_UNION(A, iVal)
108 #define V_I2REF(A) V_UNION(A, piVal)
109 #define V_I4(A) V_UNION(A, lVal)
110 #define V_I4REF(A) V_UNION(A, plVal)
111 #define V_R4(A) V_UNION(A, fltVal)
112 #define V_R4REF(A) V_UNION(A, pfltVal)
113 #define V_R8(A) V_UNION(A, dblVal)
114 #define V_R8REF(A) V_UNION(A, pdblVal)
115 #define V_I1(A) V_UNION(A, cVal)
116 #define V_I1REF(A) V_UNION(A, pcVal)
117 #define V_UI2(A) V_UNION(A, uiVal)
118 #define V_UI2REF(A) V_UNION(A, puiVal)
119 #define V_UI4(A) V_UNION(A, ulVal)
120 #define V_UI4REF(A) V_UNION(A, pulVal)
121 #define V_INT(A) V_UNION(A, intVal)
122 #define V_INTREF(A) V_UNION(A, pintVal)
123 #define V_UINT(A) V_UNION(A, uintVal)
124 #define V_UINTREF(A) V_UNION(A, puintVal)
125 #define V_I8(A) V_UNION(A, llVal)
126 #define V_I8REF(A) V_UNION(A, pllVal)
127 #define V_UI8(A) V_UNION(A, ullVal)
128 #define V_UI8REF(A) V_UNION(A, pullVal)
129 #define V_CY(A) V_UNION(A, cyVal)
130 #define V_CYREF(A) V_UNION(A, pcyVal)
131 #define V_DATE(A) V_UNION(A, date)
132 #define V_DATEREF(A) V_UNION(A, pdate)
133 #define V_BSTR(A) V_UNION(A, bstrVal)
134 #define V_BSTRREF(A) V_UNION(A, pbstrVal)
135 #define V_DISPATCH(A) V_UNION(A, pdispVal)
136 #define V_DISPATCHREF(A) V_UNION(A, ppdispVal)
137 #define V_ERROR(A) V_UNION(A, scode)
138 #define V_ERRORREF(A) V_UNION(A, pscode)
139 #define V_BOOL(A) V_UNION(A, boolVal)
140 #define V_BOOLREF(A) V_UNION(A, pboolVal)
141 #define V_UNKNOWN(A) V_UNION(A, punkVal)
142 #define V_UNKNOWNREF(A) V_UNION(A, ppunkVal)
143 #define V_VARIANTREF(A) V_UNION(A, pvarVal)
144 #define V_ARRAY(A) V_UNION(A, parray)
145 #define V_ARRAYREF(A) V_UNION(A, pparray)
146 #define V_BYREF(A) V_UNION(A, byref)
147 #define V_DECIMALREF(A) V_UNION(A, pdecVal)
148 #if (__STDC__ && !defined(_FORCENAMELESSUNION)) || defined(NONAMELESSUNION)
149 #define V_DECIMAL(A) ((A)->n1.decVal)
150 #else
151 #define V_DECIMAL(A) ((A)->decVal)
152 #endif
155 * VARIANT API
158 void WINAPI VariantInit(VARIANT*);
159 HRESULT WINAPI VariantClear(VARIANT*);
160 HRESULT WINAPI VariantCopy(VARIANT*,VARIANT*);
161 HRESULT WINAPI VariantCopyInd(VARIANT*,VARIANT*);
162 HRESULT WINAPI VariantChangeType(VARIANT*,VARIANT*,USHORT,VARTYPE);
163 HRESULT WINAPI VariantChangeTypeEx(VARIANT*,VARIANT*,LCID,USHORT,VARTYPE);
166 * These flags are used for the VariantChangeType and VariantChangeTypeEx APIs.
170 * This one is of general use.
172 #define VARIANT_NOVALUEPROP 0x1
174 * This one is used for conversions of VT_BOOL to VT_BSTR,
175 * the API will convert to "True"|"False" instead of "-1"|"0".
177 #define VARIANT_ALPHABOOL 0x2
179 * This one is used for conversions to or from a VT_BSTR string,
180 * it passes LOCALE_NOUSEROVERRIDE to the core (low-level) coercion routines.
181 * This means it will use the system default locale settings instead of custom
182 * local settings.
184 #define VARIANT_NOUSEROVERRIDE 0x4
187 * This one is used for conversions of VT_BOOL to VT_BSTR,
188 * Convert to the localised text of "True"|"False" instead of "-1"|"0".
190 #define VARIANT_LOCALBOOL 0x10
193 * Alternate calendar support.
195 #define VARIANT_CALENDAR_HIJRI 0x08
196 #define VARIANT_CALENDAR_THAI 0x20
197 #define VARIANT_CALENDAR_GREGORIAN 0x40
200 * Use NLS calls in conversion
202 #define VARIANT_USE_NLS 0x80
205 * Convert between SafeArray vectors and BSTR's
207 HRESULT WINAPI VectorFromBstr(BSTR,SAFEARRAY**);
208 HRESULT WINAPI BstrFromVector(SAFEARRAY*,BSTR*);
211 * VARTYPE Coercion API
214 /* Omits the date portion and return only the time value.
216 #define VAR_TIMEVALUEONLY ((DWORD)0x00000001)
217 /* Omits the time portion and return only the date value.
219 #define VAR_DATEVALUEONLY ((DWORD)0x00000002)
222 HRESULT WINAPI VarUI1FromI2(SHORT,BYTE*);
223 HRESULT WINAPI VarUI1FromI4(LONG,BYTE*);
224 HRESULT WINAPI VarUI1FromI8(LONG64,BYTE*);
225 HRESULT WINAPI VarUI1FromR4(FLOAT,BYTE*);
226 HRESULT WINAPI VarUI1FromR8(DOUBLE,BYTE*);
227 HRESULT WINAPI VarUI1FromDate(DATE,BYTE*);
228 HRESULT WINAPI VarUI1FromBool(VARIANT_BOOL,BYTE*);
229 HRESULT WINAPI VarUI1FromI1(signed char,BYTE*);
230 HRESULT WINAPI VarUI1FromUI2(USHORT,BYTE*);
231 HRESULT WINAPI VarUI1FromUI4(ULONG,BYTE*);
232 HRESULT WINAPI VarUI1FromUI8(ULONG64,BYTE*);
233 HRESULT WINAPI VarUI1FromStr(OLECHAR*,LCID,ULONG,BYTE*);
234 HRESULT WINAPI VarUI1FromCy(CY,BYTE*);
235 HRESULT WINAPI VarUI1FromDec(DECIMAL*,BYTE*);
236 HRESULT WINAPI VarUI1FromDisp(IDispatch*,LCID,BYTE*);
238 HRESULT WINAPI VarI2FromUI1(BYTE,SHORT*);
239 HRESULT WINAPI VarI2FromI4(LONG,SHORT*);
240 HRESULT WINAPI VarI2FromI8(LONG64,SHORT*);
241 HRESULT WINAPI VarI2FromR4(FLOAT,SHORT*);
242 HRESULT WINAPI VarI2FromR8(DOUBLE,SHORT*);
243 HRESULT WINAPI VarI2FromDate(DATE,SHORT*);
244 HRESULT WINAPI VarI2FromBool(VARIANT_BOOL,SHORT*);
245 HRESULT WINAPI VarI2FromI1(signed char,SHORT*);
246 HRESULT WINAPI VarI2FromUI2(USHORT,SHORT*);
247 HRESULT WINAPI VarI2FromUI4(ULONG,SHORT*);
248 HRESULT WINAPI VarI2FromUI8(ULONG64,SHORT*);
249 HRESULT WINAPI VarI2FromStr(OLECHAR*,LCID,ULONG,SHORT*);
250 HRESULT WINAPI VarI2FromCy(CY,SHORT*);
251 HRESULT WINAPI VarI2FromDec(DECIMAL*,SHORT*);
252 HRESULT WINAPI VarI2FromDisp(IDispatch*,LCID,SHORT*);
254 HRESULT WINAPI VarI4FromUI1(BYTE,LONG*);
255 HRESULT WINAPI VarI4FromI2(SHORT,LONG*);
256 HRESULT WINAPI VarI4FromI8(LONG64,LONG*);
257 HRESULT WINAPI VarI4FromR4(FLOAT,LONG*);
258 HRESULT WINAPI VarI4FromR8(DOUBLE,LONG*);
259 HRESULT WINAPI VarI4FromDate(DATE,LONG*);
260 HRESULT WINAPI VarI4FromBool(VARIANT_BOOL,LONG*);
261 HRESULT WINAPI VarI4FromI1(signed char,LONG*);
262 HRESULT WINAPI VarI4FromUI2(USHORT,LONG*);
263 HRESULT WINAPI VarI4FromUI4(ULONG,LONG*);
264 HRESULT WINAPI VarI4FromUI8(ULONG64,LONG*);
265 HRESULT WINAPI VarI4FromStr(OLECHAR*,LCID,ULONG,LONG*);
266 HRESULT WINAPI VarI4FromCy(CY,LONG*);
267 HRESULT WINAPI VarI4FromDec(DECIMAL*,LONG*);
268 HRESULT WINAPI VarI4FromDisp(IDispatch*,LCID,LONG*);
270 HRESULT WINAPI VarI8FromUI1(BYTE,LONG64*);
271 HRESULT WINAPI VarI8FromI2(SHORT,LONG64*);
272 HRESULT WINAPI VarI8FromI4(LONG,LONG64*);
273 HRESULT WINAPI VarI8FromR4(FLOAT,LONG64*);
274 HRESULT WINAPI VarI8FromR8(DOUBLE,LONG64*);
275 HRESULT WINAPI VarI8FromDate(DATE,LONG64*);
276 HRESULT WINAPI VarI8FromStr(OLECHAR*,LCID,ULONG,LONG64*);
277 HRESULT WINAPI VarI8FromBool(VARIANT_BOOL,LONG64*);
278 HRESULT WINAPI VarI8FromI1(signed char,LONG64*);
279 HRESULT WINAPI VarI8FromUI2(USHORT,LONG64*);
280 HRESULT WINAPI VarI8FromUI4(ULONG,LONG64*);
281 HRESULT WINAPI VarI8FromUI8(ULONG64,LONG64*);
282 HRESULT WINAPI VarI8FromDec(DECIMAL *pdecIn,LONG64*);
283 HRESULT WINAPI VarI8FromInt(INT intIn,LONG64*);
284 HRESULT WINAPI VarI8FromCy(CY,LONG64*);
285 HRESULT WINAPI VarI8FromDisp(IDispatch*,LCID,LONG64*);
287 HRESULT WINAPI VarR4FromUI1(BYTE,FLOAT*);
288 HRESULT WINAPI VarR4FromI2(SHORT,FLOAT*);
289 HRESULT WINAPI VarR4FromI4(LONG,FLOAT*);
290 HRESULT WINAPI VarR4FromI8(LONG64,FLOAT*);
291 HRESULT WINAPI VarR4FromR8(DOUBLE,FLOAT*);
292 HRESULT WINAPI VarR4FromDate(DATE,FLOAT*);
293 HRESULT WINAPI VarR4FromBool(VARIANT_BOOL,FLOAT*);
294 HRESULT WINAPI VarR4FromI1(signed char,FLOAT*);
295 HRESULT WINAPI VarR4FromUI2(USHORT,FLOAT*);
296 HRESULT WINAPI VarR4FromUI4(ULONG,FLOAT*);
297 HRESULT WINAPI VarR4FromUI8(ULONG64,FLOAT*);
298 HRESULT WINAPI VarR4FromStr(OLECHAR*,LCID,ULONG,FLOAT*);
299 HRESULT WINAPI VarR4FromCy(CY,FLOAT*);
300 HRESULT WINAPI VarR4FromDec(DECIMAL*,FLOAT*);
301 HRESULT WINAPI VarR4FromDisp(IDispatch*,LCID,FLOAT*);
303 HRESULT WINAPI VarR8FromUI1(BYTE,double*);
304 HRESULT WINAPI VarR8FromI2(SHORT,double*);
305 HRESULT WINAPI VarR8FromI4(LONG,double*);
306 HRESULT WINAPI VarR8FromI8(LONG64,double*);
307 HRESULT WINAPI VarR8FromR4(FLOAT,double*);
308 HRESULT WINAPI VarR8FromDate(DATE,double*);
309 HRESULT WINAPI VarR8FromBool(VARIANT_BOOL,double*);
310 HRESULT WINAPI VarR8FromI1(signed char,double*);
311 HRESULT WINAPI VarR8FromUI2(USHORT,double*);
312 HRESULT WINAPI VarR8FromUI4(ULONG,double*);
313 HRESULT WINAPI VarR8FromUI8(ULONG64,double*);
314 HRESULT WINAPI VarR8FromStr(OLECHAR*,LCID,ULONG,double*);
315 HRESULT WINAPI VarR8FromCy(CY,double*);
316 HRESULT WINAPI VarR8FromDec(DECIMAL*,double*);
317 HRESULT WINAPI VarR8FromDisp(IDispatch*,LCID,double*);
319 HRESULT WINAPI VarDateFromUI1(BYTE,DATE*);
320 HRESULT WINAPI VarDateFromI2(SHORT,DATE*);
321 HRESULT WINAPI VarDateFromI4(LONG,DATE*);
322 HRESULT WINAPI VarDateFromI8(LONG64,DATE*);
323 HRESULT WINAPI VarDateFromR4(FLOAT,DATE*);
324 HRESULT WINAPI VarDateFromR8(DOUBLE,DATE*);
325 HRESULT WINAPI VarDateFromStr(OLECHAR*,LCID,ULONG,DATE*);
326 HRESULT WINAPI VarDateFromI1(signed char,DATE*);
327 HRESULT WINAPI VarDateFromUI2(USHORT,DATE*);
328 HRESULT WINAPI VarDateFromUI4(ULONG,DATE*);
329 HRESULT WINAPI VarDateFromUI8(ULONG64,DATE*);
330 HRESULT WINAPI VarDateFromBool(VARIANT_BOOL,DATE*);
331 HRESULT WINAPI VarDateFromCy(CY,DATE*);
332 HRESULT WINAPI VarDateFromDec(DECIMAL*,DATE*);
333 HRESULT WINAPI VarDateFromDisp(IDispatch*,LCID,DATE*);
335 HRESULT WINAPI VarCyFromUI1(BYTE,CY*);
336 HRESULT WINAPI VarCyFromI2(SHORT sIn,CY*);
337 HRESULT WINAPI VarCyFromI4(LONG,CY*);
338 HRESULT WINAPI VarCyFromI8(LONG64,CY*);
339 HRESULT WINAPI VarCyFromR4(FLOAT,CY*);
340 HRESULT WINAPI VarCyFromR8(DOUBLE,CY*);
341 HRESULT WINAPI VarCyFromDate(DATE,CY*);
342 HRESULT WINAPI VarCyFromStr(OLECHAR*,LCID,ULONG,CY*);
343 HRESULT WINAPI VarCyFromBool(VARIANT_BOOL,CY*);
344 HRESULT WINAPI VarCyFromI1(signed char,CY*);
345 HRESULT WINAPI VarCyFromUI2(USHORT,CY*);
346 HRESULT WINAPI VarCyFromUI4(ULONG,CY*);
347 HRESULT WINAPI VarCyFromUI8(ULONG64,CY*);
348 HRESULT WINAPI VarCyFromDec(DECIMAL*,CY*);
349 HRESULT WINAPI VarCyFromStr(OLECHAR*,LCID,ULONG,CY*);
350 HRESULT WINAPI VarCyFromDisp(IDispatch*,LCID,CY*);
352 HRESULT WINAPI VarBstrFromUI1(BYTE,LCID,ULONG,BSTR*);
353 HRESULT WINAPI VarBstrFromI2(SHORT,LCID,ULONG,BSTR*);
354 HRESULT WINAPI VarBstrFromI4(LONG,LCID,ULONG,BSTR*);
355 HRESULT WINAPI VarBstrFromI8(LONG64,LCID,ULONG,BSTR*);
356 HRESULT WINAPI VarBstrFromR4(FLOAT,LCID,ULONG,BSTR*);
357 HRESULT WINAPI VarBstrFromR8(DOUBLE,LCID,ULONG,BSTR*);
358 HRESULT WINAPI VarBstrFromDate(DATE,LCID,ULONG,BSTR*);
359 HRESULT WINAPI VarBstrFromBool(VARIANT_BOOL,LCID,ULONG,BSTR*);
360 HRESULT WINAPI VarBstrFromI1(signed char,LCID,ULONG,BSTR*);
361 HRESULT WINAPI VarBstrFromUI2(USHORT,LCID,ULONG,BSTR*);
362 HRESULT WINAPI VarBstrFromUI8(ULONG64,LCID,ULONG,BSTR*);
363 HRESULT WINAPI VarBstrFromUI4(ULONG,LCID,ULONG,BSTR*);
364 HRESULT WINAPI VarBstrFromCy(CY,LCID,ULONG,BSTR*);
365 HRESULT WINAPI VarBstrFromDec(DECIMAL*,LCID,ULONG,BSTR*);
366 HRESULT WINAPI VarBstrFromDisp(IDispatch*,LCID,ULONG,BSTR*);
368 HRESULT WINAPI VarBoolFromUI1(BYTE,VARIANT_BOOL*);
369 HRESULT WINAPI VarBoolFromI2(SHORT,VARIANT_BOOL*);
370 HRESULT WINAPI VarBoolFromI4(LONG,VARIANT_BOOL*);
371 HRESULT WINAPI VarBoolFromI8(LONG64,VARIANT_BOOL*);
372 HRESULT WINAPI VarBoolFromR4(FLOAT,VARIANT_BOOL*);
373 HRESULT WINAPI VarBoolFromR8(DOUBLE,VARIANT_BOOL*);
374 HRESULT WINAPI VarBoolFromDate(DATE,VARIANT_BOOL*);
375 HRESULT WINAPI VarBoolFromStr(OLECHAR*,LCID,ULONG,VARIANT_BOOL*);
376 HRESULT WINAPI VarBoolFromI1(signed char,VARIANT_BOOL*);
377 HRESULT WINAPI VarBoolFromUI2(USHORT,VARIANT_BOOL*);
378 HRESULT WINAPI VarBoolFromUI4(ULONG,VARIANT_BOOL*);
379 HRESULT WINAPI VarBoolFromUI8(ULONG64,VARIANT_BOOL*);
380 HRESULT WINAPI VarBoolFromCy(CY,VARIANT_BOOL*);
381 HRESULT WINAPI VarBoolFromDec(DECIMAL*,VARIANT_BOOL*);
382 HRESULT WINAPI VarBoolFromDisp(IDispatch*,LCID,VARIANT_BOOL*);
384 HRESULT WINAPI VarI1FromUI1(BYTE,signed char*);
385 HRESULT WINAPI VarI1FromI2(SHORT,signed char*);
386 HRESULT WINAPI VarI1FromI4(LONG,signed char*);
387 HRESULT WINAPI VarI1FromI8(LONG64,signed char*);
388 HRESULT WINAPI VarI1FromR4(FLOAT,signed char*);
389 HRESULT WINAPI VarI1FromR8(DOUBLE,signed char*);
390 HRESULT WINAPI VarI1FromDate(DATE,signed char*);
391 HRESULT WINAPI VarI1FromStr(OLECHAR*,LCID,ULONG,signed char*);
392 HRESULT WINAPI VarI1FromBool(VARIANT_BOOL,signed char*);
393 HRESULT WINAPI VarI1FromUI2(USHORT,signed char*);
394 HRESULT WINAPI VarI1FromUI4(ULONG,signed char*);
395 HRESULT WINAPI VarI1FromUI8(ULONG64,signed char*);
396 HRESULT WINAPI VarI1FromCy(CY,signed char*);
397 HRESULT WINAPI VarI1FromDec(DECIMAL*,signed char*);
398 HRESULT WINAPI VarI1FromDisp(IDispatch*,LCID,signed char*);
400 HRESULT WINAPI VarUI2FromUI1(BYTE,USHORT*);
401 HRESULT WINAPI VarUI2FromI2(SHORT,USHORT*);
402 HRESULT WINAPI VarUI2FromI4(LONG,USHORT*);
403 HRESULT WINAPI VarUI2FromI8(LONG64,USHORT*);
404 HRESULT WINAPI VarUI2FromR4(FLOAT,USHORT*);
405 HRESULT WINAPI VarUI2FromR8(DOUBLE,USHORT*);
406 HRESULT WINAPI VarUI2FromDate(DATE,USHORT*);
407 HRESULT WINAPI VarUI2FromStr(OLECHAR*,LCID,ULONG,USHORT*);
408 HRESULT WINAPI VarUI2FromBool(VARIANT_BOOL,USHORT*);
409 HRESULT WINAPI VarUI2FromI1(signed char,USHORT*);
410 HRESULT WINAPI VarUI2FromUI4(ULONG,USHORT*);
411 HRESULT WINAPI VarUI2FromUI8(ULONG64,USHORT*);
412 HRESULT WINAPI VarUI2FromCy(CY,USHORT*);
413 HRESULT WINAPI VarUI2FromDec(DECIMAL*,USHORT*);
414 HRESULT WINAPI VarUI2FromDisp(IDispatch*,LCID,USHORT*);
416 HRESULT WINAPI VarUI4FromStr(OLECHAR*,LCID,ULONG,ULONG*);
417 HRESULT WINAPI VarUI4FromUI1(BYTE,ULONG*);
418 HRESULT WINAPI VarUI4FromI2(SHORT,ULONG*);
419 HRESULT WINAPI VarUI4FromI4(LONG,ULONG*);
420 HRESULT WINAPI VarUI4FromI8(LONG64,ULONG*);
421 HRESULT WINAPI VarUI4FromR4(FLOAT,ULONG*);
422 HRESULT WINAPI VarUI4FromR8(DOUBLE,ULONG*);
423 HRESULT WINAPI VarUI4FromDate(DATE,ULONG*);
424 HRESULT WINAPI VarUI4FromBool(VARIANT_BOOL,ULONG*);
425 HRESULT WINAPI VarUI4FromI1(signed char,ULONG*);
426 HRESULT WINAPI VarUI4FromUI2(USHORT,ULONG*);
427 HRESULT WINAPI VarUI4FromUI8(ULONG64,ULONG*);
428 HRESULT WINAPI VarUI4FromCy(CY,ULONG*);
429 HRESULT WINAPI VarUI4FromDec(DECIMAL*,ULONG*);
430 HRESULT WINAPI VarUI4FromDisp(IDispatch*,LCID,ULONG*);
432 HRESULT WINAPI VarUI8FromUI1(BYTE,ULONG64*);
433 HRESULT WINAPI VarUI8FromI2(SHORT,ULONG64*);
434 HRESULT WINAPI VarUI8FromI4(LONG,ULONG64*);
435 HRESULT WINAPI VarUI8FromI8(LONG64,ULONG64*);
436 HRESULT WINAPI VarUI8FromR4(FLOAT,ULONG64*);
437 HRESULT WINAPI VarUI8FromR8(DOUBLE,ULONG64*);
438 HRESULT WINAPI VarUI8FromDate(DATE,ULONG64*);
439 HRESULT WINAPI VarUI8FromStr(OLECHAR*,LCID,ULONG,ULONG64*);
440 HRESULT WINAPI VarUI8FromBool(VARIANT_BOOL,ULONG64*);
441 HRESULT WINAPI VarUI8FromI1(signed char,ULONG64*);
442 HRESULT WINAPI VarUI8FromUI2(USHORT,ULONG64*);
443 HRESULT WINAPI VarUI8FromUI4(ULONG,ULONG64*);
444 HRESULT WINAPI VarUI8FromDec(DECIMAL*,ULONG64*);
445 HRESULT WINAPI VarUI8FromInt(INT,ULONG64*);
446 HRESULT WINAPI VarUI8FromCy(CY,ULONG64*);
447 HRESULT WINAPI VarUI8FromDisp(IDispatch*,LCID,ULONG64*);
449 HRESULT WINAPI VarDecFromUI1(BYTE,DECIMAL*);
450 HRESULT WINAPI VarDecFromI2(SHORT,DECIMAL*);
451 HRESULT WINAPI VarDecFromI4(LONG,DECIMAL*);
452 HRESULT WINAPI VarDecFromI8(LONG64,DECIMAL*);
453 HRESULT WINAPI VarDecFromR4(FLOAT,DECIMAL*);
454 HRESULT WINAPI VarDecFromR8(DOUBLE,DECIMAL*);
455 HRESULT WINAPI VarDecFromDate(DATE,DECIMAL*);
456 HRESULT WINAPI VarDecFromStr(OLECHAR*,LCID,ULONG,DECIMAL*);
457 HRESULT WINAPI VarDecFromBool(VARIANT_BOOL,DECIMAL*);
458 HRESULT WINAPI VarDecFromI1(signed char,DECIMAL*);
459 HRESULT WINAPI VarDecFromUI2(USHORT,DECIMAL*);
460 HRESULT WINAPI VarDecFromUI4(ULONG,DECIMAL*);
461 HRESULT WINAPI VarDecFromUI8(ULONG64,DECIMAL*);
462 HRESULT WINAPI VarDecFromCy(CY,DECIMAL*);
463 HRESULT WINAPI VarDecFromDisp(IDispatch*,LCID,DECIMAL*);
465 #define VarUI4FromUI4( in,pOut ) ( *(pOut) = (in) )
466 #define VarI4FromI4( in,pOut ) ( *(pOut) = (in) )
468 #define VarUI1FromInt VarUI1FromI4
469 #define VarUI1FromUint VarUI1FromUI4
470 #define VarI2FromInt VarI2FromI4
471 #define VarI2FromUint VarI2FromUI4
472 #define VarI4FromInt VarI4FromI4
473 #define VarI4FromUint VarI4FromUI4
474 #define VarI8FromInt VarI8FromI4
475 #define VarI8FromUint VarI8FromUI4
476 #define VarR4FromInt VarR4FromI4
477 #define VarR4FromUint VarR4FromUI4
478 #define VarR8FromInt VarR8FromI4
479 #define VarR8FromUint VarR8FromUI4
480 #define VarDateFromInt VarDateFromI4
481 #define VarDateFromUint VarDateFromUI4
482 #define VarCyFromInt VarCyFromI4
483 #define VarCyFromUint VarCyFromUI4
484 #define VarBstrFromInt VarBstrFromI4
485 #define VarBstrFromUint VarBstrFromUI4
486 #define VarBoolFromInt VarBoolFromI4
487 #define VarBoolFromUint VarBoolFromUI4
488 #define VarI1FromInt VarI1FromI4
489 #define VarI1FromUint VarI1FromUI4
490 #define VarUI2FromInt VarUI2FromI4
491 #define VarUI2FromUint VarUI2FromUI4
492 #define VarUI4FromInt VarUI4FromI4
493 #define VarUI4FromUint VarUI4FromUI4
494 #define VarUI8FromInt VarUI8FromI4
495 #define VarUI8FromUint VarUI8FromUI4
496 #define VarDecFromInt VarDecFromI4
497 #define VarDecFromUint VarDecFromUI4
498 #define VarIntFromUI1 VarI4FromUI1
499 #define VarIntFromI2 VarI4FromI2
500 #define VarIntFromI4 VarI4FromI4
501 #define VarIntFromI8 VarI4FromI8
502 #define VarIntFromR4 VarI4FromR4
503 #define VarIntFromR8 VarI4FromR8
504 #define VarIntFromDate VarI4FromDate
505 #define VarIntFromCy VarI4FromCy
506 #define VarIntFromStr VarI4FromStr
507 #define VarIntFromDisp VarI4FromDisp
508 #define VarIntFromBool VarI4FromBool
509 #define VarIntFromI1 VarI4FromI1
510 #define VarIntFromUI2 VarI4FromUI2
511 #define VarIntFromUI4 VarI4FromUI4
512 #define VarIntFromUI8 VarI4FromUI8
513 #define VarIntFromDec VarI4FromDec
514 #define VarIntFromUint VarI4FromUI4
515 #define VarUintFromUI1 VarUI4FromUI1
516 #define VarUintFromI2 VarUI4FromI2
517 #define VarUintFromI4 VarUI4FromI4
518 #define VarUintFromI8 VarUI4FromI8
519 #define VarUintFromR4 VarUI4FromR4
520 #define VarUintFromR8 VarUI4FromR8
521 #define VarUintFromDate VarUI4FromDate
522 #define VarUintFromCy VarUI4FromCy
523 #define VarUintFromStr VarUI4FromStr
524 #define VarUintFromDisp VarUI4FromDisp
525 #define VarUintFromBool VarUI4FromBool
526 #define VarUintFromI1 VarUI4FromI1
527 #define VarUintFromUI2 VarUI4FromUI2
528 #define VarUintFromUI4 VarUI4FromUI4
529 #define VarUintFromUI8 VarUI4FromUI8
530 #define VarUintFromDec VarUI4FromDec
531 #define VarUintFromInt VarUI4FromI4
534 * Variant Math operations
536 #define VARCMP_LT 0
537 #define VARCMP_EQ 1
538 #define VARCMP_GT 2
539 #define VARCMP_NULL 3
541 HRESULT WINAPI VarDecAbs(const DECIMAL*,DECIMAL*);
542 HRESULT WINAPI VarDecAdd(const DECIMAL*,const DECIMAL*,DECIMAL*);
543 HRESULT WINAPI VarDecCmp(const DECIMAL*,const DECIMAL*);
544 HRESULT WINAPI VarDecCmpR8(const DECIMAL*,DOUBLE);
545 HRESULT WINAPI VarDecDiv(const DECIMAL*,const DECIMAL*,DECIMAL*);
546 HRESULT WINAPI VarDecFix(const DECIMAL*,DECIMAL*);
547 HRESULT WINAPI VarDecInt(const DECIMAL*,DECIMAL*);
548 HRESULT WINAPI VarDecMul(const DECIMAL*,const DECIMAL*,DECIMAL*);
549 HRESULT WINAPI VarDecNeg(const DECIMAL*,DECIMAL*);
550 HRESULT WINAPI VarDecRound(const DECIMAL*,int,DECIMAL*);
551 HRESULT WINAPI VarDecSub(const DECIMAL*,const DECIMAL*,DECIMAL*);
553 HRESULT WINAPI VarCyAbs(const CY,CY*);
554 HRESULT WINAPI VarCyAdd(const CY,const CY,CY*);
555 HRESULT WINAPI VarCyCmp(const CY,const CY);
556 HRESULT WINAPI VarCyCmpR8(const CY,DOUBLE);
557 HRESULT WINAPI VarCyFix(const CY,CY*);
558 HRESULT WINAPI VarCyInt(const CY,CY*);
559 HRESULT WINAPI VarCyMul(const CY,CY,CY*);
560 HRESULT WINAPI VarCyMulI4(const CY,LONG,CY*);
561 HRESULT WINAPI VarCyMulI8(const CY,LONG64,CY*);
562 HRESULT WINAPI VarCyNeg(const CY,CY*);
563 HRESULT WINAPI VarCyRound(const CY,INT,CY*);
564 HRESULT WINAPI VarCySub(const CY,const CY,CY*);
566 HRESULT WINAPI VarAdd(LPVARIANT,LPVARIANT,LPVARIANT);
567 HRESULT WINAPI VarAnd(LPVARIANT,LPVARIANT,LPVARIANT);
568 HRESULT WINAPI VarCat(LPVARIANT,LPVARIANT,LPVARIANT);
569 HRESULT WINAPI VarDiv(LPVARIANT,LPVARIANT,LPVARIANT);
570 HRESULT WINAPI VarEqv(LPVARIANT,LPVARIANT,LPVARIANT);
571 HRESULT WINAPI VarIdiv(LPVARIANT,LPVARIANT,LPVARIANT);
572 HRESULT WINAPI VarImp(LPVARIANT,LPVARIANT,LPVARIANT);
573 HRESULT WINAPI VarMod(LPVARIANT,LPVARIANT,LPVARIANT);
574 HRESULT WINAPI VarMul(LPVARIANT,LPVARIANT,LPVARIANT);
575 HRESULT WINAPI VarOr(LPVARIANT,LPVARIANT,LPVARIANT);
576 HRESULT WINAPI VarPow(LPVARIANT,LPVARIANT,LPVARIANT);
577 HRESULT WINAPI VarSub(LPVARIANT,LPVARIANT,LPVARIANT);
578 HRESULT WINAPI VarXor(LPVARIANT,LPVARIANT,LPVARIANT);
580 HRESULT WINAPI VarAbs(LPVARIANT,LPVARIANT);
581 HRESULT WINAPI VarFix(LPVARIANT,LPVARIANT);
582 HRESULT WINAPI VarInt(LPVARIANT,LPVARIANT);
583 HRESULT WINAPI VarNeg(LPVARIANT,LPVARIANT);
584 HRESULT WINAPI VarNot(LPVARIANT,LPVARIANT);
586 HRESULT WINAPI VarRound(LPVARIANT,int,LPVARIANT);
588 HRESULT WINAPI VarCmp(LPVARIANT,LPVARIANT,LCID,ULONG);
592 typedef struct tagPARAMDATA {
593 OLECHAR * szName; /* parameter name */
594 VARTYPE vt; /* parameter type */
595 } PARAMDATA, * LPPARAMDATA;
597 typedef struct tagMETHODDATA {
598 OLECHAR * szName; /* method name */
599 PARAMDATA * ppdata; /* pointer to an array of PARAMDATAs */
600 DISPID dispid; /* method ID */
601 UINT iMeth; /* method index */
602 CALLCONV cc; /* calling convention */
603 UINT cArgs; /* count of arguments */
604 WORD wFlags; /* same wFlags as on IDispatch::Invoke() */
605 VARTYPE vtReturn;
606 } METHODDATA, * LPMETHODDATA;
608 typedef struct tagINTERFACEDATA {
609 METHODDATA * pmethdata; /* pointer to an array of METHODDATAs */
610 UINT cMembers; /* count of members */
611 } INTERFACEDATA, * LPINTERFACEDATA;
613 typedef enum tagREGKIND
615 REGKIND_DEFAULT,
616 REGKIND_REGISTER,
617 REGKIND_NONE
618 } REGKIND;
620 typedef struct {
621 SYSTEMTIME st;
622 USHORT wDayOfYear;
623 } UDATE;
625 typedef struct {
626 INT cDig;
627 ULONG dwInFlags;
628 ULONG dwOutFlags;
629 INT cchUsed;
630 INT nBaseShift;
631 INT nPwr10;
632 } NUMPARSE;
634 #define NUMPRS_LEADING_WHITE 0x0001
635 #define NUMPRS_TRAILING_WHITE 0x0002
636 #define NUMPRS_LEADING_PLUS 0x0004
637 #define NUMPRS_TRAILING_PLUS 0x0008
638 #define NUMPRS_LEADING_MINUS 0x0010
639 #define NUMPRS_TRAILING_MINUS 0x0020
640 #define NUMPRS_HEX_OCT 0x0040
641 #define NUMPRS_PARENS 0x0080
642 #define NUMPRS_DECIMAL 0x0100
643 #define NUMPRS_THOUSANDS 0x0200
644 #define NUMPRS_CURRENCY 0x0400
645 #define NUMPRS_EXPONENT 0x0800
646 #define NUMPRS_USE_ALL 0x1000
647 #define NUMPRS_STD 0x1FFF
649 #define NUMPRS_NEG 0x10000
650 #define NUMPRS_INEXACT 0x20000
652 #define VTBIT_I1 (1 << VT_I1)
653 #define VTBIT_UI1 (1 << VT_UI1)
654 #define VTBIT_I2 (1 << VT_I2)
655 #define VTBIT_UI2 (1 << VT_UI2)
656 #define VTBIT_I4 (1 << VT_I4)
657 #define VTBIT_UI4 (1 << VT_UI4)
658 #define VTBIT_I8 (1 << VT_I8)
659 #define VTBIT_UI8 (1 << VT_UI8)
660 #define VTBIT_R4 (1 << VT_R4)
661 #define VTBIT_R8 (1 << VT_R8)
662 #define VTBIT_CY (1 << VT_CY)
663 #define VTBIT_DECIMAL (1 << VT_DECIMAL)
665 HRESULT WINAPI VarParseNumFromStr(OLECHAR*,LCID,ULONG,NUMPARSE*,BYTE*);
666 HRESULT WINAPI VarNumFromParseNum(NUMPARSE*,BYTE*,ULONG,VARIANT*);
668 INT WINAPI DosDateTimeToVariantTime(USHORT,USHORT,DATE*);
669 INT WINAPI VariantTimeToDosDateTime(DATE,USHORT*,USHORT*);
671 HRESULT WINAPI VariantTimeToSystemTime(DOUBLE,LPSYSTEMTIME);
672 HRESULT WINAPI SystemTimeToVariantTime(LPSYSTEMTIME,double*);
674 HRESULT WINAPI VarDateFromUdate(UDATE*,ULONG,DATE*);
675 HRESULT WINAPI VarUdateFromDate(DATE,ULONG,UDATE*);
677 ULONG WINAPI LHashValOfNameSysA(SYSKIND,LCID,LPCSTR);
678 ULONG WINAPI LHashValOfNameSys (SYSKIND,LCID,LPCOLESTR);
680 HRESULT WINAPI DispGetParam(DISPPARAMS*,UINT,VARTYPE,VARIANT*,UINT*);
681 HRESULT WINAPI DispGetIDsOfNames(ITypeInfo*,OLECHAR**,UINT,DISPID*);
682 HRESULT WINAPI DispInvoke(void*,ITypeInfo*,DISPID,WORD,DISPPARAMS*,VARIANT*,
683 EXCEPINFO*,UINT*);
684 HRESULT WINAPI CreateDispTypeInfo(INTERFACEDATA*,LCID,ITypeInfo**);
685 HRESULT WINAPI CreateStdDispatch(IUnknown*,void*,ITypeInfo*,IUnknown**);
686 HRESULT WINAPI DispCallFunc(void*,ULONG,CALLCONV,VARTYPE,UINT,VARTYPE*,
687 VARIANTARG**,VARIANT*);
688 HRESULT WINAPI GetActiveObject(REFCLSID,void*,IUnknown**);
692 * TypeLib API
695 #define MEMBERID_NIL DISPID_UNKNOWN
697 #define DISPATCH_METHOD 0x1
698 #define DISPATCH_PROPERTYGET 0x2
699 #define DISPATCH_PROPERTYPUT 0x4
700 #define DISPATCH_PROPERTYPUTREF 0x8
702 HRESULT WINAPI CreateTypeLib(SYSKIND,const OLECHAR*,ICreateTypeLib**);
703 HRESULT WINAPI CreateTypeLib2(SYSKIND,LPCOLESTR,ICreateTypeLib2**);
704 HRESULT WINAPI LoadRegTypeLib(REFGUID,WORD,WORD,LCID,ITypeLib**);
705 HRESULT WINAPI LoadTypeLib(const OLECHAR*,ITypeLib**);
706 HRESULT WINAPI LoadTypeLibEx(LPCOLESTR,REGKIND,ITypeLib**);
707 HRESULT WINAPI QueryPathOfRegTypeLib(REFGUID,WORD,WORD,LCID,LPBSTR);
708 HRESULT WINAPI RegisterTypeLib(ITypeLib*,OLECHAR*,OLECHAR*);
709 HRESULT WINAPI UnRegisterTypeLib(REFGUID,WORD,WORD,LCID,SYSKIND);
711 #ifdef __cplusplus
712 } /* extern "C" */
713 #endif
716 #endif /*__WINE_OLEAUTO_H*/