Index: Include/OAIdl.ab
===================================================================
--- Include/OAIdl.ab	(revision 35)
+++ Include/OAIdl.ab	(revision 42)
@@ -6,25 +6,10 @@
 #define _INC_OAIDL_AB
 
-' verify that the <rpcndr.h> version is high enough to compile this file*/
-'/*
-'#ifndef __REQUIRED_RPCNDR_H_VERSION__
-'#define __REQUIRED_RPCNDR_H_VERSION__ 475
-'#endif
-'
-'#include "rpc.h"
-'#include "rpcndr.h"
-'
-'#ifndef __RPCNDR_H_VERSION__
-'#error this stub requires an updated version of <rpcndr.h>
-'#endif // __RPCNDR_H_VERSION__
-'
 '#ifndef COM_NO_WINDOWS_H
-'#include "windows.h"
-'#include "ole2.h"
+#include <windows.sbp>
+#include <ole2.ab>
 '#endif /*COM_NO_WINDOWS_H*/
 
-#include <ole2.ab>
-'/* header files for imported files */
-'#include "objidl.h"
+#include <objidl.sbp>
 
 #ifndef __IOleAutomationTypes_INTERFACE_DEFINED__
@@ -174,4 +159,59 @@
 Const FADF_RESERVED = &hf008
 
+Const Enum VARENUM 'WTypes.idl
+	VT_EMPTY	= 0
+	VT_NULL	= 1
+	VT_I2	= 2
+	VT_I4	= 3
+	VT_R4	= 4
+	VT_R8	= 5
+	VT_CY	= 6
+	VT_DATE	= 7
+	VT_BSTR	= 8
+	VT_DISPATCH	= 9
+	VT_ERROR	= 10
+	VT_BOOL	= 11
+	VT_VARIANT	= 12
+	VT_UNKNOWN	= 13
+	VT_DECIMAL	= 14
+	VT_I1	= 16
+	VT_UI1	= 17
+	VT_UI2	= 18
+	VT_UI4	= 19
+	VT_I8	= 20
+	VT_UI8	= 21
+	VT_INT	= 22
+	VT_UINT	= 23
+	VT_VOID	= 24
+	VT_HRESULT	= 25
+	VT_PTR	= 26
+	VT_SAFEARRAY	= 27
+	VT_CARRAY	= 28
+	VT_USERDEFINED	= 29
+	VT_LPSTR	= 30
+	VT_LPWSTR	= 31
+	VT_RECORD	= 36
+	VT_INT_PTR	= 37
+	VT_UINT_PTR	= 38
+	VT_FILETIME	= 64
+	VT_BLOB	= 65
+	VT_STREAM	= 66
+	VT_STORAGE	= 67
+	VT_STREAMED_OBJECT	= 68
+	VT_STORED_OBJECT	= 69
+	VT_BLOB_OBJECT	= 70
+	VT_CF	= 71
+	VT_CLSID	= 72
+	VT_VERSIONED_STREAM	= 73
+	VT_BSTR_BLOB	= &hfff
+	VT_VECTOR	= &h1000
+	VT_ARRAY	= &h2000
+	VT_BYREF	= &h4000
+	VT_RESERVED	= &h8000
+	VT_ILLEGAL	= &hffff
+	VT_ILLEGALMASKED	= &hfff
+	VT_TYPEMASK	= &hfff
+End Enum
+
 Class VARIANT
 Public
@@ -588,10 +628,10 @@
 Private
 	p As VoidPtr
-'    /* [switch_is][switch_type] */ Union
-'        /* [case()] */ lptdesc As *TYPEDESC
-'        /* [case()] */ lpadesc As *ARRAYDESC
-'        /* [case()] */ hreftype As HREFTYPE
-'        /* [default] */  /* Empty union arm */
-'    End Union
+'	/* [switch_is][switch_type] */ Union
+'		/* [case()] */ lptdesc As *TYPEDESC
+'		/* [case()] */ lpadesc As *ARRAYDESC
+'		/* [case()] */ hreftype As HREFTYPE
+'		/* [default] */  /* Empty union arm */
+'	End Union
 Public
 	vt As VARTYPE
