Bug fixes.
[wine/multimedia.git] / include / oleauto.h
blobafdc6b335d84897ee458c7fbb3d47fae603eb5ef
1 #ifndef __WINE_OLEAUTO_H
2 #define __WINE_OLEAUTO_H
4 #include "wtypes.h"
5 #include "wine/obj_oleaut.h"
6 #ifndef __WINE__
7 #include "oaidl.h"
8 #endif
10 struct tagSAFEARRAY;
11 struct tagSAFEARRAYBOUND;
12 struct tagVARIANT;
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
19 BSTR16 WINAPI SysAllocString16(LPCOLESTR16);
20 BSTR WINAPI SysAllocString(const OLECHAR*);
21 INT16 WINAPI SysReAllocString16(LPBSTR16,LPCOLESTR16);
22 INT WINAPI SysReAllocString(LPBSTR,const OLECHAR*);
23 VOID WINAPI SysFreeString16(BSTR16);
24 VOID WINAPI SysFreeString(BSTR);
25 BSTR16 WINAPI SysAllocStringLen16(const char*, int);
26 BSTR WINAPI SysAllocStringLen(const OLECHAR*, UINT);
27 int WINAPI SysReAllocStringLen16(BSTR16*, const char*, int);
28 int WINAPI SysReAllocStringLen(BSTR*, const OLECHAR*, UINT);
29 int WINAPI SysStringLen16(BSTR16);
30 int WINAPI SysStringLen(BSTR);
32 /*****************************************************************
33 * SafeArray API
36 HRESULT WINAPI
37 SafeArrayAllocDescriptor(UINT cDims, struct tagSAFEARRAY **ppsaOut);
39 HRESULT WINAPI
40 SafeArrayAllocData(struct tagSAFEARRAY *psa);
42 struct tagSAFEARRAY* WINAPI
43 SafeArrayCreate(VARTYPE vt, UINT cDims, struct tagSAFEARRAYBOUND *rgsabound);
45 HRESULT WINAPI
46 SafeArrayDestroyDescriptor(struct tagSAFEARRAY *psa);
48 HRESULT WINAPI
49 SafeArrayPutElement(struct tagSAFEARRAY *psa, LONG *rgIndices, void *pv);
51 HRESULT WINAPI
52 SafeArrayGetElement(struct tagSAFEARRAY *psa, LONG *rgIndices, void *pv);
54 HRESULT WINAPI
55 SafeArrayLock(struct tagSAFEARRAY *psa);
57 HRESULT WINAPI
58 SafeArrayUnlock(struct tagSAFEARRAY *psa);
60 HRESULT WINAPI
61 SafeArrayGetUBound(struct tagSAFEARRAY *psa, UINT nDim, LONG *plUbound);
63 HRESULT WINAPI
64 SafeArrayGetLBound(struct tagSAFEARRAY *psa, UINT nDim, LONG *plLbound);
66 UINT WINAPI
67 SafeArrayGetDim(struct tagSAFEARRAY *psa);
69 UINT WINAPI
70 SafeArrayGetElemsize(struct tagSAFEARRAY *psa);
72 HRESULT WINAPI
73 SafeArrayAccessData(struct tagSAFEARRAY *psa, void **ppvData);
75 HRESULT WINAPI
76 SafeArrayUnaccessData(struct tagSAFEARRAY *psa);
78 HRESULT WINAPI
79 SafeArrayPtrOfIndex(struct tagSAFEARRAY *psa, LONG *rgIndices, void **ppvData);
81 HRESULT WINAPI
82 SafeArrayCopyData(struct tagSAFEARRAY *psaSource, struct tagSAFEARRAY **psaTarget);
84 HRESULT WINAPI
85 SafeArrayDestroyData(struct tagSAFEARRAY *psa);
87 HRESULT WINAPI
88 SafeArrayDestroy(struct tagSAFEARRAY *psa);
90 HRESULT WINAPI
91 SafeArrayCopy(struct tagSAFEARRAY *psa, struct tagSAFEARRAY **ppsaOut);
93 struct tagSAFEARRAY* WINAPI
94 SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements);
96 HRESULT WINAPI
97 SafeArrayRedim(struct tagSAFEARRAY *psa, struct tagSAFEARRAYBOUND *psaboundNew);
100 /* These are macros that help accessing the VARIANT date type.
102 #ifdef __cplusplus
103 #define V_UNION(A, B) ((A)->B)
104 #define V_VT(A) ((A)->vt)
105 #else
106 #define V_UNION(A, B) ((A)->u.B)
107 #define V_VT(A) ((A)->vt)
108 #endif /* cplusplus */
110 #define V_ISBYREF(A) (V_VT(A)&VT_BYREF)
111 #define V_ISARRAY(A) (V_VT(A)&VT_ARRAY)
112 #define V_ISVECTOR(A) (V_VT(A)&VT_VECTOR)
113 #define V_NONE(A) V_I2(A)
115 #define V_UI1(A) V_UNION(A, bVal)
116 #define V_UI1REF(A) V_UNION(A, pbVal)
117 #define V_I2(A) V_UNION(A, iVal)
118 #define V_I2REF(A) V_UNION(A, piVal)
119 #define V_I4(A) V_UNION(A, lVal)
120 #define V_I4REF(A) V_UNION(A, plVal)
121 #define V_R4(A) V_UNION(A, fltVal)
122 #define V_R4REF(A) V_UNION(A, pfltVal)
123 #define V_R8(A) V_UNION(A, dblVal)
124 #define V_R8REF(A) V_UNION(A, pdblVal)
125 #define V_I1(A) V_UNION(A, cVal)
126 #define V_I1REF(A) V_UNION(A, pcVal)
127 #define V_UI2(A) V_UNION(A, uiVal)
128 #define V_UI2REF(A) V_UNION(A, puiVal)
129 #define V_UI4(A) V_UNION(A, ulVal)
130 #define V_UI4REF(A) V_UNION(A, pulVal)
131 #define V_INT(A) V_UNION(A, intVal)
132 #define V_INTREF(A) V_UNION(A, pintVal)
133 #define V_UINT(A) V_UNION(A, uintVal)
134 #define V_UINTREF(A) V_UNION(A, puintVal)
135 #define V_CY(A) V_UNION(A, cyVal)
136 #define V_CYREF(A) V_UNION(A, pcyVal)
137 #define V_DATE(A) V_UNION(A, date)
138 #define V_DATEREF(A) V_UNION(A, pdate)
139 #define V_BSTR(A) V_UNION(A, bstrVal)
140 #define V_BSTRREF(A) V_UNION(A, pbstrVal)
141 #define V_DISPATCH(A) V_UNION(A, pdispVal)
142 #define V_DISPATCHREF(A) V_UNION(A, ppdispVal)
143 #define V_ERROR(A) V_UNION(A, scode)
144 #define V_ERRORREF(A) V_UNION(A, pscode)
145 #define V_BOOL(A) V_UNION(A, boolVal)
146 #define V_BOOLREF(A) V_UNION(A, pboolVal)
147 #define V_UNKNOWN(A) V_UNION(A, punkVal)
148 #define V_UNKNOWNREF(A) V_UNION(A, ppunkVal)
149 #define V_VARIANTREF(A) V_UNION(A, pvarVal)
150 #define V_ARRAY(A) V_UNION(A, parray)
151 #define V_ARRAYREF(A) V_UNION(A, pparray)
152 #define V_BYREF(A) V_UNION(A, byref)
153 #define V_DECIMAL(A) V_UNION(A, decVal)
154 #define V_DECIMALREF(A) V_UNION(A, pdecVal)
157 * VARIANT API
160 void WINAPI VariantInit(struct tagVARIANT* pvarg);
161 HRESULT WINAPI VariantClear(struct tagVARIANT* pvarg);
162 HRESULT WINAPI VariantCopy(struct tagVARIANT* pvargDest, struct tagVARIANT* pvargSrc);
163 HRESULT WINAPI VariantCopyInd(struct tagVARIANT* pvargDest, struct tagVARIANT* pvargSrc);
164 HRESULT WINAPI VariantChangeType(struct tagVARIANT* pvargDest, struct tagVARIANT* pvargSrc,
165 USHORT wFlags, VARTYPE vt);
166 HRESULT WINAPI VariantChangeTypeEx(struct tagVARIANT* pvargDest, struct tagVARIANT* pvargSrc,
167 LCID lcid, USHORT wFlags, VARTYPE vt);
170 * These flags are used for the VariantChangeType and VariantChangeTypeEx APIs.
174 * This one is of general use.
176 #define VARIANT_NOVALUEPROP 0x1
178 * This one is used for conversions of VT_BOOL to VT_BSTR,
179 * the API will convert to "True"|"False" instead of "-1"|"0".
181 #define VARIANT_ALPHABOOL 0x2
183 * This one is used for conversions to or from a VT_BSTR string,
184 * it passes LOCALE_NOUSEROVERRIDE to the core (low-level) coercion routines.
185 * This means it will use the system default locale settings instead of custom
186 * local settings.
188 #define VARIANT_NOUSEROVERRIDE 0x4
192 * VARTYPE Coercion API
195 /* Omits the date portion and return only the time value.
197 #define VAR_TIMEVALUEONLY ((DWORD)0x00000001)
198 /* Omits the time portion and return only the date value.
200 #define VAR_DATEVALUEONLY ((DWORD)0x00000002)
203 HRESULT WINAPI VarUI1FromI2(short sIn, BYTE* pbOut);
204 HRESULT WINAPI VarUI1FromI4(LONG lIn, BYTE* pbOut);
205 HRESULT WINAPI VarUI1FromR4(FLOAT fltIn, BYTE* pbOut);
206 HRESULT WINAPI VarUI1FromR8(double dblIn, BYTE* pbOut);
207 HRESULT WINAPI VarUI1FromDate(DATE dateIn, BYTE* pbOut);
208 HRESULT WINAPI VarUI1FromBool(VARIANT_BOOL boolIn, BYTE* pbOut);
209 HRESULT WINAPI VarUI1FromI1(CHAR cIn, BYTE*pbOut);
210 HRESULT WINAPI VarUI1FromUI2(USHORT uiIn, BYTE*pbOut);
211 HRESULT WINAPI VarUI1FromUI4(ULONG ulIn, BYTE*pbOut);
212 HRESULT WINAPI VarUI1FromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, BYTE* pbOut);
213 HRESULT WINAPI VarUI1FromCy(CY cyIn, BYTE* pbOut);
216 HRESULT WINAPI VarUI1FromDec32(DECIMAL*pdecIn, BYTE*pbOut);
217 HRESULT WINAPI VarUI1FromDisp32(IDispatch* pdispIn, LCID lcid, BYTE* pbOut);
220 HRESULT WINAPI VarI2FromUI1(BYTE bIn, short* psOut);
221 HRESULT WINAPI VarI2FromI4(LONG lIn, short* psOut);
222 HRESULT WINAPI VarI2FromR4(FLOAT fltIn, short* psOut);
223 HRESULT WINAPI VarI2FromR8(double dblIn, short* psOut);
224 HRESULT WINAPI VarI2FromDate(DATE dateIn, short* psOut);
225 HRESULT WINAPI VarI2FromBool(VARIANT_BOOL boolIn, short* psOut);
226 HRESULT WINAPI VarI2FromI1(CHAR cIn, short*psOut);
227 HRESULT WINAPI VarI2FromUI2(USHORT uiIn, short*psOut);
228 HRESULT WINAPI VarI2FromUI4(ULONG ulIn, short*psOut);
229 HRESULT WINAPI VarI2FromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, short* psOut);
230 HRESULT WINAPI VarI2FromCy(CY cyIn, short* psOut);
232 HRESULT WINAPI VarI2FromDec32(DECIMAL*pdecIn, short*psOut);
233 HRESULT WINAPI VarI2FromDisp32(IDispatch* pdispIn, LCID lcid, short* psOut);
236 HRESULT WINAPI VarI4FromUI1(BYTE bIn, LONG* plOut);
237 HRESULT WINAPI VarI4FromI2(short sIn, LONG* plOut);
238 HRESULT WINAPI VarI4FromR4(FLOAT fltIn, LONG* plOut);
239 HRESULT WINAPI VarI4FromR8(double dblIn, LONG* plOut);
240 HRESULT WINAPI VarI4FromDate(DATE dateIn, LONG* plOut);
241 HRESULT WINAPI VarI4FromBool(VARIANT_BOOL boolIn, LONG* plOut);
242 HRESULT WINAPI VarI4FromI1(CHAR cIn, LONG* plOut);
243 HRESULT WINAPI VarI4FromUI2(USHORT uiIn, LONG*plOut);
244 HRESULT WINAPI VarI4FromUI4(ULONG ulIn, LONG*plOut);
245 HRESULT WINAPI VarI4FromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, LONG* plOut);
246 HRESULT WINAPI VarI4FromCy(CY cyIn, LONG* plOut);
248 HRESULT WINAPI VarI4FromDec32(DECIMAL*pdecIn, LONG*plOut);
249 HRESULT WINAPI VarI4FromDisp32(IDispatch* pdispIn, LCID lcid, LONG* plOut);
252 HRESULT WINAPI VarR4FromUI1(BYTE bIn, FLOAT* pfltOut);
253 HRESULT WINAPI VarR4FromI2(short sIn, FLOAT* pfltOut);
254 HRESULT WINAPI VarR4FromI4(LONG lIn, FLOAT* pfltOut);
255 HRESULT WINAPI VarR4FromR8(double dblIn, FLOAT* pfltOut);
256 HRESULT WINAPI VarR4FromDate(DATE dateIn, FLOAT* pfltOut);
257 HRESULT WINAPI VarR4FromBool(VARIANT_BOOL boolIn, FLOAT* pfltOut);
258 HRESULT WINAPI VarR4FromI1(CHAR cIn, FLOAT*pfltOut);
259 HRESULT WINAPI VarR4FromUI2(USHORT uiIn, FLOAT*pfltOut);
260 HRESULT WINAPI VarR4FromUI4(ULONG ulIn, FLOAT*pfltOut);
261 HRESULT WINAPI VarR4FromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, FLOAT*pfltOut);
262 HRESULT WINAPI VarR4FromCy(CY cyIn, FLOAT* pfltOut);
264 HRESULT WINAPI VarR4FromDec32(DECIMAL*pdecIn, FLOAT*pfltOut);
265 HRESULT WINAPI VarR4FromDisp32(IDispatch* pdispIn, LCID lcid, FLOAT* pfltOut);
268 HRESULT WINAPI VarR8FromUI1(BYTE bIn, double* pdblOut);
269 HRESULT WINAPI VarR8FromI2(short sIn, double* pdblOut);
270 HRESULT WINAPI VarR8FromI4(LONG lIn, double* pdblOut);
271 HRESULT WINAPI VarR8FromR4(FLOAT fltIn, double* pdblOut);
272 HRESULT WINAPI VarR8FromDate(DATE dateIn, double* pdblOut);
273 HRESULT WINAPI VarR8FromBool(VARIANT_BOOL boolIn, double* pdblOut);
274 HRESULT WINAPI VarR8FromI1(CHAR cIn, double*pdblOut);
275 HRESULT WINAPI VarR8FromUI2(USHORT uiIn, double*pdblOut);
276 HRESULT WINAPI VarR8FromUI4(ULONG ulIn, double*pdblOut);
277 HRESULT WINAPI VarR8FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, double*pdblOut);
278 HRESULT WINAPI VarR8FromCy(CY cyIn, double* pdblOut);
280 HRESULT WINAPI VarR8FromDec32(DECIMAL*pdecIn, double*pdblOut);
281 HRESULT WINAPI VarR8FromDisp32(IDispatch* pdispIn, LCID lcid, double* pdblOut);
284 HRESULT WINAPI VarDateFromUI1(BYTE bIn, DATE* pdateOut);
285 HRESULT WINAPI VarDateFromI2(short sIn, DATE* pdateOut);
286 HRESULT WINAPI VarDateFromI4(LONG lIn, DATE* pdateOut);
287 HRESULT WINAPI VarDateFromR4(FLOAT fltIn, DATE* pdateOut);
288 HRESULT WINAPI VarDateFromR8(double dblIn, DATE* pdateOut);
289 HRESULT WINAPI VarDateFromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, DATE*pdateOut);
290 HRESULT WINAPI VarDateFromI1(CHAR cIn, DATE*pdateOut);
291 HRESULT WINAPI VarDateFromUI2(USHORT uiIn, DATE*pdateOut);
292 HRESULT WINAPI VarDateFromUI4(ULONG ulIn, DATE*pdateOut);
293 HRESULT WINAPI VarDateFromBool(VARIANT_BOOL boolIn, DATE* pdateOut);
294 HRESULT WINAPI VarDateFromCy(CY cyIn, DATE* pdateOut);
296 HRESULT WINAPI VarDateFromDec32(DECIMAL*pdecIn, DATE*pdateOut);
297 HRESULT WINAPI VarDateFromDisp32(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(CHAR cIn, CY*pcyOut);
308 HRESULT WINAPI VarCyFromUI2(USHORT uiIn, CY*pcyOut);
309 HRESULT WINAPI VarCyFromUI4(ULONG ulIn, CY*pcyOut);
311 HRESULT WINAPI VarCyFromDec32(DECIMAL*pdecIn, CY*pcyOut);
312 HRESULT WINAPI VarCyFromStr32(OLECHAR32* strIn, LCID lcid, ULONG dwFlags, CY* pcyOut);
313 HRESULT WINAPI VarCyFromDisp32(IDispatch* pdispIn, LCID lcid, CY* pcyOut);
316 HRESULT WINAPI VarBstrFromUI1(BYTE bVal, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
317 HRESULT WINAPI VarBstrFromI2(short iVal, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
318 HRESULT WINAPI VarBstrFromI4(LONG lIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
319 HRESULT WINAPI VarBstrFromR4(FLOAT fltIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
320 HRESULT WINAPI VarBstrFromR8(double dblIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
321 HRESULT WINAPI VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR *pbstrOut);
322 HRESULT WINAPI VarBstrFromDate(DATE dateIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
323 HRESULT WINAPI VarBstrFromBool(VARIANT_BOOL boolIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
324 HRESULT WINAPI VarBstrFromI1(CHAR cIn, LCID lcid, ULONG dwFlags, BSTR*pbstrOut);
325 HRESULT WINAPI VarBstrFromUI2(USHORT uiIn, LCID lcid, ULONG dwFlags, BSTR*pbstrOut);
326 HRESULT WINAPI VarBstrFromUI4(ULONG ulIn, LCID lcid, ULONG dwFlags, BSTR*pbstrOut);
327 HRESULT WINAPI VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
329 HRESULT WINAPI VarBstrFromDec32(DECIMAL*pdecIn, LCID lcid, ULONG dwFlags, BSTR32*pbstrOut);
330 HRESULT WINAPI VarBstrFromDisp32(IDispatch* pdispIn, LCID lcid, ULONG dwFlags, BSTR32* pbstrOut);
333 HRESULT WINAPI VarBoolFromUI1(BYTE bIn, VARIANT_BOOL* pboolOut);
334 HRESULT WINAPI VarBoolFromI2(short sIn, VARIANT_BOOL* pboolOut);
335 HRESULT WINAPI VarBoolFromI4(LONG lIn, VARIANT_BOOL* pboolOut);
336 HRESULT WINAPI VarBoolFromR4(FLOAT fltIn, VARIANT_BOOL* pboolOut);
337 HRESULT WINAPI VarBoolFromR8(double dblIn, VARIANT_BOOL* pboolOut);
338 HRESULT WINAPI VarBoolFromDate(DATE dateIn, VARIANT_BOOL* pboolOut);
339 HRESULT WINAPI VarBoolFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, VARIANT_BOOL* pboolOut);
340 HRESULT WINAPI VarBoolFromI1(CHAR cIn, VARIANT_BOOL*pboolOut);
341 HRESULT WINAPI VarBoolFromUI2(USHORT uiIn, VARIANT_BOOL*pboolOut);
342 HRESULT WINAPI VarBoolFromUI4(ULONG ulIn, VARIANT_BOOL*pboolOut);
343 HRESULT WINAPI VarBoolFromCy(CY cyIn, VARIANT_BOOL* pboolOut);
345 HRESULT WINAPI VarBoolFromDec32(DECIMAL*pdecIn, VARIANT_BOOL*pboolOut);
346 HRESULT WINAPI VarBoolFromDisp32(IDispatch* pdispIn, LCID lcid, VARIANT_BOOL* pboolOut);
349 HRESULT WINAPI VarI1FromUI1(BYTE bIn, CHAR*pcOut);
350 HRESULT WINAPI VarI1FromI2(short uiIn, CHAR*pcOut);
351 HRESULT WINAPI VarI1FromI4(LONG lIn, CHAR*pcOut);
352 HRESULT WINAPI VarI1FromR4(FLOAT fltIn, CHAR*pcOut);
353 HRESULT WINAPI VarI1FromR8(double dblIn, CHAR*pcOut);
354 HRESULT WINAPI VarI1FromDate(DATE dateIn, CHAR*pcOut);
355 HRESULT WINAPI VarI1FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, CHAR*pcOut);
356 HRESULT WINAPI VarI1FromBool(VARIANT_BOOL boolIn, CHAR*pcOut);
357 HRESULT WINAPI VarI1FromUI2(USHORT uiIn, CHAR*pcOut);
358 HRESULT WINAPI VarI1FromUI4(ULONG ulIn, CHAR*pcOut);
359 HRESULT WINAPI VarI1FromCy(CY cyIn, CHAR*pcOut);
361 HRESULT WINAPI VarI1FromDec32(DECIMAL*pdecIn, CHAR*pcOut);
362 HRESULT WINAPI VarI1FromDisp32(IDispatch*pdispIn, LCID lcid, CHAR*pcOut);
365 HRESULT WINAPI VarUI2FromUI1(BYTE bIn, USHORT*puiOut);
366 HRESULT WINAPI VarUI2FromI2(short uiIn, USHORT*puiOut);
367 HRESULT WINAPI VarUI2FromI4(LONG lIn, USHORT*puiOut);
368 HRESULT WINAPI VarUI2FromR4(FLOAT fltIn, USHORT*puiOut);
369 HRESULT WINAPI VarUI2FromR8(double dblIn, USHORT*puiOut);
370 HRESULT WINAPI VarUI2FromDate(DATE dateIn, USHORT*puiOut);
371 HRESULT WINAPI VarUI2FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, USHORT*puiOut);
372 HRESULT WINAPI VarUI2FromBool(VARIANT_BOOL boolIn, USHORT*puiOut);
373 HRESULT WINAPI VarUI2FromI1(CHAR cIn, USHORT*puiOut);
374 HRESULT WINAPI VarUI2FromUI4(ULONG ulIn, USHORT*puiOut);
375 HRESULT WINAPI VarUI2FromCy(CY cyIn, USHORT*puiOut);
377 HRESULT WINAPI VarUI2FromDec32(DECIMAL*pdecIn, USHORT*puiOut);
378 HRESULT WINAPI VarUI2FromDisp32(IDispatch*pdispIn, LCID lcid, USHORT*puiOut);
381 HRESULT WINAPI VarUI4FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, ULONG*pulOut);
382 HRESULT WINAPI VarUI4FromUI1(BYTE bIn, ULONG*pulOut);
383 HRESULT WINAPI VarUI4FromI2(short uiIn, ULONG*pulOut);
384 HRESULT WINAPI VarUI4FromI4(LONG lIn, ULONG*pulOut);
385 HRESULT WINAPI VarUI4FromR4(FLOAT fltIn, ULONG*pulOut);
386 HRESULT WINAPI VarUI4FromR8(double dblIn, ULONG*pulOut);
387 HRESULT WINAPI VarUI4FromDate(DATE dateIn, ULONG*pulOut);
388 HRESULT WINAPI VarUI4FromBool(VARIANT_BOOL boolIn, ULONG*pulOut);
389 HRESULT WINAPI VarUI4FromI1(CHAR cIn, ULONG*pulOut);
390 HRESULT WINAPI VarUI4FromUI2(USHORT uiIn, ULONG*pulOut);
391 HRESULT WINAPI VarUI4FromCy(CY cyIn, ULONG*pulOut);
393 HRESULT WINAPI VarUI4FromDec32(DECIMAL*pdecIn, ULONG*pulOut);
394 HRESULT WINAPI VarUI4FromDisp32(IDispatch*pdispIn, LCID lcid, ULONG*pulOut);
396 HRESULT WINAPI VarDecFromUI132(BYTE bIn, DECIMAL*pdecOut);
397 HRESULT WINAPI VarDecFromI232(short uiIn, DECIMAL*pdecOut);
398 HRESULT WINAPI VarDecFromI432(LONG lIn, DECIMAL*pdecOut);
399 HRESULT WINAPI VarDecFromR432(FLOAT fltIn, DECIMAL*pdecOut);
400 HRESULT WINAPI VarDecFromR832(double dblIn, DECIMAL*pdecOut);
401 HRESULT WINAPI VarDecFromDate32(DATE dateIn, DECIMAL*pdecOut);
402 HRESULT WINAPI VarDecFromStr32(OLECHAR32*strIn, LCID lcid, ULONG dwFlags, DECIMAL*pdecOut);
403 HRESULT WINAPI VarDecFromBool32(VARIANT_BOOL boolIn, DECIMAL*pdecOut);
404 HRESULT WINAPI VarDecFromI132(CHAR cIn, DECIMAL*pdecOut);
405 HRESULT WINAPI VarDecFromUI232(USHORT uiIn, DECIMAL*pdecOut);
406 HRESULT WINAPI VarDecFromUI432(ULONG ulIn, DECIMAL*pdecOut);
407 HRESULT WINAPI VarDecFromCy32(CY cyIn, DECIMAL*pdecOut);
408 HRESULT WINAPI VarDecFromDisp32(IDispatch*pdispIn, LCID lcid, DECIMAL*pdecOut);
413 #define VarUI4FromUI4( in, pOut ) ( *(pOut) = (in) )
414 #define VarI4FromI4( in, pOut ) ( *(pOut) = (in) )
416 #define VarUI1FromInt VarUI1FromI4
417 #define VarUI1FromUint VarUI1FromUI4
418 #define VarI2FromInt VarI2FromI4
419 #define VarI2FromUint VarI2FromUI4
420 #define VarI4FromInt VarI4FromI432
421 #define VarI4FromUint VarI4FromUI4
422 #define VarR4FromInt VarR4FromI4
423 #define VarR4FromUint VarR4FromUI4
424 #define VarR8FromInt VarR8FromI4
425 #define VarR8FromUint VarR8FromUI4
426 #define VarDateFromInt VarDateFromI4
427 #define VarDateFromUint VarDateFromUI4
428 #define VarCyFromInt VarCyFromI4
429 #define VarCyFromUint VarCyFromUI4
430 #define VarBstrFromInt VarBstrFromI4
431 #define VarBstrFromUint VarBstrFromUI4
432 #define VarBoolFromInt VarBoolFromI4
433 #define VarBoolFromUint VarBoolFromUI4
434 #define VarI1FromInt VarI1FromI4
435 #define VarI1FromUint VarI1FromUI4
436 #define VarUI2FromInt VarUI2FromI4
437 #define VarUI2FromUint VarUI2FromUI4
438 #define VarUI4FromInt VarUI4FromI4
439 #define VarUI4FromUint VarUI4FromUI432
440 #define VarDecFromInt VarDecFromI432
441 #define VarDecFromUint VarDecFromUI432
442 #define VarIntFromUI1 VarI4FromUI1
443 #define VarIntFromI2 VarI4FromI2
444 #define VarIntFromI4 VarI4FromI432
445 #define VarIntFromR4 VarI4FromR4
446 #define VarIntFromR8 VarI4FromR8
447 #define VarIntFromDate VarI4FromDate
448 #define VarIntFromCy VarI4FromCy
449 #define VarIntFromStr VarI4FromStr
450 #define VarIntFromDisp VarI4FromDisp32
451 #define VarIntFromBool VarI4FromBool
452 #define VarIntFromI1 VarI4FromI1
453 #define VarIntFromUI2 VarI4FromUI2
454 #define VarIntFromUI4 VarI4FromUI4
455 #define VarIntFromDec VarI4FromDec32
456 #define VarIntFromUint VarI4FromUI4
457 #define VarUintFromUI1 VarUI4FromUI1
458 #define VarUintFromI2 VarUI4FromI2
459 #define VarUintFromI4 VarUI4FromI4
460 #define VarUintFromR4 VarUI4FromR4
461 #define VarUintFromR8 VarUI4FromR8
462 #define VarUintFromDate VarUI4FromDate
463 #define VarUintFromCy VarUI4FromCy
464 #define VarUintFromStr VarUI4FromStr
465 #define VarUintFromDisp VarUI4FromDisp32
466 #define VarUintFromBool VarUI4FromBool
467 #define VarUintFromI1 VarUI4FromI1
468 #define VarUintFromUI2 VarUI4FromUI2
469 #define VarUintFromUI4 VarUI4FromUI432
470 #define VarUintFromDec VarUI4FromDec32
471 #define VarUintFromInt VarUI4FromI4
473 #ifdef __cplusplus
474 } /* extern "C" */
475 #endif
477 typedef struct tagPARAMDATA {
478 OLECHAR16 * szName; /* parameter name */
479 VARTYPE vt; /* parameter type */
480 } PARAMDATA, * LPPARAMDATA;
482 typedef struct tagMETHODDATA {
483 OLECHAR16 * szName; /* method name */
484 PARAMDATA * ppdata; /* pointer to an array of PARAMDATAs */
485 DISPID dispid; /* method ID */
486 UINT16 iMeth; /* method index */
487 CALLCONV cc; /* calling convention */
488 UINT16 cArgs; /* count of arguments */
489 WORD wFlags; /* same wFlags as on IDispatch::Invoke() */
490 VARTYPE vtReturn;
491 } METHODDATA, * LPMETHODDATA;
493 typedef struct tagINTERFACEDATA {
494 METHODDATA * pmethdata; /* pointer to an array of METHODDATAs */
495 UINT16 cMembers; /* count of members */
496 } INTERFACEDATA, * LPINTERFACEDATA;
498 typedef enum tagREGKIND
500 REGKIND_DEFAULT,
501 REGKIND_REGISTER,
502 REGKIND_NONE
503 } REGKIND;
506 HRESULT WINAPI LoadTypeLib(OLECHAR *szFile, ITypeLib **pptLib);
507 HRESULT WINAPI LoadTypeLibEx(LPOLESTR szFile, REGKIND regKind, ITypeLib **pptLib);
510 #endif /*__WINE_OLEAUTO_H*/