xmllite/tests: Fix a memory leak (Valgrind).
[wine.git] / include / oleauto.h
blob07c46adfa4b1f14699ce1209b0ecf86bc812cdde
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_OLEAUTO_H
20 #define __WINE_OLEAUTO_H
22 #include <oaidl.h>
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 DEFINE_OLEGUID(IID_StdOle, 0x00020430,0,0);
30 #define STDOLE_MAJORVERNUM 1
31 #define STDOLE_MINORVERNUM 0
32 #define STDOLE_LCID 0
34 #define STDOLE2_MAJORVERNUM 2
35 #define STDOLE2_MINORVERNUM 0
36 #define STDOLE2_LCID 0
38 ULONG WINAPI OaBuildVersion(void);
40 /* BSTR functions */
41 BSTR WINAPI SysAllocString(const OLECHAR*);
42 BSTR WINAPI SysAllocStringByteLen(LPCSTR,UINT);
43 BSTR WINAPI SysAllocStringLen(const OLECHAR*,UINT);
44 void WINAPI SysFreeString(BSTR);
45 INT WINAPI SysReAllocString(LPBSTR,const OLECHAR*);
46 int WINAPI SysReAllocStringLen(BSTR*,const OLECHAR*,UINT);
47 UINT WINAPI SysStringByteLen(BSTR);
48 UINT WINAPI SysStringLen(BSTR);
50 /* IErrorInfo helpers */
51 HRESULT WINAPI SetErrorInfo(ULONG,IErrorInfo*);
52 HRESULT WINAPI GetErrorInfo(ULONG,IErrorInfo**);
53 HRESULT WINAPI CreateErrorInfo(ICreateErrorInfo**);
55 /* SafeArray functions */
56 SAFEARRAY* WINAPI SafeArrayCreate(VARTYPE,UINT,SAFEARRAYBOUND*);
57 SAFEARRAY* WINAPI SafeArrayCreateEx(VARTYPE,UINT,SAFEARRAYBOUND*,LPVOID);
58 SAFEARRAY* WINAPI SafeArrayCreateVector(VARTYPE,LONG,ULONG);
59 SAFEARRAY* WINAPI SafeArrayCreateVectorEx(VARTYPE,LONG,ULONG,LPVOID);
61 HRESULT WINAPI SafeArrayAllocDescriptor(UINT,SAFEARRAY**);
62 HRESULT WINAPI SafeArrayAllocDescriptorEx(VARTYPE,UINT,SAFEARRAY**);
63 HRESULT WINAPI SafeArrayAllocData(SAFEARRAY*);
64 HRESULT WINAPI SafeArrayDestroyDescriptor(SAFEARRAY*);
65 HRESULT WINAPI SafeArrayPutElement(SAFEARRAY*,LONG*,void*);
66 HRESULT WINAPI SafeArrayGetElement(SAFEARRAY*,LONG*,void*);
67 HRESULT WINAPI SafeArrayLock(SAFEARRAY*);
68 HRESULT WINAPI SafeArrayUnlock(SAFEARRAY*);
69 HRESULT WINAPI SafeArrayGetUBound(SAFEARRAY*,UINT,LONG*);
70 HRESULT WINAPI SafeArrayGetLBound(SAFEARRAY*,UINT,LONG*);
71 UINT WINAPI SafeArrayGetDim(SAFEARRAY*);
72 UINT WINAPI SafeArrayGetElemsize(SAFEARRAY*);
73 HRESULT WINAPI SafeArrayGetVartype(SAFEARRAY*,VARTYPE*);
74 HRESULT WINAPI SafeArrayAccessData(SAFEARRAY*,void**);
75 HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY*);
76 HRESULT WINAPI SafeArrayPtrOfIndex(SAFEARRAY*,LONG*,void **);
77 HRESULT WINAPI SafeArrayCopyData(SAFEARRAY*,SAFEARRAY*);
78 HRESULT WINAPI SafeArrayDestroyData(SAFEARRAY*);
79 HRESULT WINAPI SafeArrayDestroy(SAFEARRAY*);
80 HRESULT WINAPI SafeArrayCopy(SAFEARRAY*,SAFEARRAY**);
81 HRESULT WINAPI SafeArrayRedim(SAFEARRAY*,SAFEARRAYBOUND*);
82 HRESULT WINAPI SafeArraySetRecordInfo(SAFEARRAY*,IRecordInfo*);
83 HRESULT WINAPI SafeArrayGetRecordInfo(SAFEARRAY*,IRecordInfo**);
84 HRESULT WINAPI SafeArraySetIID(SAFEARRAY*,REFGUID);
85 HRESULT WINAPI SafeArrayGetIID(SAFEARRAY*,GUID*);
87 HRESULT WINAPI VectorFromBstr(BSTR,SAFEARRAY**);
88 HRESULT WINAPI BstrFromVector(SAFEARRAY*,BSTR*);
90 /* Object registration helpers */
91 #define ACTIVEOBJECT_STRONG 0
92 #define ACTIVEOBJECT_WEAK 1
94 HRESULT WINAPI RegisterActiveObject(LPUNKNOWN,REFCLSID,DWORD,LPDWORD);
95 HRESULT WINAPI RevokeActiveObject(DWORD,LPVOID);
96 HRESULT WINAPI GetActiveObject(REFCLSID,LPVOID,LPUNKNOWN*);
98 /* IRecordInfo helpers */
99 HRESULT WINAPI GetRecordInfoFromTypeInfo(ITypeInfo*,IRecordInfo**);
100 HRESULT WINAPI GetRecordInfoFromGuids(REFGUID,ULONG,ULONG,LCID,REFGUID,IRecordInfo**);
103 * Variants
106 /* Macros for accessing the fields of the VARIANT type */
107 #if (__STDC__ && !defined(_FORCENAMELESSUNION)) || defined(NONAMELESSUNION)
108 #define V_VT(A) ((A)->n1.n2.vt)
109 #define V_UNION(A,B) ((A)->n1.n2.n3.B)
110 #define V_RECORD(A) (V_UNION(A,brecVal).pvRecord)
111 #define V_RECORDINFO(A) (V_UNION(A,brecVal).pRecInfo)
112 #else
113 #define V_VT(A) ((A)->vt)
114 #define V_UNION(A,B) ((A)->B)
115 #define V_RECORD(A) ((A)->pvRecord)
116 #define V_RECORDINFO(A) ((A)->pRecInfo)
117 #endif
119 #define V_ISBYREF(A) (V_VT(A) & VT_BYREF)
120 #define V_ISARRAY(A) (V_VT(A) & VT_ARRAY)
121 #define V_ISVECTOR(A) (V_VT(A) & VT_VECTOR)
122 #define V_NONE(A) V_I2(A)
124 #define V_ARRAY(A) V_UNION(A,parray)
125 #define V_ARRAYREF(A) V_UNION(A,pparray)
126 #define V_BOOL(A) V_UNION(A,boolVal)
127 #define V_BOOLREF(A) V_UNION(A,pboolVal)
128 #define V_BSTR(A) V_UNION(A,bstrVal)
129 #define V_BSTRREF(A) V_UNION(A,pbstrVal)
130 #define V_BYREF(A) V_UNION(A,byref)
131 #define V_CY(A) V_UNION(A,cyVal)
132 #define V_CYREF(A) V_UNION(A,pcyVal)
133 #define V_DATE(A) V_UNION(A,date)
134 #define V_DATEREF(A) V_UNION(A,pdate)
135 #if (__STDC__ && !defined(_FORCENAMELESSUNION)) || defined(NONAMELESSUNION)
136 #define V_DECIMAL(A) ((A)->n1.decVal)
137 #else
138 #define V_DECIMAL(A) ((A)->decVal)
139 #endif
140 #define V_DECIMALREF(A) V_UNION(A,pdecVal)
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_I1(A) V_UNION(A,cVal)
146 #define V_I1REF(A) V_UNION(A,pcVal)
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_I8(A) V_UNION(A,llVal)
152 #define V_I8REF(A) V_UNION(A,pllVal)
153 #define V_INT(A) V_UNION(A,intVal)
154 #define V_INTREF(A) V_UNION(A,pintVal)
155 #ifdef _WIN64
156 #define V_INT_PTR(A) V_I8(A)
157 #define V_INT_PTRREF(A) V_I8REF(A)
158 #else
159 #define V_INT_PTR(A) V_I4(A)
160 #define V_INT_PTRREF(A) V_I4REF(A)
161 #endif
162 #define V_R4(A) V_UNION(A,fltVal)
163 #define V_R4REF(A) V_UNION(A,pfltVal)
164 #define V_R8(A) V_UNION(A,dblVal)
165 #define V_R8REF(A) V_UNION(A,pdblVal)
166 #define V_UINT(A) V_UNION(A,uintVal)
167 #define V_UINTREF(A) V_UNION(A,puintVal)
168 #define V_UI1(A) V_UNION(A,bVal)
169 #define V_UI1REF(A) V_UNION(A,pbVal)
170 #define V_UI2(A) V_UNION(A,uiVal)
171 #define V_UI2REF(A) V_UNION(A,puiVal)
172 #define V_UI4(A) V_UNION(A,ulVal)
173 #define V_UI4REF(A) V_UNION(A,pulVal)
174 #define V_UI8(A) V_UNION(A,ullVal)
175 #define V_UI8REF(A) V_UNION(A,pullVal)
176 #ifdef _WIN64
177 #define V_UINT_PTR(A) V_UI8(A)
178 #define V_UINT_PTRREF(A) V_UI8REF(A)
179 #else
180 #define V_UINT_PTR(A) V_UI4(A)
181 #define V_UINT_PTRREF(A) V_UI4REF(A)
182 #endif
183 #define V_UNKNOWN(A) V_UNION(A,punkVal)
184 #define V_UNKNOWNREF(A) V_UNION(A,ppunkVal)
185 #define V_VARIANTREF(A) V_UNION(A,pvarVal)
187 void WINAPI VariantInit(VARIANT*);
188 HRESULT WINAPI VariantClear(VARIANT*);
189 HRESULT WINAPI VariantCopy(VARIANT*,VARIANT*);
190 HRESULT WINAPI VariantCopyInd(VARIANT*,VARIANT*);
191 HRESULT WINAPI VariantChangeType(VARIANT*,VARIANT*,USHORT,VARTYPE);
192 HRESULT WINAPI VariantChangeTypeEx(VARIANT*,VARIANT*,LCID,USHORT,VARTYPE);
194 /* VariantChangeType/VariantChangeTypeEx flags */
195 #define VARIANT_NOVALUEPROP 0x01 /* Don't get the default value property from IDispatch */
196 #define VARIANT_ALPHABOOL 0x02 /* Coerce to "True"|"False" instead of "-1"|"0" */
197 #define VARIANT_NOUSEROVERRIDE 0x04 /* Pass LOCALE_NOUSEROVERRIDE to low level conversions */
198 #define VARIANT_CALENDAR_HIJRI 0x08 /* Use the Hijri calendar */
199 #define VARIANT_LOCALBOOL 0x10 /* Like VARIANT_ALPHABOOL, but use localised text */
200 #define VARIANT_CALENDAR_THAI 0x20 /* Use the Thai buddhist calendar */
201 #define VARIANT_CALENDAR_GREGORIAN 0x40 /* Use the Gregorian calendar */
202 #define VARIANT_USE_NLS 0x80 /* Format result using NLS calls */
205 * Low level Variant coercion functions
208 #define VT_HARDTYPE VT_RESERVED /* Don't coerce this variant when comparing it to others */
210 /* Flags for low level coercions. LOCALE_ flags can also be passed */
211 #define VAR_TIMEVALUEONLY 0x001 /* Ignore date portion of VT_DATE */
212 #define VAR_DATEVALUEONLY 0x002 /* Ignore time portion of VT_DATE */
213 #define VAR_VALIDDATE 0x004
214 #define VAR_CALENDAR_HIJRI 0x008 /* Use the Hijri calendar */
215 #define VAR_LOCALBOOL 0x010 /* VT_BOOL<->VT_BSTR: Use localised boolean text */
216 #define VAR_FORMAT_NOSUBSTITUTE 0x020 /* Don't change format strings for un-coercable types */
217 #define VAR_FOURDIGITYEARS 0x040 /* Always print years with 4 digits */
218 #define VAR_CALENDAR_THAI 0x080 /* Use the Thai buddhist calendar */
219 #define VAR_CALENDAR_GREGORIAN 0x100 /* Use the Gregorian calendar */
221 #ifndef LOCALE_USE_NLS
222 /* This is missing from native winnls.h, but may be added at some point */
223 #define LOCALE_USE_NLS 0x10000000
224 #endif
226 #define VTDATEGRE_MIN -657434 /* Minimum possible Gregorian date: 1/1/100 */
227 #define VTDATEGRE_MAX 2958465 /* Maximum possible Gregorian date: 31/12/9999 */
229 HRESULT WINAPI VarUI1FromI2(SHORT,BYTE*);
230 HRESULT WINAPI VarUI1FromI4(LONG,BYTE*);
231 HRESULT WINAPI VarUI1FromI8(LONG64,BYTE*);
232 HRESULT WINAPI VarUI1FromR4(FLOAT,BYTE*);
233 HRESULT WINAPI VarUI1FromR8(DOUBLE,BYTE*);
234 HRESULT WINAPI VarUI1FromDate(DATE,BYTE*);
235 HRESULT WINAPI VarUI1FromBool(VARIANT_BOOL,BYTE*);
236 HRESULT WINAPI VarUI1FromI1(signed char,BYTE*);
237 HRESULT WINAPI VarUI1FromUI2(USHORT,BYTE*);
238 HRESULT WINAPI VarUI1FromUI4(ULONG,BYTE*);
239 HRESULT WINAPI VarUI1FromUI8(ULONG64,BYTE*);
240 HRESULT WINAPI VarUI1FromStr(OLECHAR*,LCID,ULONG,BYTE*);
241 HRESULT WINAPI VarUI1FromCy(CY,BYTE*);
242 HRESULT WINAPI VarUI1FromDec(DECIMAL*,BYTE*);
243 HRESULT WINAPI VarUI1FromDisp(IDispatch*,LCID,BYTE*);
245 HRESULT WINAPI VarI2FromUI1(BYTE,SHORT*);
246 HRESULT WINAPI VarI2FromI4(LONG,SHORT*);
247 HRESULT WINAPI VarI2FromI8(LONG64,SHORT*);
248 HRESULT WINAPI VarI2FromR4(FLOAT,SHORT*);
249 HRESULT WINAPI VarI2FromR8(DOUBLE,SHORT*);
250 HRESULT WINAPI VarI2FromDate(DATE,SHORT*);
251 HRESULT WINAPI VarI2FromBool(VARIANT_BOOL,SHORT*);
252 HRESULT WINAPI VarI2FromI1(signed char,SHORT*);
253 HRESULT WINAPI VarI2FromUI2(USHORT,SHORT*);
254 HRESULT WINAPI VarI2FromUI4(ULONG,SHORT*);
255 HRESULT WINAPI VarI2FromUI8(ULONG64,SHORT*);
256 HRESULT WINAPI VarI2FromStr(OLECHAR*,LCID,ULONG,SHORT*);
257 HRESULT WINAPI VarI2FromCy(CY,SHORT*);
258 HRESULT WINAPI VarI2FromDec(DECIMAL*,SHORT*);
259 HRESULT WINAPI VarI2FromDisp(IDispatch*,LCID,SHORT*);
261 HRESULT WINAPI VarI4FromUI1(BYTE,LONG*);
262 HRESULT WINAPI VarI4FromI2(SHORT,LONG*);
263 HRESULT WINAPI VarI4FromI8(LONG64,LONG*);
264 HRESULT WINAPI VarI4FromR4(FLOAT,LONG*);
265 HRESULT WINAPI VarI4FromR8(DOUBLE,LONG*);
266 HRESULT WINAPI VarI4FromDate(DATE,LONG*);
267 HRESULT WINAPI VarI4FromBool(VARIANT_BOOL,LONG*);
268 HRESULT WINAPI VarI4FromI1(signed char,LONG*);
269 HRESULT WINAPI VarI4FromUI2(USHORT,LONG*);
270 HRESULT WINAPI VarI4FromUI4(ULONG,LONG*);
271 HRESULT WINAPI VarI4FromUI8(ULONG64,LONG*);
272 HRESULT WINAPI VarI4FromStr(OLECHAR*,LCID,ULONG,LONG*);
273 HRESULT WINAPI VarI4FromCy(CY,LONG*);
274 HRESULT WINAPI VarI4FromDec(DECIMAL*,LONG*);
275 HRESULT WINAPI VarI4FromDisp(IDispatch*,LCID,LONG*);
277 HRESULT WINAPI VarI8FromUI1(BYTE,LONG64*);
278 HRESULT WINAPI VarI8FromI2(SHORT,LONG64*);
279 HRESULT WINAPI VarI8FromI4(LONG,LONG64*);
280 HRESULT WINAPI VarI8FromR4(FLOAT,LONG64*);
281 HRESULT WINAPI VarI8FromR8(DOUBLE,LONG64*);
282 HRESULT WINAPI VarI8FromDate(DATE,LONG64*);
283 HRESULT WINAPI VarI8FromStr(OLECHAR*,LCID,ULONG,LONG64*);
284 HRESULT WINAPI VarI8FromBool(VARIANT_BOOL,LONG64*);
285 HRESULT WINAPI VarI8FromI1(signed char,LONG64*);
286 HRESULT WINAPI VarI8FromUI2(USHORT,LONG64*);
287 HRESULT WINAPI VarI8FromUI4(ULONG,LONG64*);
288 HRESULT WINAPI VarI8FromUI8(ULONG64,LONG64*);
289 HRESULT WINAPI VarI8FromDec(DECIMAL *pdecIn,LONG64*);
290 HRESULT WINAPI VarI8FromInt(INT intIn,LONG64*);
291 HRESULT WINAPI VarI8FromCy(CY,LONG64*);
292 HRESULT WINAPI VarI8FromDisp(IDispatch*,LCID,LONG64*);
294 HRESULT WINAPI VarR4FromUI1(BYTE,FLOAT*);
295 HRESULT WINAPI VarR4FromI2(SHORT,FLOAT*);
296 HRESULT WINAPI VarR4FromI4(LONG,FLOAT*);
297 HRESULT WINAPI VarR4FromI8(LONG64,FLOAT*);
298 HRESULT WINAPI VarR4FromR8(DOUBLE,FLOAT*);
299 HRESULT WINAPI VarR4FromDate(DATE,FLOAT*);
300 HRESULT WINAPI VarR4FromBool(VARIANT_BOOL,FLOAT*);
301 HRESULT WINAPI VarR4FromI1(signed char,FLOAT*);
302 HRESULT WINAPI VarR4FromUI2(USHORT,FLOAT*);
303 HRESULT WINAPI VarR4FromUI4(ULONG,FLOAT*);
304 HRESULT WINAPI VarR4FromUI8(ULONG64,FLOAT*);
305 HRESULT WINAPI VarR4FromStr(OLECHAR*,LCID,ULONG,FLOAT*);
306 HRESULT WINAPI VarR4FromCy(CY,FLOAT*);
307 HRESULT WINAPI VarR4FromDec(DECIMAL*,FLOAT*);
308 HRESULT WINAPI VarR4FromDisp(IDispatch*,LCID,FLOAT*);
310 HRESULT WINAPI VarR8FromUI1(BYTE,double*);
311 HRESULT WINAPI VarR8FromI2(SHORT,double*);
312 HRESULT WINAPI VarR8FromI4(LONG,double*);
313 HRESULT WINAPI VarR8FromI8(LONG64,double*);
314 HRESULT WINAPI VarR8FromR4(FLOAT,double*);
315 HRESULT WINAPI VarR8FromDate(DATE,double*);
316 HRESULT WINAPI VarR8FromBool(VARIANT_BOOL,double*);
317 HRESULT WINAPI VarR8FromI1(signed char,double*);
318 HRESULT WINAPI VarR8FromUI2(USHORT,double*);
319 HRESULT WINAPI VarR8FromUI4(ULONG,double*);
320 HRESULT WINAPI VarR8FromUI8(ULONG64,double*);
321 HRESULT WINAPI VarR8FromStr(OLECHAR*,LCID,ULONG,double*);
322 HRESULT WINAPI VarR8FromCy(CY,double*);
323 HRESULT WINAPI VarR8FromDec(const DECIMAL*,double*);
324 HRESULT WINAPI VarR8FromDisp(IDispatch*,LCID,double*);
326 HRESULT WINAPI VarDateFromUI1(BYTE,DATE*);
327 HRESULT WINAPI VarDateFromI2(SHORT,DATE*);
328 HRESULT WINAPI VarDateFromI4(LONG,DATE*);
329 HRESULT WINAPI VarDateFromI8(LONG64,DATE*);
330 HRESULT WINAPI VarDateFromR4(FLOAT,DATE*);
331 HRESULT WINAPI VarDateFromR8(DOUBLE,DATE*);
332 HRESULT WINAPI VarDateFromStr(OLECHAR*,LCID,ULONG,DATE*);
333 HRESULT WINAPI VarDateFromI1(signed char,DATE*);
334 HRESULT WINAPI VarDateFromUI2(USHORT,DATE*);
335 HRESULT WINAPI VarDateFromUI4(ULONG,DATE*);
336 HRESULT WINAPI VarDateFromUI8(ULONG64,DATE*);
337 HRESULT WINAPI VarDateFromBool(VARIANT_BOOL,DATE*);
338 HRESULT WINAPI VarDateFromCy(CY,DATE*);
339 HRESULT WINAPI VarDateFromDec(DECIMAL*,DATE*);
340 HRESULT WINAPI VarDateFromDisp(IDispatch*,LCID,DATE*);
342 HRESULT WINAPI VarCyFromUI1(BYTE,CY*);
343 HRESULT WINAPI VarCyFromI2(SHORT sIn,CY*);
344 HRESULT WINAPI VarCyFromI4(LONG,CY*);
345 HRESULT WINAPI VarCyFromI8(LONG64,CY*);
346 HRESULT WINAPI VarCyFromR4(FLOAT,CY*);
347 HRESULT WINAPI VarCyFromR8(DOUBLE,CY*);
348 HRESULT WINAPI VarCyFromDate(DATE,CY*);
349 HRESULT WINAPI VarCyFromStr(OLECHAR*,LCID,ULONG,CY*);
350 HRESULT WINAPI VarCyFromBool(VARIANT_BOOL,CY*);
351 HRESULT WINAPI VarCyFromI1(signed char,CY*);
352 HRESULT WINAPI VarCyFromUI2(USHORT,CY*);
353 HRESULT WINAPI VarCyFromUI4(ULONG,CY*);
354 HRESULT WINAPI VarCyFromUI8(ULONG64,CY*);
355 HRESULT WINAPI VarCyFromDec(DECIMAL*,CY*);
356 HRESULT WINAPI VarCyFromDisp(IDispatch*,LCID,CY*);
358 HRESULT WINAPI VarBstrFromUI1(BYTE,LCID,ULONG,BSTR*);
359 HRESULT WINAPI VarBstrFromI2(SHORT,LCID,ULONG,BSTR*);
360 HRESULT WINAPI VarBstrFromI4(LONG,LCID,ULONG,BSTR*);
361 HRESULT WINAPI VarBstrFromI8(LONG64,LCID,ULONG,BSTR*);
362 HRESULT WINAPI VarBstrFromR4(FLOAT,LCID,ULONG,BSTR*);
363 HRESULT WINAPI VarBstrFromR8(DOUBLE,LCID,ULONG,BSTR*);
364 HRESULT WINAPI VarBstrFromDate(DATE,LCID,ULONG,BSTR*);
365 HRESULT WINAPI VarBstrFromBool(VARIANT_BOOL,LCID,ULONG,BSTR*);
366 HRESULT WINAPI VarBstrFromI1(signed char,LCID,ULONG,BSTR*);
367 HRESULT WINAPI VarBstrFromUI2(USHORT,LCID,ULONG,BSTR*);
368 HRESULT WINAPI VarBstrFromUI8(ULONG64,LCID,ULONG,BSTR*);
369 HRESULT WINAPI VarBstrFromUI4(ULONG,LCID,ULONG,BSTR*);
370 HRESULT WINAPI VarBstrFromCy(CY,LCID,ULONG,BSTR*);
371 HRESULT WINAPI VarBstrFromDec(DECIMAL*,LCID,ULONG,BSTR*);
372 HRESULT WINAPI VarBstrFromDisp(IDispatch*,LCID,ULONG,BSTR*);
374 HRESULT WINAPI VarBoolFromUI1(BYTE,VARIANT_BOOL*);
375 HRESULT WINAPI VarBoolFromI2(SHORT,VARIANT_BOOL*);
376 HRESULT WINAPI VarBoolFromI4(LONG,VARIANT_BOOL*);
377 HRESULT WINAPI VarBoolFromI8(LONG64,VARIANT_BOOL*);
378 HRESULT WINAPI VarBoolFromR4(FLOAT,VARIANT_BOOL*);
379 HRESULT WINAPI VarBoolFromR8(DOUBLE,VARIANT_BOOL*);
380 HRESULT WINAPI VarBoolFromDate(DATE,VARIANT_BOOL*);
381 HRESULT WINAPI VarBoolFromStr(OLECHAR*,LCID,ULONG,VARIANT_BOOL*);
382 HRESULT WINAPI VarBoolFromI1(signed char,VARIANT_BOOL*);
383 HRESULT WINAPI VarBoolFromUI2(USHORT,VARIANT_BOOL*);
384 HRESULT WINAPI VarBoolFromUI4(ULONG,VARIANT_BOOL*);
385 HRESULT WINAPI VarBoolFromUI8(ULONG64,VARIANT_BOOL*);
386 HRESULT WINAPI VarBoolFromCy(CY,VARIANT_BOOL*);
387 HRESULT WINAPI VarBoolFromDec(DECIMAL*,VARIANT_BOOL*);
388 HRESULT WINAPI VarBoolFromDisp(IDispatch*,LCID,VARIANT_BOOL*);
390 HRESULT WINAPI VarI1FromUI1(BYTE,signed char*);
391 HRESULT WINAPI VarI1FromI2(SHORT,signed char*);
392 HRESULT WINAPI VarI1FromI4(LONG,signed char*);
393 HRESULT WINAPI VarI1FromI8(LONG64,signed char*);
394 HRESULT WINAPI VarI1FromR4(FLOAT,signed char*);
395 HRESULT WINAPI VarI1FromR8(DOUBLE,signed char*);
396 HRESULT WINAPI VarI1FromDate(DATE,signed char*);
397 HRESULT WINAPI VarI1FromStr(OLECHAR*,LCID,ULONG,signed char*);
398 HRESULT WINAPI VarI1FromBool(VARIANT_BOOL,signed char*);
399 HRESULT WINAPI VarI1FromUI2(USHORT,signed char*);
400 HRESULT WINAPI VarI1FromUI4(ULONG,signed char*);
401 HRESULT WINAPI VarI1FromUI8(ULONG64,signed char*);
402 HRESULT WINAPI VarI1FromCy(CY,signed char*);
403 HRESULT WINAPI VarI1FromDec(DECIMAL*,signed char*);
404 HRESULT WINAPI VarI1FromDisp(IDispatch*,LCID,signed char*);
406 HRESULT WINAPI VarUI2FromUI1(BYTE,USHORT*);
407 HRESULT WINAPI VarUI2FromI2(SHORT,USHORT*);
408 HRESULT WINAPI VarUI2FromI4(LONG,USHORT*);
409 HRESULT WINAPI VarUI2FromI8(LONG64,USHORT*);
410 HRESULT WINAPI VarUI2FromR4(FLOAT,USHORT*);
411 HRESULT WINAPI VarUI2FromR8(DOUBLE,USHORT*);
412 HRESULT WINAPI VarUI2FromDate(DATE,USHORT*);
413 HRESULT WINAPI VarUI2FromStr(OLECHAR*,LCID,ULONG,USHORT*);
414 HRESULT WINAPI VarUI2FromBool(VARIANT_BOOL,USHORT*);
415 HRESULT WINAPI VarUI2FromI1(signed char,USHORT*);
416 HRESULT WINAPI VarUI2FromUI4(ULONG,USHORT*);
417 HRESULT WINAPI VarUI2FromUI8(ULONG64,USHORT*);
418 HRESULT WINAPI VarUI2FromCy(CY,USHORT*);
419 HRESULT WINAPI VarUI2FromDec(DECIMAL*,USHORT*);
420 HRESULT WINAPI VarUI2FromDisp(IDispatch*,LCID,USHORT*);
422 HRESULT WINAPI VarUI4FromStr(OLECHAR*,LCID,ULONG,ULONG*);
423 HRESULT WINAPI VarUI4FromUI1(BYTE,ULONG*);
424 HRESULT WINAPI VarUI4FromI2(SHORT,ULONG*);
425 HRESULT WINAPI VarUI4FromI4(LONG,ULONG*);
426 HRESULT WINAPI VarUI4FromI8(LONG64,ULONG*);
427 HRESULT WINAPI VarUI4FromR4(FLOAT,ULONG*);
428 HRESULT WINAPI VarUI4FromR8(DOUBLE,ULONG*);
429 HRESULT WINAPI VarUI4FromDate(DATE,ULONG*);
430 HRESULT WINAPI VarUI4FromBool(VARIANT_BOOL,ULONG*);
431 HRESULT WINAPI VarUI4FromI1(signed char,ULONG*);
432 HRESULT WINAPI VarUI4FromUI2(USHORT,ULONG*);
433 HRESULT WINAPI VarUI4FromUI8(ULONG64,ULONG*);
434 HRESULT WINAPI VarUI4FromCy(CY,ULONG*);
435 HRESULT WINAPI VarUI4FromDec(DECIMAL*,ULONG*);
436 HRESULT WINAPI VarUI4FromDisp(IDispatch*,LCID,ULONG*);
438 HRESULT WINAPI VarUI8FromUI1(BYTE,ULONG64*);
439 HRESULT WINAPI VarUI8FromI2(SHORT,ULONG64*);
440 HRESULT WINAPI VarUI8FromI4(LONG,ULONG64*);
441 HRESULT WINAPI VarUI8FromI8(LONG64,ULONG64*);
442 HRESULT WINAPI VarUI8FromR4(FLOAT,ULONG64*);
443 HRESULT WINAPI VarUI8FromR8(DOUBLE,ULONG64*);
444 HRESULT WINAPI VarUI8FromDate(DATE,ULONG64*);
445 HRESULT WINAPI VarUI8FromStr(OLECHAR*,LCID,ULONG,ULONG64*);
446 HRESULT WINAPI VarUI8FromBool(VARIANT_BOOL,ULONG64*);
447 HRESULT WINAPI VarUI8FromI1(signed char,ULONG64*);
448 HRESULT WINAPI VarUI8FromUI2(USHORT,ULONG64*);
449 HRESULT WINAPI VarUI8FromUI4(ULONG,ULONG64*);
450 HRESULT WINAPI VarUI8FromDec(DECIMAL*,ULONG64*);
451 HRESULT WINAPI VarUI8FromInt(INT,ULONG64*);
452 HRESULT WINAPI VarUI8FromCy(CY,ULONG64*);
453 HRESULT WINAPI VarUI8FromDisp(IDispatch*,LCID,ULONG64*);
455 HRESULT WINAPI VarDecFromUI1(BYTE,DECIMAL*);
456 HRESULT WINAPI VarDecFromI2(SHORT,DECIMAL*);
457 HRESULT WINAPI VarDecFromI4(LONG,DECIMAL*);
458 HRESULT WINAPI VarDecFromI8(LONG64,DECIMAL*);
459 HRESULT WINAPI VarDecFromR4(FLOAT,DECIMAL*);
460 HRESULT WINAPI VarDecFromR8(DOUBLE,DECIMAL*);
461 HRESULT WINAPI VarDecFromDate(DATE,DECIMAL*);
462 HRESULT WINAPI VarDecFromStr(OLECHAR*,LCID,ULONG,DECIMAL*);
463 HRESULT WINAPI VarDecFromBool(VARIANT_BOOL,DECIMAL*);
464 HRESULT WINAPI VarDecFromI1(signed char,DECIMAL*);
465 HRESULT WINAPI VarDecFromUI2(USHORT,DECIMAL*);
466 HRESULT WINAPI VarDecFromUI4(ULONG,DECIMAL*);
467 HRESULT WINAPI VarDecFromUI8(ULONG64,DECIMAL*);
468 HRESULT WINAPI VarDecFromCy(CY,DECIMAL*);
469 HRESULT WINAPI VarDecFromDisp(IDispatch*,LCID,DECIMAL*);
471 #define VarUI4FromUI4( in,pOut ) ( *(pOut) = (in) )
472 #define VarI4FromI4( in,pOut ) ( *(pOut) = (in) )
474 #define VarUI1FromInt VarUI1FromI4
475 #define VarUI1FromUint VarUI1FromUI4
476 #define VarI2FromInt VarI2FromI4
477 #define VarI2FromUint VarI2FromUI4
478 #define VarI4FromInt VarI4FromI4
479 #define VarI4FromUint VarI4FromUI4
480 #define VarI8FromInt VarI8FromI4
481 #define VarI8FromUint VarI8FromUI4
482 #define VarR4FromInt VarR4FromI4
483 #define VarR4FromUint VarR4FromUI4
484 #define VarR8FromInt VarR8FromI4
485 #define VarR8FromUint VarR8FromUI4
486 #define VarDateFromInt VarDateFromI4
487 #define VarDateFromUint VarDateFromUI4
488 #define VarCyFromInt VarCyFromI4
489 #define VarCyFromUint VarCyFromUI4
490 #define VarBstrFromInt VarBstrFromI4
491 #define VarBstrFromUint VarBstrFromUI4
492 #define VarBoolFromInt VarBoolFromI4
493 #define VarBoolFromUint VarBoolFromUI4
494 #define VarI1FromInt VarI1FromI4
495 #define VarI1FromUint VarI1FromUI4
496 #define VarUI2FromInt VarUI2FromI4
497 #define VarUI2FromUint VarUI2FromUI4
498 #define VarUI4FromInt VarUI4FromI4
499 #define VarUI4FromUint VarUI4FromUI4
500 #define VarUI8FromInt VarUI8FromI4
501 #define VarUI8FromUint VarUI8FromUI4
502 #define VarDecFromInt VarDecFromI4
503 #define VarDecFromUint VarDecFromUI4
504 #define VarIntFromUI1 VarI4FromUI1
505 #define VarIntFromI2 VarI4FromI2
506 #define VarIntFromI4 VarI4FromI4
507 #define VarIntFromI8 VarI4FromI8
508 #define VarIntFromR4 VarI4FromR4
509 #define VarIntFromR8 VarI4FromR8
510 #define VarIntFromDate VarI4FromDate
511 #define VarIntFromCy VarI4FromCy
512 #define VarIntFromStr VarI4FromStr
513 #define VarIntFromDisp VarI4FromDisp
514 #define VarIntFromBool VarI4FromBool
515 #define VarIntFromI1 VarI4FromI1
516 #define VarIntFromUI2 VarI4FromUI2
517 #define VarIntFromUI4 VarI4FromUI4
518 #define VarIntFromUI8 VarI4FromUI8
519 #define VarIntFromDec VarI4FromDec
520 #define VarIntFromUint VarI4FromUI4
521 #define VarUintFromUI1 VarUI4FromUI1
522 #define VarUintFromI2 VarUI4FromI2
523 #define VarUintFromI4 VarUI4FromI4
524 #define VarUintFromI8 VarUI4FromI8
525 #define VarUintFromR4 VarUI4FromR4
526 #define VarUintFromR8 VarUI4FromR8
527 #define VarUintFromDate VarUI4FromDate
528 #define VarUintFromCy VarUI4FromCy
529 #define VarUintFromStr VarUI4FromStr
530 #define VarUintFromDisp VarUI4FromDisp
531 #define VarUintFromBool VarUI4FromBool
532 #define VarUintFromI1 VarUI4FromI1
533 #define VarUintFromUI2 VarUI4FromUI2
534 #define VarUintFromUI4 VarUI4FromUI4
535 #define VarUintFromUI8 VarUI4FromUI8
536 #define VarUintFromDec VarUI4FromDec
537 #define VarUintFromInt VarUI4FromI4
540 * Variant Math operations
542 #define VARCMP_LT 0
543 #define VARCMP_EQ 1
544 #define VARCMP_GT 2
545 #define VARCMP_NULL 3
547 HRESULT WINAPI VarR4CmpR8(float,double);
549 HRESULT WINAPI VarR8Pow(double,double,double*);
550 HRESULT WINAPI VarR8Round(double,int,double*);
552 HRESULT WINAPI VarDecAbs(const DECIMAL*,DECIMAL*);
553 HRESULT WINAPI VarDecAdd(const DECIMAL*,const DECIMAL*,DECIMAL*);
554 HRESULT WINAPI VarDecCmp(const DECIMAL*,const DECIMAL*);
555 HRESULT WINAPI VarDecCmpR8(const DECIMAL*,DOUBLE);
556 HRESULT WINAPI VarDecDiv(const DECIMAL*,const DECIMAL*,DECIMAL*);
557 HRESULT WINAPI VarDecFix(const DECIMAL*,DECIMAL*);
558 HRESULT WINAPI VarDecInt(const DECIMAL*,DECIMAL*);
559 HRESULT WINAPI VarDecMul(const DECIMAL*,const DECIMAL*,DECIMAL*);
560 HRESULT WINAPI VarDecNeg(const DECIMAL*,DECIMAL*);
561 HRESULT WINAPI VarDecRound(const DECIMAL*,int,DECIMAL*);
562 HRESULT WINAPI VarDecSub(const DECIMAL*,const DECIMAL*,DECIMAL*);
564 HRESULT WINAPI VarCyAbs(const CY,CY*);
565 HRESULT WINAPI VarCyAdd(const CY,const CY,CY*);
566 HRESULT WINAPI VarCyCmp(const CY,const CY);
567 HRESULT WINAPI VarCyCmpR8(const CY,DOUBLE);
568 HRESULT WINAPI VarCyFix(const CY,CY*);
569 HRESULT WINAPI VarCyInt(const CY,CY*);
570 HRESULT WINAPI VarCyMul(const CY,CY,CY*);
571 HRESULT WINAPI VarCyMulI4(const CY,LONG,CY*);
572 HRESULT WINAPI VarCyMulI8(const CY,LONG64,CY*);
573 HRESULT WINAPI VarCyNeg(const CY,CY*);
574 HRESULT WINAPI VarCyRound(const CY,INT,CY*);
575 HRESULT WINAPI VarCySub(const CY,const CY,CY*);
577 HRESULT WINAPI VarAdd(LPVARIANT,LPVARIANT,LPVARIANT);
578 HRESULT WINAPI VarAnd(LPVARIANT,LPVARIANT,LPVARIANT);
579 HRESULT WINAPI VarCat(LPVARIANT,LPVARIANT,LPVARIANT);
580 HRESULT WINAPI VarDiv(LPVARIANT,LPVARIANT,LPVARIANT);
581 HRESULT WINAPI VarEqv(LPVARIANT,LPVARIANT,LPVARIANT);
582 HRESULT WINAPI VarIdiv(LPVARIANT,LPVARIANT,LPVARIANT);
583 HRESULT WINAPI VarImp(LPVARIANT,LPVARIANT,LPVARIANT);
584 HRESULT WINAPI VarMod(LPVARIANT,LPVARIANT,LPVARIANT);
585 HRESULT WINAPI VarMul(LPVARIANT,LPVARIANT,LPVARIANT);
586 HRESULT WINAPI VarOr(LPVARIANT,LPVARIANT,LPVARIANT);
587 HRESULT WINAPI VarPow(LPVARIANT,LPVARIANT,LPVARIANT);
588 HRESULT WINAPI VarSub(LPVARIANT,LPVARIANT,LPVARIANT);
589 HRESULT WINAPI VarXor(LPVARIANT,LPVARIANT,LPVARIANT);
591 HRESULT WINAPI VarAbs(LPVARIANT,LPVARIANT);
592 HRESULT WINAPI VarFix(LPVARIANT,LPVARIANT);
593 HRESULT WINAPI VarInt(LPVARIANT,LPVARIANT);
594 HRESULT WINAPI VarNeg(LPVARIANT,LPVARIANT);
595 HRESULT WINAPI VarNot(LPVARIANT,LPVARIANT);
597 HRESULT WINAPI VarRound(LPVARIANT,int,LPVARIANT);
599 HRESULT WINAPI VarCmp(LPVARIANT,LPVARIANT,LCID,ULONG);
601 HRESULT WINAPI VarBstrCmp(BSTR,BSTR,LCID,ULONG);
602 HRESULT WINAPI VarBstrCat(BSTR,BSTR,BSTR*);
605 typedef struct {
606 SYSTEMTIME st;
607 USHORT wDayOfYear;
608 } UDATE;
610 typedef struct
612 INT cDig; /* Number of parsed digits */
613 ULONG dwInFlags; /* Acceptable state of the input string (NUMPRS_ flags) */
614 ULONG dwOutFlags; /* Parsed state of the output string (NUMPRS_ flags) */
615 INT cchUsed; /* Number of characters parsed from input string */
616 INT nBaseShift; /* Base of the number (but apparently unused) */
617 INT nPwr10; /* Scale of the number in powers of 10 */
618 } NUMPARSE;
620 #define NUMPRS_LEADING_WHITE 0x00001 /* Leading whitespace */
621 #define NUMPRS_TRAILING_WHITE 0x00002 /* Trailing whitespace */
622 #define NUMPRS_LEADING_PLUS 0x00004 /* Leading '+' sign */
623 #define NUMPRS_TRAILING_PLUS 0x00008 /* Trailing '+' sign */
624 #define NUMPRS_LEADING_MINUS 0x00010 /* Leading '-' sign */
625 #define NUMPRS_TRAILING_MINUS 0x00020 /* Trailing '-' sign */
626 #define NUMPRS_HEX_OCT 0x00040 /* Octal number (with a leading 0) */
627 #define NUMPRS_PARENS 0x00080 /* Parentheses for negative numbers */
628 #define NUMPRS_DECIMAL 0x00100 /* Decimal separator */
629 #define NUMPRS_THOUSANDS 0x00200 /* Thousands separator */
630 #define NUMPRS_CURRENCY 0x00400 /* Currency symbol */
631 #define NUMPRS_EXPONENT 0x00800 /* Exponent (e.g. "e-14") */
632 #define NUMPRS_USE_ALL 0x01000 /* Parse the entire string */
633 #define NUMPRS_STD 0x01FFF /* Standard flags for internal coercions (All of the above) */
634 #define NUMPRS_NEG 0x10000 /* Number is negative (dwOutFlags only) */
635 #define NUMPRS_INEXACT 0x20000 /* Number is represented inexactly (dwOutFlags only) */
637 #define VTBIT_I1 (1 << VT_I1)
638 #define VTBIT_UI1 (1 << VT_UI1)
639 #define VTBIT_I2 (1 << VT_I2)
640 #define VTBIT_UI2 (1 << VT_UI2)
641 #define VTBIT_I4 (1 << VT_I4)
642 #define VTBIT_UI4 (1 << VT_UI4)
643 #define VTBIT_I8 (1 << VT_I8)
644 #define VTBIT_UI8 (1 << VT_UI8)
645 #define VTBIT_R4 (1 << VT_R4)
646 #define VTBIT_R8 (1 << VT_R8)
647 #define VTBIT_CY (1 << VT_CY)
648 #define VTBIT_DECIMAL (1 << VT_DECIMAL)
650 HRESULT WINAPI VarParseNumFromStr(OLECHAR*,LCID,ULONG,NUMPARSE*,BYTE*);
651 HRESULT WINAPI VarNumFromParseNum(NUMPARSE*,BYTE*,ULONG,VARIANT*);
653 INT WINAPI DosDateTimeToVariantTime(USHORT,USHORT,double*);
654 INT WINAPI VariantTimeToDosDateTime(double,USHORT*,USHORT*);
656 INT WINAPI VariantTimeToSystemTime(DOUBLE,LPSYSTEMTIME);
657 INT WINAPI SystemTimeToVariantTime(LPSYSTEMTIME,double*);
659 HRESULT WINAPI VarDateFromUdate(UDATE*,ULONG,DATE*);
660 HRESULT WINAPI VarDateFromUdateEx(UDATE*,LCID,ULONG,DATE*);
661 HRESULT WINAPI VarUdateFromDate(DATE,ULONG,UDATE*);
663 /* Variant formatting */
664 HRESULT WINAPI VarWeekdayName(int,int,int,ULONG,BSTR*);
665 HRESULT WINAPI VarMonthName(int,int,ULONG,BSTR*);
666 HRESULT WINAPI GetAltMonthNames(LCID,LPOLESTR**);
668 HRESULT WINAPI VarFormat(LPVARIANT,LPOLESTR,int,int,ULONG,BSTR*);
669 HRESULT WINAPI VarFormatCurrency(LPVARIANT,int,int,int,int,ULONG,BSTR*);
670 HRESULT WINAPI VarFormatDateTime(LPVARIANT,int,ULONG,BSTR*);
671 HRESULT WINAPI VarFormatNumber(LPVARIANT,int,int,int,int,ULONG,BSTR*);
672 HRESULT WINAPI VarFormatPercent(LPVARIANT,int,int,int,int,ULONG,BSTR*);
674 HRESULT WINAPI VarFormatFromTokens(LPVARIANT,LPOLESTR,LPBYTE,ULONG,BSTR*,LCID);
675 HRESULT WINAPI VarTokenizeFormatString(LPOLESTR,LPBYTE,int,int,int,LCID,int*);
679 * IDispatch types and helper functions
682 /* A structure describing a single parameter to a com object method. */
683 typedef struct tagPARAMDATA
685 OLECHAR *szName; /* Name of Parameter */
686 VARTYPE vt; /* Type of Parameter */
687 } PARAMDATA, *LPPARAMDATA;
689 /* A structure describing a single method of a com object. */
690 typedef struct tagMETHODDATA
692 OLECHAR *szName; /* Name of method */
693 PARAMDATA *ppdata; /* Parameters of the method */
694 DISPID dispid; /* Id of the method */
695 UINT iMeth; /* Vtable index of the method */
696 CALLCONV cc; /* Calling convention of the method */
697 UINT cArgs; /* Number of parameters in the method */
698 WORD wFlags; /* Type of the method (DISPATCH_ flags) */
699 VARTYPE vtReturn; /* Type of the return value */
700 } METHODDATA, *LPMETHODDATA;
702 /* Structure describing a single com object */
703 typedef struct tagINTERFACEDATA
705 METHODDATA *pmethdata; /* Methods of the object */
706 UINT cMembers; /* Number of methods in the object */
707 } INTERFACEDATA, *LPINTERFACEDATA;
709 typedef enum tagREGKIND
711 REGKIND_DEFAULT,
712 REGKIND_REGISTER,
713 REGKIND_NONE
714 } REGKIND;
716 HRESULT WINAPI DispGetParam(DISPPARAMS*,UINT,VARTYPE,VARIANT*,UINT*);
717 HRESULT WINAPI DispGetIDsOfNames(ITypeInfo*,OLECHAR**,UINT,DISPID*);
718 HRESULT WINAPI DispInvoke(void*,ITypeInfo*,DISPID,WORD,DISPPARAMS*,VARIANT*,
719 EXCEPINFO*,UINT*);
720 HRESULT WINAPI CreateDispTypeInfo(INTERFACEDATA*,LCID,ITypeInfo**);
721 HRESULT WINAPI CreateStdDispatch(IUnknown*,void*,ITypeInfo*,IUnknown**);
722 HRESULT WINAPI DispCallFunc(void*,ULONG_PTR,CALLCONV,VARTYPE,UINT,VARTYPE*,
723 VARIANTARG**,VARIANT*);
727 * TypeLib API
730 ULONG WINAPI LHashValOfNameSysA(SYSKIND,LCID,LPCSTR);
731 ULONG WINAPI LHashValOfNameSys(SYSKIND,LCID,LPCOLESTR);
733 #define LHashValOfName(lcid,name) LHashValOfNameSys(SYS_WIN32,lcid,name)
734 #define WHashValOfLHashVal(hash) ((USHORT)((hash) & 0xffff))
735 #define IsHashValCompatible(hash1,hash2) ((hash1) & 0xff0000 == (hash2) & 0xff0000)
737 #define MEMBERID_NIL DISPID_UNKNOWN
738 #define ID_DEFAULTINST -2
740 #define DISPATCH_METHOD 0x1
741 #define DISPATCH_PROPERTYGET 0x2
742 #define DISPATCH_PROPERTYPUT 0x4
743 #define DISPATCH_PROPERTYPUTREF 0x8
745 #define LOAD_TLB_AS_32BIT 0x20
746 #define LOAD_TLB_AS_64BIT 0x40
747 #define MASK_TO_RESET_TLB_BITS ~(LOAD_TLB_AS_32BIT|LOAD_TLB_AS_64BIT)
749 HRESULT WINAPI CreateTypeLib(SYSKIND,const OLECHAR*,ICreateTypeLib**);
750 HRESULT WINAPI CreateTypeLib2(SYSKIND,LPCOLESTR,ICreateTypeLib2**);
751 HRESULT WINAPI LoadRegTypeLib(REFGUID,WORD,WORD,LCID,ITypeLib**);
752 HRESULT WINAPI LoadTypeLib(const OLECHAR*,ITypeLib**);
753 HRESULT WINAPI LoadTypeLibEx(LPCOLESTR,REGKIND,ITypeLib**);
754 HRESULT WINAPI QueryPathOfRegTypeLib(REFGUID,WORD,WORD,LCID,LPBSTR);
755 HRESULT WINAPI RegisterTypeLib(ITypeLib*,OLECHAR*,OLECHAR*);
756 HRESULT WINAPI UnRegisterTypeLib(REFGUID,WORD,WORD,LCID,SYSKIND);
757 HRESULT WINAPI RegisterTypeLibForUser(ITypeLib*,OLECHAR*,OLECHAR*);
758 HRESULT WINAPI UnRegisterTypeLibForUser(REFGUID,WORD,WORD,LCID,SYSKIND);
760 VOID WINAPI ClearCustData(LPCUSTDATA);
762 #ifdef __cplusplus
763 } /* extern "C" */
764 #endif
767 #endif /*__WINE_OLEAUTO_H*/