' ########################################################################################
' Microsoft Windows
' File: OAIdl.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_OAIdl_PBI)
#DEFINE PBX_OAIdl_PBI
%EQUATE `OAIDL_INC = 1
#INCLUDE ONCE "Legacy/System/WTypes.inc"
#IF NOT %DEF(%IOleAutomationTypes_INTERFACE_DEFINED)
 %IOleAutomationTypes_INTERFACE_DEFINED = 1
'typedef CY CURRENCY;
' // Size = 8 bytes
TYPE SAFEARRAYBOUND DWORD
 cElements AS DWORD ' ULONG cElements
 lLbound AS LONG ' LONG lLbound
END TYPE
' SF_TYPE enum
%EQUATE `SF_ERROR = %VT_ERROR
%EQUATE `SF_I1 = %VT_I1
%EQUATE `SF_I2 = %VT_I2
%EQUATE `SF_I4 = %VT_I4
%EQUATE `SF_I8 = %VT_I8
%EQUATE `SF_BSTR = %VT_BSTR
%EQUATE `SF_UNKNOWN = %VT_UNKNOWN
%EQUATE `SF_DISPATCH = %VT_DISPATCH
%EQUATE `SF_VARIANT = %VT_VARIANT
%EQUATE `SF_RECORD = %VT_RECORD
%EQUATE `SF_HAVEIID = %VT_UNKNOWN OR %VT_RESERVED
' // Size = 24 bytes
TYPE SAFEARRAY DWORD FILL
 cDims AS WORD ' USHORT
 fFeatures AS WORD ' USHORT
 cbElements AS DWORD ' ULONG
 cLocks AS DWORD ' ULONG
 pvData AS DWORD
 rgsabound(0) AS SAFEARRAYBOUND ' SAFEARRAYBOUND rgsabound[ 1 ]
END TYPE
%EQUATE `FADF_AUTO = &H1 ' An array that is allocated on the stack.
%EQUATE `FADF_STATIC = &H2 ' An array that is statically allocated.
%EQUATE `FADF_EMBEDDED = &H4 ' An array that is embedded in a structure.
%EQUATE `FADF_FIXEDSIZE = &H10 ' An array that may not be resized or reallocated.
%EQUATE `FADF_RECORD = &H20 ' An array containing records. When set there will be a pointer to the IRecordinfo interface at negative offset 4 in the array descriptor.
%EQUATE `FADF_HAVEIID = &H40 ' An array that has an IID identifying interface. When set there will be a guid at negative offset 16 in the safearray descriptor. Flag is set only when %FADF_DISPATCH or %FADF_UNKNOWN is also set.
%EQUATE `FADF_HAVEVARTYPE = &H80 ' An array that has a VT type. When set there will be a VT tag at negative offset 4 in the array descriptor that specifies the element type.
%EQUATE `FADF_BSTR = &H100 ' An array of BSTRs.
%EQUATE `FADF_UNKNOWN = &H200 ' An array of IUnknown*.
%EQUATE `FADF_DISPATCH = &H400 ' An array of IDispatch*.
%EQUATE `FADF_VARIANT = &H800 ' An array of VARIANTs.
%EQUATE `FADF_RESERVED = &HF008 ' Bits reserved for future use.
'/* VARIANT STRUCTURE
' *
' * VARTYPE vt;
' * WORD wReserved1;
' * WORD wReserved2;
' * WORD wReserved3;
' * union {
' * LONGLONG VT_I8
' * LONG VT_I4
' * BYTE VT_UI1
' * SHORT VT_I2
' * FLOAT VT_R4
' * DOUBLE VT_R8
' * VARIANT_BOOL VT_BOOL
' * SCODE VT_ERROR
' * CY VT_CY
' * DATE VT_DATE
' * BSTR VT_BSTR
' * IUnknown * VT_UNKNOWN
' * IDispatch * VT_DISPATCH
' * SAFEARRAY * VT_ARRAY
' * BYTE * VT_BYREF|VT_UI1
' * SHORT * VT_BYREF|VT_I2
' * LONG * VT_BYREF|VT_I4
' * LONGLONG * VT_BYREF|VT_I8
' * FLOAT * VT_BYREF|VT_R4
' * DOUBLE * VT_BYREF|VT_R8
' * VARIANT_BOOL * VT_BYREF|VT_BOOL
' * SCODE * VT_BYREF|VT_ERROR
' * CY * VT_BYREF|VT_CY
' * DATE * VT_BYREF|VT_DATE
' * BSTR * VT_BYREF|VT_BSTR
' * IUnknown ** VT_BYREF|VT_UNKNOWN
' * IDispatch ** VT_BYREF|VT_DISPATCH
' * SAFEARRAY ** VT_BYREF|VT_ARRAY
' * VARIANT * VT_BYREF|VT_VARIANT
' * PVOID VT_BYREF (Generic ByRef)
' * CHAR VT_I1
' * USHORT VT_UI2
' * ULONG VT_UI4
' * ULONGLONG VT_UI8
' * INT VT_INT
' * UINT VT_UINT
' * DECIMAL * VT_BYREF|VT_DECIMAL
' * CHAR * VT_BYREF|VT_I1
' * USHORT * VT_BYREF|VT_UI2
' * ULONG * VT_BYREF|VT_UI4
' * ULONGLONG * VT_BYREF|VT_UI8
' * INT * VT_BYREF|VT_INT
' * UINT * VT_BYREF|VT_UINT
' * }
' */
'struct tagVARIANT
' {
' union
' {
' struct __tagVARIANT
' {
' VARTYPE vt;
' WORD wReserved1;
' WORD wReserved2;
' WORD wReserved3;
' union
' {
' LONGLONG llVal;
' LONG lVal;
' BYTE bVal;
' SHORT iVal;
' FLOAT fltVal;
' DOUBLE dblVal;
' VARIANT_BOOL boolVal;
' _VARIANT_BOOL bool;
' SCODE scode;
' CY cyVal;
' DATE date;
' BSTR bstrVal;
' IUnknown *punkVal;
' IDispatch *pdispVal;
' SAFEARRAY *parray;
' BYTE *pbVal;
' SHORT *piVal;
' LONG *plVal;
' LONGLONG *pllVal;
' FLOAT *pfltVal;
' DOUBLE *pdblVal;
' VARIANT_BOOL *pboolVal;
' _VARIANT_BOOL *pbool;
' SCODE *pscode;
' CY *pcyVal;
' DATE *pdate;
' BSTR *pbstrVal;
' IUnknown **ppunkVal;
' IDispatch **ppdispVal;
' SAFEARRAY **pparray;
' VARIANT *pvarVal;
' PVOID byref;
' CHAR cVal;
' USHORT uiVal;
' ULONG ulVal;
' ULONGLONG ullVal;
' INT intVal;
' UINT uintVal;
' DECIMAL *pdecVal;
' CHAR *pcVal;
' USHORT *puiVal;
' ULONG *pulVal;
' ULONGLONG *pullVal;
' INT *pintVal;
' UINT *puintVal;
' struct __tagBRECORD
' {
' PVOID pvRecord;
' IRecordInfo *pRecInfo;
' } __VARIANT_NAME_4;
' } __VARIANT_NAME_3;
' } __VARIANT_NAME_2;
' DECIMAL decVal;
' } __VARIANT_NAME_1;
' } ;
' // Size = 8 bytes
TYPE BRECORD DWORD
 pvRecord AS DWORD
 pRecInfo AS DWORD ' IRecordInfo interface
