1 #ifndef __WINE_OLEAUTO_H
2 #define __WINE_OLEAUTO_H
5 #include "wine/obj_base.h"
6 #include "wine/obj_oleaut.h"
7 #include "wine/obj_errorinfo.h"
14 struct tagSAFEARRAYBOUND;
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 /*****************************************************************
40 HRESULT WINAPI SetErrorInfo(ULONG dwReserved, IErrorInfo *perrinfo);
41 HRESULT WINAPI GetErrorInfo(ULONG dwReserved, IErrorInfo **pperrinfo);
42 HRESULT WINAPI CreateErrorInfo(ICreateErrorInfo **pperrinfo);
44 /*****************************************************************
49 SafeArrayAllocDescriptor(UINT cDims, struct tagSAFEARRAY **ppsaOut);
52 SafeArrayAllocData(struct tagSAFEARRAY *psa);
54 struct tagSAFEARRAY WINAPI
55 *SafeArrayCreate(VARTYPE vt, UINT cDims, struct tagSAFEARRAYBOUND *rgsabound);
58 SafeArrayDestroyDescriptor(struct tagSAFEARRAY *psa);
61 SafeArrayPutElement(struct tagSAFEARRAY *psa, LONG *rgIndices, void *pv);
64 SafeArrayGetElement(struct tagSAFEARRAY *psa, LONG *rgIndices, void *pv);
67 SafeArrayLock(struct tagSAFEARRAY *psa);
70 SafeArrayUnlock(struct tagSAFEARRAY *psa);
73 SafeArrayGetUBound(struct tagSAFEARRAY *psa, UINT nDim, LONG *plUbound);
76 SafeArrayGetLBound(struct tagSAFEARRAY *psa, UINT nDim, LONG *plLbound);
79 SafeArrayGetDim(struct tagSAFEARRAY *psa);
82 SafeArrayGetElemsize(struct tagSAFEARRAY *psa);
85 SafeArrayAccessData(struct tagSAFEARRAY *psa, void **ppvData);
88 SafeArrayUnaccessData(struct tagSAFEARRAY *psa);
91 SafeArrayPtrOfIndex(struct tagSAFEARRAY *psa, LONG *rgIndices, void **ppvData);
94 SafeArrayCopyData(struct tagSAFEARRAY *psaSource, struct tagSAFEARRAY **psaTarget);
97 SafeArrayDestroyData(struct tagSAFEARRAY *psa);
100 SafeArrayDestroy(struct tagSAFEARRAY *psa);
103 SafeArrayCopy(struct tagSAFEARRAY *psa, struct tagSAFEARRAY **ppsaOut);
105 struct tagSAFEARRAY WINAPI
106 *SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements);
109 SafeArrayRedim(struct tagSAFEARRAY *psa, struct tagSAFEARRAYBOUND *psaboundNew);
112 /* These are macros that help accessing the VARIANT date type.
115 #define V_UNION(A, B) ((A)->B)
116 #define V_VT(A) ((A)->vt)
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)
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
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 VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR *pbstrOut);
320 HRESULT WINAPI VarBstrFromDate(DATE dateIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
321 HRESULT WINAPI VarBstrFromBool(VARIANT_BOOL boolIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
322 HRESULT WINAPI VarBstrFromI1(CHAR cIn, LCID lcid, ULONG dwFlags, BSTR*pbstrOut);
323 HRESULT WINAPI VarBstrFromUI2(USHORT uiIn, LCID lcid, ULONG dwFlags, BSTR*pbstrOut);
324 HRESULT WINAPI VarBstrFromUI4(ULONG ulIn, LCID lcid, ULONG dwFlags, BSTR*pbstrOut);
325 HRESULT WINAPI VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
326 HRESULT WINAPI VarBstrFromDec(DECIMAL* pdecIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
327 HRESULT WINAPI VarBstrFromDisp(IDispatch* pdispIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
329 HRESULT WINAPI VarBoolFromUI1(BYTE bIn, VARIANT_BOOL* pboolOut);
330 HRESULT WINAPI VarBoolFromI2(short sIn, VARIANT_BOOL* pboolOut);
331 HRESULT WINAPI VarBoolFromI4(LONG lIn, VARIANT_BOOL* pboolOut);
332 HRESULT WINAPI VarBoolFromR4(FLOAT fltIn, VARIANT_BOOL* pboolOut);
333 HRESULT WINAPI VarBoolFromR8(double dblIn, VARIANT_BOOL* pboolOut);
334 HRESULT WINAPI VarBoolFromDate(DATE dateIn, VARIANT_BOOL* pboolOut);
335 HRESULT WINAPI VarBoolFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, VARIANT_BOOL* pboolOut);
336 HRESULT WINAPI VarBoolFromI1(CHAR cIn, VARIANT_BOOL*pboolOut);
337 HRESULT WINAPI VarBoolFromUI2(USHORT uiIn, VARIANT_BOOL*pboolOut);
338 HRESULT WINAPI VarBoolFromUI4(ULONG ulIn, VARIANT_BOOL*pboolOut);
339 HRESULT WINAPI VarBoolFromCy(CY cyIn, VARIANT_BOOL* pboolOut);
340 HRESULT WINAPI VarBoolFromDec(DECIMAL* pdecIn, VARIANT_BOOL* pboolOut);
341 HRESULT WINAPI VarBoolFromDisp(IDispatch* pdispIn, LCID lcid, VARIANT_BOOL* pboolOut);
343 HRESULT WINAPI VarI1FromUI1(BYTE bIn, CHAR*pcOut);
344 HRESULT WINAPI VarI1FromI2(short uiIn, CHAR*pcOut);
345 HRESULT WINAPI VarI1FromI4(LONG lIn, CHAR*pcOut);
346 HRESULT WINAPI VarI1FromR4(FLOAT fltIn, CHAR*pcOut);
347 HRESULT WINAPI VarI1FromR8(double dblIn, CHAR*pcOut);
348 HRESULT WINAPI VarI1FromDate(DATE dateIn, CHAR*pcOut);
349 HRESULT WINAPI VarI1FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, CHAR*pcOut);
350 HRESULT WINAPI VarI1FromBool(VARIANT_BOOL boolIn, CHAR*pcOut);
351 HRESULT WINAPI VarI1FromUI2(USHORT uiIn, CHAR*pcOut);
352 HRESULT WINAPI VarI1FromUI4(ULONG ulIn, CHAR*pcOut);
353 HRESULT WINAPI VarI1FromCy(CY cyIn, CHAR*pcOut);
354 HRESULT WINAPI VarI1FromDec(DECIMAL* pdecIn, CHAR* pcOut);
355 HRESULT WINAPI VarI1FromDisp(IDispatch* pdispIn, LCID lcid, CHAR* pcOut);
357 HRESULT WINAPI VarUI2FromUI1(BYTE bIn, USHORT*puiOut);
358 HRESULT WINAPI VarUI2FromI2(short uiIn, USHORT*puiOut);
359 HRESULT WINAPI VarUI2FromI4(LONG lIn, USHORT*puiOut);
360 HRESULT WINAPI VarUI2FromR4(FLOAT fltIn, USHORT*puiOut);
361 HRESULT WINAPI VarUI2FromR8(double dblIn, USHORT*puiOut);
362 HRESULT WINAPI VarUI2FromDate(DATE dateIn, USHORT*puiOut);
363 HRESULT WINAPI VarUI2FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, USHORT*puiOut);
364 HRESULT WINAPI VarUI2FromBool(VARIANT_BOOL boolIn, USHORT*puiOut);
365 HRESULT WINAPI VarUI2FromI1(CHAR cIn, USHORT*puiOut);
366 HRESULT WINAPI VarUI2FromUI4(ULONG ulIn, USHORT*puiOut);
367 HRESULT WINAPI VarUI2FromCy(CY cyIn, USHORT*puiOut);
368 HRESULT WINAPI VarUI2FromDec(DECIMAL* pdecIn, USHORT* puiOut);
369 HRESULT WINAPI VarUI2FromDisp(IDispatch* pdispIn, LCID lcid, USHORT* puiOut);
371 HRESULT WINAPI VarUI4FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, ULONG*pulOut);
372 HRESULT WINAPI VarUI4FromUI1(BYTE bIn, ULONG*pulOut);
373 HRESULT WINAPI VarUI4FromI2(short uiIn, ULONG*pulOut);
374 HRESULT WINAPI VarUI4FromI4(LONG lIn, ULONG*pulOut);
375 HRESULT WINAPI VarUI4FromR4(FLOAT fltIn, ULONG*pulOut);
376 HRESULT WINAPI VarUI4FromR8(double dblIn, ULONG*pulOut);
377 HRESULT WINAPI VarUI4FromDate(DATE dateIn, ULONG*pulOut);
378 HRESULT WINAPI VarUI4FromBool(VARIANT_BOOL boolIn, ULONG*pulOut);
379 HRESULT WINAPI VarUI4FromI1(CHAR cIn, ULONG*pulOut);
380 HRESULT WINAPI VarUI4FromUI2(USHORT uiIn, ULONG*pulOut);
381 HRESULT WINAPI VarUI4FromCy(CY cyIn, ULONG*pulOut);
382 HRESULT WINAPI VarUI4FromDec(DECIMAL* pdecIn, ULONG* pulOut);
383 HRESULT WINAPI VarUI4FromDisp(IDispatch* pdispIn, LCID lcid, ULONG* pulOut);
385 HRESULT WINAPI VarDecFromUI1(BYTE bIn, DECIMAL*pdecOut);
386 HRESULT WINAPI VarDecFromI2(short uiIn, DECIMAL*pdecOut);
387 HRESULT WINAPI VarDecFromI4(LONG lIn, DECIMAL*pdecOut);
388 HRESULT WINAPI VarDecFromR4(FLOAT fltIn, DECIMAL*pdecOut);
389 HRESULT WINAPI VarDecFromR8(double dblIn, DECIMAL*pdecOut);
390 HRESULT WINAPI VarDecFromDate(DATE dateIn, DECIMAL*pdecOut);
391 HRESULT WINAPI VarDecFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, DECIMAL* pdecOut);
392 HRESULT WINAPI VarDecFromBool(VARIANT_BOOL boolIn, DECIMAL* pdecOut);
393 HRESULT WINAPI VarDecFromI1(CHAR cIn, DECIMAL* pdecOut);
394 HRESULT WINAPI VarDecFromUI2(USHORT uiIn, DECIMAL* pdecOut);
395 HRESULT WINAPI VarDecFromUI4(ULONG ulIn, DECIMAL* pdecOut);
396 HRESULT WINAPI VarDecFromCy(CY cyIn, DECIMAL* pdecOut);
397 HRESULT WINAPI VarDecFromDisp(IDispatch* pdispIn, LCID lcid, DECIMAL* pdecOut);
401 #define VarUI4FromUI4( in, pOut ) ( *(pOut) = (in) )
402 #define VarI4FromI4( in, pOut ) ( *(pOut) = (in) )
404 #define VarUI1FromInt VarUI1FromI4
405 #define VarUI1FromUint VarUI1FromUI4
406 #define VarI2FromInt VarI2FromI4
407 #define VarI2FromUint VarI2FromUI4
408 #define VarI4FromInt VarI4FromI4
409 #define VarI4FromUint VarI4FromUI4
410 #define VarR4FromInt VarR4FromI4
411 #define VarR4FromUint VarR4FromUI4
412 #define VarR8FromInt VarR8FromI4
413 #define VarR8FromUint VarR8FromUI4
414 #define VarDateFromInt VarDateFromI4
415 #define VarDateFromUint VarDateFromUI4
416 #define VarCyFromInt VarCyFromI4
417 #define VarCyFromUint VarCyFromUI4
418 #define VarBstrFromInt VarBstrFromI4
419 #define VarBstrFromUint VarBstrFromUI4
420 #define VarBoolFromInt VarBoolFromI4
421 #define VarBoolFromUint VarBoolFromUI4
422 #define VarI1FromInt VarI1FromI4
423 #define VarI1FromUint VarI1FromUI4
424 #define VarUI2FromInt VarUI2FromI4
425 #define VarUI2FromUint VarUI2FromUI4
426 #define VarUI4FromInt VarUI4FromI4
427 #define VarUI4FromUint VarUI4FromUI4
428 #define VarDecFromInt VarDecFromI4
429 #define VarDecFromUint VarDecFromUI4
430 #define VarIntFromUI1 VarI4FromUI1
431 #define VarIntFromI2 VarI4FromI2
432 #define VarIntFromI4 VarI4FromI4
433 #define VarIntFromR4 VarI4FromR4
434 #define VarIntFromR8 VarI4FromR8
435 #define VarIntFromDate VarI4FromDate
436 #define VarIntFromCy VarI4FromCy
437 #define VarIntFromStr VarI4FromStr
438 #define VarIntFromDisp VarI4FromDisp
439 #define VarIntFromBool VarI4FromBool
440 #define VarIntFromI1 VarI4FromI1
441 #define VarIntFromUI2 VarI4FromUI2
442 #define VarIntFromUI4 VarI4FromUI4
443 #define VarIntFromDec VarI4FromDec
444 #define VarIntFromUint VarI4FromUI4
445 #define VarUintFromUI1 VarUI4FromUI1
446 #define VarUintFromI2 VarUI4FromI2
447 #define VarUintFromI4 VarUI4FromI4
448 #define VarUintFromR4 VarUI4FromR4
449 #define VarUintFromR8 VarUI4FromR8
450 #define VarUintFromDate VarUI4FromDate
451 #define VarUintFromCy VarUI4FromCy
452 #define VarUintFromStr VarUI4FromStr
453 #define VarUintFromDisp VarUI4FromDisp
454 #define VarUintFromBool VarUI4FromBool
455 #define VarUintFromI1 VarUI4FromI1
456 #define VarUintFromUI2 VarUI4FromUI2
457 #define VarUintFromUI4 VarUI4FromUI4
458 #define VarUintFromDec VarUI4FromDec
459 #define VarUintFromInt VarUI4FromI4
462 * Variant Math operations
467 #define VARCMP_NULL 3
469 HRESULT WINAPI VarAdd(LPVARIANT,LPVARIANT,LPVARIANT);
470 HRESULT WINAPI VarAnd(LPVARIANT,LPVARIANT,LPVARIANT);
471 HRESULT WINAPI VarCat(LPVARIANT,LPVARIANT,LPVARIANT);
472 HRESULT WINAPI VarDiv(LPVARIANT,LPVARIANT,LPVARIANT);
473 HRESULT WINAPI VarEqv(LPVARIANT,LPVARIANT,LPVARIANT);
474 HRESULT WINAPI VarIdiv(LPVARIANT,LPVARIANT,LPVARIANT);
475 HRESULT WINAPI VarImp(LPVARIANT,LPVARIANT,LPVARIANT);
476 HRESULT WINAPI VarMod(LPVARIANT,LPVARIANT,LPVARIANT);
477 HRESULT WINAPI VarMul(LPVARIANT,LPVARIANT,LPVARIANT);
478 HRESULT WINAPI VarOr(LPVARIANT,LPVARIANT,LPVARIANT);
479 HRESULT WINAPI VarPow(LPVARIANT,LPVARIANT,LPVARIANT);
480 HRESULT WINAPI VarSub(LPVARIANT,LPVARIANT,LPVARIANT);
481 HRESULT WINAPI VarXor(LPVARIANT,LPVARIANT,LPVARIANT);
483 HRESULT WINAPI VarAbs(LPVARIANT,LPVARIANT);
484 HRESULT WINAPI VarFix(LPVARIANT,LPVARIANT);
485 HRESULT WINAPI VarInt(LPVARIANT,LPVARIANT);
486 HRESULT WINAPI VarNeg(LPVARIANT,LPVARIANT);
487 HRESULT WINAPI VarNot(LPVARIANT,LPVARIANT);
489 HRESULT WINAPI VarRound(LPVARIANT,int,LPVARIANT);
491 HRESULT WINAPI VarCmp(LPVARIANT,LPVARIANT,LCID,ULONG);
495 typedef struct tagPARAMDATA {
496 OLECHAR * szName; /* parameter name */
497 VARTYPE vt; /* parameter type */
498 } PARAMDATA, * LPPARAMDATA;
500 typedef struct tagMETHODDATA {
501 OLECHAR * szName; /* method name */
502 PARAMDATA * ppdata; /* pointer to an array of PARAMDATAs */
503 DISPID dispid; /* method ID */
504 UINT iMeth; /* method index */
505 CALLCONV cc; /* calling convention */
506 UINT cArgs; /* count of arguments */
507 WORD wFlags; /* same wFlags as on IDispatch::Invoke() */
509 } METHODDATA, * LPMETHODDATA;
511 typedef struct tagINTERFACEDATA {
512 METHODDATA * pmethdata; /* pointer to an array of METHODDATAs */
513 UINT cMembers; /* count of members */
514 } INTERFACEDATA, * LPINTERFACEDATA;
516 typedef enum tagREGKIND
524 INT WINAPI DosDateTimeToVariantTime(USHORT,USHORT,DATE*);
526 ULONG WINAPI LHashValOfNameSysA(SYSKIND syskind,LCID lcid,LPCSTR szName);
527 ULONG WINAPI LHashValOfNameSys (SYSKIND syskind,LCID lcid,LPCOLESTR szName);
529 HRESULT WINAPI DispGetParam(DISPPARAMS* pdispparams, UINT position,
530 VARTYPE vtTarg, VARIANT* pvarResult, UINT* puArgErr);
531 HRESULT WINAPI DispGetIDsOfNames(ITypeInfo* ptinfo, OLECHAR** rgszNames,
532 UINT cNames, DISPID* rgdispid);
533 HRESULT WINAPI DispInvoke(void* _this, ITypeInfo* ptinfo, DISPID dispidMember,
534 WORD wFlags, DISPPARAMS* pparams, VARIANT* pvarResult,
535 EXCEPINFO* pexcepinfo, UINT* puArgErr);
536 HRESULT WINAPI CreateDispTypeInfo(INTERFACEDATA* pidata, LCID lcid,
537 ITypeInfo** pptinfo);
538 HRESULT WINAPI CreateStdDispatch(IUnknown* punkOuter, void* pvThis,
539 ITypeInfo* ptinfo, IUnknown** ppunkStdDisp);
540 HRESULT WINAPI DispCallFunc(void* pvInstance, ULONG oVft, CALLCONV cc,
541 VARTYPE vtReturn, UINT cActuals, VARTYPE* prgvt,
542 VARIANTARG** prgpvarg, VARIANT* pvargResult);
549 HRESULT WINAPI CreateTypeLib(SYSKIND,const OLECHAR*,ICreateTypeLib**);
550 HRESULT WINAPI CreateTypeLib2(SYSKIND,LPCOLESTR,ICreateTypeLib2**);
551 HRESULT WINAPI LoadRegTypeLib(REFGUID,WORD,WORD,LCID,ITypeLib**);
552 HRESULT WINAPI LoadTypeLib(const OLECHAR*,ITypeLib**);
553 HRESULT WINAPI LoadTypeLibEx(LPCOLESTR,REGKIND,ITypeLib**);
554 HRESULT WINAPI QueryPathOfRegTypeLib(REFGUID,WORD,WORD,LCID,LPBSTR);
555 HRESULT WINAPI RegisterTypeLib(ITypeLib*,OLECHAR*,OLECHAR*);
556 HRESULT WINAPI UnRegisterTypeLib(REFGUID,WORD,WORD,LCID,SYSKIND);
563 #endif /*__WINE_OLEAUTO_H*/