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
23 #define __WINE_INCLUDE_OAIDL
25 #undef __WINE_INCLUDE_OAIDL
31 DEFINE_OLEGUID(IID_StdOle
, 0x00020430,0,0);
34 struct tagSAFEARRAYBOUND
;
41 BSTR WINAPI
SysAllocString(const OLECHAR
*);
42 BSTR WINAPI
SysAllocStringByteLen(LPCSTR
,UINT
);
43 BSTR WINAPI
SysAllocStringLen(const OLECHAR
*,UINT
);
44 void WINAPI
SysFreeString(BSTR
);
45 INT WINAPI
SysReAllocString(LPBSTR
,const OLECHAR
*);
46 int WINAPI
SysReAllocStringLen(BSTR
*,const OLECHAR
*,UINT
);
47 int WINAPI
SysStringByteLen(BSTR
);
48 int WINAPI
SysStringLen(BSTR
);
51 /*****************************************************************
55 HRESULT WINAPI
SetErrorInfo(ULONG dwReserved
, IErrorInfo
*perrinfo
);
56 HRESULT WINAPI
GetErrorInfo(ULONG dwReserved
, IErrorInfo
**pperrinfo
);
57 HRESULT WINAPI
CreateErrorInfo(ICreateErrorInfo
**pperrinfo
);
59 /*****************************************************************
64 SafeArrayAllocDescriptor(UINT cDims
, struct tagSAFEARRAY
**ppsaOut
);
67 SafeArrayAllocDescriptorEx(VARTYPE vt
,UINT cDims
,struct tagSAFEARRAY
**ppsaOut
);
70 SafeArrayAllocData(struct tagSAFEARRAY
*psa
);
72 struct tagSAFEARRAY
* WINAPI
73 SafeArrayCreate(VARTYPE vt
, UINT cDims
, struct tagSAFEARRAYBOUND
*rgsabound
);
76 SafeArrayDestroyDescriptor(struct tagSAFEARRAY
*psa
);
79 SafeArrayPutElement(struct tagSAFEARRAY
*psa
, LONG
*rgIndices
, void *pv
);
82 SafeArrayGetElement(struct tagSAFEARRAY
*psa
, LONG
*rgIndices
, void *pv
);
85 SafeArrayLock(struct tagSAFEARRAY
*psa
);
88 SafeArrayUnlock(struct tagSAFEARRAY
*psa
);
91 SafeArrayGetUBound(struct tagSAFEARRAY
*psa
, UINT nDim
, LONG
*plUbound
);
94 SafeArrayGetLBound(struct tagSAFEARRAY
*psa
, UINT nDim
, LONG
*plLbound
);
97 SafeArrayGetDim(struct tagSAFEARRAY
*psa
);
100 SafeArrayGetElemsize(struct tagSAFEARRAY
*psa
);
103 SafeArrayAccessData(struct tagSAFEARRAY
*psa
, void **ppvData
);
106 SafeArrayUnaccessData(struct tagSAFEARRAY
*psa
);
109 SafeArrayPtrOfIndex(struct tagSAFEARRAY
*psa
, LONG
*rgIndices
, void **ppvData
);
112 SafeArrayCopyData(struct tagSAFEARRAY
*psaSource
, struct tagSAFEARRAY
*psaTarget
);
115 SafeArrayDestroyData(struct tagSAFEARRAY
*psa
);
118 SafeArrayDestroy(struct tagSAFEARRAY
*psa
);
121 SafeArrayCopy(struct tagSAFEARRAY
*psa
, struct tagSAFEARRAY
**ppsaOut
);
123 struct tagSAFEARRAY
* WINAPI
124 SafeArrayCreateVector(VARTYPE vt
, LONG lLbound
, ULONG cElements
);
127 SafeArrayRedim(struct tagSAFEARRAY
*psa
, struct tagSAFEARRAYBOUND
*psaboundNew
);
130 SafeArraySetIID(struct tagSAFEARRAY
*psa
, REFGUID riid
);
133 SafeArrayGetIID(struct tagSAFEARRAY
*psa
, GUID
*riid
);
136 SafeArrayGetVartype(struct tagSAFEARRAY
*psa
, VARTYPE
*vt
);
139 SafeArrayGetRecordInfo(struct tagSAFEARRAY
*psa
, IRecordInfo
**recordinfo
);
142 SafeArraySetRecordInfo(struct tagSAFEARRAY
*psa
, IRecordInfo
*recordinfo
);
145 /* These are macros that help accessing the VARIANT date type.
147 #if (__STDC__ && !defined(_FORCENAMELESSUNION)) || defined(NONAMELESSUNION)
148 #define V_UNION(A, B) ((A)->n1.n2.n3.B)
149 #define V_VT(A) ((A)->n1.n2.vt)
151 #define V_UNION(A, B) ((A)->B)
152 #define V_VT(A) ((A)->vt)
153 #endif /* cplusplus */
155 #define V_ISBYREF(A) (V_VT(A)&VT_BYREF)
156 #define V_ISARRAY(A) (V_VT(A)&VT_ARRAY)
157 #define V_ISVECTOR(A) (V_VT(A)&VT_VECTOR)
158 #define V_NONE(A) V_I2(A)
160 #define V_UI1(A) V_UNION(A, bVal)
161 #define V_UI1REF(A) V_UNION(A, pbVal)
162 #define V_I2(A) V_UNION(A, iVal)
163 #define V_I2REF(A) V_UNION(A, piVal)
164 #define V_I4(A) V_UNION(A, lVal)
165 #define V_I4REF(A) V_UNION(A, plVal)
166 #define V_R4(A) V_UNION(A, fltVal)
167 #define V_R4REF(A) V_UNION(A, pfltVal)
168 #define V_R8(A) V_UNION(A, dblVal)
169 #define V_R8REF(A) V_UNION(A, pdblVal)
170 #define V_I1(A) V_UNION(A, cVal)
171 #define V_I1REF(A) V_UNION(A, pcVal)
172 #define V_UI2(A) V_UNION(A, uiVal)
173 #define V_UI2REF(A) V_UNION(A, puiVal)
174 #define V_UI4(A) V_UNION(A, ulVal)
175 #define V_UI4REF(A) V_UNION(A, pulVal)
176 #define V_INT(A) V_UNION(A, intVal)
177 #define V_INTREF(A) V_UNION(A, pintVal)
178 #define V_UINT(A) V_UNION(A, uintVal)
179 #define V_UINTREF(A) V_UNION(A, puintVal)
180 #define V_CY(A) V_UNION(A, cyVal)
181 #define V_CYREF(A) V_UNION(A, pcyVal)
182 #define V_DATE(A) V_UNION(A, date)
183 #define V_DATEREF(A) V_UNION(A, pdate)
184 #define V_BSTR(A) V_UNION(A, bstrVal)
185 #define V_BSTRREF(A) V_UNION(A, pbstrVal)
186 #define V_DISPATCH(A) V_UNION(A, pdispVal)
187 #define V_DISPATCHREF(A) V_UNION(A, ppdispVal)
188 #define V_ERROR(A) V_UNION(A, scode)
189 #define V_ERRORREF(A) V_UNION(A, pscode)
190 #define V_BOOL(A) V_UNION(A, boolVal)
191 #define V_BOOLREF(A) V_UNION(A, pboolVal)
192 #define V_UNKNOWN(A) V_UNION(A, punkVal)
193 #define V_UNKNOWNREF(A) V_UNION(A, ppunkVal)
194 #define V_VARIANTREF(A) V_UNION(A, pvarVal)
195 #define V_ARRAY(A) V_UNION(A, parray)
196 #define V_ARRAYREF(A) V_UNION(A, pparray)
197 #define V_BYREF(A) V_UNION(A, byref)
198 #define V_DECIMALREF(A) V_UNION(A, pdecVal)
199 #if (__STDC__ && !defined(_FORCENAMELESSUNION)) || defined(NONAMELESSUNION)
200 #define V_DECIMAL(A) ((A)->n1.decVal)
202 #define V_DECIMAL(A) ((A)->decVal)
209 void WINAPI
VariantInit(struct tagVARIANT
* pvarg
);
210 HRESULT WINAPI
VariantClear(struct tagVARIANT
* pvarg
);
211 HRESULT WINAPI
VariantCopy(struct tagVARIANT
* pvargDest
, struct tagVARIANT
* pvargSrc
);
212 HRESULT WINAPI
VariantCopyInd(struct tagVARIANT
* pvargDest
, struct tagVARIANT
* pvargSrc
);
213 HRESULT WINAPI
VariantChangeType(struct tagVARIANT
* pvargDest
, struct tagVARIANT
* pvargSrc
,
214 USHORT wFlags
, VARTYPE vt
);
215 HRESULT WINAPI
VariantChangeTypeEx(struct tagVARIANT
* pvargDest
, struct tagVARIANT
* pvargSrc
,
216 LCID lcid
, USHORT wFlags
, VARTYPE vt
);
219 * These flags are used for the VariantChangeType and VariantChangeTypeEx APIs.
223 * This one is of general use.
225 #define VARIANT_NOVALUEPROP 0x1
227 * This one is used for conversions of VT_BOOL to VT_BSTR,
228 * the API will convert to "True"|"False" instead of "-1"|"0".
230 #define VARIANT_ALPHABOOL 0x2
232 * This one is used for conversions to or from a VT_BSTR string,
233 * it passes LOCALE_NOUSEROVERRIDE to the core (low-level) coercion routines.
234 * This means it will use the system default locale settings instead of custom
237 #define VARIANT_NOUSEROVERRIDE 0x4
241 * VARTYPE Coercion API
244 /* Omits the date portion and return only the time value.
246 #define VAR_TIMEVALUEONLY ((DWORD)0x00000001)
247 /* Omits the time portion and return only the date value.
249 #define VAR_DATEVALUEONLY ((DWORD)0x00000002)
252 HRESULT WINAPI
VarUI1FromI2(short sIn
, BYTE
* pbOut
);
253 HRESULT WINAPI
VarUI1FromI4(LONG lIn
, BYTE
* pbOut
);
254 HRESULT WINAPI
VarUI1FromR4(FLOAT fltIn
, BYTE
* pbOut
);
255 HRESULT WINAPI
VarUI1FromR8(double dblIn
, BYTE
* pbOut
);
256 HRESULT WINAPI
VarUI1FromDate(DATE dateIn
, BYTE
* pbOut
);
257 HRESULT WINAPI
VarUI1FromBool(VARIANT_BOOL boolIn
, BYTE
* pbOut
);
258 HRESULT WINAPI
VarUI1FromI1(CHAR cIn
, BYTE
*pbOut
);
259 HRESULT WINAPI
VarUI1FromUI2(USHORT uiIn
, BYTE
*pbOut
);
260 HRESULT WINAPI
VarUI1FromUI4(ULONG ulIn
, BYTE
*pbOut
);
261 HRESULT WINAPI
VarUI1FromStr(OLECHAR
* strIn
, LCID lcid
, ULONG dwFlags
, BYTE
* pbOut
);
262 HRESULT WINAPI
VarUI1FromCy(CY cyIn
, BYTE
* pbOut
);
263 HRESULT WINAPI
VarUI1FromDec(DECIMAL
* pdecIn
, BYTE
* pbOut
);
264 HRESULT WINAPI
VarUI1FromDisp(IDispatch
* pdispIn
, LCID lcid
, BYTE
* pbOut
);
266 HRESULT WINAPI
VarI2FromUI1(BYTE bIn
, short* psOut
);
267 HRESULT WINAPI
VarI2FromI4(LONG lIn
, short* psOut
);
268 HRESULT WINAPI
VarI2FromR4(FLOAT fltIn
, short* psOut
);
269 HRESULT WINAPI
VarI2FromR8(double dblIn
, short* psOut
);
270 HRESULT WINAPI
VarI2FromDate(DATE dateIn
, short* psOut
);
271 HRESULT WINAPI
VarI2FromBool(VARIANT_BOOL boolIn
, short* psOut
);
272 HRESULT WINAPI
VarI2FromI1(CHAR cIn
, short*psOut
);
273 HRESULT WINAPI
VarI2FromUI2(USHORT uiIn
, short*psOut
);
274 HRESULT WINAPI
VarI2FromUI4(ULONG ulIn
, short*psOut
);
275 HRESULT WINAPI
VarI2FromStr(OLECHAR
* strIn
, LCID lcid
, ULONG dwFlags
, short* psOut
);
276 HRESULT WINAPI
VarI2FromCy(CY cyIn
, short* psOut
);
277 HRESULT WINAPI
VarI2FromDec(DECIMAL
* pdecIn
, short* psOut
);
278 HRESULT WINAPI
VarI2FromDisp(IDispatch
* pdispIn
, LCID lcid
, short* psOut
);
280 HRESULT WINAPI
VarI4FromUI1(BYTE bIn
, LONG
* plOut
);
281 HRESULT WINAPI
VarI4FromI2(short sIn
, LONG
* plOut
);
282 HRESULT WINAPI
VarI4FromR4(FLOAT fltIn
, LONG
* plOut
);
283 HRESULT WINAPI
VarI4FromR8(double dblIn
, LONG
* plOut
);
284 HRESULT WINAPI
VarI4FromDate(DATE dateIn
, LONG
* plOut
);
285 HRESULT WINAPI
VarI4FromBool(VARIANT_BOOL boolIn
, LONG
* plOut
);
286 HRESULT WINAPI
VarI4FromI1(CHAR cIn
, LONG
* plOut
);
287 HRESULT WINAPI
VarI4FromUI2(USHORT uiIn
, LONG
*plOut
);
288 HRESULT WINAPI
VarI4FromUI4(ULONG ulIn
, LONG
*plOut
);
289 HRESULT WINAPI
VarI4FromStr(OLECHAR
* strIn
, LCID lcid
, ULONG dwFlags
, LONG
* plOut
);
290 HRESULT WINAPI
VarI4FromCy(CY cyIn
, LONG
* plOut
);
291 HRESULT WINAPI
VarI4FromDec(DECIMAL
* pdecIn
, LONG
* plOut
);
292 HRESULT WINAPI
VarI4FromDisp(IDispatch
* pdispIn
, LCID lcid
, LONG
* plOut
);
294 HRESULT WINAPI
VarR4FromUI1(BYTE bIn
, FLOAT
* pfltOut
);
295 HRESULT WINAPI
VarR4FromI2(short sIn
, FLOAT
* pfltOut
);
296 HRESULT WINAPI
VarR4FromI4(LONG lIn
, FLOAT
* pfltOut
);
297 HRESULT WINAPI
VarR4FromR8(double dblIn
, FLOAT
* pfltOut
);
298 HRESULT WINAPI
VarR4FromDate(DATE dateIn
, FLOAT
* pfltOut
);
299 HRESULT WINAPI
VarR4FromBool(VARIANT_BOOL boolIn
, FLOAT
* pfltOut
);
300 HRESULT WINAPI
VarR4FromI1(CHAR cIn
, FLOAT
*pfltOut
);
301 HRESULT WINAPI
VarR4FromUI2(USHORT uiIn
, FLOAT
*pfltOut
);
302 HRESULT WINAPI
VarR4FromUI4(ULONG ulIn
, FLOAT
*pfltOut
);
303 HRESULT WINAPI
VarR4FromStr(OLECHAR
* strIn
, LCID lcid
, ULONG dwFlags
, FLOAT
*pfltOut
);
304 HRESULT WINAPI
VarR4FromCy(CY cyIn
, FLOAT
* pfltOut
);
305 HRESULT WINAPI
VarR4FromDec(DECIMAL
* pdecIn
, FLOAT
* pfltOut
);
306 HRESULT WINAPI
VarR4FromDisp(IDispatch
* pdispIn
, LCID lcid
, FLOAT
* pfltOut
);
308 HRESULT WINAPI
VarR8FromUI1(BYTE bIn
, double* pdblOut
);
309 HRESULT WINAPI
VarR8FromI2(short sIn
, double* pdblOut
);
310 HRESULT WINAPI
VarR8FromI4(LONG lIn
, double* pdblOut
);
311 HRESULT WINAPI
VarR8FromR4(FLOAT fltIn
, double* pdblOut
);
312 HRESULT WINAPI
VarR8FromDate(DATE dateIn
, double* pdblOut
);
313 HRESULT WINAPI
VarR8FromBool(VARIANT_BOOL boolIn
, double* pdblOut
);
314 HRESULT WINAPI
VarR8FromI1(CHAR cIn
, double*pdblOut
);
315 HRESULT WINAPI
VarR8FromUI2(USHORT uiIn
, double*pdblOut
);
316 HRESULT WINAPI
VarR8FromUI4(ULONG ulIn
, double*pdblOut
);
317 HRESULT WINAPI
VarR8FromStr(OLECHAR
*strIn
, LCID lcid
, ULONG dwFlags
, double*pdblOut
);
318 HRESULT WINAPI
VarR8FromCy(CY cyIn
, double* pdblOut
);
319 HRESULT WINAPI
VarR8FromDec(DECIMAL
* pdecIn
, double* pdblOut
);
320 HRESULT WINAPI
VarR8FromDisp(IDispatch
* pdispIn
, LCID lcid
, double* pdblOut
);
322 HRESULT WINAPI
VarDateFromUI1(BYTE bIn
, DATE
* pdateOut
);
323 HRESULT WINAPI
VarDateFromI2(short sIn
, DATE
* pdateOut
);
324 HRESULT WINAPI
VarDateFromI4(LONG lIn
, DATE
* pdateOut
);
325 HRESULT WINAPI
VarDateFromR4(FLOAT fltIn
, DATE
* pdateOut
);
326 HRESULT WINAPI
VarDateFromR8(double dblIn
, DATE
* pdateOut
);
327 HRESULT WINAPI
VarDateFromStr(OLECHAR
*strIn
, LCID lcid
, ULONG dwFlags
, DATE
*pdateOut
);
328 HRESULT WINAPI
VarDateFromI1(CHAR cIn
, DATE
*pdateOut
);
329 HRESULT WINAPI
VarDateFromUI2(USHORT uiIn
, DATE
*pdateOut
);
330 HRESULT WINAPI
VarDateFromUI4(ULONG ulIn
, DATE
*pdateOut
);
331 HRESULT WINAPI
VarDateFromBool(VARIANT_BOOL boolIn
, DATE
* pdateOut
);
332 HRESULT WINAPI
VarDateFromCy(CY cyIn
, DATE
* pdateOut
);
333 HRESULT WINAPI
VarDateFromDec(DECIMAL
* pdecIn
, DATE
* pdateOut
);
334 HRESULT WINAPI
VarDateFromDisp(IDispatch
* pdispIn
, LCID lcid
, DATE
* pdateOut
);
336 HRESULT WINAPI
VarCyFromUI1(BYTE bIn
, CY
* pcyOut
);
337 HRESULT WINAPI
VarCyFromI2(short sIn
, CY
* pcyOut
);
338 HRESULT WINAPI
VarCyFromI4(LONG lIn
, CY
* pcyOut
);
339 HRESULT WINAPI
VarCyFromR4(FLOAT fltIn
, CY
* pcyOut
);
340 HRESULT WINAPI
VarCyFromR8(double dblIn
, CY
* pcyOut
);
341 HRESULT WINAPI
VarCyFromDate(DATE dateIn
, CY
* pcyOut
);
342 HRESULT WINAPI
VarCyFromStr(OLECHAR
*strIn
, LCID lcid
, ULONG dwFlags
, CY
*pcyOut
);
343 HRESULT WINAPI
VarCyFromBool(VARIANT_BOOL boolIn
, CY
* pcyOut
);
344 HRESULT WINAPI
VarCyFromI1(signed char cIn
, CY
*pcyOut
);
345 HRESULT WINAPI
VarCyFromUI2(USHORT uiIn
, CY
*pcyOut
);
346 HRESULT WINAPI
VarCyFromUI4(ULONG ulIn
, CY
*pcyOut
);
347 HRESULT WINAPI
VarCyFromDec(DECIMAL
*pdecIn
, CY
*pcyOut
);
348 HRESULT WINAPI
VarCyFromStr(OLECHAR
* strIn
, LCID lcid
, ULONG dwFlags
, CY
* pcyOut
);
349 HRESULT WINAPI
VarCyFromDisp(IDispatch
* pdispIn
, LCID lcid
, CY
* pcyOut
);
351 HRESULT WINAPI
VarBstrFromUI1(BYTE bVal
, LCID lcid
, ULONG dwFlags
, BSTR
* pbstrOut
);
352 HRESULT WINAPI
VarBstrFromI2(short iVal
, LCID lcid
, ULONG dwFlags
, BSTR
* pbstrOut
);
353 HRESULT WINAPI
VarBstrFromI4(LONG lIn
, LCID lcid
, ULONG dwFlags
, BSTR
* pbstrOut
);
354 HRESULT WINAPI
VarBstrFromR4(FLOAT fltIn
, LCID lcid
, ULONG dwFlags
, BSTR
* pbstrOut
);
355 HRESULT WINAPI
VarBstrFromR8(double dblIn
, LCID lcid
, ULONG dwFlags
, BSTR
* pbstrOut
);
356 HRESULT WINAPI
VarBstrFromDate(DATE dateIn
, LCID lcid
, ULONG dwFlags
, BSTR
* pbstrOut
);
357 HRESULT WINAPI
VarBstrFromBool(VARIANT_BOOL boolIn
, LCID lcid
, ULONG dwFlags
, BSTR
* pbstrOut
);
358 HRESULT WINAPI
VarBstrFromI1(CHAR cIn
, LCID lcid
, ULONG dwFlags
, BSTR
*pbstrOut
);
359 HRESULT WINAPI
VarBstrFromUI2(USHORT uiIn
, LCID lcid
, ULONG dwFlags
, BSTR
*pbstrOut
);
360 HRESULT WINAPI
VarBstrFromUI4(ULONG ulIn
, LCID lcid
, ULONG dwFlags
, BSTR
*pbstrOut
);
361 HRESULT WINAPI
VarBstrFromCy(CY cyIn
, LCID lcid
, ULONG dwFlags
, BSTR
* pbstrOut
);
362 HRESULT WINAPI
VarBstrFromDec(DECIMAL
* pdecIn
, LCID lcid
, ULONG dwFlags
, BSTR
* pbstrOut
);
363 HRESULT WINAPI
VarBstrFromDisp(IDispatch
* pdispIn
, LCID lcid
, ULONG dwFlags
, BSTR
* pbstrOut
);
365 HRESULT WINAPI
VarBoolFromUI1(BYTE bIn
, VARIANT_BOOL
* pboolOut
);
366 HRESULT WINAPI
VarBoolFromI2(short sIn
, VARIANT_BOOL
* pboolOut
);
367 HRESULT WINAPI
VarBoolFromI4(LONG lIn
, VARIANT_BOOL
* pboolOut
);
368 HRESULT WINAPI
VarBoolFromR4(FLOAT fltIn
, VARIANT_BOOL
* pboolOut
);
369 HRESULT WINAPI
VarBoolFromR8(double dblIn
, VARIANT_BOOL
* pboolOut
);
370 HRESULT WINAPI
VarBoolFromDate(DATE dateIn
, VARIANT_BOOL
* pboolOut
);
371 HRESULT WINAPI
VarBoolFromStr(OLECHAR
* strIn
, LCID lcid
, ULONG dwFlags
, VARIANT_BOOL
* pboolOut
);
372 HRESULT WINAPI
VarBoolFromI1(CHAR cIn
, VARIANT_BOOL
*pboolOut
);
373 HRESULT WINAPI
VarBoolFromUI2(USHORT uiIn
, VARIANT_BOOL
*pboolOut
);
374 HRESULT WINAPI
VarBoolFromUI4(ULONG ulIn
, VARIANT_BOOL
*pboolOut
);
375 HRESULT WINAPI
VarBoolFromCy(CY cyIn
, VARIANT_BOOL
* pboolOut
);
376 HRESULT WINAPI
VarBoolFromDec(DECIMAL
* pdecIn
, VARIANT_BOOL
* pboolOut
);
377 HRESULT WINAPI
VarBoolFromDisp(IDispatch
* pdispIn
, LCID lcid
, VARIANT_BOOL
* pboolOut
);
379 HRESULT WINAPI
VarI1FromUI1(BYTE bIn
, CHAR
*pcOut
);
380 HRESULT WINAPI
VarI1FromI2(short uiIn
, CHAR
*pcOut
);
381 HRESULT WINAPI
VarI1FromI4(LONG lIn
, CHAR
*pcOut
);
382 HRESULT WINAPI
VarI1FromR4(FLOAT fltIn
, CHAR
*pcOut
);
383 HRESULT WINAPI
VarI1FromR8(double dblIn
, CHAR
*pcOut
);
384 HRESULT WINAPI
VarI1FromDate(DATE dateIn
, CHAR
*pcOut
);
385 HRESULT WINAPI
VarI1FromStr(OLECHAR
*strIn
, LCID lcid
, ULONG dwFlags
, CHAR
*pcOut
);
386 HRESULT WINAPI
VarI1FromBool(VARIANT_BOOL boolIn
, CHAR
*pcOut
);
387 HRESULT WINAPI
VarI1FromUI2(USHORT uiIn
, CHAR
*pcOut
);
388 HRESULT WINAPI
VarI1FromUI4(ULONG ulIn
, CHAR
*pcOut
);
389 HRESULT WINAPI
VarI1FromCy(CY cyIn
, CHAR
*pcOut
);
390 HRESULT WINAPI
VarI1FromDec(DECIMAL
* pdecIn
, CHAR
* pcOut
);
391 HRESULT WINAPI
VarI1FromDisp(IDispatch
* pdispIn
, LCID lcid
, CHAR
* pcOut
);
393 HRESULT WINAPI
VarUI2FromUI1(BYTE bIn
, USHORT
*puiOut
);
394 HRESULT WINAPI
VarUI2FromI2(short uiIn
, USHORT
*puiOut
);
395 HRESULT WINAPI
VarUI2FromI4(LONG lIn
, USHORT
*puiOut
);
396 HRESULT WINAPI
VarUI2FromR4(FLOAT fltIn
, USHORT
*puiOut
);
397 HRESULT WINAPI
VarUI2FromR8(double dblIn
, USHORT
*puiOut
);
398 HRESULT WINAPI
VarUI2FromDate(DATE dateIn
, USHORT
*puiOut
);
399 HRESULT WINAPI
VarUI2FromStr(OLECHAR
*strIn
, LCID lcid
, ULONG dwFlags
, USHORT
*puiOut
);
400 HRESULT WINAPI
VarUI2FromBool(VARIANT_BOOL boolIn
, USHORT
*puiOut
);
401 HRESULT WINAPI
VarUI2FromI1(CHAR cIn
, USHORT
*puiOut
);
402 HRESULT WINAPI
VarUI2FromUI4(ULONG ulIn
, USHORT
*puiOut
);
403 HRESULT WINAPI
VarUI2FromCy(CY cyIn
, USHORT
*puiOut
);
404 HRESULT WINAPI
VarUI2FromDec(DECIMAL
* pdecIn
, USHORT
* puiOut
);
405 HRESULT WINAPI
VarUI2FromDisp(IDispatch
* pdispIn
, LCID lcid
, USHORT
* puiOut
);
407 HRESULT WINAPI
VarUI4FromStr(OLECHAR
*strIn
, LCID lcid
, ULONG dwFlags
, ULONG
*pulOut
);
408 HRESULT WINAPI
VarUI4FromUI1(BYTE bIn
, ULONG
*pulOut
);
409 HRESULT WINAPI
VarUI4FromI2(short uiIn
, ULONG
*pulOut
);
410 HRESULT WINAPI
VarUI4FromI4(LONG lIn
, ULONG
*pulOut
);
411 HRESULT WINAPI
VarUI4FromR4(FLOAT fltIn
, ULONG
*pulOut
);
412 HRESULT WINAPI
VarUI4FromR8(double dblIn
, ULONG
*pulOut
);
413 HRESULT WINAPI
VarUI4FromDate(DATE dateIn
, ULONG
*pulOut
);
414 HRESULT WINAPI
VarUI4FromBool(VARIANT_BOOL boolIn
, ULONG
*pulOut
);
415 HRESULT WINAPI
VarUI4FromI1(CHAR cIn
, ULONG
*pulOut
);
416 HRESULT WINAPI
VarUI4FromUI2(USHORT uiIn
, ULONG
*pulOut
);
417 HRESULT WINAPI
VarUI4FromCy(CY cyIn
, ULONG
*pulOut
);
418 HRESULT WINAPI
VarUI4FromDec(DECIMAL
* pdecIn
, ULONG
* pulOut
);
419 HRESULT WINAPI
VarUI4FromDisp(IDispatch
* pdispIn
, LCID lcid
, ULONG
* pulOut
);
421 HRESULT WINAPI
VarDecFromUI1(BYTE bIn
, DECIMAL
*pdecOut
);
422 HRESULT WINAPI
VarDecFromI2(short uiIn
, DECIMAL
*pdecOut
);
423 HRESULT WINAPI
VarDecFromI4(LONG lIn
, DECIMAL
*pdecOut
);
424 HRESULT WINAPI
VarDecFromR4(FLOAT fltIn
, DECIMAL
*pdecOut
);
425 HRESULT WINAPI
VarDecFromR8(double dblIn
, DECIMAL
*pdecOut
);
426 HRESULT WINAPI
VarDecFromDate(DATE dateIn
, DECIMAL
*pdecOut
);
427 HRESULT WINAPI
VarDecFromStr(OLECHAR
* strIn
, LCID lcid
, ULONG dwFlags
, DECIMAL
* pdecOut
);
428 HRESULT WINAPI
VarDecFromBool(VARIANT_BOOL boolIn
, DECIMAL
* pdecOut
);
429 HRESULT WINAPI
VarDecFromI1(CHAR cIn
, DECIMAL
* pdecOut
);
430 HRESULT WINAPI
VarDecFromUI2(USHORT uiIn
, DECIMAL
* pdecOut
);
431 HRESULT WINAPI
VarDecFromUI4(ULONG ulIn
, DECIMAL
* pdecOut
);
432 HRESULT WINAPI
VarDecFromCy(CY cyIn
, DECIMAL
* pdecOut
);
433 HRESULT WINAPI
VarDecFromDisp(IDispatch
* pdispIn
, LCID lcid
, DECIMAL
* pdecOut
);
437 #define VarUI4FromUI4( in, pOut ) ( *(pOut) = (in) )
438 #define VarI4FromI4( in, pOut ) ( *(pOut) = (in) )
440 #define VarUI1FromInt VarUI1FromI4
441 #define VarUI1FromUint VarUI1FromUI4
442 #define VarI2FromInt VarI2FromI4
443 #define VarI2FromUint VarI2FromUI4
444 #define VarI4FromInt VarI4FromI4
445 #define VarI4FromUint VarI4FromUI4
446 #define VarR4FromInt VarR4FromI4
447 #define VarR4FromUint VarR4FromUI4
448 #define VarR8FromInt VarR8FromI4
449 #define VarR8FromUint VarR8FromUI4
450 #define VarDateFromInt VarDateFromI4
451 #define VarDateFromUint VarDateFromUI4
452 #define VarCyFromInt VarCyFromI4
453 #define VarCyFromUint VarCyFromUI4
454 #define VarBstrFromInt VarBstrFromI4
455 #define VarBstrFromUint VarBstrFromUI4
456 #define VarBoolFromInt VarBoolFromI4
457 #define VarBoolFromUint VarBoolFromUI4
458 #define VarI1FromInt VarI1FromI4
459 #define VarI1FromUint VarI1FromUI4
460 #define VarUI2FromInt VarUI2FromI4
461 #define VarUI2FromUint VarUI2FromUI4
462 #define VarUI4FromInt VarUI4FromI4
463 #define VarUI4FromUint VarUI4FromUI4
464 #define VarDecFromInt VarDecFromI4
465 #define VarDecFromUint VarDecFromUI4
466 #define VarIntFromUI1 VarI4FromUI1
467 #define VarIntFromI2 VarI4FromI2
468 #define VarIntFromI4 VarI4FromI4
469 #define VarIntFromR4 VarI4FromR4
470 #define VarIntFromR8 VarI4FromR8
471 #define VarIntFromDate VarI4FromDate
472 #define VarIntFromCy VarI4FromCy
473 #define VarIntFromStr VarI4FromStr
474 #define VarIntFromDisp VarI4FromDisp
475 #define VarIntFromBool VarI4FromBool
476 #define VarIntFromI1 VarI4FromI1
477 #define VarIntFromUI2 VarI4FromUI2
478 #define VarIntFromUI4 VarI4FromUI4
479 #define VarIntFromDec VarI4FromDec
480 #define VarIntFromUint VarI4FromUI4
481 #define VarUintFromUI1 VarUI4FromUI1
482 #define VarUintFromI2 VarUI4FromI2
483 #define VarUintFromI4 VarUI4FromI4
484 #define VarUintFromR4 VarUI4FromR4
485 #define VarUintFromR8 VarUI4FromR8
486 #define VarUintFromDate VarUI4FromDate
487 #define VarUintFromCy VarUI4FromCy
488 #define VarUintFromStr VarUI4FromStr
489 #define VarUintFromDisp VarUI4FromDisp
490 #define VarUintFromBool VarUI4FromBool
491 #define VarUintFromI1 VarUI4FromI1
492 #define VarUintFromUI2 VarUI4FromUI2
493 #define VarUintFromUI4 VarUI4FromUI4
494 #define VarUintFromDec VarUI4FromDec
495 #define VarUintFromInt VarUI4FromI4
498 * Variant Math operations
503 #define VARCMP_NULL 3
505 HRESULT WINAPI
VarAdd(LPVARIANT
,LPVARIANT
,LPVARIANT
);
506 HRESULT WINAPI
VarAnd(LPVARIANT
,LPVARIANT
,LPVARIANT
);
507 HRESULT WINAPI
VarCat(LPVARIANT
,LPVARIANT
,LPVARIANT
);
508 HRESULT WINAPI
VarDiv(LPVARIANT
,LPVARIANT
,LPVARIANT
);
509 HRESULT WINAPI
VarEqv(LPVARIANT
,LPVARIANT
,LPVARIANT
);
510 HRESULT WINAPI
VarIdiv(LPVARIANT
,LPVARIANT
,LPVARIANT
);
511 HRESULT WINAPI
VarImp(LPVARIANT
,LPVARIANT
,LPVARIANT
);
512 HRESULT WINAPI
VarMod(LPVARIANT
,LPVARIANT
,LPVARIANT
);
513 HRESULT WINAPI
VarMul(LPVARIANT
,LPVARIANT
,LPVARIANT
);
514 HRESULT WINAPI
VarOr(LPVARIANT
,LPVARIANT
,LPVARIANT
);
515 HRESULT WINAPI
VarPow(LPVARIANT
,LPVARIANT
,LPVARIANT
);
516 HRESULT WINAPI
VarSub(LPVARIANT
,LPVARIANT
,LPVARIANT
);
517 HRESULT WINAPI
VarXor(LPVARIANT
,LPVARIANT
,LPVARIANT
);
519 HRESULT WINAPI
VarAbs(LPVARIANT
,LPVARIANT
);
520 HRESULT WINAPI
VarFix(LPVARIANT
,LPVARIANT
);
521 HRESULT WINAPI
VarInt(LPVARIANT
,LPVARIANT
);
522 HRESULT WINAPI
VarNeg(LPVARIANT
,LPVARIANT
);
523 HRESULT WINAPI
VarNot(LPVARIANT
,LPVARIANT
);
525 HRESULT WINAPI
VarRound(LPVARIANT
,int,LPVARIANT
);
527 HRESULT WINAPI
VarCmp(LPVARIANT
,LPVARIANT
,LCID
,ULONG
);
531 typedef struct tagPARAMDATA
{
532 OLECHAR
* szName
; /* parameter name */
533 VARTYPE vt
; /* parameter type */
534 } PARAMDATA
, * LPPARAMDATA
;
536 typedef struct tagMETHODDATA
{
537 OLECHAR
* szName
; /* method name */
538 PARAMDATA
* ppdata
; /* pointer to an array of PARAMDATAs */
539 DISPID dispid
; /* method ID */
540 UINT iMeth
; /* method index */
541 CALLCONV cc
; /* calling convention */
542 UINT cArgs
; /* count of arguments */
543 WORD wFlags
; /* same wFlags as on IDispatch::Invoke() */
545 } METHODDATA
, * LPMETHODDATA
;
547 typedef struct tagINTERFACEDATA
{
548 METHODDATA
* pmethdata
; /* pointer to an array of METHODDATAs */
549 UINT cMembers
; /* count of members */
550 } INTERFACEDATA
, * LPINTERFACEDATA
;
552 typedef enum tagREGKIND
573 #define NUMPRS_LEADING_WHITE 0x0001
574 #define NUMPRS_TRAILING_WHITE 0x0002
575 #define NUMPRS_LEADING_PLUS 0x0004
576 #define NUMPRS_TRAILING_PLUS 0x0008
577 #define NUMPRS_LEADING_MINUS 0x0010
578 #define NUMPRS_TRAILING_MINUS 0x0020
579 #define NUMPRS_HEX_OCT 0x0040
580 #define NUMPRS_PARENS 0x0080
581 #define NUMPRS_DECIMAL 0x0100
582 #define NUMPRS_THOUSANDS 0x0200
583 #define NUMPRS_CURRENCY 0x0400
584 #define NUMPRS_EXPONENT 0x0800
585 #define NUMPRS_USE_ALL 0x1000
586 #define NUMPRS_STD 0x1FFF
588 #define NUMPRS_NEG 0x10000
589 #define NUMPRS_INEXACT 0x20000
591 #define VTBIT_I1 (1 << VT_I1)
592 #define VTBIT_UI1 (1 << VT_UI1)
593 #define VTBIT_I2 (1 << VT_I2)
594 #define VTBIT_UI2 (1 << VT_UI2)
595 #define VTBIT_I4 (1 << VT_I4)
596 #define VTBIT_UI4 (1 << VT_UI4)
597 #define VTBIT_R4 (1 << VT_R4)
598 #define VTBIT_R8 (1 << VT_R8)
599 #define VTBIT_CY (1 << VT_CY)
600 #define VTBIT_DECIMAL (1 << VT_DECIMAL)
602 HRESULT WINAPI
VarParseNumFromStr(OLECHAR
*,LCID
,ULONG
,NUMPARSE
*,BYTE
*);
603 HRESULT WINAPI
VarNumFromParseNum(NUMPARSE
*,BYTE
*,ULONG
,VARIANT
*);
605 INT WINAPI
DosDateTimeToVariantTime(USHORT
,USHORT
,DATE
*);
606 INT WINAPI
VariantTimeToDosDateTime(DATE
, USHORT
*, USHORT
*);
608 HRESULT WINAPI
VariantTimeToSystemTime(double,LPSYSTEMTIME
);
609 HRESULT WINAPI
SystemTimeToVariantTime(LPSYSTEMTIME
,double*);
611 HRESULT WINAPI
VarDateFromUdate(UDATE
*,ULONG
, DATE
*);
612 HRESULT WINAPI
VarUdateFromDate(DATE
, ULONG
, UDATE
*);
614 ULONG WINAPI
LHashValOfNameSysA(SYSKIND syskind
,LCID lcid
,LPCSTR szName
);
615 ULONG WINAPI
LHashValOfNameSys (SYSKIND syskind
,LCID lcid
,LPCOLESTR szName
);
617 HRESULT WINAPI
DispGetParam(DISPPARAMS
* pdispparams
, UINT position
,
618 VARTYPE vtTarg
, VARIANT
* pvarResult
, UINT
* puArgErr
);
619 HRESULT WINAPI
DispGetIDsOfNames(ITypeInfo
* ptinfo
, OLECHAR
** rgszNames
,
620 UINT cNames
, DISPID
* rgdispid
);
621 HRESULT WINAPI
DispInvoke(void* _this
, ITypeInfo
* ptinfo
, DISPID dispidMember
,
622 WORD wFlags
, DISPPARAMS
* pparams
, VARIANT
* pvarResult
,
623 EXCEPINFO
* pexcepinfo
, UINT
* puArgErr
);
624 HRESULT WINAPI
CreateDispTypeInfo(INTERFACEDATA
* pidata
, LCID lcid
,
625 ITypeInfo
** pptinfo
);
626 HRESULT WINAPI
CreateStdDispatch(IUnknown
* punkOuter
, void* pvThis
,
627 ITypeInfo
* ptinfo
, IUnknown
** ppunkStdDisp
);
628 HRESULT WINAPI
DispCallFunc(void* pvInstance
, ULONG oVft
, CALLCONV cc
,
629 VARTYPE vtReturn
, UINT cActuals
, VARTYPE
* prgvt
,
630 VARIANTARG
** prgpvarg
, VARIANT
* pvargResult
);
631 HRESULT WINAPI
GetActiveObject(REFCLSID
, void*, IUnknown
**);
638 #define MEMBERID_NIL DISPID_UNKNOWN
640 #define DISPATCH_METHOD 0x1
641 #define DISPATCH_PROPERTYGET 0x2
642 #define DISPATCH_PROPERTYPUT 0x4
643 #define DISPATCH_PROPERTYPUTREF 0x8
645 HRESULT WINAPI
CreateTypeLib(SYSKIND
,const OLECHAR
*,ICreateTypeLib
**);
646 HRESULT WINAPI
CreateTypeLib2(SYSKIND
,LPCOLESTR
,ICreateTypeLib2
**);
647 HRESULT WINAPI
LoadRegTypeLib(REFGUID
,WORD
,WORD
,LCID
,ITypeLib
**);
648 HRESULT WINAPI
LoadTypeLib(const OLECHAR
*,ITypeLib
**);
649 HRESULT WINAPI
LoadTypeLibEx(LPCOLESTR
,REGKIND
,ITypeLib
**);
650 HRESULT WINAPI
QueryPathOfRegTypeLib(REFGUID
,WORD
,WORD
,LCID
,LPBSTR
);
651 HRESULT WINAPI
RegisterTypeLib(ITypeLib
*,OLECHAR
*,OLECHAR
*);
652 HRESULT WINAPI
UnRegisterTypeLib(REFGUID
,WORD
,WORD
,LCID
,SYSKIND
);
659 #endif /*__WINE_OLEAUTO_H*/