END TYPE
' // Size = 8 bytes
UNION VARIANTDATA_UNION
 llVal AS QUAD ' LONGLONG // VT_I8
 lVal AS LONG ' LONG // VT_I4
 bVal AS BYTE ' BYTE // VT_UI1
 iVal AS INTEGER ' SHORT // VT_I2
 fltVal AS SINGLE ' FLOAT // VT_R4
 dblVal AS DOUBLE ' DOUBLE // VT_R8
 boolVal AS INTEGER ' VARIANT_BOOL // VT_BOOL
 bool AS INTEGER ' _VARIANT_BOOL
 scode AS LONG ' SCODE // VT_ERROR
 cyVal AS CUR ' CY // VT_CY
 date AS DOUBLE ' DATE // VT_DATE
 bstrVal AS WSTRING PTR ' BSTR // VT_BSTR
 punkVal AS DWORD PTR ' IUnknown* // VT_UNKNOWN
 pdispVal AS DWORD PTR ' IDispatch* // VT_DISPATCH
 parray AS SAFEARRAY PTR ' SAFEARRAY* // VT_ARRAY
 pbVal AS BYTE PTR ' BYTE* // VT_BYREF|VT_UI1
 piVal AS INTEGER PTR ' SHORT* // VT_BYREF|VT_I2
 plVal AS LONG PTR ' LONG* // VT_BYREF|VT_I4
 pllVal AS QUAD PTR ' LONGLONG* // VT_BYREF|VT_I8
 pfltVal AS SINGLE PTR ' FLOAT* // VT_BYREF|VT_R4
 pdblVal AS DOUBLE PTR ' DOUBLE* // VT_BYREF|VT_R8
 pboolVal AS INTEGER PTR ' VARIANT_BOOL* // VT_BYREF|VT_BOOL
 pbool AS INTEGER PTR ' _VARIANT_BOOL*
 pscode AS LONG PTR ' SCODE* // VT_BYREF|VT_ERROR
 pcyVal AS CUR PTR ' CY* // VT_BYREF|VT_CY
 pdate AS DOUBLE PTR ' DATE* // VT_BYREF|VT_DATE
 pbstrVal AS WSTRING PTR ' BSTR* // VT_BYREF|VT_BSTR
 ppunkVal AS DWORD PTR ' IUnknown** // VT_BYREF|VT_UNKNOWN
 ppdispVal AS DWORD PTR ' IDispatch** // VT_BYREF|VT_DISPATCH
 pparray AS SAFEARRAY PTR ' SAFEARRAY** // VT_BYREF|VT_ARRAY
 pvarVal AS VARIANT PTR ' VARIANT* // VT_BYREF|VT_VARIANT
 pByRef AS DWORD PTR ' PVOID // Generic BYREF (void*)
 cVal AS BYTE ' CHAR // VT_I1
 uiVal AS WORD ' USHORT // VT_UI2
 ulVal AS DWORD ' ULONG // VT_UI4
 intVal AS LONG ' INT // VT_INT
 uintVal AS DWORD ' UINT // VT_UINT
 pdecVal AS DECIMAL PTR ' DECIMAL* // VT_BYREF|VT_DECIMAL
 pcVal AS BYTE PTR ' CHAR* // VT_BYREF|VT_I1
 puiVal AS WORD PTR ' USHORT* // VT_BYREF|VT_UI2
 pulVal AS DWORD PTR ' ULONG* // VT_BYREF|VT_UI4
 pullVal AS QUAD PTR ' ULONGLONG* // VT_BYREF|VT_UI8
 pintVal AS LONG PTR ' INT* // VT_BYREF|VT_INT
 puintVal AS DWORD PTR ' UINT* // VT_BYREF|VT_UINT
 BRECORD ' VT_RECORD
END UNION
' // Size = 16 bytes
TYPE tagVARIANT DWORD FILL
 vt AS WORD 'VARTYPE
 wReserved1 AS WORD
 wReserved2 AS WORD
 wReserved3 AS WORD
 VARIANTDATA_UNION
END TYPE
' For backwards compatibility
' // Size = 16 bytes
TYPE VARIANTAPI DWORD FILL
 vt AS WORD 'VARTYPE
 wReserved1 AS WORD
 wReserved2 AS WORD
 wReserved3 AS WORD
 vd AS VARIANTDATA_UNION
END TYPE
'typedef LONG DISPID;
'typedef DISPID MEMBERID;
'typedef DWORD HREFTYPE;
' TYPEKIND enum
%EQUATE `TKIND_ENUM = 0
%EQUATE `TKIND_RECORD = %TKIND_ENUM + 1
%EQUATE `TKIND_MODULE = %TKIND_RECORD + 1
%EQUATE `TKIND_INTERFACE = %TKIND_MODULE + 1
%EQUATE `TKIND_DISPATCH = %TKIND_INTERFACE + 1
%EQUATE `TKIND_COCLASS = %TKIND_DISPATCH + 1
%EQUATE `TKIND_ALIAS = %TKIND_COCLASS + 1
%EQUATE `TKIND_UNION = %TKIND_ALIAS + 1
%EQUATE `TKIND_MAX = %TKIND_UNION + 1
'typedef struct tagTYPEDESC
' {
' union
' {
' struct tagTYPEDESC *lptdesc;
' struct tagARRAYDESC *lpadesc;
' HREFTYPE hreftype;
' /* Empty union arm */
' } DUMMYUNIONNAME;
' VARTYPE vt;
' } TYPEDESC;
' // Size = 4 bytes
UNION TYPEDESCDATA DWORD
 lptdesc AS DWORD ' VT_PTR - the pointed-at type
 lpadesc AS DWORD ' VT_CARRAY
 hreftype AS DWORD ' VT_USERDEFINED - this is used to get a TypeInfo for the UDT
END UNION
' // Size = 4 bytes
TYPE TYPEDESC DWORD ' // Must be DWORD aligned
 TYPEDESCDATA
 vt AS WORD ' VARTYPE
END TYPE
'typedef struct tagARRAYDESC
' {
' TYPEDESC tdescElem;
' USHORT cDims;
' /* [size_is] */ SAFEARRAYBOUND rgbounds[ 1 ];
' } ARRAYDESC;
' // Size = 20 bytes
TYPE ARRAYDESC DWORD ' // Must be DWORD aligned
 tdescElem AS TYPEDESC ' Element type
 cDims AS WORD ' Dimension count
 rgbounds(0) AS SAFEARRAYBOUND ' Variable length array containing one element for each dimension.
END TYPE
'typedef struct tagPARAMDESCEX
' {
' ULONG cBytes;
' VARIANTARG varDefaultValue;
' } PARAMDESCEX;
'typedef struct tagPARAMDESCEX *LPPARAMDESCEX;
' // Size = 24 bytes
TYPE PARAMDESCEX ' Must be 8 byte aligned
 cBytes AS DWORD ' size of this struct
 alignment__ AS DWORD ' // To keep 8 byte alignment
 varDefaultValue AS tagVARIANT ' default value of this parameter
END TYPE
'typedef struct tagPARAMDESC
' {
' LPPARAMDESCEX pparamdescex;
' USHORT wParamFlags;
' } PARAMDESC;
'typedef struct tagPARAMDESC *LPPARAMDESC;
' // Size = 8 bytes
TYPE PARAMDESC DWORD ' // Must be DWORD aligned
 pparamdescex AS PARAMDESCEX PTR ' valid if PARAMFLAG_FHASDEFAULT
 wParamFlags AS WORD ' IN, OUT, etc
END TYPE
%EQUATE `PARAMFLAG_NONE = &H0
%EQUATE `PARAMFLAG_FIN = &H1
%EQUATE `PARAMFLAG_FOUT = &H2
%EQUATE `PARAMFLAG_FLCID = &H4
%EQUATE `PARAMFLAG_FRETVAL = &H8
%EQUATE `PARAMFLAG_FOPT = &H10
%EQUATE `PARAMFLAG_FHASDEFAULT = &H20
%EQUATE `PARAMFLAG_FHASCUSTDATA = &H40
'typedef struct tagIDLDESC
' {
' ULONG_PTR dwReserved;
' USHORT wIDLFlags;
' } IDLDESC;
'typedef struct tagIDLDESC *LPIDLDESC;
' // Size = 8 bytes
TYPE IDLDESC DWORD ' // Must be DWORD aligned
 dwReserved AS DWORD ' Reserved; set to a null reference
 wIDLFlags AS WORD ' Indicates an IDLFLAG value describing the type
END TYPE
%EQUATE `IDLFLAG_NONE = 0 ' Whether the parameter passes or receives information is unspecified.
%EQUATE `IDLFLAG_FIN = 1 ' The parameter passes information from the caller to the callee.
%EQUATE `IDLFLAG_FOUT = 2 ' The parameter returns information from the callee to the caller.
%EQUATE `IDLFLAG_FLCID = 4 ' The parameter is the local identifier of a client application.
%EQUATE `IDLFLAG_FRETVAL = 8 ' The parameter is the return value of the member.
'typedef struct tagELEMDESC {
' TYPEDESC tdesc; /* the type of the element */
' union {
' IDLDESC idldesc; /* info for remoting the element */
' PARAMDESC paramdesc; /* info about the parameter */
' } DUMMYUNIONNAME;
'} ELEMDESC, * LPELEMDESC;
' // Size = 8 bytes
UNION ELEMDESCUNION
 idldesc AS IDLDESC ' Info for remoting the element (backward compatibility)
 paramdesc AS PARAMDESC ' info about the parameter
END UNION
' // Size = 16 bytes
TYPE ELEMDESC DWORD
 tdesc AS TYPEDESC ' Type of the element
 ELEMDESCUNION
END TYPE
' // Size = 76 bytes
TYPE TYPEATTR DWORD FILL
 guid AS GUID ' The GUID of the type information
 lcid AS DWORD ' Locale of member names and doc strings
 dwReserved AS DWORD
 memidConstructor AS LONG ' ID of constructor, or MEMBERID_NIL if none
 memidDestructor AS LONG ' ID of destructor, or MEMBERID_NIL if none
 lpstrSchema AS DWORD ' Reserved for future use
 cbSizeInstance AS DWORD ' The size of an instance of this type
 typekind AS DWORD ' The kind of type this information describes
 cFuncs AS WORD ' Number of functions
 cVars AS WORD ' Number of variables/data members
 cImplTypes AS WORD ' Number of implemented interfaces
 cbSizeVft AS WORD ' The size of this type's VTBL
 cbAlignment AS WORD ' Byte alignment for an instance of this type
 wTypeFlags AS WORD
 wMajorVerNum AS WORD ' Major version number
 wMinorVerNum AS WORD ' Minor version number
 tdescAlias AS TYPEDESC ' If TypeKind == TKIND_ALIAS, specifies the type for which this type is an alias.
 idldescType AS IDLDESC ' IDL attributes of the described type
