source: trunk/include/win/oleauto.h@ 5200

Last change on this file since 5200 was 4959, checked in by sandervl, 25 years ago

header updates

File size: 22.5 KB
Line 
1#ifndef __WINE_OLEAUTO_H
2#define __WINE_OLEAUTO_H
3
4#include "wtypes.h"
5#include "wine/obj_base.h"
6#include "wine/obj_oleaut.h"
7#include "wine/obj_errorinfo.h"
8
9#ifndef __WINE__
10#include "oaidl.h"
11#endif
12
13struct tagSAFEARRAY;
14struct tagSAFEARRAYBOUND;
15struct tagVARIANT;
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21
22/*
23 * BSTR API
24 */
25
26BSTR WINAPI SysAllocString(const OLECHAR*);
27BSTR WINAPI SysAllocStringByteLen(LPCSTR,UINT);
28BSTR WINAPI SysAllocStringLen(const OLECHAR*,UINT);
29void WINAPI SysFreeString(BSTR);
30INT WINAPI SysReAllocString(LPBSTR,const OLECHAR*);
31int WINAPI SysReAllocStringLen(BSTR*,const OLECHAR*,UINT);
32int WINAPI SysStringByteLen(BSTR);
33int WINAPI SysStringLen(BSTR);
34
35
36/*****************************************************************
37 * ErrorInfo API
38 */
39
40HRESULT WINAPI SetErrorInfo(ULONG dwReserved, IErrorInfo *perrinfo);
41HRESULT WINAPI GetErrorInfo(ULONG dwReserved, IErrorInfo **pperrinfo);
42HRESULT WINAPI CreateErrorInfo(ICreateErrorInfo **pperrinfo);
43
44/*****************************************************************
45 * SafeArray API
46 */
47
48HRESULT WINAPI
49SafeArrayAllocDescriptor(UINT cDims, struct tagSAFEARRAY **ppsaOut);
50
51HRESULT WINAPI
52SafeArrayAllocData(struct tagSAFEARRAY *psa);
53
54struct tagSAFEARRAY * WINAPI
55SafeArrayCreate(VARTYPE vt, UINT cDims, struct tagSAFEARRAYBOUND *rgsabound);
56
57HRESULT WINAPI
58SafeArrayDestroyDescriptor(struct tagSAFEARRAY *psa);
59
60HRESULT WINAPI
61SafeArrayPutElement(struct tagSAFEARRAY *psa, LONG *rgIndices, void *pv);
62
63HRESULT WINAPI
64SafeArrayGetElement(struct tagSAFEARRAY *psa, LONG *rgIndices, void *pv);
65
66HRESULT WINAPI
67SafeArrayLock(struct tagSAFEARRAY *psa);
68
69HRESULT WINAPI
70SafeArrayUnlock(struct tagSAFEARRAY *psa);
71
72HRESULT WINAPI
73SafeArrayGetUBound(struct tagSAFEARRAY *psa, UINT nDim, LONG *plUbound);
74
75HRESULT WINAPI
76SafeArrayGetLBound(struct tagSAFEARRAY *psa, UINT nDim, LONG *plLbound);
77
78UINT WINAPI
79SafeArrayGetDim(struct tagSAFEARRAY *psa);
80
81UINT WINAPI
82SafeArrayGetElemsize(struct tagSAFEARRAY *psa);
83
84HRESULT WINAPI
85SafeArrayAccessData(struct tagSAFEARRAY *psa, void **ppvData);
86
87HRESULT WINAPI
88SafeArrayUnaccessData(struct tagSAFEARRAY *psa);
89
90HRESULT WINAPI
91SafeArrayPtrOfIndex(struct tagSAFEARRAY *psa, LONG *rgIndices, void **ppvData);
92
93HRESULT WINAPI
94SafeArrayCopyData(struct tagSAFEARRAY *psaSource, struct tagSAFEARRAY **psaTarget);
95
96HRESULT WINAPI
97SafeArrayDestroyData(struct tagSAFEARRAY *psa);
98
99HRESULT WINAPI
100SafeArrayDestroy(struct tagSAFEARRAY *psa);
101
102HRESULT WINAPI
103SafeArrayCopy(struct tagSAFEARRAY *psa, struct tagSAFEARRAY **ppsaOut);
104
105struct tagSAFEARRAY *WINAPI
106SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements);
107
108HRESULT WINAPI
109SafeArrayRedim(struct tagSAFEARRAY *psa, struct tagSAFEARRAYBOUND *psaboundNew);
110
111
112/* These are macros that help accessing the VARIANT date type.
113 */
114#if defined(__cplusplus) && !defined(NONAMELESSUNION)
115#define V_UNION(A, B) ((A)->B)
116#define V_VT(A) ((A)->vt)
117#else
118#define V_UNION(A, B) ((A)->u.B)
119#define V_VT(A) ((A)->vt)
120#endif /* cplusplus */
121
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)
126
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)
167
168/*
169 * VARIANT API
170 */
171
172void WINAPI VariantInit(struct tagVARIANT* pvarg);
173HRESULT WINAPI VariantClear(struct tagVARIANT* pvarg);
174HRESULT WINAPI VariantCopy(struct tagVARIANT* pvargDest, struct tagVARIANT* pvargSrc);
175HRESULT WINAPI VariantCopyInd(struct tagVARIANT* pvargDest, struct tagVARIANT* pvargSrc);
176HRESULT WINAPI VariantChangeType(struct tagVARIANT* pvargDest, struct tagVARIANT* pvargSrc,
177 USHORT wFlags, VARTYPE vt);
178HRESULT WINAPI VariantChangeTypeEx(struct tagVARIANT* pvargDest, struct tagVARIANT* pvargSrc,
179 LCID lcid, USHORT wFlags, VARTYPE vt);
180
181/*
182 * These flags are used for the VariantChangeType and VariantChangeTypeEx APIs.
183 */
184
185/*
186 * This one is of general use.
187 */
188#define VARIANT_NOVALUEPROP 0x1
189/*
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".
192 */
193#define VARIANT_ALPHABOOL 0x2
194/*
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
198 * local settings.
199 */
200#define VARIANT_NOUSEROVERRIDE 0x4
201
202
203/*
204 * VARTYPE Coercion API
205 */
206
207/* Omits the date portion and return only the time value.
208 */
209#define VAR_TIMEVALUEONLY ((DWORD)0x00000001)
210/* Omits the time portion and return only the date value.
211 */
212#define VAR_DATEVALUEONLY ((DWORD)0x00000002)
213
214
215HRESULT WINAPI VarUI1FromI2(short sIn, BYTE* pbOut);
216HRESULT WINAPI VarUI1FromI4(LONG lIn, BYTE* pbOut);
217HRESULT WINAPI VarUI1FromR4(FLOAT fltIn, BYTE* pbOut);
218HRESULT WINAPI VarUI1FromR8(double dblIn, BYTE* pbOut);
219HRESULT WINAPI VarUI1FromDate(DATE dateIn, BYTE* pbOut);
220HRESULT WINAPI VarUI1FromBool(VARIANT_BOOL boolIn, BYTE* pbOut);
221HRESULT WINAPI VarUI1FromI1(CHAR cIn, BYTE*pbOut);
222HRESULT WINAPI VarUI1FromUI2(USHORT uiIn, BYTE*pbOut);
223HRESULT WINAPI VarUI1FromUI4(ULONG ulIn, BYTE*pbOut);
224HRESULT WINAPI VarUI1FromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, BYTE* pbOut);
225HRESULT WINAPI VarUI1FromCy(CY cyIn, BYTE* pbOut);
226
227/*
228HRESULT WINAPI VarUI1FromDec32(DECIMAL*pdecIn, BYTE*pbOut);
229HRESULT WINAPI VarUI1FromDisp32(IDispatch* pdispIn, LCID lcid, BYTE* pbOut);
230*/
231
232HRESULT WINAPI VarI2FromUI1(BYTE bIn, short* psOut);
233HRESULT WINAPI VarI2FromI4(LONG lIn, short* psOut);
234HRESULT WINAPI VarI2FromR4(FLOAT fltIn, short* psOut);
235HRESULT WINAPI VarI2FromR8(double dblIn, short* psOut);
236HRESULT WINAPI VarI2FromDate(DATE dateIn, short* psOut);
237HRESULT WINAPI VarI2FromBool(VARIANT_BOOL boolIn, short* psOut);
238HRESULT WINAPI VarI2FromI1(CHAR cIn, short*psOut);
239HRESULT WINAPI VarI2FromUI2(USHORT uiIn, short*psOut);
240HRESULT WINAPI VarI2FromUI4(ULONG ulIn, short*psOut);
241HRESULT WINAPI VarI2FromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, short* psOut);
242HRESULT WINAPI VarI2FromCy(CY cyIn, short* psOut);
243/*
244HRESULT WINAPI VarI2FromDec32(DECIMAL*pdecIn, short*psOut);
245HRESULT WINAPI VarI2FromDisp32(IDispatch* pdispIn, LCID lcid, short* psOut);
246*/
247
248HRESULT WINAPI VarI4FromUI1(BYTE bIn, LONG* plOut);
249HRESULT WINAPI VarI4FromI2(short sIn, LONG* plOut);
250HRESULT WINAPI VarI4FromR4(FLOAT fltIn, LONG* plOut);
251HRESULT WINAPI VarI4FromR8(double dblIn, LONG* plOut);
252HRESULT WINAPI VarI4FromDate(DATE dateIn, LONG* plOut);
253HRESULT WINAPI VarI4FromBool(VARIANT_BOOL boolIn, LONG* plOut);
254HRESULT WINAPI VarI4FromI1(CHAR cIn, LONG* plOut);
255HRESULT WINAPI VarI4FromUI2(USHORT uiIn, LONG*plOut);
256HRESULT WINAPI VarI4FromUI4(ULONG ulIn, LONG*plOut);
257HRESULT WINAPI VarI4FromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, LONG* plOut);
258HRESULT WINAPI VarI4FromCy(CY cyIn, LONG* plOut);
259/*
260HRESULT WINAPI VarI4FromDec32(DECIMAL*pdecIn, LONG*plOut);
261HRESULT WINAPI VarI4FromDisp32(IDispatch* pdispIn, LCID lcid, LONG* plOut);
262*/
263
264HRESULT WINAPI VarR4FromUI1(BYTE bIn, FLOAT* pfltOut);
265HRESULT WINAPI VarR4FromI2(short sIn, FLOAT* pfltOut);
266HRESULT WINAPI VarR4FromI4(LONG lIn, FLOAT* pfltOut);
267HRESULT WINAPI VarR4FromR8(double dblIn, FLOAT* pfltOut);
268HRESULT WINAPI VarR4FromDate(DATE dateIn, FLOAT* pfltOut);
269HRESULT WINAPI VarR4FromBool(VARIANT_BOOL boolIn, FLOAT* pfltOut);
270HRESULT WINAPI VarR4FromI1(CHAR cIn, FLOAT*pfltOut);
271HRESULT WINAPI VarR4FromUI2(USHORT uiIn, FLOAT*pfltOut);
272HRESULT WINAPI VarR4FromUI4(ULONG ulIn, FLOAT*pfltOut);
273HRESULT WINAPI VarR4FromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, FLOAT*pfltOut);
274HRESULT WINAPI VarR4FromCy(CY cyIn, FLOAT* pfltOut);
275/*
276HRESULT WINAPI VarR4FromDec32(DECIMAL*pdecIn, FLOAT*pfltOut);
277HRESULT WINAPI VarR4FromDisp32(IDispatch* pdispIn, LCID lcid, FLOAT* pfltOut);
278*/
279
280HRESULT WINAPI VarR8FromUI1(BYTE bIn, double* pdblOut);
281HRESULT WINAPI VarR8FromI2(short sIn, double* pdblOut);
282HRESULT WINAPI VarR8FromI4(LONG lIn, double* pdblOut);
283HRESULT WINAPI VarR8FromR4(FLOAT fltIn, double* pdblOut);
284HRESULT WINAPI VarR8FromDate(DATE dateIn, double* pdblOut);
285HRESULT WINAPI VarR8FromBool(VARIANT_BOOL boolIn, double* pdblOut);
286HRESULT WINAPI VarR8FromI1(CHAR cIn, double*pdblOut);
287HRESULT WINAPI VarR8FromUI2(USHORT uiIn, double*pdblOut);
288HRESULT WINAPI VarR8FromUI4(ULONG ulIn, double*pdblOut);
289HRESULT WINAPI VarR8FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, double*pdblOut);
290HRESULT WINAPI VarR8FromCy(CY cyIn, double* pdblOut);
291/*
292HRESULT WINAPI VarR8FromDec32(DECIMAL*pdecIn, double*pdblOut);
293HRESULT WINAPI VarR8FromDisp32(IDispatch* pdispIn, LCID lcid, double* pdblOut);
294*/
295
296HRESULT WINAPI VarDateFromUI1(BYTE bIn, DATE* pdateOut);
297HRESULT WINAPI VarDateFromI2(short sIn, DATE* pdateOut);
298HRESULT WINAPI VarDateFromI4(LONG lIn, DATE* pdateOut);
299HRESULT WINAPI VarDateFromR4(FLOAT fltIn, DATE* pdateOut);
300HRESULT WINAPI VarDateFromR8(double dblIn, DATE* pdateOut);
301HRESULT WINAPI VarDateFromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, DATE*pdateOut);
302HRESULT WINAPI VarDateFromI1(CHAR cIn, DATE*pdateOut);
303HRESULT WINAPI VarDateFromUI2(USHORT uiIn, DATE*pdateOut);
304HRESULT WINAPI VarDateFromUI4(ULONG ulIn, DATE*pdateOut);
305HRESULT WINAPI VarDateFromBool(VARIANT_BOOL boolIn, DATE* pdateOut);
306HRESULT WINAPI VarDateFromCy(CY cyIn, DATE* pdateOut);
307/*
308HRESULT WINAPI VarDateFromDec32(DECIMAL*pdecIn, DATE*pdateOut);
309HRESULT WINAPI VarDateFromDisp32(IDispatch* pdispIn, LCID lcid, DATE* pdateOut);
310*/
311HRESULT WINAPI VarCyFromUI1(BYTE bIn, CY* pcyOut);
312HRESULT WINAPI VarCyFromI2(short sIn, CY* pcyOut);
313HRESULT WINAPI VarCyFromI4(LONG lIn, CY* pcyOut);
314HRESULT WINAPI VarCyFromR4(FLOAT fltIn, CY* pcyOut);
315HRESULT WINAPI VarCyFromR8(double dblIn, CY* pcyOut);
316HRESULT WINAPI VarCyFromDate(DATE dateIn, CY* pcyOut);
317HRESULT WINAPI VarCyFromStr(OLECHAR *strIn, LCID lcid, ULONG dwFlags, CY *pcyOut);
318HRESULT WINAPI VarCyFromBool(VARIANT_BOOL boolIn, CY* pcyOut);
319HRESULT WINAPI VarCyFromI1(CHAR cIn, CY*pcyOut);
320HRESULT WINAPI VarCyFromUI2(USHORT uiIn, CY*pcyOut);
321HRESULT WINAPI VarCyFromUI4(ULONG ulIn, CY*pcyOut);
322/*
323HRESULT WINAPI VarCyFromDec32(DECIMAL*pdecIn, CY*pcyOut);
324HRESULT WINAPI VarCyFromStr32(OLECHAR32* strIn, LCID lcid, ULONG dwFlags, CY* pcyOut);
325HRESULT WINAPI VarCyFromDisp32(IDispatch* pdispIn, LCID lcid, CY* pcyOut);
326*/
327
328HRESULT WINAPI VarBstrFromUI1(BYTE bVal, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
329HRESULT WINAPI VarBstrFromI2(short iVal, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
330HRESULT WINAPI VarBstrFromI4(LONG lIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
331HRESULT WINAPI VarBstrFromR4(FLOAT fltIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
332HRESULT WINAPI VarBstrFromR8(double dblIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
333HRESULT WINAPI VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR *pbstrOut);
334HRESULT WINAPI VarBstrFromDate(DATE dateIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
335HRESULT WINAPI VarBstrFromBool(VARIANT_BOOL boolIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
336HRESULT WINAPI VarBstrFromI1(CHAR cIn, LCID lcid, ULONG dwFlags, BSTR*pbstrOut);
337HRESULT WINAPI VarBstrFromUI2(USHORT uiIn, LCID lcid, ULONG dwFlags, BSTR*pbstrOut);
338HRESULT WINAPI VarBstrFromUI4(ULONG ulIn, LCID lcid, ULONG dwFlags, BSTR*pbstrOut);
339HRESULT WINAPI VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut);
340/*
341HRESULT WINAPI VarBstrFromDec32(DECIMAL*pdecIn, LCID lcid, ULONG dwFlags, BSTR32*pbstrOut);
342HRESULT WINAPI VarBstrFromDisp32(IDispatch* pdispIn, LCID lcid, ULONG dwFlags, BSTR32* pbstrOut);
343*/
344
345HRESULT WINAPI VarBoolFromUI1(BYTE bIn, VARIANT_BOOL* pboolOut);
346HRESULT WINAPI VarBoolFromI2(short sIn, VARIANT_BOOL* pboolOut);
347HRESULT WINAPI VarBoolFromI4(LONG lIn, VARIANT_BOOL* pboolOut);
348HRESULT WINAPI VarBoolFromR4(FLOAT fltIn, VARIANT_BOOL* pboolOut);
349HRESULT WINAPI VarBoolFromR8(double dblIn, VARIANT_BOOL* pboolOut);
350HRESULT WINAPI VarBoolFromDate(DATE dateIn, VARIANT_BOOL* pboolOut);
351HRESULT WINAPI VarBoolFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, VARIANT_BOOL* pboolOut);
352HRESULT WINAPI VarBoolFromI1(CHAR cIn, VARIANT_BOOL*pboolOut);
353HRESULT WINAPI VarBoolFromUI2(USHORT uiIn, VARIANT_BOOL*pboolOut);
354HRESULT WINAPI VarBoolFromUI4(ULONG ulIn, VARIANT_BOOL*pboolOut);
355HRESULT WINAPI VarBoolFromCy(CY cyIn, VARIANT_BOOL* pboolOut);
356/*
357HRESULT WINAPI VarBoolFromDec32(DECIMAL*pdecIn, VARIANT_BOOL*pboolOut);
358HRESULT WINAPI VarBoolFromDisp32(IDispatch* pdispIn, LCID lcid, VARIANT_BOOL* pboolOut);
359*/
360
361HRESULT WINAPI VarI1FromUI1(BYTE bIn, CHAR*pcOut);
362HRESULT WINAPI VarI1FromI2(short uiIn, CHAR*pcOut);
363HRESULT WINAPI VarI1FromI4(LONG lIn, CHAR*pcOut);
364HRESULT WINAPI VarI1FromR4(FLOAT fltIn, CHAR*pcOut);
365HRESULT WINAPI VarI1FromR8(double dblIn, CHAR*pcOut);
366HRESULT WINAPI VarI1FromDate(DATE dateIn, CHAR*pcOut);
367HRESULT WINAPI VarI1FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, CHAR*pcOut);
368HRESULT WINAPI VarI1FromBool(VARIANT_BOOL boolIn, CHAR*pcOut);
369HRESULT WINAPI VarI1FromUI2(USHORT uiIn, CHAR*pcOut);
370HRESULT WINAPI VarI1FromUI4(ULONG ulIn, CHAR*pcOut);
371HRESULT WINAPI VarI1FromCy(CY cyIn, CHAR*pcOut);
372/*
373HRESULT WINAPI VarI1FromDec32(DECIMAL*pdecIn, CHAR*pcOut);
374HRESULT WINAPI VarI1FromDisp32(IDispatch*pdispIn, LCID lcid, CHAR*pcOut);
375*/
376
377HRESULT WINAPI VarUI2FromUI1(BYTE bIn, USHORT*puiOut);
378HRESULT WINAPI VarUI2FromI2(short uiIn, USHORT*puiOut);
379HRESULT WINAPI VarUI2FromI4(LONG lIn, USHORT*puiOut);
380HRESULT WINAPI VarUI2FromR4(FLOAT fltIn, USHORT*puiOut);
381HRESULT WINAPI VarUI2FromR8(double dblIn, USHORT*puiOut);
382HRESULT WINAPI VarUI2FromDate(DATE dateIn, USHORT*puiOut);
383HRESULT WINAPI VarUI2FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, USHORT*puiOut);
384HRESULT WINAPI VarUI2FromBool(VARIANT_BOOL boolIn, USHORT*puiOut);
385HRESULT WINAPI VarUI2FromI1(CHAR cIn, USHORT*puiOut);
386HRESULT WINAPI VarUI2FromUI4(ULONG ulIn, USHORT*puiOut);
387HRESULT WINAPI VarUI2FromCy(CY cyIn, USHORT*puiOut);
388/*
389HRESULT WINAPI VarUI2FromDec32(DECIMAL*pdecIn, USHORT*puiOut);
390HRESULT WINAPI VarUI2FromDisp32(IDispatch*pdispIn, LCID lcid, USHORT*puiOut);
391*/
392
393HRESULT WINAPI VarUI4FromStr(OLECHAR*strIn, LCID lcid, ULONG dwFlags, ULONG*pulOut);
394HRESULT WINAPI VarUI4FromUI1(BYTE bIn, ULONG*pulOut);
395HRESULT WINAPI VarUI4FromI2(short uiIn, ULONG*pulOut);
396HRESULT WINAPI VarUI4FromI4(LONG lIn, ULONG*pulOut);
397HRESULT WINAPI VarUI4FromR4(FLOAT fltIn, ULONG*pulOut);
398HRESULT WINAPI VarUI4FromR8(double dblIn, ULONG*pulOut);
399HRESULT WINAPI VarUI4FromDate(DATE dateIn, ULONG*pulOut);
400HRESULT WINAPI VarUI4FromBool(VARIANT_BOOL boolIn, ULONG*pulOut);
401HRESULT WINAPI VarUI4FromI1(CHAR cIn, ULONG*pulOut);
402HRESULT WINAPI VarUI4FromUI2(USHORT uiIn, ULONG*pulOut);
403HRESULT WINAPI VarUI4FromCy(CY cyIn, ULONG*pulOut);
404/*
405HRESULT WINAPI VarUI4FromDec32(DECIMAL*pdecIn, ULONG*pulOut);
406HRESULT WINAPI VarUI4FromDisp32(IDispatch*pdispIn, LCID lcid, ULONG*pulOut);
407
408HRESULT WINAPI VarDecFromUI132(BYTE bIn, DECIMAL*pdecOut);
409HRESULT WINAPI VarDecFromI232(short uiIn, DECIMAL*pdecOut);
410HRESULT WINAPI VarDecFromI432(LONG lIn, DECIMAL*pdecOut);
411HRESULT WINAPI VarDecFromR432(FLOAT fltIn, DECIMAL*pdecOut);
412HRESULT WINAPI VarDecFromR832(double dblIn, DECIMAL*pdecOut);
413HRESULT WINAPI VarDecFromDate32(DATE dateIn, DECIMAL*pdecOut);
414HRESULT WINAPI VarDecFromStr32(OLECHAR32*strIn, LCID lcid, ULONG dwFlags, DECIMAL*pdecOut);
415HRESULT WINAPI VarDecFromBool32(VARIANT_BOOL boolIn, DECIMAL*pdecOut);
416HRESULT WINAPI VarDecFromI132(CHAR cIn, DECIMAL*pdecOut);
417HRESULT WINAPI VarDecFromUI232(USHORT uiIn, DECIMAL*pdecOut);
418HRESULT WINAPI VarDecFromUI432(ULONG ulIn, DECIMAL*pdecOut);
419HRESULT WINAPI VarDecFromCy32(CY cyIn, DECIMAL*pdecOut);
420HRESULT WINAPI VarDecFromDisp32(IDispatch*pdispIn, LCID lcid, DECIMAL*pdecOut);
421*/
422
423
424
425#define VarUI4FromUI4( in, pOut ) ( *(pOut) = (in) )
426#define VarI4FromI4( in, pOut ) ( *(pOut) = (in) )
427
428#define VarUI1FromInt VarUI1FromI4
429#define VarUI1FromUint VarUI1FromUI4
430#define VarI2FromInt VarI2FromI4
431#define VarI2FromUint VarI2FromUI4
432#define VarI4FromInt VarI4FromI432
433#define VarI4FromUint VarI4FromUI4
434#define VarR4FromInt VarR4FromI4
435#define VarR4FromUint VarR4FromUI4
436#define VarR8FromInt VarR8FromI4
437#define VarR8FromUint VarR8FromUI4
438#define VarDateFromInt VarDateFromI4
439#define VarDateFromUint VarDateFromUI4
440#define VarCyFromInt VarCyFromI4
441#define VarCyFromUint VarCyFromUI4
442#define VarBstrFromInt VarBstrFromI4
443#define VarBstrFromUint VarBstrFromUI4
444#define VarBoolFromInt VarBoolFromI4
445#define VarBoolFromUint VarBoolFromUI4
446#define VarI1FromInt VarI1FromI4
447#define VarI1FromUint VarI1FromUI4
448#define VarUI2FromInt VarUI2FromI4
449#define VarUI2FromUint VarUI2FromUI4
450#define VarUI4FromInt VarUI4FromI4
451#define VarUI4FromUint VarUI4FromUI432
452#define VarDecFromInt VarDecFromI432
453#define VarDecFromUint VarDecFromUI432
454#define VarIntFromUI1 VarI4FromUI1
455#define VarIntFromI2 VarI4FromI2
456#define VarIntFromI4 VarI4FromI432
457#define VarIntFromR4 VarI4FromR4
458#define VarIntFromR8 VarI4FromR8
459#define VarIntFromDate VarI4FromDate
460#define VarIntFromCy VarI4FromCy
461#define VarIntFromStr VarI4FromStr
462#define VarIntFromDisp VarI4FromDisp32
463#define VarIntFromBool VarI4FromBool
464#define VarIntFromI1 VarI4FromI1
465#define VarIntFromUI2 VarI4FromUI2
466#define VarIntFromUI4 VarI4FromUI4
467#define VarIntFromDec VarI4FromDec32
468#define VarIntFromUint VarI4FromUI4
469#define VarUintFromUI1 VarUI4FromUI1
470#define VarUintFromI2 VarUI4FromI2
471#define VarUintFromI4 VarUI4FromI4
472#define VarUintFromR4 VarUI4FromR4
473#define VarUintFromR8 VarUI4FromR8
474#define VarUintFromDate VarUI4FromDate
475#define VarUintFromCy VarUI4FromCy
476#define VarUintFromStr VarUI4FromStr
477#define VarUintFromDisp VarUI4FromDisp32
478#define VarUintFromBool VarUI4FromBool
479#define VarUintFromI1 VarUI4FromI1
480#define VarUintFromUI2 VarUI4FromUI2
481#define VarUintFromUI4 VarUI4FromUI432
482#define VarUintFromDec VarUI4FromDec32
483#define VarUintFromInt VarUI4FromI4
484
485/*
486 * Variant Math operations
487 */
488#define VARCMP_LT 0
489#define VARCMP_EQ 1
490#define VARCMP_GT 2
491#define VARCMP_NULL 3
492
493HRESULT WINAPI VarAdd(LPVARIANT,LPVARIANT,LPVARIANT);
494HRESULT WINAPI VarAnd(LPVARIANT,LPVARIANT,LPVARIANT);
495HRESULT WINAPI VarCat(LPVARIANT,LPVARIANT,LPVARIANT);
496HRESULT WINAPI VarDiv(LPVARIANT,LPVARIANT,LPVARIANT);
497HRESULT WINAPI VarEqv(LPVARIANT,LPVARIANT,LPVARIANT);
498HRESULT WINAPI VarIdiv(LPVARIANT,LPVARIANT,LPVARIANT);
499HRESULT WINAPI VarImp(LPVARIANT,LPVARIANT,LPVARIANT);
500HRESULT WINAPI VarMod(LPVARIANT,LPVARIANT,LPVARIANT);
501HRESULT WINAPI VarMul(LPVARIANT,LPVARIANT,LPVARIANT);
502HRESULT WINAPI VarOr(LPVARIANT,LPVARIANT,LPVARIANT);
503HRESULT WINAPI VarPow(LPVARIANT,LPVARIANT,LPVARIANT);
504HRESULT WINAPI VarSub(LPVARIANT,LPVARIANT,LPVARIANT);
505HRESULT WINAPI VarXor(LPVARIANT,LPVARIANT,LPVARIANT);
506
507HRESULT WINAPI VarAbs(LPVARIANT,LPVARIANT);
508HRESULT WINAPI VarFix(LPVARIANT,LPVARIANT);
509HRESULT WINAPI VarInt(LPVARIANT,LPVARIANT);
510HRESULT WINAPI VarNeg(LPVARIANT,LPVARIANT);
511HRESULT WINAPI VarNot(LPVARIANT,LPVARIANT);
512
513HRESULT WINAPI VarRound(LPVARIANT,int,LPVARIANT);
514
515HRESULT WINAPI VarCmp(LPVARIANT,LPVARIANT,LCID,ULONG);
516
517
518
519typedef struct tagPARAMDATA {
520 OLECHAR * szName; /* parameter name */
521 VARTYPE vt; /* parameter type */
522} PARAMDATA, * LPPARAMDATA;
523
524typedef struct tagMETHODDATA {
525 OLECHAR * szName; /* method name */
526 PARAMDATA * ppdata; /* pointer to an array of PARAMDATAs */
527 DISPID dispid; /* method ID */
528 UINT iMeth; /* method index */
529 CALLCONV_OLE2 cc; /* calling convention */
530 UINT cArgs; /* count of arguments */
531 WORD wFlags; /* same wFlags as on IDispatch::Invoke() */
532 VARTYPE vtReturn;
533} METHODDATA, * LPMETHODDATA;
534
535typedef struct tagINTERFACEDATA {
536 METHODDATA * pmethdata; /* pointer to an array of METHODDATAs */
537 UINT cMembers; /* count of members */
538} INTERFACEDATA, * LPINTERFACEDATA;
539
540typedef enum tagREGKIND
541{
542 REGKIND_DEFAULT,
543 REGKIND_REGISTER,
544 REGKIND_NONE
545} REGKIND;
546
547
548INT WINAPI DosDateTimeToVariantTime(USHORT,USHORT,DATE*);
549
550ULONG WINAPI LHashValOfNameSysA(SYSKIND syskind,LCID lcid,LPCSTR szName);
551ULONG WINAPI LHashValOfNameSys (SYSKIND syskind,LCID lcid,LPCOLESTR szName);
552
553HRESULT WINAPI DispGetParam(DISPPARAMS* pdispparams, UINT position,
554 VARTYPE vtTarg, VARIANT* pvarResult, UINT* puArgErr);
555HRESULT WINAPI DispGetIDsOfNames(ITypeInfo* ptinfo, OLECHAR** rgszNames,
556 UINT cNames, DISPID* rgdispid);
557HRESULT WINAPI DispInvoke(void* _this, ITypeInfo* ptinfo, DISPID dispidMember,
558 WORD wFlags, DISPPARAMS* pparams, VARIANT* pvarResult,
559 EXCEPINFO* pexcepinfo, UINT* puArgErr);
560HRESULT WINAPI CreateDispTypeInfo(INTERFACEDATA* pidata, LCID lcid,
561 ITypeInfo** pptinfo);
562HRESULT WINAPI CreateStdDispatch(IUnknown* punkOuter, void* pvThis,
563 ITypeInfo* ptinfo, IUnknown** ppunkStdDisp);
564HRESULT WINAPI DispCallFunc(void* pvInstance, ULONG oVft, CALLCONV_OLE2 cc,
565 VARTYPE vtReturn, UINT cActuals, VARTYPE* prgvt,
566 VARIANTARG** prgpvarg, VARIANT* pvargResult);
567
568
569/*
570 * TypeLib API
571 */
572
573HRESULT WINAPI CreateTypeLib(SYSKIND,const OLECHAR*,ICreateTypeLib**);
574HRESULT WINAPI CreateTypeLib2(SYSKIND,LPCOLESTR,ICreateTypeLib2**);
575HRESULT WINAPI LoadRegTypeLib(REFGUID,WORD,WORD,LCID,ITypeLib**);
576HRESULT WINAPI LoadTypeLib(const OLECHAR*,ITypeLib**);
577HRESULT WINAPI LoadTypeLibEx(LPCOLESTR,REGKIND,ITypeLib**);
578HRESULT WINAPI QueryPathOfRegTypeLib(REFGUID,WORD,WORD,LCID,LPBSTR);
579HRESULT WINAPI RegisterTypeLib(ITypeLib*,OLECHAR*,OLECHAR*);
580HRESULT WINAPI UnRegisterTypeLib(REFGUID,WORD,WORD,LCID,SYSKIND);
581
582#ifdef __cplusplus
583} /* extern "C" */
584#endif
585
586
587#endif /*__WINE_OLEAUTO_H*/
Note: See TracBrowser for help on using the repository browser.