@@ -752,8 +792,8 @@
 /* [v1_enum] */
 Const Enum INVOKEKIND
-	INVOKE_FUNC	= 1
-	INVOKE_PROPERTYGET	= 2
-	INVOKE_PROPERTYPUT	= 4
-	INVOKE_PROPERTYPUTREF	= 8
+	INVOKE_FUNC = 1
+	INVOKE_PROPERTYGET = 2
+	INVOKE_PROPERTYPUT = 4
+	INVOKE_PROPERTYPUTREF = 8
 End Enum
 
@@ -868,6 +908,6 @@
 
 Type CUSTDATAITEM
-    guid As GUID
-    varValue As VARIANTARG
+	guid As GUID
+	varValue As VARIANTARG
 End Type
 
@@ -883,6 +923,4 @@
 #endif /* __IOleAutomationTypes_INTERFACE_DEFINED__ */
 
-#ifdef __UNDEFINED__
-
 #ifndef __ICreateTypeInfo_INTERFACE_DEFINED__
 #define __ICreateTypeInfo_INTERFACE_DEFINED__
@@ -891,101 +929,97 @@
 /* [local][unique][uuid][object] */
 
-'typedef /* [unique] */ ICreateTypeInfo *LPCREATETYPEINFO;
-
-
-EXTERN_C const IID IID_ICreateTypeInfo;
-
-    MIDL_INTERFACE("00020405-0000-0000-C000-000000000046")
-    ICreateTypeInfo : public IUnknown
-    {
-    public:
-        Function SetGuid(
-            /* [in] */ REFGUID guid) As HRESULT
-
-        Function SetTypeFlags(
-            /* [in] */ UINT uTypeFlags) As HRESULT
-
-        Function SetDocString(
-            /* [in] */ LPOLESTR pStrDoc) As HRESULT
-
-        Function SetHelpContext(
-            /* [in] */ DWORD dwHelpContext) As HRESULT
-
-        Function SetVersion(
-            /* [in] */ WORD wMajorVerNum,
-            /* [in] */ WORD wMinorVerNum) As HRESULT
-
-        Function AddRefTypeInfo(
-            /* [in] */ ITypeInfo *pTInfo,
-            /* [in] */ HREFTYPE *phRefType) As HRESULT
-
-        Function AddFuncDesc(
-            /* [in] */ UINT index,
-            /* [in] */ FUNCDESC *pFuncDesc) As HRESULT
-
-        Function AddImplType(
-            /* [in] */ UINT index,
-            /* [in] */ HREFTYPE hRefType) As HRESULT
-
-        Function SetImplTypeFlags(
-            /* [in] */ UINT index,
-            /* [in] */ INT implTypeFlags) As HRESULT
-
-        Function SetAlignment(
-            /* [in] */ WORD cbAlignment) As HRESULT
-
-        Function SetSchema(
-            /* [in] */ LPOLESTR pStrSchema) As HRESULT
-
-        Function AddVarDesc(
-            /* [in] */ UINT index,
-            /* [in] */ VARDESC *pVarDesc) As HRESULT
-
-        Function SetFuncAndParamNames(
-            /* [in] */ UINT index,
-            /* [in][size_is][in] */ LPOLESTR *rgszNames,
-            /* [in] */ UINT cNames) As HRESULT
-
-        Function SetVarName(
-            /* [in] */ UINT index,
-            /* [in] */ LPOLESTR szName) As HRESULT
-
-        Function SetTypeDescAlias(
-            /* [in] */ TYPEDESC *pTDescAlias) As HRESULT
-
-        Function DefineFuncAsDllEntry(
-            /* [in] */ UINT index,
-            /* [in] */ LPOLESTR szDllName,
-            /* [in] */ LPOLESTR szProcName) As HRESULT
-
-        Function SetFuncDocString(
-            /* [in] */ UINT index,
-            /* [in] */ LPOLESTR szDocString) As HRESULT
-
-        Function SetVarDocString(
-            /* [in] */ UINT index,
-            /* [in] */ LPOLESTR szDocString) As HRESULT
-
-        Function SetFuncHelpContext(
-            /* [in] */ UINT index,
-            /* [in] */ DWORD dwHelpContext) As HRESULT
-
-        Function SetVarHelpContext(
-            /* [in] */ UINT index,
-            /* [in] */ DWORD dwHelpContext) As HRESULT
-
-        Function SetMops(
-            /* [in] */ UINT index,
-            /* [in] */ BSTR bstrMops) As HRESULT
-
-        Function SetTypeIdldesc(
-            /* [in] */ IDLDESC *pIdlDesc) As HRESULT
-
-        Function LayOut( void) As HRESULT
-
-    };
+'TypeDef /* [unique] */ ICreateTypeInfo *LPCREATETYPEINFO;
+
+Dim IID_ICreateTypeInfo = [&h00020405, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
+
+Interface ICreateTypeInfo
+	Inherits IUnknown
+
+		Function SetGuid(
+			/* [in] */ ByRef guid As GUID) As HRESULT
+
+		Function SetTypeFlags(
+			/* [in] */ uTypeFlags As DWord) As HRESULT
+
+		Function SetDocString(
+			/* [in] */ pStrDoc As LPOLESTR) As HRESULT
+
+		Function SetHelpContext(
+			/* [in] */ dwHelpContext As DWord) As HRESULT
+
+		Function SetVersion(
+			/* [in] */ wMajorVerNum As Word,
+			/* [in] */ wMinorVerNum As Word) As HRESULT
+
+		Function AddRefTypeInfo(
+			/* [in] */ pTInfo As VoidPtr /* *ITypeInfo */,
+			/* [in] */ByRef hRefType As HREFTYPE) As HRESULT
+
+		Function AddFuncDesc(
+			/* [in] */ index As DWord,
+			/* [in] */ ByRef FuncDesc As FUNCDESC) As HRESULT
+
+		Function AddImplType(
+			/* [in] */ index As DWord,
+			/* [in] */ hRefType As HREFTYPE) As HRESULT
+
+		Function SetImplTypeFlags(
+			/* [in] */ index As DWord,
+			/* [in] */ implTypeFlags As Long) As HRESULT
+
+		Function SetAlignment(
+			/* [in] */ cbAlignment As Long) As HRESULT
+
+		Function SetSchema(
+			/* [in] */ pStrSchema As LPOLESTR) As HRESULT
+
+		Function AddVarDesc(
+			/* [in] */ index As DWord,
+			/* [in] */ ByRef VarDesc As VARDESC) As HRESULT
+
+		Function SetFuncAndParamNames(
+			/* [in] */ index As DWord,
+			/* [in][size_is][in] */ rgszNames As *LPOLESTR,
+			/* [in] */ cNames As DWord) As HRESULT
+
+		Function SetVarName(
+			/* [in] */ index As DWord,
+			/* [in] */ szName As LPOLESTR) As HRESULT
+
+		Function SetTypeDescAlias(
+			/* [in] */ ByRef TDescAlias As TYPEDESC) As HRESULT
+
+		Function DefineFuncAsDllEntry(
+			/* [in] */ index As DWord,
+			/* [in] */ szDllName As LPOLESTR,
+			/* [in] */ zProcName As LPOLESTR) As HRESULT
+
+		Function SetFuncDocString(
+			/* [in] */ index As DWord,
+			/* [in] */ szDocString As LPOLESTR) As HRESULT
+
+		Function SetVarDocString(
+			/* [in] */ index As DWord,
+			/* [in] */ szDocString As LPOLESTR) As HRESULT
+
+		Function SetFuncHelpContext(
+			/* [in] */ index As DWord,
+			/* [in] */ dwHelpContext As DWord) As HRESULT
+
+		Function SetVarHelpContext(
+			/* [in] */ index As DWord,
+			/* [in] */ dwHelpContext As DWord) As HRESULT
+
+		Function SetMops(
+			/* [in] */ index As DWord,
+			/* [in] */ bstrMops As BSTR) As HRESULT
+
+		Function SetTypeIdldesc(
+			/* [in] */ ByRef IdlDesc As IDLDESC) As HRESULT
+
+		Function LayOut() As HRESULT
+End Interface
 
 #endif 	/* __ICreateTypeInfo_INTERFACE_DEFINED__ */
-
 
 #ifndef __ICreateTypeInfo2_INTERFACE_DEFINED__
@@ -995,73 +1029,68 @@
 /* [local][unique][uuid][object] */
 
-'typedef /* [unique] */ ICreateTypeInfo2 *LPCREATETYPEINFO2;
-
-
-EXTERN_C const IID IID_ICreateTypeInfo2;
-
-    MIDL_INTERFACE("0002040E-0000-0000-C000-000000000046")
-    ICreateTypeInfo2 : public ICreateTypeInfo
-    {
-    public:
-        Function DeleteFuncDesc(
-            /* [in] */ UINT index) As HRESULT
-
-        Function DeleteFuncDescByMemId(
-            /* [in] */ MEMBERID memid,
-            /* [in] */ INVOKEKIND invKind) As HRESULT
-
-        Function DeleteVarDesc(
-            /* [in] */ UINT index) As HRESULT
-
-        Function DeleteVarDescByMemId(
-            /* [in] */ MEMBERID memid) As HRESULT
-
-        Function DeleteImplType(
-            /* [in] */ UINT index) As HRESULT
-
-        Function SetCustData(
-            /* [in] */ REFGUID guid,
-            /* [in] */ VARIANT *pVarVal) As HRESULT
-
-        Function SetFuncCustData(
-            /* [in] */ UINT index,
-            /* [in] */ REFGUID guid,
-            /* [in] */ VARIANT *pVarVal) As HRESULT
-
-        Function SetParamCustData(
-            /* [in] */ UINT indexFunc,
-            /* [in] */ UINT indexParam,
-            /* [in] */ REFGUID guid,
-            /* [in] */ VARIANT *pVarVal) As HRESULT
-
-        Function SetVarCustData(
-            /* [in] */ UINT index,
-            /* [in] */ REFGUID guid,
-            /* [in] */ VARIANT *pVarVal) As HRESULT
-
-        Function SetImplTypeCustData(
-            /* [in] */ UINT index,
-            /* [in] */ REFGUID guid,
-            /* [in] */ VARIANT *pVarVal) As HRESULT
-
-        Function SetHelpStringContext(
-            /* [in] */ ULONG dwHelpStringContext) As HRESULT
-
-        Function SetFuncHelpStringContext(
-            /* [in] */ UINT index,
-            /* [in] */ ULONG dwHelpStringContext) As HRESULT
-
-        Function SetVarHelpStringContext(
-            /* [in] */ UINT index,
-            /* [in] */ ULONG dwHelpStringContext) As HRESULT
-
-        Function Invalidate( void) As HRESULT
-
-        Function SetName(
-            /* [in] */ LPOLESTR szName) As HRESULT
-
-    };
-
-
+TypeDef LPCREATETYPEINFO2 = /* [unique] */ *ICreateTypeInfo2
+
+Dim IID_ICreateTypeInfo2 = [&h0002040E, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
+
+Interface ICreateTypeInfo2
+	Inherits ICreateTypeInfo
+
+	Function DeleteFuncDesc(
+		/* [in] */ index As DWord) As HRESULT
+
+	Function DeleteFuncDescByMemId(
+		/* [in] */ memid As *MEMBERID,
+		/* [in] */ invKind As *INVOKEKIND) As HRESULT
+
+	Function DeleteVarDesc(
+		/* [in] */ index As DWord) As HRESULT
+
+	Function DeleteVarDescByMemId(
+		/* [in] */ memid As *MEMBERID) As HRESULT
+
+	Function DeleteImplType(
+		/* [in] */ index As DWord) As HRESULT
+
+	Function SetCustData(
+		/* [in] */ ByRef guid As GUID,
+		/* [in] */ ByRef VarVal As VARIANT) As HRESULT
+
+	Function SetFuncCustData(
+		/* [in] */ index As DWord,
+		/* [in] */ ByRef guid As GUID,
+		/* [in] */ ByRef VarVal As VARIANT) As HRESULT
+
+	Function SetParamCustData(
+		/* [in] */ indexFunc As DWord,
+		/* [in] */ indexParam As DWord,
+		/* [in] */ ByRef guid As GUID,
+		/* [in] */ ByRef VarVal As VARIANT) As HRESULT
+
+	Function SetVarCustData(
+		/* [in] */ index As DWord,
+		/* [in] */ ByRef guid As GUID,
+		/* [in] */ ByRef VarVal As VARIANT) As HRESULT
+
+	Function SetImplTypeCustData(
+		/* [in] */ index As DWord,
+		/* [in] */ ByRef guid As GUID,
+		/* [in] */ ByRef VarVal As VARIANT) As HRESULT
+
+	Function SetHelpStringContext(
+		/* [in] */ dwHelpStringContext As DWord) As HRESULT
+
+	Function SetFuncHelpStringContext(
+		/* [in] */ index As DWord,
+		/* [in] */ dwHelpStringContext As DWord) As HRESULT
+
+	Function SetVarHelpStringContext(
+		/* [in] */ index As DWord,
+		/* [in] */ dwHelpStringContext As DWord) As HRESULT
+
+	Function Invalidate() As HRESULT
+
+	Function SetName(
+		/* [in] */ szName As LPOLESTR) As HRESULT
+End Interface
 
 #endif 	/* __ICreateTypeInfo2_INTERFACE_DEFINED__ */
@@ -1074,50 +1103,46 @@
 /* [local][unique][uuid][object] */
 
-'typedef /* [unique] */ ICreateTypeLib *LPCREATETYPELIB;
-
-
-EXTERN_C const IID IID_ICreateTypeLib;
-
-    MIDL_INTERFACE("00020406-0000-0000-C000-000000000046")
-    ICreateTypeLib : public IUnknown
-    {
-    public:
-        Function CreateTypeInfo(
-            /* [in] */ LPOLESTR szName,
-            /* [in] */ TYPEKIND tkind,
-            /* [out] */ ICreateTypeInfo **ppCTInfo) As HRESULT
-
-        Function SetName(
-            /* [in] */ LPOLESTR szName) As HRESULT
-
-        Function SetVersion(
-            /* [in] */ WORD wMajorVerNum,
-            /* [in] */ WORD wMinorVerNum) As HRESULT
-
-        Function SetGuid(
-            /* [in] */ REFGUID guid) As HRESULT
-
-        Function SetDocString(
-            /* [in] */ LPOLESTR szDoc) As HRESULT
-
-        Function SetHelpFileName(
-            /* [in] */ LPOLESTR szHelpFileName) As HRESULT
-
-        Function SetHelpContext(
-            /* [in] */ DWORD dwHelpContext) As HRESULT
-
-        Function SetLcid(
-            /* [in] */ LCID lcid) As HRESULT
-
-        Function SetLibFlags(
-            /* [in] */ UINT uLibFlags) As HRESULT
-
-        Function SaveAllChanges( void) As HRESULT
-
-    };
+TypeDef LPCREATETYPELIB = /* [unique] */ *ICreateTypeLib
+
+
+Dim IID_ICreateTypeLib = [&h00020406, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
+Interface ICreateTypeLib
+	Inherits IUnknown
+
+	Function CreateTypeInfo(
+		/* [in] */ szName As LPOLESTR,
+		/* [in] */ tkind As *TYPEKIND,
+		/* [out] */ ByRef pCTInfo As *ICreateTypeInfo) As HRESULT
+
+	Function SetName(
+		/* [in] */ szName As LPOLESTR) As HRESULT
+
+	Function SetVersion(
+		/* [in] */ wMajorVerNum As Word,
+		/* [in] */ wMinorVerNum As Word) As HRESULT
+
+	Function SetGuid(
+		/* [in] */ ByRef guid As GUID) As HRESULT
+
+	Function SetDocString(
+		/* [in] */ szDoc As LPOLESTR) As HRESULT
+
+	Function SetHelpFileName(
+		/* [in] */ szHelpFileName As LPOLESTR) As HRESULT
+
+	Function SetHelpContext(
+		/* [in] */ dwHelpContext As DWord) As HRESULT
+
+	Function SetLcid(
+		/* [in] */ lcid As LCID) As HRESULT
+
+	Function SetLibFlags(
+		/* [in] */ uLibFlags As DWord) As HRESULT
+
+	Function SaveAllChanges() As HRESULT
+End Interface
 
 
 #endif 	/* __ICreateTypeLib_INTERFACE_DEFINED__ */
-
 
 #ifndef __ICreateTypeLib2_INTERFACE_DEFINED__
@@ -1127,32 +1152,29 @@
 /* [local][unique][uuid][object] */
 
-typedef /* [unique] */ ICreateTypeLib2 *LPCREATETYPELIB2;
-
-
-EXTERN_C const IID IID_ICreateTypeLib2;
-
-    MIDL_INTERFACE("0002040F-0000-0000-C000-000000000046")
-    ICreateTypeLib2 : public ICreateTypeLib
-    {
-    public:
-        Function DeleteTypeInfo(
-            /* [in] */ LPOLESTR szName) As HRESULT
-
-        Function SetCustData(
-            /* [in] */ REFGUID guid,
-            /* [in] */ VARIANT *pVarVal) As HRESULT
-
-        Function SetHelpStringContext(
-            /* [in] */ ULONG dwHelpStringContext) As HRESULT
-
-        Function SetHelpStringDll(
-            /* [in] */ LPOLESTR szFileName) As HRESULT
-
-    };
+TypeDef LPCREATETYPELIB2 = /* [unique] */ *ICreateTypeLib2
+
+
+Dim IID_ICreateTypeLib2 = [&h0002040F, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
+
+Interface ICreateTypeLib2
+	Inherits ICreateTypeLib
+
+	Function DeleteTypeInfo(
+		/* [in] */ szName As LPOLESTR) As HRESULT
+
+	Function SetCustData(
+		/* [in] */ ByRef guid As GUID,
+		/* [in] */ ByRef VarVal As VARIANT) As HRESULT
+
+	Function SetHelpStringContext(
+		/* [in] */ dwHelpStringContext As DWord) As HRESULT
+
+	Function SetHelpStringDll(
+		/* [in] */ szFileName As LPOLESTR) As HRESULT
+
+End Interface
 
 
 #endif 	/* __ICreateTypeLib2_INTERFACE_DEFINED__ */
-
-#endif '__UNDECLARED__
 
 #ifndef __IDispatch_INTERFACE_DEFINED__
@@ -1246,25 +1268,24 @@
 /* [unique][uuid][object] */
 
-typedef /* [unique] */ ITypeComp *LPTYPECOMP;
-
-typedef /* [v1_enum] */
-enum tagDESCKIND
-    {	DESCKIND_NONE = 0,
-	DESCKIND_FUNCDESC = DESCKIND_NONE + 1,
-	DESCKIND_VARDESC = DESCKIND_FUNCDESC + 1,
-	DESCKIND_TYPECOMP = DESCKIND_VARDESC + 1,
-	DESCKIND_IMPLICITAPPOBJ = DESCKIND_TYPECOMP + 1,
-	DESCKIND_MAX = DESCKIND_IMPLICITAPPOBJ + 1
-    } 	DESCKIND;
-
-typedef union tagBINDPTR
-    {
-    FUNCDESC *lpfuncdesc;
-    VARDESC *lpvardesc;
-    ITypeComp *lptcomp;
-    } 	BINDPTR;
-
-typedef union tagBINDPTR *LPBINDPTR;
-
+TypeDef /* [unique] */ ITypeComp *LPTYPECOMP;
+
+/* [v1_enum] */
+Const Enum DESCKIND
+	DESCKIND_NONE
+	DESCKIND_FUNCDESC = DESCKIND_NONE
+	DESCKIND_VARDESC = DESCKIND_FUNCDESC
+	DESCKIND_TYPECOMP = DESCKIND_VARDESC
+	DESCKIND_IMPLICITAPPOBJ = DESCKIND_TYPECOMP
+	DESCKIND_MAX = DESCKIND_IMPLICITAPPOBJ
+End Enum
+/*
+Union BINDPTR
+    lpfuncdesc As *FUNCDESC
+    lpvardesc As *VARDESC
+    lptcomp As *ITypeComp
+End Union
+
+TypeDef LPBINDPTR = *BINDPTR
+*/
 
 EXTERN_C const IID IID_ITypeComp;
@@ -1300,5 +1321,5 @@
 /* [unique][uuid][object] */
 
-typedef /* [unique] */ ITypeInfo *LPTYPEINFO;
+TypeDef /* [unique] */ ITypeInfo *LPTYPEINFO;
 
 
@@ -1407,5 +1428,5 @@
 /* [unique][uuid][object] */
 
-typedef /* [unique] */ ITypeInfo2 *LPTYPEINFO2;
+TypeDef /* [unique] */ ITypeInfo2 *LPTYPEINFO2;
 
 
@@ -1495,5 +1516,5 @@
 /* [unique][uuid][object] */
 
-typedef /* [v1_enum] */
+TypeDef /* [v1_enum] */
 enum tagSYSKIND
     {	SYS_WIN16 = 0,
@@ -1503,5 +1524,5 @@
     } 	SYSKIND;
 
-typedef /* [v1_enum] */
+TypeDef /* [v1_enum] */
 enum tagLIBFLAGS
     {	LIBFLAG_FRESTRICTED = 0x1,
@@ -1511,7 +1532,7 @@
     } 	LIBFLAGS;
 
-typedef /* [unique] */ ITypeLib *LPTYPELIB;
-
-typedef struct tagTLIBATTR
+TypeDef /* [unique] */ ITypeLib *LPTYPELIB;
+
+TypeDef struct tagTLIBATTR
     {
     GUID guid;
@@ -1523,5 +1544,5 @@
     } 	TLIBATTR;
 
-typedef struct tagTLIBATTR *LPTLIBATTR;
+TypeDef struct tagTLIBATTR *LPTLIBATTR;
 
 
@@ -1585,5 +1606,5 @@
 /* [unique][uuid][object] */
 
-typedef /* [unique] */ ITypeLib2 *LPTYPELIB2;
+TypeDef /* [unique] */ ITypeLib2 *LPTYPELIB2;
 
 
@@ -1623,9 +1644,8 @@
 /* [local][unique][uuid][object] */
 
-typedef /* [unique] */ ITypeChangeEvents *LPTYPECHANGEEVENTS;
-
-typedef
-enum tagCHANGEKIND
-    {	CHANGEKIND_ADDMEMBER = 0,
+TypeDef /* [unique] */ ITypeChangeEvents *LPTYPECHANGEEVENTS;
+
+Enum CHANGEKIND
+	CHANGEKIND_ADDMEMBER = 0,
 	CHANGEKIND_DELETEMEMBER = CHANGEKIND_ADDMEMBER + 1,
 	CHANGEKIND_SETNAMES = CHANGEKIND_DELETEMEMBER + 1,
@@ -1635,5 +1655,5 @@
 	CHANGEKIND_CHANGEFAILED = CHANGEKIND_INVALIDATE + 1,
 	CHANGEKIND_MAX = CHANGEKIND_CHANGEFAILED + 1
-    } 	CHANGEKIND;
+End Enum
 
 
@@ -1666,5 +1686,5 @@
 /* [unique][uuid][object] */
 
-typedef /* [unique] */ IErrorInfo *LPERRORINFO;
+TypeDef /* [unique] */ IErrorInfo *LPERRORINFO;
 
 
@@ -1701,5 +1721,5 @@
 /* [unique][uuid][object] */
 
-typedef /* [unique] */ ICreateErrorInfo *LPCREATEERRORINFO;
+TypeDef /* [unique] */ ICreateErrorInfo *LPCREATEERRORINFO;
 
 
@@ -1736,5 +1756,5 @@
 /* [unique][uuid][object] */
 
-typedef /* [unique] */ ISupportErrorInfo *LPSUPPORTERRORINFO;
+TypeDef /* [unique] */ ISupportErrorInfo *LPSUPPORTERRORINFO;
 
 
@@ -1824,5 +1844,5 @@
 /* [uuid][object][local] */
 
-typedef /* [unique] */ IRecordInfo *LPRECORDINFO;
+TypeDef /* [unique] */ IRecordInfo *LPRECORDINFO;
 
 
@@ -1898,4 +1918,6 @@
 #endif 	/* __IRecordInfo_INTERFACE_DEFINED__ */
 
+#endif ' __UNDEFINED__
+
 
 #ifndef __IErrorLog_INTERFACE_DEFINED__
@@ -1905,18 +1927,15 @@
 /* [unique][uuid][object] */
 
-typedef IErrorLog *LPERRORLOG;
-
-
-EXTERN_C const IID IID_IErrorLog;
-
-    MIDL_INTERFACE("3127CA40-446E-11CE-8135-00AA004BB851")
-    IErrorLog : public IUnknown
-    {
-    public:
-        Function AddError(
-            /* [in] */ LPCOLESTR pszPropName,
-            /* [in] */ EXCEPINFO *pExcepInfo) As HRESULT
-
-    };
+TypeDef LPERRORLOG = *IErrorLog
+
+Dim IID_IErrorLog = [&h3127CA40, &h446E, &h11CE, [&h81, &h35, &h00, &hAA, &h00, &h4B, &hB8, &h51]] As IID
+
+Interface IErrorLog
+	Inherits IUnknown
+
+	Function AddError(
+		/* [in] */ pszPropName As LPCOLESTR,
+		/* [in] */ ByRef pExcepInfo As EXCEPINFO) As HRESULT
+End Interface
 
 #endif 	/* __IErrorLog_INTERFACE_DEFINED__ */
@@ -1929,26 +1948,22 @@
 /* [unique][uuid][object] */
 
-typedef IPropertyBag *LPPROPERTYBAG;
-
-
-EXTERN_C const IID IID_IPropertyBag;
-
-    MIDL_INTERFACE("55272A00-42CB-11CE-8135-00AA004BB851")
-    IPropertyBag : public IUnknown
-    {
-    public:
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Read(
-            /* [in] */ LPCOLESTR pszPropName,
-            /* [out][in] */ VARIANT *pVar,
-            /* [in] */ IErrorLog *pErrorLog) As HRESULT
-
-        Function Write(
-            /* [in] */ LPCOLESTR pszPropName,
-            /* [in] */ VARIANT *pVar) As HRESULT
-
-    };
+TypeDef LPPROPERTYBAG = *IPropertyBag
+
+Dim IID_IPropertyBag = [&h55272A00, &h42CB, &h11CE, [&h81, &h35, &h00, &hAA, &h00, &h4B, &hB8, &h51]] As IID
+
+Interface IPropertyBag
+	Inherits IUnknown
+
+	/* [local] */ Function Read(
+		/* [in] */ pszPropName As LPCOLESTR,
+		/* [out][in] */ ByRef Var As VARIANT,
+		/* [in] */ pErrorLog As *IErrorLog) As HRESULT
+
+	Function Write(
+		/* [in] */ pszPropName As LPCOLESTR,
+		/* [in] */ ByRef Var As VARIANT) As HRESULT
+End Interface
+
 #endif 	/* __IPropertyBag_INTERFACE_DEFINED__ */
 
-#endif ' __UNDEFINED__
-
 #endif '_INC_OAIDL_AB
