source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/oleauto.h

Last change on this file was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 33.3 KB
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#if !defined(_OLEAUTO_H_)
7#define _OLEAUTO_H_
8
9#ifndef RC_INVOKED
10#include <pshpack8.h>
11#endif
12
13#ifdef _OLEAUT32_
14#define WINOLEAUTAPI STDAPI
15#define WINOLEAUTAPI_(type) STDAPI_(type)
16#else
17#define WINOLEAUTAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI
18#define WINOLEAUTAPI_(type) EXTERN_C DECLSPEC_IMPORT type WINAPI
19#endif
20
21EXTERN_C const IID IID_StdOle;
22
23#define STDOLE_MAJORVERNUM 0x1
24#define STDOLE_MINORVERNUM 0x0
25#define STDOLE_LCID 0x0000
26
27#define STDOLE2_MAJORVERNUM 0x2
28#define STDOLE2_MINORVERNUM 0x0
29#define STDOLE2_LCID 0x0000
30
31#ifndef _LCID_DEFINED
32typedef DWORD LCID;
33#define _LCID_DEFINED
34#endif
35
36#ifndef BEGIN_INTERFACE
37#define BEGIN_INTERFACE
38#define END_INTERFACE
39#endif
40
41#include <oaidl.h>
42
43WINOLEAUTAPI_(BSTR) SysAllocString(const OLECHAR *);
44WINOLEAUTAPI_(INT) SysReAllocString(BSTR *,const OLECHAR *);
45WINOLEAUTAPI_(BSTR) SysAllocStringLen(const OLECHAR *,UINT);
46WINOLEAUTAPI_(INT) SysReAllocStringLen(BSTR *,const OLECHAR *,UINT);
47WINOLEAUTAPI_(void) SysFreeString(BSTR);
48WINOLEAUTAPI_(UINT) SysStringLen(BSTR);
49WINOLEAUTAPI_(UINT) SysStringByteLen(BSTR bstr);
50WINOLEAUTAPI_(BSTR) SysAllocStringByteLen(LPCSTR psz,UINT len);
51WINOLEAUTAPI_(INT) DosDateTimeToVariantTime(USHORT wDosDate,USHORT wDosTime,DOUBLE *pvtime);
52WINOLEAUTAPI_(INT) VariantTimeToDosDateTime(DOUBLE vtime,USHORT *pwDosDate,USHORT *pwDosTime);
53WINOLEAUTAPI_(INT) SystemTimeToVariantTime(LPSYSTEMTIME lpSystemTime,DOUBLE *pvtime);
54WINOLEAUTAPI_(INT) VariantTimeToSystemTime(DOUBLE vtime,LPSYSTEMTIME lpSystemTime);
55WINOLEAUTAPI SafeArrayAllocDescriptor(UINT cDims,SAFEARRAY **ppsaOut);
56WINOLEAUTAPI SafeArrayAllocDescriptorEx(VARTYPE vt,UINT cDims,SAFEARRAY **ppsaOut);
57WINOLEAUTAPI SafeArrayAllocData(SAFEARRAY *psa);
58WINOLEAUTAPI_(SAFEARRAY *) SafeArrayCreate(VARTYPE vt,UINT cDims,SAFEARRAYBOUND *rgsabound);
59WINOLEAUTAPI_(SAFEARRAY *) SafeArrayCreateEx(VARTYPE vt,UINT cDims,SAFEARRAYBOUND *rgsabound,PVOID pvExtra);
60WINOLEAUTAPI SafeArrayCopyData(SAFEARRAY *psaSource,SAFEARRAY *psaTarget);
61WINOLEAUTAPI SafeArrayDestroyDescriptor(SAFEARRAY *psa);
62WINOLEAUTAPI SafeArrayDestroyData(SAFEARRAY *psa);
63WINOLEAUTAPI SafeArrayDestroy(SAFEARRAY *psa);
64WINOLEAUTAPI SafeArrayRedim(SAFEARRAY *psa,SAFEARRAYBOUND *psaboundNew);
65WINOLEAUTAPI_(UINT) SafeArrayGetDim(SAFEARRAY *psa);
66WINOLEAUTAPI_(UINT) SafeArrayGetElemsize(SAFEARRAY *psa);
67WINOLEAUTAPI SafeArrayGetUBound(SAFEARRAY *psa,UINT nDim,LONG *plUbound);
68WINOLEAUTAPI SafeArrayGetLBound(SAFEARRAY *psa,UINT nDim,LONG *plLbound);
69WINOLEAUTAPI SafeArrayLock(SAFEARRAY *psa);
70WINOLEAUTAPI SafeArrayUnlock(SAFEARRAY *psa);
71WINOLEAUTAPI SafeArrayAccessData(SAFEARRAY *psa,void HUGEP **ppvData);
72WINOLEAUTAPI SafeArrayUnaccessData(SAFEARRAY *psa);
73WINOLEAUTAPI SafeArrayGetElement(SAFEARRAY *psa,LONG *rgIndices,void *pv);
74WINOLEAUTAPI SafeArrayPutElement(SAFEARRAY *psa,LONG *rgIndices,void *pv);
75WINOLEAUTAPI SafeArrayCopy(SAFEARRAY *psa,SAFEARRAY **ppsaOut);
76WINOLEAUTAPI SafeArrayPtrOfIndex(SAFEARRAY *psa,LONG *rgIndices,void **ppvData);
77WINOLEAUTAPI SafeArraySetRecordInfo(SAFEARRAY *psa,IRecordInfo *prinfo);
78WINOLEAUTAPI SafeArrayGetRecordInfo(SAFEARRAY *psa,IRecordInfo **prinfo);
79WINOLEAUTAPI SafeArraySetIID(SAFEARRAY *psa,REFGUID guid);
80WINOLEAUTAPI SafeArrayGetIID(SAFEARRAY *psa,GUID *pguid);
81WINOLEAUTAPI SafeArrayGetVartype(SAFEARRAY *psa,VARTYPE *pvt);
82WINOLEAUTAPI_(SAFEARRAY *) SafeArrayCreateVector(VARTYPE vt,LONG lLbound,ULONG cElements);
83WINOLEAUTAPI_(SAFEARRAY *) SafeArrayCreateVectorEx(VARTYPE vt,LONG lLbound,ULONG cElements,PVOID pvExtra);
84WINOLEAUTAPI_(void) VariantInit(VARIANTARG *pvarg);
85WINOLEAUTAPI VariantClear(VARIANTARG *pvarg);
86WINOLEAUTAPI VariantCopy(VARIANTARG *pvargDest,VARIANTARG *pvargSrc);
87WINOLEAUTAPI VariantCopyInd(VARIANT *pvarDest,VARIANTARG *pvargSrc);
88WINOLEAUTAPI VariantChangeType(VARIANTARG *pvargDest,VARIANTARG *pvarSrc,USHORT wFlags,VARTYPE vt);
89WINOLEAUTAPI VariantChangeTypeEx(VARIANTARG *pvargDest,VARIANTARG *pvarSrc,LCID lcid,USHORT wFlags,VARTYPE vt);
90
91#define VARIANT_NOVALUEPROP 0x01
92#define VARIANT_ALPHABOOL 0x02
93#define VARIANT_NOUSEROVERRIDE 0x04
94#define VARIANT_CALENDAR_HIJRI 0x08
95#define VARIANT_LOCALBOOL 0x10
96#define VARIANT_CALENDAR_THAI 0x20
97#define VARIANT_CALENDAR_GREGORIAN 0x40
98#define VARIANT_USE_NLS 0x80
99
100WINOLEAUTAPI VectorFromBstr (BSTR bstr,SAFEARRAY **ppsa);
101WINOLEAUTAPI BstrFromVector (SAFEARRAY *psa,BSTR *pbstr);
102
103#define VAR_TIMEVALUEONLY ((DWORD)0x00000001)
104#define VAR_DATEVALUEONLY ((DWORD)0x00000002)
105#define VAR_VALIDDATE ((DWORD)0x00000004)
106#define VAR_CALENDAR_HIJRI ((DWORD)0x00000008)
107#define VAR_LOCALBOOL ((DWORD)0x00000010)
108#define VAR_FORMAT_NOSUBSTITUTE ((DWORD)0x00000020)
109#define VAR_FOURDIGITYEARS ((DWORD)0x00000040)
110
111#ifndef LOCALE_USE_NLS
112#define LOCALE_USE_NLS 0x10000000
113#endif
114
115#define VAR_CALENDAR_THAI ((DWORD)0x00000080)
116#define VAR_CALENDAR_GREGORIAN ((DWORD)0x00000100)
117
118#define VTDATEGRE_MAX 2958465
119#define VTDATEGRE_MIN -657434
120
121WINOLEAUTAPI VarUI1FromI2(SHORT sIn,BYTE *pbOut);
122WINOLEAUTAPI VarUI1FromI4(LONG lIn,BYTE *pbOut);
123WINOLEAUTAPI VarUI1FromI8(LONG64 i64In,BYTE *pbOut);
124WINOLEAUTAPI VarUI1FromR4(FLOAT fltIn,BYTE *pbOut);
125WINOLEAUTAPI VarUI1FromR8(DOUBLE dblIn,BYTE *pbOut);
126WINOLEAUTAPI VarUI1FromCy(CY cyIn,BYTE *pbOut);
127WINOLEAUTAPI VarUI1FromDate(DATE dateIn,BYTE *pbOut);
128WINOLEAUTAPI VarUI1FromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,BYTE *pbOut);
129WINOLEAUTAPI VarUI1FromDisp(IDispatch *pdispIn,LCID lcid,BYTE *pbOut);
130WINOLEAUTAPI VarUI1FromBool(VARIANT_BOOL boolIn,BYTE *pbOut);
131WINOLEAUTAPI VarUI1FromI1(CHAR cIn,BYTE *pbOut);
132WINOLEAUTAPI VarUI1FromUI2(USHORT uiIn,BYTE *pbOut);
133WINOLEAUTAPI VarUI1FromUI4(ULONG ulIn,BYTE *pbOut);
134WINOLEAUTAPI VarUI1FromUI8(ULONG64 ui64In,BYTE *pbOut);
135WINOLEAUTAPI VarUI1FromDec(DECIMAL *pdecIn,BYTE *pbOut);
136WINOLEAUTAPI VarI2FromUI1(BYTE bIn,SHORT *psOut);
137WINOLEAUTAPI VarI2FromI4(LONG lIn,SHORT *psOut);
138WINOLEAUTAPI VarI2FromI8(LONG64 i64In,SHORT *psOut);
139WINOLEAUTAPI VarI2FromR4(FLOAT fltIn,SHORT *psOut);
140WINOLEAUTAPI VarI2FromR8(DOUBLE dblIn,SHORT *psOut);
141WINOLEAUTAPI VarI2FromCy(CY cyIn,SHORT *psOut);
142WINOLEAUTAPI VarI2FromDate(DATE dateIn,SHORT *psOut);
143WINOLEAUTAPI VarI2FromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,SHORT *psOut);
144WINOLEAUTAPI VarI2FromDisp(IDispatch *pdispIn,LCID lcid,SHORT *psOut);
145WINOLEAUTAPI VarI2FromBool(VARIANT_BOOL boolIn,SHORT *psOut);
146WINOLEAUTAPI VarI2FromI1(CHAR cIn,SHORT *psOut);
147WINOLEAUTAPI VarI2FromUI2(USHORT uiIn,SHORT *psOut);
148WINOLEAUTAPI VarI2FromUI4(ULONG ulIn,SHORT *psOut);
149WINOLEAUTAPI VarI2FromUI8(ULONG64 ui64In,SHORT *psOut);
150WINOLEAUTAPI VarI2FromDec(DECIMAL *pdecIn,SHORT *psOut);
151WINOLEAUTAPI VarI4FromUI1(BYTE bIn,LONG *plOut);
152WINOLEAUTAPI VarI4FromI2(SHORT sIn,LONG *plOut);
153WINOLEAUTAPI VarI4FromI8(LONG64 i64In,LONG *plOut);
154WINOLEAUTAPI VarI4FromR4(FLOAT fltIn,LONG *plOut);
155WINOLEAUTAPI VarI4FromR8(DOUBLE dblIn,LONG *plOut);
156WINOLEAUTAPI VarI4FromCy(CY cyIn,LONG *plOut);
157WINOLEAUTAPI VarI4FromDate(DATE dateIn,LONG *plOut);
158WINOLEAUTAPI VarI4FromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,LONG *plOut);
159WINOLEAUTAPI VarI4FromDisp(IDispatch *pdispIn,LCID lcid,LONG *plOut);
160WINOLEAUTAPI VarI4FromBool(VARIANT_BOOL boolIn,LONG *plOut);
161WINOLEAUTAPI VarI4FromI1(CHAR cIn,LONG *plOut);
162WINOLEAUTAPI VarI4FromUI2(USHORT uiIn,LONG *plOut);
163WINOLEAUTAPI VarI4FromUI4(ULONG ulIn,LONG *plOut);
164WINOLEAUTAPI VarI4FromUI8(ULONG64 ui64In,LONG *plOut);
165WINOLEAUTAPI VarI4FromDec(DECIMAL *pdecIn,LONG *plOut);
166WINOLEAUTAPI VarI4FromInt(INT intIn,LONG *plOut);
167WINOLEAUTAPI VarI8FromUI1(BYTE bIn,LONG64 *pi64Out);
168WINOLEAUTAPI VarI8FromI2(SHORT sIn,LONG64 *pi64Out);
169WINOLEAUTAPI VarI8FromI4(LONG lIn,LONG64 *pi64Out);
170WINOLEAUTAPI VarI8FromR4(FLOAT fltIn,LONG64 *pi64Out);
171WINOLEAUTAPI VarI8FromR8(DOUBLE dblIn,LONG64 *pi64Out);
172WINOLEAUTAPI VarI8FromCy(CY cyIn,LONG64 *pi64Out);
173WINOLEAUTAPI VarI8FromDate(DATE dateIn,LONG64 *pi64Out);
174WINOLEAUTAPI VarI8FromStr(OLECHAR *strIn,LCID lcid,unsigned __LONG32 dwFlags,LONG64 *pi64Out);
175WINOLEAUTAPI VarI8FromDisp(IDispatch *pdispIn,LCID lcid,LONG64 *pi64Out);
176WINOLEAUTAPI VarI8FromBool(VARIANT_BOOL boolIn,LONG64 *pi64Out);
177WINOLEAUTAPI VarI8FromI1(CHAR cIn,LONG64 *pi64Out);
178WINOLEAUTAPI VarI8FromUI2(USHORT uiIn,LONG64 *pi64Out);
179WINOLEAUTAPI VarI8FromUI4(ULONG ulIn,LONG64 *pi64Out);
180WINOLEAUTAPI VarI8FromUI8(ULONG64 ui64In,LONG64 *pi64Out);
181WINOLEAUTAPI VarI8FromDec(DECIMAL *pdecIn,LONG64 *pi64Out);
182WINOLEAUTAPI VarI8FromInt(INT intIn,LONG64 *pi64Out);
183WINOLEAUTAPI VarR4FromUI1(BYTE bIn,FLOAT *pfltOut);
184WINOLEAUTAPI VarR4FromI2(SHORT sIn,FLOAT *pfltOut);
185WINOLEAUTAPI VarR4FromI4(LONG lIn,FLOAT *pfltOut);
186WINOLEAUTAPI VarR4FromI8(LONG64 i64In,FLOAT *pfltOut);
187WINOLEAUTAPI VarR4FromR8(DOUBLE dblIn,FLOAT *pfltOut);
188WINOLEAUTAPI VarR4FromCy(CY cyIn,FLOAT *pfltOut);
189WINOLEAUTAPI VarR4FromDate(DATE dateIn,FLOAT *pfltOut);
190WINOLEAUTAPI VarR4FromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,FLOAT *pfltOut);
191WINOLEAUTAPI VarR4FromDisp(IDispatch *pdispIn,LCID lcid,FLOAT *pfltOut);
192WINOLEAUTAPI VarR4FromBool(VARIANT_BOOL boolIn,FLOAT *pfltOut);
193WINOLEAUTAPI VarR4FromI1(CHAR cIn,FLOAT *pfltOut);
194WINOLEAUTAPI VarR4FromUI2(USHORT uiIn,FLOAT *pfltOut);
195WINOLEAUTAPI VarR4FromUI4(ULONG ulIn,FLOAT *pfltOut);
196WINOLEAUTAPI VarR4FromUI8(ULONG64 ui64In,FLOAT *pfltOut);
197WINOLEAUTAPI VarR4FromDec(DECIMAL *pdecIn,FLOAT *pfltOut);
198WINOLEAUTAPI VarR8FromUI1(BYTE bIn,DOUBLE *pdblOut);
199WINOLEAUTAPI VarR8FromI2(SHORT sIn,DOUBLE *pdblOut);
200WINOLEAUTAPI VarR8FromI4(LONG lIn,DOUBLE *pdblOut);
201WINOLEAUTAPI VarR8FromI8(LONG64 i64In,DOUBLE *pdblOut);
202WINOLEAUTAPI VarR8FromR4(FLOAT fltIn,DOUBLE *pdblOut);
203WINOLEAUTAPI VarR8FromCy(CY cyIn,DOUBLE *pdblOut);
204WINOLEAUTAPI VarR8FromDate(DATE dateIn,DOUBLE *pdblOut);
205WINOLEAUTAPI VarR8FromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,DOUBLE *pdblOut);
206WINOLEAUTAPI VarR8FromDisp(IDispatch *pdispIn,LCID lcid,DOUBLE *pdblOut);
207WINOLEAUTAPI VarR8FromBool(VARIANT_BOOL boolIn,DOUBLE *pdblOut);
208WINOLEAUTAPI VarR8FromI1(CHAR cIn,DOUBLE *pdblOut);
209WINOLEAUTAPI VarR8FromUI2(USHORT uiIn,DOUBLE *pdblOut);
210WINOLEAUTAPI VarR8FromUI4(ULONG ulIn,DOUBLE *pdblOut);
211WINOLEAUTAPI VarR8FromUI8(ULONG64 ui64In,DOUBLE *pdblOut);
212WINOLEAUTAPI VarR8FromDec(DECIMAL *pdecIn,DOUBLE *pdblOut);
213WINOLEAUTAPI VarDateFromUI1(BYTE bIn,DATE *pdateOut);
214WINOLEAUTAPI VarDateFromI2(SHORT sIn,DATE *pdateOut);
215WINOLEAUTAPI VarDateFromI4(LONG lIn,DATE *pdateOut);
216WINOLEAUTAPI VarDateFromI8(LONG64 i64In,DATE *pdateOut);
217WINOLEAUTAPI VarDateFromR4(FLOAT fltIn,DATE *pdateOut);
218WINOLEAUTAPI VarDateFromR8(DOUBLE dblIn,DATE *pdateOut);
219WINOLEAUTAPI VarDateFromCy(CY cyIn,DATE *pdateOut);
220WINOLEAUTAPI VarDateFromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,DATE *pdateOut);
221WINOLEAUTAPI VarDateFromDisp(IDispatch *pdispIn,LCID lcid,DATE *pdateOut);
222WINOLEAUTAPI VarDateFromBool(VARIANT_BOOL boolIn,DATE *pdateOut);
223WINOLEAUTAPI VarDateFromI1(CHAR cIn,DATE *pdateOut);
224WINOLEAUTAPI VarDateFromUI2(USHORT uiIn,DATE *pdateOut);
225WINOLEAUTAPI VarDateFromUI4(ULONG ulIn,DATE *pdateOut);
226WINOLEAUTAPI VarDateFromUI8(ULONG64 ui64In,DATE *pdateOut);
227WINOLEAUTAPI VarDateFromDec(DECIMAL *pdecIn,DATE *pdateOut);
228WINOLEAUTAPI VarCyFromUI1(BYTE bIn,CY *pcyOut);
229WINOLEAUTAPI VarCyFromI2(SHORT sIn,CY *pcyOut);
230WINOLEAUTAPI VarCyFromI4(LONG lIn,CY *pcyOut);
231WINOLEAUTAPI VarCyFromI8(LONG64 i64In,CY *pcyOut);
232WINOLEAUTAPI VarCyFromR4(FLOAT fltIn,CY *pcyOut);
233WINOLEAUTAPI VarCyFromR8(DOUBLE dblIn,CY *pcyOut);
234WINOLEAUTAPI VarCyFromDate(DATE dateIn,CY *pcyOut);
235WINOLEAUTAPI VarCyFromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,CY *pcyOut);
236WINOLEAUTAPI VarCyFromDisp(IDispatch *pdispIn,LCID lcid,CY *pcyOut);
237WINOLEAUTAPI VarCyFromBool(VARIANT_BOOL boolIn,CY *pcyOut);
238WINOLEAUTAPI VarCyFromI1(CHAR cIn,CY *pcyOut);
239WINOLEAUTAPI VarCyFromUI2(USHORT uiIn,CY *pcyOut);
240WINOLEAUTAPI VarCyFromUI4(ULONG ulIn,CY *pcyOut);
241WINOLEAUTAPI VarCyFromUI8(ULONG64 ui64In,CY *pcyOut);
242WINOLEAUTAPI VarCyFromDec(DECIMAL *pdecIn,CY *pcyOut);
243WINOLEAUTAPI VarBstrFromUI1(BYTE bVal,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
244WINOLEAUTAPI VarBstrFromI2(SHORT iVal,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
245WINOLEAUTAPI VarBstrFromI4(LONG lIn,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
246WINOLEAUTAPI VarBstrFromI8(LONG64 i64In,LCID lcid,unsigned __LONG32 dwFlags,BSTR *pbstrOut);
247WINOLEAUTAPI VarBstrFromR4(FLOAT fltIn,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
248WINOLEAUTAPI VarBstrFromR8(DOUBLE dblIn,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
249WINOLEAUTAPI VarBstrFromCy(CY cyIn,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
250WINOLEAUTAPI VarBstrFromDate(DATE dateIn,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
251WINOLEAUTAPI VarBstrFromDisp(IDispatch *pdispIn,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
252WINOLEAUTAPI VarBstrFromBool(VARIANT_BOOL boolIn,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
253WINOLEAUTAPI VarBstrFromI1(CHAR cIn,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
254WINOLEAUTAPI VarBstrFromUI2(USHORT uiIn,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
255WINOLEAUTAPI VarBstrFromUI4(ULONG ulIn,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
256WINOLEAUTAPI VarBstrFromUI8(ULONG64 ui64In,LCID lcid,unsigned __LONG32 dwFlags,BSTR *pbstrOut);
257WINOLEAUTAPI VarBstrFromDec(DECIMAL *pdecIn,LCID lcid,ULONG dwFlags,BSTR *pbstrOut);
258WINOLEAUTAPI VarBoolFromUI1(BYTE bIn,VARIANT_BOOL *pboolOut);
259WINOLEAUTAPI VarBoolFromI2(SHORT sIn,VARIANT_BOOL *pboolOut);
260WINOLEAUTAPI VarBoolFromI4(LONG lIn,VARIANT_BOOL *pboolOut);
261WINOLEAUTAPI VarBoolFromI8(LONG64 i64In,VARIANT_BOOL *pboolOut);
262WINOLEAUTAPI VarBoolFromR4(FLOAT fltIn,VARIANT_BOOL *pboolOut);
263WINOLEAUTAPI VarBoolFromR8(DOUBLE dblIn,VARIANT_BOOL *pboolOut);
264WINOLEAUTAPI VarBoolFromDate(DATE dateIn,VARIANT_BOOL *pboolOut);
265WINOLEAUTAPI VarBoolFromCy(CY cyIn,VARIANT_BOOL *pboolOut);
266WINOLEAUTAPI VarBoolFromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,VARIANT_BOOL *pboolOut);
267WINOLEAUTAPI VarBoolFromDisp(IDispatch *pdispIn,LCID lcid,VARIANT_BOOL *pboolOut);
268WINOLEAUTAPI VarBoolFromI1(CHAR cIn,VARIANT_BOOL *pboolOut);
269WINOLEAUTAPI VarBoolFromUI2(USHORT uiIn,VARIANT_BOOL *pboolOut);
270WINOLEAUTAPI VarBoolFromUI4(ULONG ulIn,VARIANT_BOOL *pboolOut);
271WINOLEAUTAPI VarBoolFromUI8(ULONG64 i64In,VARIANT_BOOL *pboolOut);
272WINOLEAUTAPI VarBoolFromDec(DECIMAL *pdecIn,VARIANT_BOOL *pboolOut);
273WINOLEAUTAPI VarI1FromUI1(BYTE bIn,CHAR *pcOut);
274WINOLEAUTAPI VarI1FromI2(SHORT uiIn,CHAR *pcOut);
275WINOLEAUTAPI VarI1FromI4(LONG lIn,CHAR *pcOut);
276WINOLEAUTAPI VarI1FromI8(LONG64 i64In,CHAR *pcOut);
277WINOLEAUTAPI VarI1FromR4(FLOAT fltIn,CHAR *pcOut);
278WINOLEAUTAPI VarI1FromR8(DOUBLE dblIn,CHAR *pcOut);
279WINOLEAUTAPI VarI1FromDate(DATE dateIn,CHAR *pcOut);
280WINOLEAUTAPI VarI1FromCy(CY cyIn,CHAR *pcOut);
281WINOLEAUTAPI VarI1FromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,CHAR *pcOut);
282WINOLEAUTAPI VarI1FromDisp(IDispatch *pdispIn,LCID lcid,CHAR *pcOut);
283WINOLEAUTAPI VarI1FromBool(VARIANT_BOOL boolIn,CHAR *pcOut);
284WINOLEAUTAPI VarI1FromUI2(USHORT uiIn,CHAR *pcOut);
285WINOLEAUTAPI VarI1FromUI4(ULONG ulIn,CHAR *pcOut);
286WINOLEAUTAPI VarI1FromUI8(ULONG64 i64In,CHAR *pcOut);
287WINOLEAUTAPI VarI1FromDec(DECIMAL *pdecIn,CHAR *pcOut);
288WINOLEAUTAPI VarUI2FromUI1(BYTE bIn,USHORT *puiOut);
289WINOLEAUTAPI VarUI2FromI2(SHORT uiIn,USHORT *puiOut);
290WINOLEAUTAPI VarUI2FromI4(LONG lIn,USHORT *puiOut);
291WINOLEAUTAPI VarUI2FromI8(LONG64 i64In,USHORT *puiOut);
292WINOLEAUTAPI VarUI2FromR4(FLOAT fltIn,USHORT *puiOut);
293WINOLEAUTAPI VarUI2FromR8(DOUBLE dblIn,USHORT *puiOut);
294WINOLEAUTAPI VarUI2FromDate(DATE dateIn,USHORT *puiOut);
295WINOLEAUTAPI VarUI2FromCy(CY cyIn,USHORT *puiOut);
296WINOLEAUTAPI VarUI2FromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,USHORT *puiOut);
297WINOLEAUTAPI VarUI2FromDisp(IDispatch *pdispIn,LCID lcid,USHORT *puiOut);
298WINOLEAUTAPI VarUI2FromBool(VARIANT_BOOL boolIn,USHORT *puiOut);
299WINOLEAUTAPI VarUI2FromI1(CHAR cIn,USHORT *puiOut);
300WINOLEAUTAPI VarUI2FromUI4(ULONG ulIn,USHORT *puiOut);
301WINOLEAUTAPI VarUI2FromUI8(ULONG64 i64In,USHORT *puiOut);
302WINOLEAUTAPI VarUI2FromDec(DECIMAL *pdecIn,USHORT *puiOut);
303WINOLEAUTAPI VarUI4FromUI1(BYTE bIn,ULONG *pulOut);
304WINOLEAUTAPI VarUI4FromI2(SHORT uiIn,ULONG *pulOut);
305WINOLEAUTAPI VarUI4FromI4(LONG lIn,ULONG *pulOut);
306WINOLEAUTAPI VarUI4FromI8(LONG64 i64In,ULONG *plOut);
307WINOLEAUTAPI VarUI4FromR4(FLOAT fltIn,ULONG *pulOut);
308WINOLEAUTAPI VarUI4FromR8(DOUBLE dblIn,ULONG *pulOut);
309WINOLEAUTAPI VarUI4FromDate(DATE dateIn,ULONG *pulOut);
310WINOLEAUTAPI VarUI4FromCy(CY cyIn,ULONG *pulOut);
311WINOLEAUTAPI VarUI4FromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,ULONG *pulOut);
312WINOLEAUTAPI VarUI4FromDisp(IDispatch *pdispIn,LCID lcid,ULONG *pulOut);
313WINOLEAUTAPI VarUI4FromBool(VARIANT_BOOL boolIn,ULONG *pulOut);
314WINOLEAUTAPI VarUI4FromI1(CHAR cIn,ULONG *pulOut);
315WINOLEAUTAPI VarUI4FromUI2(USHORT uiIn,ULONG *pulOut);
316WINOLEAUTAPI VarUI4FromUI8(ULONG64 ui64In,ULONG *plOut);
317WINOLEAUTAPI VarUI4FromDec(DECIMAL *pdecIn,ULONG *pulOut);
318WINOLEAUTAPI VarUI8FromUI1(BYTE bIn,ULONG64 *pi64Out);
319WINOLEAUTAPI VarUI8FromI2(SHORT sIn,ULONG64 *pi64Out);
320WINOLEAUTAPI VarUI8FromI4(LONG lIn,ULONG64 *pi64Out);
321WINOLEAUTAPI VarUI8FromI8(LONG64 ui64In,ULONG64 *pi64Out);
322WINOLEAUTAPI VarUI8FromR4(FLOAT fltIn,ULONG64 *pi64Out);
323WINOLEAUTAPI VarUI8FromR8(DOUBLE dblIn,ULONG64 *pi64Out);
324WINOLEAUTAPI VarUI8FromCy(CY cyIn,ULONG64 *pi64Out);
325WINOLEAUTAPI VarUI8FromDate(DATE dateIn,ULONG64 *pi64Out);
326WINOLEAUTAPI VarUI8FromStr(OLECHAR *strIn,LCID lcid,unsigned __LONG32 dwFlags,ULONG64 *pi64Out);
327WINOLEAUTAPI VarUI8FromDisp(IDispatch *pdispIn,LCID lcid,ULONG64 *pi64Out);
328WINOLEAUTAPI VarUI8FromBool(VARIANT_BOOL boolIn,ULONG64 *pi64Out);
329WINOLEAUTAPI VarUI8FromI1(CHAR cIn,ULONG64 *pi64Out);
330WINOLEAUTAPI VarUI8FromUI2(USHORT uiIn,ULONG64 *pi64Out);
331WINOLEAUTAPI VarUI8FromUI4(ULONG ulIn,ULONG64 *pi64Out);
332WINOLEAUTAPI VarUI8FromDec(DECIMAL *pdecIn,ULONG64 *pi64Out);
333WINOLEAUTAPI VarUI8FromInt(INT intIn,ULONG64 *pi64Out);
334WINOLEAUTAPI VarDecFromUI1(BYTE bIn,DECIMAL *pdecOut);
335WINOLEAUTAPI VarDecFromI2(SHORT uiIn,DECIMAL *pdecOut);
336WINOLEAUTAPI VarDecFromI4(LONG lIn,DECIMAL *pdecOut);
337WINOLEAUTAPI VarDecFromI8(LONG64 i64In,DECIMAL *pdecOut);
338WINOLEAUTAPI VarDecFromR4(FLOAT fltIn,DECIMAL *pdecOut);
339WINOLEAUTAPI VarDecFromR8(DOUBLE dblIn,DECIMAL *pdecOut);
340WINOLEAUTAPI VarDecFromDate(DATE dateIn,DECIMAL *pdecOut);
341WINOLEAUTAPI VarDecFromCy(CY cyIn,DECIMAL *pdecOut);
342WINOLEAUTAPI VarDecFromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,DECIMAL *pdecOut);
343WINOLEAUTAPI VarDecFromDisp(IDispatch *pdispIn,LCID lcid,DECIMAL *pdecOut);
344WINOLEAUTAPI VarDecFromBool(VARIANT_BOOL boolIn,DECIMAL *pdecOut);
345WINOLEAUTAPI VarDecFromI1(CHAR cIn,DECIMAL *pdecOut);
346WINOLEAUTAPI VarDecFromUI2(USHORT uiIn,DECIMAL *pdecOut);
347WINOLEAUTAPI VarDecFromUI4(ULONG ulIn,DECIMAL *pdecOut);
348WINOLEAUTAPI VarDecFromUI8(ULONG64 ui64In,DECIMAL *pdecOut);
349
350#define VarUI4FromUI4(in,pOut) (*(pOut) = (in))
351#define VarI4FromI4(in,pOut) (*(pOut) = (in))
352
353WINOLEAUTAPI VarI4FromI8(LONG64 i64In,LONG *plOut);
354WINOLEAUTAPI VarI4FromUI8(ULONG64 ui64In,LONG *plOut);
355
356#define VarUI8FromUI8(in,pOut) (*(pOut) = (in))
357#define VarI8FromI8(in,pOut) (*(pOut) = (in))
358
359#define VarUI1FromInt VarUI1FromI4
360#define VarUI1FromUint VarUI1FromUI4
361#define VarI2FromInt VarI2FromI4
362#define VarI2FromUint VarI2FromUI4
363#define VarI4FromInt VarI4FromI4
364#define VarI4FromUint VarI4FromUI4
365#define VarI8FromInt VarI8FromI4
366#define VarI8FromUint VarI8FromUI4
367#define VarR4FromInt VarR4FromI4
368#define VarR4FromUint VarR4FromUI4
369#define VarR8FromInt VarR8FromI4
370#define VarR8FromUint VarR8FromUI4
371#define VarDateFromInt VarDateFromI4
372#define VarDateFromUint VarDateFromUI4
373#define VarCyFromInt VarCyFromI4
374#define VarCyFromUint VarCyFromUI4
375#define VarBstrFromInt VarBstrFromI4
376#define VarBstrFromUint VarBstrFromUI4
377#define VarBoolFromInt VarBoolFromI4
378#define VarBoolFromUint VarBoolFromUI4
379#define VarI1FromInt VarI1FromI4
380#define VarI1FromUint VarI1FromUI4
381#define VarUI2FromInt VarUI2FromI4
382#define VarUI2FromUint VarUI2FromUI4
383#define VarUI4FromInt VarUI4FromI4
384#define VarUI4FromUint VarUI4FromUI4
385#define VarDecFromInt VarDecFromI4
386#define VarDecFromUint VarDecFromUI4
387#define VarIntFromUI1 VarI4FromUI1
388#define VarIntFromI2 VarI4FromI2
389#define VarIntFromI4 VarI4FromI4
390#define VarIntFromI8 VarI4FromI8
391#define VarIntFromR4 VarI4FromR4
392#define VarIntFromR8 VarI4FromR8
393#define VarIntFromDate VarI4FromDate
394#define VarIntFromCy VarI4FromCy
395#define VarIntFromStr VarI4FromStr
396#define VarIntFromDisp VarI4FromDisp
397#define VarIntFromBool VarI4FromBool
398#define VarIntFromI1 VarI4FromI1
399#define VarIntFromUI2 VarI4FromUI2
400#define VarIntFromUI4 VarI4FromUI4
401#define VarIntFromUI8 VarI4FromUI8
402#define VarIntFromDec VarI4FromDec
403#define VarIntFromUint VarI4FromUI4
404#define VarUintFromUI1 VarUI4FromUI1
405#define VarUintFromI2 VarUI4FromI2
406#define VarUintFromI4 VarUI4FromI4
407#define VarUintFromI8 VarUI4FromI8
408#define VarUintFromR4 VarUI4FromR4
409#define VarUintFromR8 VarUI4FromR8
410#define VarUintFromDate VarUI4FromDate
411#define VarUintFromCy VarUI4FromCy
412#define VarUintFromStr VarUI4FromStr
413#define VarUintFromDisp VarUI4FromDisp
414#define VarUintFromBool VarUI4FromBool
415#define VarUintFromI1 VarUI4FromI1
416#define VarUintFromUI2 VarUI4FromUI2
417#define VarUintFromUI4 VarUI4FromUI4
418#define VarUintFromUI8 VarUI4FromUI8
419#define VarUintFromDec VarUI4FromDec
420#define VarUintFromInt VarUI4FromI4
421
422typedef struct {
423 INT cDig;
424 ULONG dwInFlags;
425 ULONG dwOutFlags;
426 INT cchUsed;
427 INT nBaseShift;
428 INT nPwr10;
429} NUMPARSE;
430
431#define NUMPRS_LEADING_WHITE 0x0001
432#define NUMPRS_TRAILING_WHITE 0x0002
433#define NUMPRS_LEADING_PLUS 0x0004
434#define NUMPRS_TRAILING_PLUS 0x0008
435#define NUMPRS_LEADING_MINUS 0x0010
436#define NUMPRS_TRAILING_MINUS 0x0020
437#define NUMPRS_HEX_OCT 0x0040
438#define NUMPRS_PARENS 0x0080
439#define NUMPRS_DECIMAL 0x0100
440#define NUMPRS_THOUSANDS 0x0200
441#define NUMPRS_CURRENCY 0x0400
442#define NUMPRS_EXPONENT 0x0800
443#define NUMPRS_USE_ALL 0x1000
444#define NUMPRS_STD 0x1FFF
445
446#define NUMPRS_NEG 0x10000
447#define NUMPRS_INEXACT 0x20000
448
449#define VTBIT_I1 (1 << VT_I1)
450#define VTBIT_UI1 (1 << VT_UI1)
451#define VTBIT_I2 (1 << VT_I2)
452#define VTBIT_UI2 (1 << VT_UI2)
453#define VTBIT_I4 (1 << VT_I4)
454#define VTBIT_UI4 (1 << VT_UI4)
455#define VTBIT_I8 (1 << VT_I8)
456#define VTBIT_UI8 (1 << VT_UI8)
457#define VTBIT_R4 (1 << VT_R4)
458#define VTBIT_R8 (1 << VT_R8)
459#define VTBIT_CY (1 << VT_CY)
460#define VTBIT_DECIMAL (1 << VT_DECIMAL)
461
462WINOLEAUTAPI VarParseNumFromStr(OLECHAR *strIn,LCID lcid,ULONG dwFlags,NUMPARSE *pnumprs,BYTE *rgbDig);
463WINOLEAUTAPI VarNumFromParseNum(NUMPARSE *pnumprs,BYTE *rgbDig,ULONG dwVtBits,VARIANT *pvar);
464STDAPI VarAdd(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
465STDAPI VarAnd(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
466STDAPI VarCat(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
467STDAPI VarDiv(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
468STDAPI VarEqv(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
469STDAPI VarIdiv(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
470STDAPI VarImp(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
471STDAPI VarMod(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
472STDAPI VarMul(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
473STDAPI VarOr(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
474STDAPI VarPow(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
475STDAPI VarSub(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
476STDAPI VarXor(LPVARIANT pvarLeft,LPVARIANT pvarRight,LPVARIANT pvarResult);
477STDAPI VarAbs(LPVARIANT pvarIn,LPVARIANT pvarResult);
478STDAPI VarFix(LPVARIANT pvarIn,LPVARIANT pvarResult);
479STDAPI VarInt(LPVARIANT pvarIn,LPVARIANT pvarResult);
480STDAPI VarNeg(LPVARIANT pvarIn,LPVARIANT pvarResult);
481STDAPI VarNot(LPVARIANT pvarIn,LPVARIANT pvarResult);
482STDAPI VarRound(LPVARIANT pvarIn,int cDecimals,LPVARIANT pvarResult);
483STDAPI VarCmp(LPVARIANT pvarLeft,LPVARIANT pvarRight,LCID lcid,ULONG dwFlags);
484
485#ifdef __cplusplus
486extern "C++" {
487 static __inline HRESULT WINAPI VarCmp(LPVARIANT pvarLeft,LPVARIANT pvarRight,LCID lcid) { return VarCmp(pvarLeft,pvarRight,lcid,0); }
488}
489#endif
490
491STDAPI VarDecAdd(LPDECIMAL pdecLeft,LPDECIMAL pdecRight,LPDECIMAL pdecResult);
492STDAPI VarDecDiv(LPDECIMAL pdecLeft,LPDECIMAL pdecRight,LPDECIMAL pdecResult);
493STDAPI VarDecMul(LPDECIMAL pdecLeft,LPDECIMAL pdecRight,LPDECIMAL pdecResult);
494STDAPI VarDecSub(LPDECIMAL pdecLeft,LPDECIMAL pdecRight,LPDECIMAL pdecResult);
495STDAPI VarDecAbs(LPDECIMAL pdecIn,LPDECIMAL pdecResult);
496STDAPI VarDecFix(LPDECIMAL pdecIn,LPDECIMAL pdecResult);
497STDAPI VarDecInt(LPDECIMAL pdecIn,LPDECIMAL pdecResult);
498STDAPI VarDecNeg(LPDECIMAL pdecIn,LPDECIMAL pdecResult);
499STDAPI VarDecRound(LPDECIMAL pdecIn,int cDecimals,LPDECIMAL pdecResult);
500STDAPI VarDecCmp(LPDECIMAL pdecLeft,LPDECIMAL pdecRight);
501STDAPI VarDecCmpR8(LPDECIMAL pdecLeft,double dblRight);
502STDAPI VarCyAdd(CY cyLeft,CY cyRight,LPCY pcyResult);
503STDAPI VarCyMul(CY cyLeft,CY cyRight,LPCY pcyResult);
504STDAPI VarCyMulI4(CY cyLeft,__LONG32 lRight,LPCY pcyResult);
505STDAPI VarCyMulI8(CY cyLeft,LONG64 lRight,LPCY pcyResult);
506STDAPI VarCySub(CY cyLeft,CY cyRight,LPCY pcyResult);
507STDAPI VarCyAbs(CY cyIn,LPCY pcyResult);
508STDAPI VarCyFix(CY cyIn,LPCY pcyResult);
509STDAPI VarCyInt(CY cyIn,LPCY pcyResult);
510STDAPI VarCyNeg(CY cyIn,LPCY pcyResult);
511STDAPI VarCyRound(CY cyIn,int cDecimals,LPCY pcyResult);
512STDAPI VarCyCmp(CY cyLeft,CY cyRight);
513STDAPI VarCyCmpR8(CY cyLeft,double dblRight);
514STDAPI VarBstrCat(BSTR bstrLeft,BSTR bstrRight,LPBSTR pbstrResult);
515STDAPI VarBstrCmp(BSTR bstrLeft,BSTR bstrRight,LCID lcid,ULONG dwFlags);
516STDAPI VarR8Pow(double dblLeft,double dblRight,double *pdblResult);
517STDAPI VarR4CmpR8(float fltLeft,double dblRight);
518STDAPI VarR8Round(double dblIn,int cDecimals,double *pdblResult);
519
520#define VARCMP_LT 0
521#define VARCMP_EQ 1
522#define VARCMP_GT 2
523#define VARCMP_NULL 3
524
525#define VT_HARDTYPE VT_RESERVED
526
527typedef struct {
528 SYSTEMTIME st;
529 USHORT wDayOfYear;
530} UDATE;
531
532WINOLEAUTAPI VarDateFromUdate(UDATE *pudateIn,ULONG dwFlags,DATE *pdateOut);
533WINOLEAUTAPI VarDateFromUdateEx(UDATE *pudateIn,LCID lcid,ULONG dwFlags,DATE *pdateOut);
534WINOLEAUTAPI VarUdateFromDate(DATE dateIn,ULONG dwFlags,UDATE *pudateOut);
535WINOLEAUTAPI GetAltMonthNames(LCID lcid,LPOLESTR **prgp);
536WINOLEAUTAPI VarFormat(LPVARIANT pvarIn,LPOLESTR pstrFormat,int iFirstDay,int iFirstWeek,ULONG dwFlags,BSTR *pbstrOut);
537WINOLEAUTAPI VarFormatDateTime(LPVARIANT pvarIn,int iNamedFormat,ULONG dwFlags,BSTR *pbstrOut);
538WINOLEAUTAPI VarFormatNumber(LPVARIANT pvarIn,int iNumDig,int iIncLead,int iUseParens,int iGroup,ULONG dwFlags,BSTR *pbstrOut);
539WINOLEAUTAPI VarFormatPercent(LPVARIANT pvarIn,int iNumDig,int iIncLead,int iUseParens,int iGroup,ULONG dwFlags,BSTR *pbstrOut);
540WINOLEAUTAPI VarFormatCurrency(LPVARIANT pvarIn,int iNumDig,int iIncLead,int iUseParens,int iGroup,ULONG dwFlags,BSTR *pbstrOut);
541WINOLEAUTAPI VarWeekdayName(int iWeekday,int fAbbrev,int iFirstDay,ULONG dwFlags,BSTR *pbstrOut);
542WINOLEAUTAPI VarMonthName(int iMonth,int fAbbrev,ULONG dwFlags,BSTR *pbstrOut);
543WINOLEAUTAPI VarFormatFromTokens(LPVARIANT pvarIn,LPOLESTR pstrFormat,LPBYTE pbTokCur,ULONG dwFlags,BSTR *pbstrOut,LCID lcid);
544WINOLEAUTAPI VarTokenizeFormatString(LPOLESTR pstrFormat,LPBYTE rgbTok,int cbTok,int iFirstDay,int iFirstWeek,LCID lcid,int *pcbActual);
545
546#ifndef DEFINED_LPTYPELIB
547#define DEFINED_LPTYPELIB
548typedef ITypeLib *LPTYPELIB;
549#endif
550#ifndef DEFINED_DISPID_MEMBERID
551#define DEFINED_DISPID_MEMBERID
552typedef LONG DISPID;
553typedef DISPID MEMBERID;
554#endif
555
556#define MEMBERID_NIL DISPID_UNKNOWN
557#define ID_DEFAULTINST -2
558
559#define DISPATCH_METHOD 0x1
560#define DISPATCH_PROPERTYGET 0x2
561#define DISPATCH_PROPERTYPUT 0x4
562#define DISPATCH_PROPERTYPUTREF 0x8
563
564#ifndef DEFINDE_LPTYPEINFO
565#define DEFINDE_LPTYPEINFO
566typedef ITypeInfo *LPTYPEINFO;
567#endif
568#ifndef DEFINED_LPTYPECOMP
569#define DEFINED_LPTYPECOMP
570typedef ITypeComp *LPTYPECOMP;
571#endif
572#ifndef DEFINED_LPCREATETYPELIB
573#define DEFINED_LPCREATETYPELIB
574typedef ICreateTypeLib *LPCREATETYPELIB;
575#endif
576#ifndef DEFINE_LPCREATETYPEINFO
577#define DEFINE_LPCREATETYPEINFO
578typedef ICreateTypeInfo *LPCREATETYPEINFO;
579#endif
580
581WINOLEAUTAPI_(ULONG) LHashValOfNameSysA(SYSKIND syskind,LCID lcid,LPCSTR szName);
582WINOLEAUTAPI_(ULONG) LHashValOfNameSys(SYSKIND syskind,LCID lcid,const OLECHAR *szName);
583
584#define LHashValOfName(lcid,szName) LHashValOfNameSys(SYS_WIN32,lcid,szName)
585#define WHashValOfLHashVal(lhashval) ((USHORT) (0x0000ffff & (lhashval)))
586#define IsHashValCompatible(lhashval1,lhashval2) ((WINBOOL) ((0x00ff0000 & (lhashval1))==(0x00ff0000 & (lhashval2))))
587
588WINOLEAUTAPI LoadTypeLib(const OLECHAR *szFile,ITypeLib **pptlib);
589
590typedef enum tagREGKIND {
591 REGKIND_DEFAULT,REGKIND_REGISTER,REGKIND_NONE
592} REGKIND;
593
594#define LOAD_TLB_AS_32BIT 0x20
595#define LOAD_TLB_AS_64BIT 0x40
596#define MASK_TO_RESET_TLB_BITS ~(LOAD_TLB_AS_32BIT | LOAD_TLB_AS_64BIT)
597
598WINOLEAUTAPI LoadTypeLibEx(LPCOLESTR szFile,REGKIND regkind,ITypeLib **pptlib);
599WINOLEAUTAPI LoadRegTypeLib(REFGUID rguid,WORD wVerMajor,WORD wVerMinor,LCID lcid,ITypeLib **pptlib);
600WINOLEAUTAPI QueryPathOfRegTypeLib(REFGUID guid,USHORT wMaj,USHORT wMin,LCID lcid,LPBSTR lpbstrPathName);
601WINOLEAUTAPI RegisterTypeLib(ITypeLib *ptlib,OLECHAR *szFullPath,OLECHAR *szHelpDir);
602WINOLEAUTAPI UnRegisterTypeLib(REFGUID libID,WORD wVerMajor,WORD wVerMinor,LCID lcid,SYSKIND syskind);
603WINOLEAUTAPI CreateTypeLib(SYSKIND syskind,const OLECHAR *szFile,ICreateTypeLib **ppctlib);
604WINOLEAUTAPI CreateTypeLib2(SYSKIND syskind,LPCOLESTR szFile,ICreateTypeLib2 **ppctlib);
605
606#ifndef DEFINED_LPDISPATCH
607#define DEFINED_LPDISPATCH
608typedef IDispatch *LPDISPATCH;
609#endif
610
611typedef struct tagPARAMDATA {
612 OLECHAR *szName;
613 VARTYPE vt;
614} PARAMDATA,*LPPARAMDATA;
615
616typedef struct tagMETHODDATA {
617 OLECHAR *szName;
618 PARAMDATA *ppdata;
619 DISPID dispid;
620 UINT iMeth;
621 CALLCONV cc;
622 UINT cArgs;
623 WORD wFlags;
624 VARTYPE vtReturn;
625} METHODDATA,*LPMETHODDATA;
626
627typedef struct tagINTERFACEDATA {
628 METHODDATA *pmethdata;
629 UINT cMembers;
630} INTERFACEDATA,*LPINTERFACEDATA;
631
632WINOLEAUTAPI DispGetParam(DISPPARAMS *pdispparams,UINT position,VARTYPE vtTarg,VARIANT *pvarResult,UINT *puArgErr);
633WINOLEAUTAPI DispGetIDsOfNames(ITypeInfo *ptinfo,OLECHAR **rgszNames,UINT cNames,DISPID *rgdispid);
634WINOLEAUTAPI DispInvoke(void *_this,ITypeInfo *ptinfo,DISPID dispidMember,WORD wFlags,DISPPARAMS *pparams,VARIANT *pvarResult,EXCEPINFO *pexcepinfo,UINT *puArgErr);
635WINOLEAUTAPI CreateDispTypeInfo(INTERFACEDATA *pidata,LCID lcid,ITypeInfo **pptinfo);
636WINOLEAUTAPI CreateStdDispatch(IUnknown *punkOuter,void *pvThis,ITypeInfo *ptinfo,IUnknown **ppunkStdDisp);
637WINOLEAUTAPI DispCallFunc(void *pvInstance,ULONG_PTR oVft,CALLCONV cc,VARTYPE vtReturn,UINT cActuals,VARTYPE *prgvt,VARIANTARG **prgpvarg,VARIANT *pvargResult);
638
639#define ACTIVEOBJECT_STRONG 0x0
640#define ACTIVEOBJECT_WEAK 0x1
641
642WINOLEAUTAPI RegisterActiveObject(IUnknown *punk,REFCLSID rclsid,DWORD dwFlags,DWORD *pdwRegister);
643WINOLEAUTAPI RevokeActiveObject(DWORD dwRegister,void *pvReserved);
644WINOLEAUTAPI GetActiveObject(REFCLSID rclsid,void *pvReserved,IUnknown **ppunk);
645WINOLEAUTAPI SetErrorInfo(ULONG dwReserved,IErrorInfo *perrinfo);
646WINOLEAUTAPI GetErrorInfo(ULONG dwReserved,IErrorInfo **pperrinfo);
647WINOLEAUTAPI CreateErrorInfo(ICreateErrorInfo **pperrinfo);
648WINOLEAUTAPI GetRecordInfoFromTypeInfo(ITypeInfo *pTypeInfo,IRecordInfo **ppRecInfo);
649WINOLEAUTAPI GetRecordInfoFromGuids(REFGUID rGuidTypeLib,ULONG uVerMajor,ULONG uVerMinor,LCID lcid,REFGUID rGuidTypeInfo,IRecordInfo **ppRecInfo);
650WINOLEAUTAPI_(ULONG) OaBuildVersion(void);
651WINOLEAUTAPI_(void) ClearCustData(LPCUSTDATA pCustData);
652
653#if defined(NONAMELESSUNION)
654#define V_UNION(X,Y) ((X)->n1.n2.n3.Y)
655#define V_VT(X) ((X)->n1.n2.vt)
656#define V_RECORDINFO(X) ((X)->n1.n2.n3.brecVal.pRecInfo)
657#define V_RECORD(X) ((X)->n1.n2.n3.brecVal.pvRecord)
658#else
659#define V_UNION(X,Y) ((X)->Y)
660#define V_VT(X) ((X)->vt)
661#define V_RECORDINFO(X) ((X)->pRecInfo)
662#define V_RECORD(X) ((X)->pvRecord)
663#endif
664
665#define V_ISBYREF(X) (V_VT(X)&VT_BYREF)
666#define V_ISARRAY(X) (V_VT(X)&VT_ARRAY)
667#define V_ISVECTOR(X) (V_VT(X)&VT_VECTOR)
668#define V_NONE(X) V_I2(X)
669
670#define V_UI1(X) V_UNION(X,bVal)
671#define V_UI1REF(X) V_UNION(X,pbVal)
672#define V_I2(X) V_UNION(X,iVal)
673#define V_I2REF(X) V_UNION(X,piVal)
674#define V_I4(X) V_UNION(X,lVal)
675#define V_I4REF(X) V_UNION(X,plVal)
676#define V_I8(X) V_UNION(X,llVal)
677#define V_I8REF(X) V_UNION(X,pllVal)
678#define V_R4(X) V_UNION(X,fltVal)
679#define V_R4REF(X) V_UNION(X,pfltVal)
680#define V_R8(X) V_UNION(X,dblVal)
681#define V_R8REF(X) V_UNION(X,pdblVal)
682#define V_I1(X) V_UNION(X,cVal)
683#define V_I1REF(X) V_UNION(X,pcVal)
684#define V_UI2(X) V_UNION(X,uiVal)
685#define V_UI2REF(X) V_UNION(X,puiVal)
686#define V_UI4(X) V_UNION(X,ulVal)
687#define V_UI4REF(X) V_UNION(X,pulVal)
688#define V_UI8(X) V_UNION(X,ullVal)
689#define V_UI8REF(X) V_UNION(X,pullVal)
690#define V_INT(X) V_UNION(X,intVal)
691#define V_INTREF(X) V_UNION(X,pintVal)
692#define V_UINT(X) V_UNION(X,uintVal)
693#define V_UINTREF(X) V_UNION(X,puintVal)
694
695#ifdef _WIN64
696#define V_INT_PTR(X) V_UNION(X,llVal)
697#define V_UINT_PTR(X) V_UNION(X,ullVal)
698#define V_INT_PTRREF(X) V_UNION(X,pllVal)
699#define V_UINT_PTRREF(X) V_UNION(X,pullVal)
700#else
701#define V_INT_PTR(X) V_UNION(X,lVal)
702#define V_UINT_PTR(X) V_UNION(X,ulVal)
703#define V_INT_PTRREF(X) V_UNION(X,plVal)
704#define V_UINT_PTRREF(X) V_UNION(X,pulVal)
705#endif
706
707#define V_CY(X) V_UNION(X,cyVal)
708#define V_CYREF(X) V_UNION(X,pcyVal)
709#define V_DATE(X) V_UNION(X,date)
710#define V_DATEREF(X) V_UNION(X,pdate)
711#define V_BSTR(X) V_UNION(X,bstrVal)
712#define V_BSTRREF(X) V_UNION(X,pbstrVal)
713#define V_DISPATCH(X) V_UNION(X,pdispVal)
714#define V_DISPATCHREF(X) V_UNION(X,ppdispVal)
715#define V_ERROR(X) V_UNION(X,scode)
716#define V_ERRORREF(X) V_UNION(X,pscode)
717#define V_BOOL(X) V_UNION(X,boolVal)
718#define V_BOOLREF(X) V_UNION(X,pboolVal)
719#define V_UNKNOWN(X) V_UNION(X,punkVal)
720#define V_UNKNOWNREF(X) V_UNION(X,ppunkVal)
721#define V_VARIANTREF(X) V_UNION(X,pvarVal)
722#define V_ARRAY(X) V_UNION(X,parray)
723#define V_ARRAYREF(X) V_UNION(X,pparray)
724#define V_BYREF(X) V_UNION(X,byref)
725
726#define V_DECIMAL(X) V_UNION(X,decVal)
727#define V_DECIMALREF(X) V_UNION(X,pdecVal)
728
729#ifndef RC_INVOKED
730#include <poppack.h>
731#endif
732#endif
Note: See TracBrowser for help on using the repository browser.