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