END TYPE
'typedef struct tagDISPPARAMS
' {
' /* [size_is] */ VARIANTARG *rgvarg;
' /* [size_is] */ DISPID *rgdispidNamedArgs;
' UINT cArgs;
' UINT cNamedArgs;
' } DISPPARAMS;
' PB internal definition
'TYPE DispParams
' VariantArgs AS VARIANT PTR
' NamedDispId AS LONG PTR
' CountArgs AS DWORD
' CountNamed AS DWORD
'END TYPE
' // Size = 16 bytes
TYPE tagDISPPARAMS DWORD
 rgvarg AS tagVARIANT PTR ' VARIANTARG *
 rgdispidNamedArgs AS LONG PTR ' DISPID *
 cArgs AS DWORD ' UINT
 cNamedArgs AS DWORD ' UINT
END TYPE
'typedef struct tagEXCEPINFO
' {
' WORD wCode;
' WORD wReserved;
' BSTR bstrSource;
' BSTR bstrDescription;
' BSTR bstrHelpFile;
' DWORD dwHelpContext;
' ULONG_PTR pvReserved;
' ULONG_PTR pfnDeferredFillIn;
' SCODE scode;
' } EXCEPINFO;
' // Size = 32 bytes
TYPE EXCEPINFO DWORD FILL
 wCode AS WORD ' An error code describing the error.
 wReserved AS WORD ' Reserved
 bstrSource AS WSTRING PTR ' Source of the exception.
 bstrDescription AS WSTRING PTR ' Textual description of the error.
 bstrHelpFile AS WSTRING PTR ' Help file path.
 dwHelpContext AS DWORD ' Help context ID.
 pvReserved AS DWORD ' Reserved
 pfnDeferredFillIn AS DWORD ' Pointer to function that fills in Help and description info.
 scode AS LONG ' An SCODE describing the error
END TYPE
' CALLCONV enum
%EQUATE `CC_FASTCALL = 0
%EQUATE `CC_CDECL = 1
%EQUATE `CC_MSCPASCAL = %CC_CDECL + 1
%EQUATE `CC_PASCAL = %CC_MSCPASCAL
%EQUATE `CC_MACPASCAL = %CC_PASCAL + 1
%EQUATE `CC_STDCALL = %CC_MACPASCAL + 1
%EQUATE `CC_FPFASTCALL = %CC_STDCALL + 1
%EQUATE `CC_SYSCALL = %CC_FPFASTCALL + 1
%EQUATE `CC_MPWCDECL = %CC_SYSCALL + 1
%EQUATE `CC_MPWPASCAL = %CC_MPWCDECL + 1
%EQUATE `CC_MAX = %CC_MPWPASCAL + 1
' FUNCKIND enum
%EQUATE `FUNC_VIRTUAL = 0
%EQUATE `FUNC_PUREVIRTUAL = %FUNC_VIRTUAL + 1
%EQUATE `FUNC_NONVIRTUAL = %FUNC_PUREVIRTUAL + 1
%EQUATE `FUNC_STATIC = %FUNC_NONVIRTUAL + 1
%EQUATE `FUNC_DISPATCH = %FUNC_STATIC + 1
' INVOKEKIND enum
%EQUATE `INVOKE_FUNC = 1
%EQUATE `INVOKE_PROPERTYGET = 2
%EQUATE `INVOKE_PROPERTYPUT = 4
%EQUATE `INVOKE_PROPERTYPUTREF = 8
'typedef struct tagFUNCDESC
' {
' MEMBERID memid;
' /* [size_is] */ SCODE *lprgscode;
' /* [size_is] */ ELEMDESC *lprgelemdescParam;
' FUNCKIND funckind;
' INVOKEKIND invkind;
' CALLCONV callconv;
' SHORT cParams;
' SHORT cParamsOpt;
' SHORT oVft;
' SHORT cScodes;
' ELEMDESC elemdescFunc;
' WORD wFuncFlags;
' } FUNCDESC;
' // Size = 52 bytes
TYPE FUNCDESC DWORD FILL
 memid AS LONG ' Function memberID
 lprgscode AS LONG PTR ' SCODE
 lprgelemdescParam AS ELEMDESC PTR ' Pointer to an ELEMDESC structure
 funckind AS DWORD ' Specifies whether the function is virtual, static, or dispatch-only.
 invkind AS DWORD ' Invocation kind. Indicates if this is a property function, and if so, what kind.
 callconv AS DWORD ' Specifies the function's calling convention
 cParams AS INTEGER ' Count of total number of parameters
 cParamsOpt AS INTEGER ' Count of optional parameters
 oVft AS INTEGER ' For FUNC_VIRTUAL, specifies the offset in the VTBL
 cScodes AS INTEGER ' Count of permitted return values
 elemdescFunc AS ELEMDESC ' Contains the return type of the function
 wFuncFlags AS WORD ' Flags
 alignment__ AS WORD ' // To keep DWORD alignment
END TYPE
' VARKIND enum
%EQUATE `VAR_PERINSTANCE = 0
%EQUATE `VAR_STATIC = %VAR_PERINSTANCE + 1
%EQUATE `VAR_CONST = %VAR_STATIC + 1
%EQUATE `VAR_DISPATCH = %VAR_CONST + 1
%EQUATE `IMPLTYPEFLAG_FDEFAULT = &H1
%EQUATE `IMPLTYPEFLAG_FSOURCE = &H2
%EQUATE `IMPLTYPEFLAG_FRESTRICTED = &H4
%EQUATE `IMPLTYPEFLAG_FDEFAULTVTABLE = &H8
'typedef struct tagVARDESC
' {
' MEMBERID memid;
' LPOLESTR lpstrSchema;
' union
' {
' ULONG oInst;
' VARIANT *lpvarValue;
' } DUMMYUNIONNAME;
' ELEMDESC elemdescVar;
' WORD wVarFlags;
' VARKIND varkind;
' } VARDESC;
' // Size = 4 bytes
UNION VARDESCDATA
 oInst AS DWORD ' VAR_PERINSTANCE, the offset of this variable within the instance.
 lpvarValue AS tagVARIANT PTR ' VAR_CONST, the value of the constant.
END UNION
' // Size = 36 bytes
TYPE VARDESC DWORD ' // Must be DWORD aligned
 memid AS LONG ' Variable memberID
 lpstrSchema AS WSTRINGZ PTR ' Reserved for future use
 VARDESCDATA
 elemdescVar AS ELEMDESC ' Contains the variable type
 wVarFlags AS WORD ' Flags
 varkind AS DWORD ' Kind of variable
