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