END TYPE
' TYPEFLAGS enum
%EQUATE `TYPEFLAG_FAPPOBJECT = &H1
%EQUATE `TYPEFLAG_FCANCREATE = &H2
%EQUATE `TYPEFLAG_FLICENSED = &H4
%EQUATE `TYPEFLAG_FPREDECLID = &H8
%EQUATE `TYPEFLAG_FHIDDEN = &H10
%EQUATE `TYPEFLAG_FCONTROL = &H20
%EQUATE `TYPEFLAG_FDUAL = &H40
%EQUATE `TYPEFLAG_FNONEXTENSIBLE = &H80
%EQUATE `TYPEFLAG_FOLEAUTOMATION = &H100
%EQUATE `TYPEFLAG_FRESTRICTED = &H200
%EQUATE `TYPEFLAG_FAGGREGATABLE = &H400
%EQUATE `TYPEFLAG_FREPLACEABLE = &H800
%EQUATE `TYPEFLAG_FDISPATCHABLE = &H1000
%EQUATE `TYPEFLAG_FREVERSEBIND = &H2000
%EQUATE `TYPEFLAG_FPROXY = &H4000
' FUNCFLAGS enum
%EQUATE `FUNCFLAG_FRESTRICTED = &H1
%EQUATE `FUNCFLAG_FSOURCE = &H2
%EQUATE `FUNCFLAG_FBINDABLE = &H4
%EQUATE `FUNCFLAG_FREQUESTEDIT = &H8
%EQUATE `FUNCFLAG_FDISPLAYBIND = &H10
%EQUATE `FUNCFLAG_FDEFAULTBIND = &H20
%EQUATE `FUNCFLAG_FHIDDEN = &H40
%EQUATE `FUNCFLAG_FUSESGETLASTERROR = &H80
%EQUATE `FUNCFLAG_FDEFAULTCOLLELEM = &H100
%EQUATE `FUNCFLAG_FUIDEFAULT = &H200
%EQUATE `FUNCFLAG_FNONBROWSABLE = &H400
%EQUATE `FUNCFLAG_FREPLACEABLE = &H800
%EQUATE `FUNCFLAG_FIMMEDIATEBIND = &H1000
' VARFLAGS enum
%EQUATE `VARFLAG_FREADONLY = &H1
%EQUATE `VARFLAG_FSOURCE = &H2
%EQUATE `VARFLAG_FBINDABLE = &H4
%EQUATE `VARFLAG_FREQUESTEDIT = &H8
%EQUATE `VARFLAG_FDISPLAYBIND = &H10
%EQUATE `VARFLAG_FDEFAULTBIND = &H20
%EQUATE `VARFLAG_FHIDDEN = &H40
%EQUATE `VARFLAG_FRESTRICTED = &H80
%EQUATE `VARFLAG_FDEFAULTCOLLELEM = &H100
%EQUATE `VARFLAG_FUIDEFAULT = &H200
%EQUATE `VARFLAG_FNONBROWSABLE = &H400
%EQUATE `VARFLAG_FREPLACEABLE = &H800
%EQUATE `VARFLAG_FIMMEDIATEBIND = &H1000
'typedef struct tagCUSTDATAITEM
' {
' GUID guid;
' VARIANTARG varValue;
' } CUSTDATAITEM;
' // Size = 32 bytes
TYPE CUSTDATAITEM DWORD
 guid AS GUID ' Unique identifier for this data item.
 varValue AS tagVARIANT ' Value of this data item.
END TYPE
'typedef struct tagCUSTDATA
' {
' DWORD cCustData;
' /* [size_is] */ LPCUSTDATAITEM prgCustData;
' } CUSTDATA;
' // Size = 8 bytes
TYPE CUSTDATA DWORD
 cCustData AS DWORD ' Number of custom data items in prgCustData.
 prgCustData AS CUSTDATAITEM PTR ' Array of custom data items.
END TYPE
#ENDIF ' /* __IOleAutomationTypes_INTERFACE_DEFINED__ */
' ########################################################################################
' ICreateTypeInfo interface
' IID = 00020405-0000-0000-C000-000000000046
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ICreateTypeInfo_INTERFACE_DEFINED)
 %ICreateTypeInfo_INTERFACE_DEFINED = 1
$IID_ICreateTypeInfo = GUID$("{00020405-0000-0000-C000-000000000046}")
INTERFACE ICreateTypeInfo $IID_ICreateTypeInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetGuid ( ' VTable offset = 12
 BYREF guid AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetTypeFlags ( ' VTable offset = 16
 BYVAL uTypeFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDocString ( ' VTable offset = 20
 BYREF pStrDoc AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetHelpContext ( ' VTable offset = 24
 BYVAL dwHelpContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetVersion ( ' VTable offset = 28
 BYVAL wMajorVerNum AS WORD
 , BYVAL wMinorVerNum AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD AddRefTypeInfo ( ' VTable offset = 32
 BYVAL pTInfo AS ITypeInfo
 , BYREF phRefType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AddFuncDesc ( ' VTable offset = 36
 BYVAL index AS DWORD
 , BYREF pFuncDesc AS FUNCDESC
 ) AS LONG
 ' =====================================================================================
 METHOD AddImplType ( ' VTable offset = 40
 BYVAL index AS DWORD
 , BYVAL hRefType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetImplTypeFlags ( ' VTable offset = 44
 BYVAL index AS DWORD
 , BYVAL implTypeFlags AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetAlignMent ( ' VTable offset = 48
 BYVAL cbAlignment AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSchema ( ' VTable offset = 52
 BYREF pStrSchema AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD AddVarDesc ( ' VTable offset = 56
 BYVAL index AS DWORD
 , BYREF pVarDesc AS VARDESC
 ) AS LONG
 ' =====================================================================================
 METHOD SetFuncAndParamNames ( ' VTable offset = 60
 BYVAL index AS DWORD
 , BYREF rgszNames AS WSTRING
 , BYVAL cNames AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetVarName ( ' VTable offset = 64
 BYVAL index AS DWORD
 , BYREF szName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetTypeDescAlias ( ' VTable offset = 68
 BYREF pTDescAlias AS TYPEDESC
 ) AS LONG
 ' =====================================================================================
 METHOD DefineFuncAsDLLEntry ( ' VTable offset = 72
 BYVAL index AS DWORD
 , BYREF szDllName AS WSTRINGZ
 , BYREF szProcName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetFuncDocString ( ' VTable offset = 76
 BYVAL index AS DWORD
 , BYREF szDocString AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetVarDocString ( ' VTable offset = 80
 BYVAL index AS DWORD
 , BYREF szDocString AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetFuncHelpContext ( ' VTable offset = 84
 BYVAL index AS DWORD
 , BYVAL dwHelpContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetVarHelpContext ( ' VTable offset = 88
 BYVAL index AS DWORD
 , BYVAL dwHelpContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetMops ( ' VTable offset = 92
 BYVAL index AS DWORD
 , BYVAL bstrMops AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetTypeIdldesc ( ' VTable offset = 96
 BYREF pIdlDesc AS IDLDESC
 ) AS LONG
 ' =====================================================================================
 METHOD LayOut ( ' VTable offset = 100
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ICreateTypeInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' ICreateTypeInfo2 interface
' IID = 0002040E-0000-0000-C000-000000000046
' Inherited interface = ICreateTypeInfo
' ########################################################################################
#IF NOT %DEF(%ICreateTypeInfo2_INTERFACE_DEFINED)
 %ICreateTypeInfo2_INTERFACE_DEFINED = 1
$IID_ICreateTypeInfo2 = GUID$("{0002040E-0000-0000-C000-000000000046}")
INTERFACE ICreateTypeInfo2 $IID_ICreateTypeInfo2
 INHERIT IUnknown
 ' =====================================================================================
 ' ICreateTypeInfo Methods
 ' =====================================================================================
 METHOD SetGuid ( ' VTable offset = 12
 BYREF guid AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetTypeFlags ( ' VTable offset = 16
 BYVAL uTypeFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDocString ( ' VTable offset = 20
 BYREF pStrDoc AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetHelpContext ( ' VTable offset = 24
 BYVAL dwHelpContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetVersion ( ' VTable offset = 28
 BYVAL wMajorVerNum AS WORD
 , BYVAL wMinorVerNum AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD AddRefTypeInfo ( ' VTable offset = 32
 BYVAL pTInfo AS ITypeInfo
 , BYREF phRefType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AddFuncDesc ( ' VTable offset = 36
 BYVAL index AS DWORD
 , BYREF pFuncDesc AS FUNCDESC
 ) AS LONG
 ' =====================================================================================
 METHOD AddImplType ( ' VTable offset = 40
 BYVAL index AS DWORD
 , BYVAL hRefType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetImplTypeFlags ( ' VTable offset = 44
 BYVAL index AS DWORD
 , BYVAL implTypeFlags AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetAlignMent ( ' VTable offset = 48
 BYVAL cbAlignment AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSchema ( ' VTable offset = 52
 BYREF pStrSchema AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD AddVarDesc ( ' VTable offset = 56
 BYVAL index AS DWORD
 , BYREF pVarDesc AS VARDESC
 ) AS LONG
 ' =====================================================================================
 METHOD SetFuncAndParamNames ( ' VTable offset = 60
 BYVAL index AS DWORD
 , BYREF rgszNames AS WSTRING
 , BYVAL cNames AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetVarName ( ' VTable offset = 64
 BYVAL index AS DWORD
 , BYREF szName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetTypeDescAlias ( ' VTable offset = 68
 BYREF pTDescAlias AS TYPEDESC
 ) AS LONG
 ' =====================================================================================
 METHOD DefineFuncAsDLLEntry ( ' VTable offset = 72
 BYVAL index AS DWORD
 , BYREF szDllName AS WSTRINGZ
 , BYREF szProcName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetFuncDocString ( ' VTable offset = 76
 BYVAL index AS DWORD
 , BYREF szDocString AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetVarDocString ( ' VTable offset = 80
 BYVAL index AS DWORD
 , BYREF szDocString AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetFuncHelpContext ( ' VTable offset = 84
 BYVAL index AS DWORD
 , BYVAL dwHelpContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetVarHelpContext ( ' VTable offset = 88
 BYVAL index AS DWORD
 , BYVAL dwHelpContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetMops ( ' VTable offset = 92
 BYVAL index AS DWORD
 , BYVAL bstrMops AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetTypeIdldesc ( ' VTable offset = 96
 BYREF pIdlDesc AS IDLDESC
 ) AS LONG
 ' =====================================================================================
 METHOD LayOut ( ' VTable offset = 100
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ICreateTypeInfo2 Methods
 ' =====================================================================================
 METHOD DeleteFuncDesc ( ' VTable offset = 104
 BYVAL index AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteFuncDescByMemId ( ' VTable offset = 108
 BYVAL memid AS LONG
 , BYVAL invKind AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteVarDesc ( ' VTable offset = 112
 BYVAL index AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteVarDescByMemId ( ' VTable offset = 116
 BYVAL memid AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteImplType ( ' VTable offset = 120
 BYVAL index AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetCustData ( ' VTable offset = 124
 BYREF guid AS GUID
 , BYVAL pVarVal AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetFuncCustData ( ' VTable offset = 128
 BYVAL index AS DWORD
 , BYREF guid AS GUID
 , BYVAL pVarVal AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetParamCustData ( ' VTable offset = 132
 BYVAL indexFunc AS DWORD
 , BYVAL indexParam AS DWORD
 , BYREF guid AS GUID
 , BYVAL pVarVal AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetVarCustData ( ' VTable offset = 136
 BYVAL index AS DWORD
 , BYREF guid AS GUID
 , BYVAL pVarVal AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetImplTypeCustData ( ' VTable offset = 140
 BYVAL index AS DWORD
 , BYREF guid AS GUID
 , BYVAL pVarVal AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetHelpStringContext ( ' VTable offset = 144
 BYVAL dwHelpStringContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetFuncHelpStringContext ( ' VTable offset = 148
 BYVAL index AS DWORD
 , BYVAL dwHelpStringContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetVarHelpStringContext ( ' VTable offset = 152
 BYVAL index AS DWORD
 , BYVAL dwHelpStringContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Invalidate ( ' VTable offset = 156
 ) AS LONG
 ' =====================================================================================
 METHOD SetName ( ' VTable offset = 160
 BYREF szName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ICreateTypeInfo2_INTERFACE_DEFINED__ */
' ########################################################################################
' ICreateTypeLib interface
' IID = 00020406-0000-0000-C000-000000000046
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ICreateTypeLib_INTERFACE_DEFINED)
 %ICreateTypeLib_INTERFACE_DEFINED = 1
$IID_ICreateTypeLib = GUID$("{00020406-0000-0000-C000-000000000046}")
INTERFACE ICreateTypeLib $IID_ICreateTypeLib
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreateTypeInfo ( ' VTable offset = 12
 BYREF szName AS WSTRINGZ
 , BYVAL tkind AS DWORD
 , BYREF ppCTInfo AS ICreateTypeInfo
 ) AS LONG
 ' =====================================================================================
 METHOD SetName ( ' VTable offset = 16
 BYREF szName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetVersion ( ' VTable offset = 20
 BYVAL wMajorVerNum AS WORD
 , BYVAL wMinorVerNum AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetGuid ( ' VTable offset = 24
 BYREF guid AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetDocString ( ' VTable offset = 28
 BYREF szDoc AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetHelpFileName ( ' VTable offset = 32
 BYREF szHelpFileName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetHelpContext ( ' VTable offset = 36
 BYVAL dwHelpContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetLCID ( ' VTable offset = 40
 BYVAL lcid AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetLibFlags ( ' VTable offset = 44
 BYVAL uLibFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SaveAllChanges ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ICreateTypeLib_INTERFACE_DEFINED__ */
' ########################################################################################
' ICreateTypeLib2 interface
' IID = 0002040F-0000-0000-C000-000000000046
' Inherited interface = ICreateTypeLib
' ########################################################################################
#IF NOT %DEF(%ICreateTypeLib2_INTERFACE_DEFINED)
 %ICreateTypeLib2_INTERFACE_DEFINED = 1
$IID_ICreateTypeLib2 = GUID$("{0002040F-0000-0000-C000-000000000046}")
INTERFACE ICreateTypeLib2 $IID_ICreateTypeLib2
 INHERIT IUnknown
 ' =====================================================================================
 ' ICreateTypeLib Methods
 ' =====================================================================================
 METHOD CreateTypeInfo ( ' VTable offset = 12
 BYREF szName AS WSTRINGZ
 , BYVAL tkind AS DWORD
 , BYREF ppCTInfo AS ICreateTypeInfo
 ) AS LONG
 ' =====================================================================================
 METHOD SetName ( ' VTable offset = 16
 BYREF szName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetVersion ( ' VTable offset = 20
 BYVAL wMajorVerNum AS WORD
 , BYVAL wMinorVerNum AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetGuid ( ' VTable offset = 24
 BYREF guid AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetDocString ( ' VTable offset = 28
 BYREF szDoc AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetHelpFileName ( ' VTable offset = 32
 BYREF szHelpFileName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetHelpContext ( ' VTable offset = 36
 BYVAL dwHelpContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetLCID ( ' VTable offset = 40
 BYVAL lcid AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetLibFlags ( ' VTable offset = 44
 BYVAL uLibFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SaveAllChanges ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ICreateTypeLib Methods
 ' =====================================================================================
 METHOD DeleteTypeInfo ( ' VTable offset = 52
 BYREF szName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetCustData ( ' VTable offset = 56
 BYREF guid AS GUID
 , BYVAL pVarVal AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetHelpStringContext ( ' VTable offset = 60
 BYVAL dwHelpStringContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetHelpStringDll ( ' VTable offset = 64
 BYREF szFileName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ICreateTypeLib2_INTERFACE_DEFINED__ */
' ########################################################################################
' IDispatch interface
' IID = 00020400-0000-0000-C000-000000000046
' Inherited interface = IUnknown
' NOTE: Renamed because of conflicts with the built-in PB definition.
' ########################################################################################
#IF NOT %DEF(%IDispatch_INTERFACE_DEFINED)
 %IDispatch_INTERFACE_DEFINED = 1
$IID_IDispatch = GUID$("{00020400-0000-0000-C000-000000000046}")
'/* DISPID reserved to indicate an "unknown" name */
'/* only reserved for data members (properties); reused as a method dispid below */
%EQUATE `DISPID_UNKNOWN = -1
'/* DISPID reserved for the "value" property */
%EQUATE `DISPID_VALUE = 0
'/* The following DISPID is reserved to indicate the param
' * that is the right-hand-side (or "put" value) of a PropertyPut
' */
%EQUATE `DISPID_PROPERTYPUT = -3
'/* DISPID reserved for the standard "NewEnum" method */
%EQUATE `DISPID_NEWENUM = -4
'/* DISPID reserved for the standard "Evaluate" method */
%EQUATE `DISPID_EVALUATE = -5
%EQUATE `DISPID_CONSTRUCTOR = -6
%EQUATE `DISPID_DESTRUCTOR = -7
%EQUATE `DISPID_COLLECT = -8
'/* The range -500 through -999 is reserved for Controls */
'/* The range 0x80010000 through 0x8001FFFF is reserved for Controls */
'/* The range -5000 through -5499 is reserved for ActiveX Accessability */
'/* The range -2000 through -2499 is reserved for VB5 */
'/* The range -3900 through -3999 is reserved for Forms */
'/* The range -5500 through -5550 is reserved for Forms */
'/* The remainder of the negative DISPIDs are reserved for future use */
INTERFACE COM_IDispatch $IID_IDispatch
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetTypeInfoCount ( ' VTable offset = 12
 BYREF pctinfo AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypeInfo ( ' VTable offset = 16
 BYVAL iTInfo AS DWORD
 , BYVAL lcid AS DWORD
 , BYREF ppTInfo AS ITypeInfo
 ) AS LONG
 ' =====================================================================================
 METHOD GetIDsOfNames ( ' VTable offset = 20
 BYREF riid AS GUID
 , BYREF rgszNames AS WSTRING
 , BYVAL cNames AS DWORD
 , BYVAL lcid AS DWORD
 , BYREF rgDispId AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Invoke ( ' VTable offset = 24
 BYVAL dispIdMember AS LONG
 , BYREF riid AS GUID
 , BYVAL lcid AS DWORD
 , BYVAL wFlags AS WORD
 , BYREF pDispParams AS DISPPARAMS
 , BYREF pVarResult AS VARIANT
 , BYREF pExcepInfo AS EXCEPINFO
 , BYREF puArgErr AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IDispatch_INTERFACE_DEFINED__ */
' *** As built into the PowerBASIC compiler ***
' Note: GetIDsOfNames still uses AS STRING, instead of AS WSTRING, for the rgszNames parameter.
' Therefore, you must use a variable declared AS STRING and convert it to unicode with UCODE$.
'INTERFACE IDispatch $IID_IDispatch
' INHERIT IUnknown
' ' =====================================================================================
' METHOD GetTypeInfoCount ( ' VTable offset = 12
' BYREF pctinfo AS DWORD
' ) AS LONG
' ' =====================================================================================
' METHOD GetTypeInfo ( ' VTable offset = 16
' BYVAL iTInfo AS DWORD
' , BYVAL lcid AS DWORD
' , BYREF ppTInfo AS DWORD
' ) AS LONG
' ' =====================================================================================
' METHOD GetIDsOfNames ( ' VTable offset = 20
' BYREF riid AS GUID
' , BYREF rgszNames AS STRING
' , BYVAL cNames AS DWORD
' , BYVAL lcid AS DWORD
' , BYREF rgDispId AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD Invoke ( ' VTable offset = 24
' BYVAL dispIdMember AS LONG
' , BYREF riid AS GUID
' , BYVAL lcid AS DWORD
' , BYVAL wFlags AS DWORD
' , BYREF pDispParams AS DISPPARAMS
' , BYREF pVarResult AS VARIANT
' , BYVAL pExcepInfo AS DWORD
' , BYREF puArgErr AS DWORD
' ) AS LONG
' ' =====================================================================================
'END INTERFACE
' ########################################################################################
' IEnumVARIANT interface
' IID = 00000002-0000-0000-C000-000000000046
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IEnumVARIANT_INTERFACE_DEFINED)
 %IEnumVARIANT_INTERFACE_DEFINED = 1
$IID_IEnumVARIANT = GUID$("{00020404-0000-0000-C000-000000000046}")
INTERFACE IEnumVARIANT $IID_IEnumVARIANT
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 12
 BYVAL celt AS DWORD
 , BYREF rgVar AS VARIANT
 , BYREF pCeltFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 16
 BYVAL celt AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 24
 BYREF ppenum AS IEnumVARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IEnumVARIANT_INTERFACE_DEFINED__ */
' ########################################################################################
' ITypeComp interface
' IID = 00020403-0000-0000-C000-000000000046
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITypeComp_INTERFACE_DEFINED)
 %ITypeComp_INTERFACE_DEFINED = 1
' DESCKIND enum
%EQUATE `DESCKIND_NONE = 0
%EQUATE `DESCKIND_FUNCDESC = %DESCKIND_NONE + 1
%EQUATE `DESCKIND_VARDESC = %DESCKIND_FUNCDESC + 1
%EQUATE `DESCKIND_TYPECOMP = %DESCKIND_VARDESC + 1
%EQUATE `DESCKIND_IMPLICITAPPOBJ = %DESCKIND_TYPECOMP + 1
%EQUATE `DESCKIND_MAX = %DESCKIND_IMPLICITAPPOBJ + 1
UNION BINDPTR
 lpfuncdesc AS FUNCDESC PTR ' FUNCDESC FAR*
 lpvardesc AS VARDESC PTR ' VARDESC FAR*
 lptcomp AS DWORD PTR ' ITypeComp FAR*
END UNION
$IID_ITypeComp = GUID$("{00020403-0000-0000-C000-000000000046}")
INTERFACE ITypeComp $IID_ITypeComp
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Bind ( ' VTable offset = 12
 BYREF szName AS WSTRINGZ
 , BYVAL lHashVal AS DWORD
 , BYVAL wFlags AS WORD
 , BYREF ppTInfo AS ITypeInfo
 , BYREF pDescKindgs AS DWORD
 , BYVAL pBindPtr AS BINDPTR PTR
 ) AS LONG
 ' =====================================================================================
 METHOD BindType ( ' VTable offset = 16
 BYREF szName AS WSTRINGZ
 , BYVAL lHashVal AS DWORD
 , BYREF ppTInfo AS ITypeInfo
 , BYREF ppTComp AS ITypeComp
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITypeComp_INTERFACE_DEFINED__ */
' ########################################################################################
' ITypeInfo interface
' IID = 00020401-0000-0000-C000-000000000046
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITypeInfo_INTERFACE_DEFINED)
 %ITypeInfo_INTERFACE_DEFINED = 1
$IID_ITypeInfo = GUID$("{00020401-0000-0000-C000-000000000046}")
INTERFACE ITypeInfo $IID_ITypeInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetTypeAttr ( ' VTable offset = 12
 BYREF ppTypeAttr AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypeComp ( ' VTable offset = 16
 BYREF ppTComp AS ITypeComp
 ) AS LONG
 ' =====================================================================================
 METHOD GetFuncDesc ( ' VTable offset = 20
 BYVAL index AS DWORD
 , BYREF ppFuncDesc AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetVarDesc ( ' VTable offset = 24
 BYVAL index AS DWORD
 , BYREF ppVarDesc AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetNames ( ' VTable offset = 28
 BYVAL memid AS LONG
 , BYREF rgBstrNames AS WSTRING
 , BYVAL cMaxNames AS DWORD
 , BYREF pcNames AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRefTypeOfImplType ( ' VTable offset = 32
 BYVAL index AS DWORD
 , BYREF pRefType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetImplTypeFlags ( ' VTable offset = 36
 BYVAL index AS DWORD
 , BYREF pImplTypeFlags AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetIDsOfNames ( ' VTable offset = 40
 BYREF rgszNames AS WSTRING
 , BYVAL cNames AS DWORD
 , BYREF pMemId AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Invoke ( ' VTable offset = 44
 BYVAL pvInstance AS DWORD
 , BYVAL memid AS LONG
 , BYVAL wFlags AS WORD
 , BYREF pDispParams AS DISPPARAMS
 , BYREF pVarResult AS VARIANT
 , BYREF pExcepInfo AS EXCEPINFO
 , BYREF puArgErr AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDocumentation ( ' VTable offset = 48
 BYVAL memid AS LONG
 , BYREF pBstrName AS WSTRING
 , BYREF pBstrDocString AS WSTRING
 , BYREF pdwHelpContext AS DWORD
 , BYREF pBstrHelpFile AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetDllEntry ( ' VTable offset = 52
 BYVAL memid AS LONG
 , BYVAL invKind AS LONG
 , BYREF pBstrDllName AS WSTRING
 , BYREF pBstrName AS WSTRING
 , BYREF pwOrdinal AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRefTypeInfo ( ' VTable offset = 56
 BYVAL hRefType AS DWORD
 , BYREF ppTInfo AS ITypeInfo
 ) AS LONG
 ' =====================================================================================
 METHOD AddressOfMember ( ' VTable offset = 60
 BYVAL memid AS LONG
 , BYVAL invKind AS LONG
 , BYREF ppv AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CreateInstance( ' VTable offset = 64
 BYVAL pUnkOuter AS IUnknown
 , BYREF riid AS GUID
 , BYREF ppvObj AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD GetMops ( ' VTable offset = 68
 BYVAL memid AS LONG
 , BYREF pBstrMops AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetContainingTypeLib ( ' VTable offset = 72
 BYREF ppTLib AS ITypeLib
 , BYREF pIndex AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ReleaseTypeAttr ( ' VTable offset = 76
 BYVAL pTypeAttr AS TYPEATTR PTR
 ) ' void
 ' =====================================================================================
 METHOD ReleaseFuncDesc ( ' VTable offset = 80
 BYVAL pFuncDesc AS FUNCDESC PTR
 ) ' void
 ' =====================================================================================
 METHOD ReleaseVarDesc ( ' VTable offset = 84
 BYVAL pVarDesc AS VARDESC PTR
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITypeInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' ITypeInfo2 interface
' IID = 00020412-0000-0000-C000-000000000046
' Inherited interface = ITypeInfo
' ########################################################################################
#IF NOT %DEF(%ITypeInfo2_INTERFACE_DEFINED)
 %ITypeInfo2_INTERFACE_DEFINED = 1
$IID_ITypeInfo2 = GUID$("{00020412-0000-0000-C000-000000000046}")
INTERFACE ITypeInfo2 $IID_ITypeInfo2
 INHERIT IUnknown
 ' =====================================================================================
 ' ITypeInfo Methods
 ' =====================================================================================
 METHOD GetTypeAttr ( ' VTable offset = 12
 BYREF ppTypeAttr AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypeComp ( ' VTable offset = 16
 BYREF ppTComp AS ITypeComp
 ) AS LONG
 ' =====================================================================================
 METHOD GetFuncDesc ( ' VTable offset = 20
 BYVAL index AS DWORD
 , BYREF ppFuncDesc AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetVarDesc ( ' VTable offset = 24
 BYVAL index AS DWORD
 , BYREF ppVarDesc AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetNames ( ' VTable offset = 28
 BYVAL memid AS LONG
 , BYREF rgBstrNames AS WSTRING
 , BYVAL cMaxNames AS DWORD
 , BYREF pcNames AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRefTypeOfImplType ( ' VTable offset = 32
 BYVAL index AS DWORD
 , BYREF pRefType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetImplTypeFlags ( ' VTable offset = 36
 BYVAL index AS DWORD
 , BYREF pImplTypeFlags AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetIDsOfNames ( ' VTable offset = 40
 BYREF rgszNames AS WSTRING
 , BYVAL cNames AS DWORD
 , BYREF pMemId AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Invoke ( ' VTable offset = 44
 BYVAL pvInstance AS DWORD
 , BYVAL memid AS LONG
 , BYVAL wFlags AS WORD
 , BYREF pDispParams AS DISPPARAMS
 , BYREF pVarResult AS VARIANT
 , BYREF pExcepInfo AS EXCEPINFO
 , BYREF puArgErr AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDocumentation ( ' VTable offset = 48
 BYVAL memid AS LONG
 , BYREF pBstrName AS WSTRING
 , BYREF pBstrDocString AS WSTRING
 , BYREF pdwHelpContext AS DWORD
 , BYREF pBstrHelpFile AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetDllEntry ( ' VTable offset = 52
 BYVAL memid AS LONG
 , BYVAL invKind AS LONG
 , BYREF pBstrDllName AS WSTRING
 , BYREF pBstrName AS WSTRING
 , BYREF pwOrdinal AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRefTypeInfo ( ' VTable offset = 56
 BYVAL hRefType AS DWORD
 , BYREF ppTInfo AS ITypeInfo
 ) AS LONG
 ' =====================================================================================
 METHOD AddressOfMember ( ' VTable offset = 60
 BYVAL memid AS LONG
 , BYVAL invKind AS LONG
 , BYREF ppv AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CreateInstance( ' VTable offset = 64
 BYVAL pUnkOuter AS IUnknown
 , BYREF riid AS GUID
 , BYREF ppvObj AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD GetMops ( ' VTable offset = 68
 BYVAL memid AS LONG
 , BYREF pBstrMops AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetContainingTypeLib ( ' VTable offset = 72
 BYREF ppTLib AS ITypeLib
 , BYREF pIndex AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ReleaseTypeAttr ( ' VTable offset = 76
 BYVAL pTypeAttr AS TYPEATTR PTR
 ) ' void
 ' =====================================================================================
 METHOD ReleaseFuncDesc ( ' VTable offset = 80
 BYVAL pFuncDesc AS FUNCDESC PTR
 ) ' void
 ' =====================================================================================
 METHOD ReleaseVarDesc ( ' VTable offset = 84
 BYVAL pVarDesc AS VARDESC PTR
 ) ' void
 ' =====================================================================================
 ' =====================================================================================
 ' ITypeInfo2 Methods
 ' =====================================================================================
 METHOD GetTypeKind ( ' VTable offset = 88
 BYREF pTypeKind AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypeFlags ( ' VTable offset = 92
 BYREF pTypeFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFuncIndexOfMemId ( ' VTable offset = 96
 BYVAL memid AS LONG
 , BYVAL invKind AS DWORD
 , BYVAL pFuncIndex AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetVarIndexOfMemId ( ' VTable offset = 100
 BYVAL memid AS LONG
 , BYVAL pVarIndex AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCustData ( ' VTable offset = 104
 BYREF guid AS GUID
 , BYREF pVarVal AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetFuncCustData ( ' VTable offset = 108
 BYVAL index AS DWORD
 , BYREF guid AS GUID
 , BYREF pVarVal AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetParamCustData ( ' VTable offset = 112
 BYVAL indexFunc AS DWORD
 , BYVAL indexParam AS DWORD
 , BYREF guid AS GUID
 , BYREF pVarVal AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetVarCustData ( ' VTable offset = 116
 BYVAL index AS DWORD
 , BYREF guid AS GUID
 , BYREF pVarVal AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetImplTypeCustData ( ' VTable offset = 120
 BYVAL index AS DWORD
 , BYREF guid AS GUID
 , BYREF pVarVal AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetDocumentation2 ( ' VTable offset = 124
 BYVAL memid AS LONG
 , BYVAL lcid AS DWORD
 , BYREF pbstrHelpString AS WSTRING
 , BYREF pdwHelpStringContext AS DWORD
 , BYREF pBstrHelpFile AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllCustData ( ' VTable offset = 128
 BYREF pCustData AS CUSTDATA
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllFuncCustData ( ' VTable offset = 132
 BYVAL index AS DWORD
 , BYREF pCustData AS CUSTDATA
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllParamCustData ( ' VTable offset = 136
 BYVAL indexFunc AS DWORD
 , BYVAL indexParam AS DWORD
 , BYREF pCustData AS CUSTDATA
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllVarCustData ( ' VTable offset = 140
 BYVAL index AS DWORD
 , BYREF pCustData AS CUSTDATA
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllImplTypeCustData ( ' VTable offset = 144
 BYVAL index AS DWORD
 , BYREF pCustData AS CUSTDATA
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITypeInfo2_INTERFACE_DEFINED__ */
' ########################################################################################
' ITypeLib interface
' IID = 00020402-0000-0000-C000-000000000046
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITypeLib_INTERFACE_DEFINED)
 %ITypeLib_INTERFACE_DEFINED = 1
' SYSKIND enum
%EQUATE `SYS_WIN16 = 0
%EQUATE `SYS_WIN32 = 1
%EQUATE `SYS_MAC = 2
%EQUATE `SYS_WIN64 = 3
' LIBFLAGS enum
%EQUATE `LIBFLAG_FRESTRICTED = &H01
%EQUATE `LIBFLAG_FCONTROL = &H02
%EQUATE `LIBFLAG_FHIDDEN = &H04
%EQUATE `LIBFLAG_FHASDISKIMAGE = &H08
' // Size = 32 bytes
TYPE TLIBATTR
 guid AS GUID ' GUID
 lcid AS DWORD ' LCID
 syskind AS LONG ' SYSKIND
 wMajorVerNum AS WORD ' WORD
 wMinorVerNum AS WORD ' WORD
 wLibFlags AS WORD ' WORD
 alignment__ AS WORD ' // To keep DWORD alignment
END TYPE
$IID_ITypeLib = GUID$("{00020402-0000-0000-C000-000000000046}")
INTERFACE ITypeLib $IID_ITypeLib
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetTypeInfoCount ( ' VTable offset = 12
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetTypeInfo ( ' VTable offset = 16
 BYVAL index AS DWORD
 , BYREF ppTInfo AS ITypeInfo
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypeInfoType ( ' VTable offset = 20
 BYVAL index AS DWORD
 , BYREF pTKind AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypeInfoOfGuid ( ' VTable offset = 24
 BYREF guid AS GUID
 , BYREF ppTinfo AS ITypeInfo
 ) AS LONG
 ' =====================================================================================
 METHOD GetLibAttr ( ' VTable offset = 28
 BYREF ppTLibAttr AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypeComp ( ' VTable offset = 32
 BYREF ppTComp AS ITypeComp
 ) AS LONG
 ' =====================================================================================
 METHOD GetDocumentation ( ' VTable offset = 36
 BYVAL index AS LONG
 , BYREF pBstrName AS WSTRING
 , BYREF pBstrDocString AS WSTRING
 , BYREF pdwHelpContext AS DWORD
 , BYREF pBstrHelpFile AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD IsName ( ' VTable offset = 40
 BYREF szNameBuf AS WSTRINGZ
 , BYVAL lHashVal AS DWORD
 , BYREF pfName AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD FindName ( ' VTable offset = 44
 BYREF szNameBuf AS WSTRINGZ
 , BYVAL lHashVal AS DWORD
 , BYREF ppTInfo AS ITypeInfo
 , BYREF rgMemId AS LONG
 , BYREF pcFound AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ReleaseTLibAttr ( ' VTable offset = 48
 BYVAL pTLibAttr AS DWORD
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITypeLib_INTERFACE_DEFINED__ */
' ########################################################################################
' ITypeLib2 interface
' IID = 00020411-0000-0000-C000-000000000046
' Inherited interface = ITypeLib
' ########################################################################################
#IF NOT %DEF(%ITypeLib2_INTERFACE_DEFINED)
 %ITypeLib2_INTERFACE_DEFINED = 1
$IID_ITypeLib2 = GUID$("{00020411-0000-0000-C000-000000000046}")
INTERFACE ITypeLib2 $IID_ITypeLib2
 INHERIT IUnknown
 ' =====================================================================================
 ' ITypeLib Methods
 ' =====================================================================================
 METHOD GetTypeInfoCount ( ' VTable offset = 12
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetTypeInfo ( ' VTable offset = 16
 BYVAL index AS DWORD
 , BYREF ppTInfo AS ITypeInfo
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypeInfoType ( ' VTable offset = 20
 BYVAL index AS DWORD
 , BYREF pTKind AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypeInfoOfGuid ( ' VTable offset = 24
 BYREF guid AS GUID
 , BYREF ppTinfo AS ITypeInfo
 ) AS LONG
 ' =====================================================================================
 METHOD GetLibAttr ( ' VTable offset = 28
 BYREF ppTLibAttr AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypeComp ( ' VTable offset = 32
 BYREF ppTComp AS ITypeComp
 ) AS LONG
 ' =====================================================================================
 METHOD GetDocumentation ( ' VTable offset = 36
 BYVAL index AS LONG
 , BYREF pBstrName AS WSTRING
 , BYREF pBstrDocString AS WSTRING
 , BYREF pdwHelpContext AS DWORD
 , BYREF pBstrHelpFile AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD IsName ( ' VTable offset = 40
 BYREF szNameBuf AS WSTRINGZ
 , BYVAL lHashVal AS DWORD
 , BYREF pfName AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD FindName ( ' VTable offset = 44
 BYREF szNameBuf AS WSTRINGZ
 , BYVAL lHashVal AS DWORD
 , BYREF ppTInfo AS ITypeInfo
 , BYREF rgMemId AS LONG
 , BYREF pcFound AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ReleaseTLibAttr ( ' VTable offset = 48
 BYVAL pTLibAttr AS DWORD
 ) ' void
 ' =====================================================================================
 ' =====================================================================================
 ' ITypeLib2 Methods
 ' =====================================================================================
 METHOD GetCustData ( ' VTable offset = 52
 BYREF guid AS GUID
 , BYREF pVarVal AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetLibStatistics ( ' VTable offset = 56
 BYREF pcUniqueNames AS DWORD
 , BYREF pcchUniqueNames AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDocumentation2 ( ' VTable offset = 60
 BYVAL index AS LONG
 , BYVAL lcid AS DWORD
 , BYREF pbstrHelpString AS WSTRING
 , BYREF pdwHelpStringContext AS DWORD
 , BYREF pbstrHelpStringDll AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetAllCustData ( ' VTable offset = 64
 BYREF pCustData AS CUSTDATA
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITypeLib2_INTERFACE_DEFINED__ */
' ########################################################################################
' ITypeChangeEvents interface
' IID = 00020411-0000-0000-C000-000000000046
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITypeChangeEvents_INTERFACE_DEFINED)
 %ITypeChangeEvents_INTERFACE_DEFINED = 1
$IID_ITypeChangeEvents = GUID$("{00020411-0000-0000-C000-000000000046}")
' enum CHANGEKIND
%EQUATE `CHANGEKIND_ADDMEMBER = 0
%EQUATE `CHANGEKIND_DELETEMEMBER = %CHANGEKIND_ADDMEMBER + 1
%EQUATE `CHANGEKIND_SETNAMES = %CHANGEKIND_DELETEMEMBER + 1
%EQUATE `CHANGEKIND_SETDOCUMENTATION = %CHANGEKIND_SETNAMES + 1
%EQUATE `CHANGEKIND_GENERAL = %CHANGEKIND_SETDOCUMENTATION + 1
%EQUATE `CHANGEKIND_INVALIDATE = %CHANGEKIND_GENERAL + 1
%EQUATE `CHANGEKIND_CHANGEFAILED = %CHANGEKIND_INVALIDATE + 1
%EQUATE `CHANGEKIND_MAX = %CHANGEKIND_CHANGEFAILED + 1
' MIDL_INTERFACE("00020410-0000-0000-C000-000000000046")
' ITypeChangeEvents : public IUnknown
' {
' public:
' virtual HRESULT STDMETHODCALLTYPE RequestTypeChange(
' virtual HRESULT STDMETHODCALLTYPE AfterTypeChange(
' };
#ENDIF ' /* __ITypeChangeEvents_INTERFACE_DEFINED__ */
' ########################################################################################
' IErrorInfo interface
' IID = 1CF2B120-547D-101B-8E65-08002B2BD119
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IErrorInfo_INTERFACE_DEFINED)
 %IErrorInfo_INTERFACE_DEFINED = 1
$IID_IErrorInfo = GUID$("{1CF2B120-547D-101B-8E65-08002B2BD119}")
INTERFACE IErrorInfo $IID_IErrorInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetGUID ( ' VTable offset = 12
 BYREF pGUID AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetSource ( ' VTable offset = 16
 BYREF pBstrSource AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetDescription ( ' VTable offset = 20
 BYREF pBstrDescription AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetHelpFile ( ' VTable offset = 24
 BYREF pBstrHelpFile AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetHelpContext ( ' VTable offset = 28
 BYREF pdwHelpContext AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IErrorInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' ICreateErrorInfo interface
' IID = 22F03340-547D-101B-8E65-08002B2BD119
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ICreateErrorInfo_INTERFACE_DEFINED)
 %ICreateErrorInfo_INTERFACE_DEFINED = 1
$IID_ICreateErrorInfo = GUID$("{22F03340-547D-101B-8E65-08002B2BD119}")
INTERFACE ICreateErrorInfo $IID_ICreateErrorInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetGUID ( ' VTable offset = 12
 BYREF rguid AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD SetSource ( ' VTable offset = 16
 BYREF szSource AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetDescription ( ' VTable offset = 20
 BYREF szDescription AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetHelpFile ( ' VTable offset = 24
 BYREF szHelpFile AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetHelpContext ( ' VTable offset = 28
 BYVAL dwHelpContext AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ICreateErrorInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' ISupportErrorInfo interface
' IID = DF0B3D60-548F-101B-8E65-08002B2BD119
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ISupportErrorInfo_INTERFACE_DEFINED)
 %ISupportErrorInfo_INTERFACE_DEFINED = 1
$IID_ISupportErrorInfo = GUID$("{DF0B3D60-548F-101B-8E65-08002B2BD119}")
INTERFACE ISupportErrorInfo $IID_ISupportErrorInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD InterfaceSupportsErrorInfo ( ' VTable offset = 12
 BYREF riid AS GUID
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISupportErrorInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' ITypeFactory interface
' IID = 0000002E-0000-0000-C000-000000000046
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITypeFactory_INTERFACE_DEFINED)
 %ITypeFactory_INTERFACE_DEFINED = 1
$IID_ITypeFactory = GUID$("{0000002E-0000-0000-C000-000000000046}")
INTERFACE ITypeFactory $IID_ITypeFactory
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreateFromTypeInfo ( ' VTable offset = 12
 BYREF pTypeInfo AS ITypeInfo
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITypeFactory_INTERFACE_DEFINED__ */
' ########################################################################################
' ITypeMarshal interface
' IID = 0000002D-0000-0000-C000-000000000046
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITypeMarshal_INTERFACE_DEFINED)
 %ITypeMarshal_INTERFACE_DEFINED = 1
$IID_ITypeMarshal = GUID$("{0000002D-0000-0000-C000-000000000046}")
INTERFACE ITypeMarshal $IID_ITypeMarshal
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Size ( ' VTable offset = 12
 BYVAL pvType AS DWORD
 , BYVAL dwDestContext AS DWORD
 , BYVAL pvDestContext AS DWORD
 , BYREF pSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Marshal ( ' VTable offset = 16
 BYVAL pvType AS DWORD
 , BYVAL dwDestContext AS DWORD
 , BYVAL pvDestContext AS DWORD
 , BYVAL cbBufferLength AS DWORD
 , BYVAL pBuffer AS BYTE PTR
 , BYREF pcbWritten AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Unmarshal ( ' VTable offset = 20
 BYREF pvType AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL cbBufferLength AS DWORD
 , BYVAL pBuffer AS BYTE PTR
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Free ( ' VTable offset = 24
 BYVAL pvType AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITypeMarshal_INTERFACE_DEFINED__ */
' ########################################################################################
' IRecordInfo interface
' IID = 0000002F-0000-0000-C000-000000000046
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IRecordInfo_INTERFACE_DEFINED)
 %IRecordInfo_INTERFACE_DEFINED = 1
$IID_IRecordInfo = GUID$("{0000002F-0000-0000-C000-000000000046}")
INTERFACE IRecordInfo $IID_IRecordInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD RecordInit ( ' VTable offset = 12
 BYVAL pvNew AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD RecordClear ( ' VTable offset = 16
 BYVAL pvExisting AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD RecordCopy ( ' VTable offset = 20
 BYVAL pvExisting AS DWORD
 , BYVAL pvNew AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetGuid ( ' VTable offset = 24
 BYREF pguid AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD GetName ( ' VTable offset = 28
 BYREF pbstrName AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetSize ( ' VTable offset = 32
 BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypeInfo ( ' VTable offset = 36
 BYREF ppTypeInfo AS ITypeInfo
 ) AS LONG
 ' =====================================================================================
 METHOD GetField ( ' VTable offset = 40
 BYVAL pvData AS DWORD
 , BYREF szFieldName AS WSTRINGZ
 , BYREF pvarField AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetFieldNoCopy ( ' VTable offset = 44
 BYVAL pvData AS DWORD
 , BYREF szFieldName AS WSTRINGZ
 , BYREF pvarField AS VARIANT
 , BYREF ppvDataCArray AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD PutField ( ' VTable offset = 48
 BYVAL wFlags AS DWORD
 , BYVAL pvData AS DWORD
 , BYREF szFieldName AS WSTRINGZ
 , BYVAL pvarField AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD PutFieldNoCopy ( ' VTable offset = 52
 BYVAL wFlags AS DWORD
 , BYVAL pvData AS DWORD
 , BYREF szFieldName AS WSTRINGZ
 , BYVAL pvarField AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetFieldNames ( ' VTable offset = 56
 BYREF pcNames AS DWORD
 , BYREF rgBstrNames AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD IsMatchingType ( ' VTable offset = 60
 BYVAL pRecordInfo AS IRecordInfo
 ) AS LONG
 ' =====================================================================================
 METHOD RecordCreate ( ' VTable offset = 64
 ) AS LONG
 ' =====================================================================================
 METHOD RecordCreateCopy ( ' VTable offset = 68
 BYVAL pvSource AS DWORD
 , BYREF ppvDest AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD RecordDestroy ( ' VTable offset = 72
 BYVAL pvRecord AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IRecordInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' IErrorLog interface
' IID = 3127CA40-446E-11CE-8135-00AA004BB851
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IErrorLog_INTERFACE_DEFINED)
 %IErrorLog_INTERFACE_DEFINED = 1
$IID_IErrorLog = GUID$("{3127CA40-446E-11CE-8135-00AA004BB851}")
INTERFACE IErrorLog $IID_IErrorLog
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AddError ( ' VTable offset = 12
 BYREF pszPropName AS WSTRINGZ
 , BYREF pExcepInfo AS EXCEPINFO
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IErrorLog_INTERFACE_DEFINED__ */
' ########################################################################################
' IPropertyBag interface
' IID = 22F55882-280B-11d0-A8A9-00A0C90C2004
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPropertyBag_INTERFACE_DEFINED)
 %IPropertyBag_INTERFACE_DEFINED = 1
$IID_IPropertyBag = GUID$("{55272A00-42CB-11CE-8135-00AA004BB851}")
INTERFACE IPropertyBag $IID_IPropertyBag
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Read ( ' VTable offset = 12
 BYREF pszPropName AS WSTRINGZ
 , BYREF pVar AS VARIANT
 , BYVAL pErrorLog AS IErrorLog
 ) AS LONG
 ' =====================================================================================
 METHOD Write ( ' VTable offset = 16
 BYREF pszPropName AS WSTRINGZ
 , BYREF pVar AS VARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPropertyBag_INTERFACE_DEFINED__ */
#INCLUDE ONCE "Legacy/COM/Ole2.inc"
'/* header files for imported files */
#include ONCE "Legacy/COM/ObjIdl.inc"
#ENDIF
