Index: trunk/Include/Classes/ActiveBasic/Strings/Strings.ab
===================================================================
--- trunk/Include/Classes/ActiveBasic/Strings/Strings.ab	(revision 476)
+++ trunk/Include/Classes/ActiveBasic/Strings/Strings.ab	(revision 478)
@@ -1,9 +1,3 @@
 'Classes/ActiveBasic/Strings/Strings.ab
-
-#ifndef __ACTIVEBASIC_STRINGS_STRINGS_AB__
-#define __ACTIVEBASIC_STRINGS_STRINGS_AB__
-
-#require <Classes/System/Math.ab>
-#require <Classes/System/Collections/ArrayList.ab>
 
 Namespace ActiveBasic
@@ -220,3 +214,2 @@
 End Namespace 'ActiveBasic
 
-#endif '__ACTIVEBASIC_STRINGS_STRINGS_AB__
Index: trunk/Include/Classes/System/String.ab
===================================================================
--- trunk/Include/Classes/System/String.ab	(revision 476)
+++ trunk/Include/Classes/System/String.ab	(revision 478)
@@ -256,6 +256,8 @@
 
 		Override Function Equals(s As Object) As Boolean
-			If Object.Equals( This.GetType(), s.GetType() ) Then
-				Return This.Equals(s As String)
+			If Not ActiveBasic.IsNothing(s) Then
+				If Object.Equals(This.GetType(), s.GetType()) Then
+					Return This.Equals(s As String)
+				End If
 			End If
 			Return False
Index: trunk/Include/OAIdl.ab
===================================================================
--- trunk/Include/OAIdl.ab	(revision 476)
+++ trunk/Include/OAIdl.ab	(revision 478)
@@ -2,12 +2,4 @@
 ' 本来はOAIdl.idlから生成するのが正当ですが、
 ' これは手動で移植したものです。
-
-#ifndef _INC_OAIDL_AB
-#define _INC_OAIDL_AB
-
-'#ifndef COM_NO_WINDOWS_H
-#require <windows.sbp>
-#require <ole2.ab>
-'#endif /*COM_NO_WINDOWS_H*/
 
 #require <objidl.sbp>
@@ -777,5 +769,5 @@
 
 Type /* [wire_marshal] */ CLEANLOCALSTORAGE
-	pInterface As *IUnknown
+	pInterface As IUnknown
 	pStorage As VoidPtr
 	flags As DWord
@@ -823,5 +815,5 @@
 		/* [in] */ wMinorVerNum As Word) As HRESULT
 	Function AddRefTypeInfo(
-		/* [in] */ pTInfo As *ITypeInfo,
+		/* [in] */ TInfo As ITypeInfo,
 		/* [in] */ByRef hRefType As HREFTYPE) As HRESULT
 	Function AddFuncDesc(
@@ -1037,5 +1029,5 @@
 		/* [in] */ iTInfo As DWord,
 		/* [in] */ lcid As LCID,
-		/* [out] */ ByRef pTInfo As *ITypeInfo) As HRESULT
+		/* [out] */ ByRef TInfo As ITypeInfo) As HRESULT
 	Function GetIDsOfNames(
 		/* [in] */ ByRef riid As IID,
@@ -1078,5 +1070,5 @@
 	Function Reset() As HRESULT
 	Function Clone(
-		/* [out] */ ByRef pEnum As *IEnumVARIANT) As HRESULT
+		/* [out] */ ByRef enum_ As IEnumVARIANT) As HRESULT
 
 End Interface
@@ -1105,5 +1097,5 @@
     lpfuncdesc As *FUNCDESC
     lpvardesc As *VARDESC
-    lptcomp As *ITypeComp
+    lptcomp As ITypeComp
 End Union
 */
@@ -1123,5 +1115,5 @@
 		/* [in] */ HashVal As DWord,
 		/* [in] */ wFlags As Word,
-		/* [out] */ ByRef pTInfo As *ITypeInfo,
+		/* [out] */ ByRef TInfo As ITypeInfo,
 		/* [out] */ ByRef DescKind As DESCKIND,
 		/* [out] */ ByRef BindPtr As BINDPTR) As HRESULT
@@ -1130,6 +1122,6 @@
 		/* [in] */ szName As LPOLESTR,
 		/* [in] */ HashVal As DWord,
-		/* [out] */ ByRef pTInfo As *ITypeInfo,
-		/* [out] */ ByRef pTComp As *ITypeComp) As HRESULT
+		/* [out] */ ByRef TInfo As ITypeInfo,
+		/* [out] */ ByRef TComp As ITypeComp) As HRESULT
 End Interface
 
@@ -1333,5 +1325,5 @@
 	Function GetTypeInfo(
 		/* [in] */ index As DWord,
-		/* [out] */ ByRef pTInfo As *ITypeInfo) As HRESULT
+		/* [out] */ ByRef TInfo As ITypeInfo) As HRESULT
 	Function GetTypeInfoType(
 		/* [in] */ index As DWord,
@@ -1339,9 +1331,9 @@
 	Function GetTypeInfoOfGuid(
 		/* [in] */ ByRef guid As GUID,
-		/* [out] */ ByRef pTInfo As *ITypeInfo) As HRESULT
+		/* [out] */ ByRef TInfo As ITypeInfo) As HRESULT
 	Function /* [local] */ GetLibAttr(
-		/* [out] */ ByRef pTLibAttr As *TLIBATTR) As HRESULT
+		/* [out] */ ByRef TLibAttr As TLIBATTR) As HRESULT
 	Function GetTypeComp(
-		/* [out] */ ByRef ppTComp As *ITypeComp) As HRESULT
+		/* [out] */ ByRef TComp As ITypeComp) As HRESULT
 	Function /* [local] */ GetDocumentation(
 		/* [in] */ index As Long,
@@ -1357,5 +1349,5 @@
 		/* [out][in] */ szNameBuf As LPOLESTR,
 		/* [in] */ lHashVal As DWord,
-		/* [length_is][size_is][out] */ ppTInfo As **ITypeInfo,
+		/* [length_is][size_is][out] */ pTInfo As *ITypeInfo,
 		/* [length_is][size_is][out] */ rgMemId As *MEMBERID,
 		/* [out][in] */ ByRef cFound As Word) As HRESULT
@@ -1425,10 +1417,10 @@
 	Function RequestTypeChange(
 		/* [in] */ changeKind As CHANGEKIND,
-		/* [in] */ pTInfoBefore As ITypeInfo,
+		/* [in] */ TInfoBefore As ITypeInfo,
 		/* [in] */ pStrName As LPOLESTR,
 		/* [out] */ ByRef fCancel As Long) As HRESULT
 	Function AfterTypeChange(
 		/* [in] */ changeKind As CHANGEKIND,
-		/* [in] */ pTInfoAfter As *ITypeInfo,
+		/* [in] */ TInfoAfter As ITypeInfo,
 		/* [in] */ pStrName As LPOLESTR) As HRESULT
 End Interface
@@ -1525,7 +1517,7 @@
 
 	Function CreateFromTypeInfo(
-		/* [in] */ pTypeInfo As *ITypeInfo,
+		/* [in] */ TypeInfo As ITypeInfo,
 		/* [in] */ ByRef riid As IID,
-		/* [iid_is][out] */ ByRef pv As *IUnknown) As HRESULT
+		/* [iid_is][out] */ ByRef pv As IUnknown) As HRESULT
 End Interface
 
@@ -1620,5 +1612,5 @@
 		/* [length_is][size_is][out] */ rgBstrNames As *BSTR) As HRESULT
 	Function IsMatchingType(
-		/* [in] */ pRecordInfo As *IRecordInfo) As BOOL
+		/* [in] */ RecordInfo As IRecordInfo) As BOOL
 	Function RecordCreate() As VoidPtr
 	Function RecordCreateCopy(
@@ -1678,3 +1670,2 @@
 #endif 	/* __IPropertyBag_INTERFACE_DEFINED__ */
 
-#endif '_INC_OAIDL_AB
Index: trunk/Include/api_imm.sbp
===================================================================
--- trunk/Include/api_imm.sbp	(revision 476)
+++ trunk/Include/api_imm.sbp	(revision 478)
@@ -1,9 +1,3 @@
 ' api_imm.sbp
-
-#ifndef _IMM_
-#define _IMM_
-
-#ifndef _IMM_SDK_DEFINED_
-#define _IMM_SDK_DEFINED_
 
 Type _System_DeclareHandle_HIMC:unused As DWord:End Type
@@ -702,6 +696,2 @@
 ' for Windows Simplified Chinese Edition
 Const SOFTKEYBOARD_TYPE_C1 = &h0002
-
-#endif '_IMM_SDK_DEFINED_
-
-#endif '_IMM_
Index: trunk/Include/basic/command.sbp
===================================================================
--- trunk/Include/basic/command.sbp	(revision 476)
+++ trunk/Include/basic/command.sbp	(revision 478)
@@ -4,8 +4,4 @@
 #ifndef _INC_COMMAND
 #define _INC_COMMAND
-
-#require <windows.sbp>
-#require <Classes/System/Environment.ab>
-#require <Classes/ActiveBasic/Windows/Windows.ab>
 
 Const _System_Type_SByte = 1
@@ -67,8 +63,8 @@
 
 Macro MSGBOX(hwnd As HWND, str As String)(title As String, boxType As DWord, ByRef retAns As DWord)
-	Dim ret = ActiveBasic.Windows.Detail._System_MessageBox(hwnd, ToSCStr(str), ToSCStr(title), boxType)
-	If VarPtr(retAns) Then
-		retAns = ret
-	End If
+'	Dim ret = MessageBox(hwnd, ToTCStr(str), ToTCStr(title), boxType)
+'	If VarPtr(retAns) Then
+'		retAns = ret
+'	End If
 End Macro
 
Index: trunk/Include/com/bstring.ab
===================================================================
--- trunk/Include/com/bstring.ab	(revision 476)
+++ trunk/Include/com/bstring.ab	(revision 478)
@@ -1,6 +1,3 @@
 ' com/bstring.ab
-
-'#require <ole2.ab>
-'#require <oleauto.ab>
 
 Namespace ActiveBasic
@@ -8,5 +5,5 @@
 
 Class BString
-	'Inherits System.IDisposable, System.ICloneable
+	Implements System.IDisposable ', System.ICloneable
 Public
 	Sub BString()
@@ -19,28 +16,52 @@
 
 	Sub BString(s As BString)
-		BString.Copy(This.bs, s.bs)
-	End Sub
-
-	Sub BString(s As LPCOLESTR)
-		bs = SysAllocString(s)
+		If Not IsNothing(s) Then
+			bs = copy(s.bs)
+		End If
 	End Sub
 
 	Sub BString(s As LPCOLESTR, len As DWord)
-		bs = SysAllocStringLen(s, len)
-	End Sub
-
-	Sub BString(s As PCSTR)
-		Init(s, lstrlenA(s))
-	End Sub
-
-	Sub BString(s As PCSTR, len As DWord)
-		Dim lenBS = MultiByteToWideChar(CP_THREAD_ACP, 0, s, len As Long, 0, 0)
-		bs = SysAllocStringLen(0, lenBS)
-		MultiByteToWideChar(CP_THREAD_ACP, 0, s, len As Long, bs, lenBS)
+		If s <> 0 Then
+			bs = SysAllocStringLen(s, len)
+		End If
 	End Sub
 
 	Sub BString(s As String)
-		Init(s.StrPtr, s.Length As DWord)
-	End Sub
+		If Not IsNothing(s) Then
+			Init(s.StrPtr, s.Length As DWord)
+		End If
+	End Sub
+
+	Static Function FromBStr(bs As BSTR) As BString
+		FromBStr = New BString(bs, SysStringLen(bs))
+	End Function
+
+	Static Function FromCStr(s As PCWSTR) As BString
+		If s <> 0 Then
+			FromCStr = New BString(s, lstrlenW(s))
+		Else
+			FromCStr = New BString
+		End If
+	End Function
+
+	Static Function FromCStr(s As PCWSTR, len As DWord) As BString
+		If s <> 0 Then
+			FromCStr = New BString(s, len)
+		Else
+			FromCStr = New BString
+		End If
+	End Function
+
+	Static Function FromCStr(s As PCSTR) As BString
+		Dim dst As PCWSTR
+		Dim lenW = GetStr(s, dst)
+		FromCStr = FromCStr(s, lenW)
+	End Function
+
+	Static Function FromCStr(s As PCSTR, len As DWord) As BString
+		Dim dst As PCWSTR
+		Dim lenW = GetStr(s, len, dst)
+		FromCStr = FromCStr(s, lenW)
+	End Function
 
 	Sub ~BString()
@@ -48,21 +69,6 @@
 	End Sub
 
-	Sub Assign(bstr As BString)
-		Clear()
-		BString.Copy(This.bs, bstr.bs)
-	End Sub
-
-	Sub Assign(s As LPCOLESTR)
-		Clear()
-		s = SysAllocString(s)
-	End Sub
-
-	Sub AssignFromBStr(bstr As BSTR)
-		Clear()
-		BString.Copy(bs, bstr)
-	End Sub
-
 	Const Function Copy() As BSTR
-		BString.Copy(Copy, bs)
+		Copy = copy(bs)
 	End Function
 
@@ -76,26 +82,17 @@
 
 	Sub Clear()
-		If bs <> 0 Then
-			SysFreeString(bs)
-			bs = 0
-		End If
+		reset(0)
 	End Sub
 
 	Sub Attach(ByRef bstr As BSTR)
-		Clear()
-		BString.Move(bs, bstr)
+		reset(move(bstr))
 	End Sub
 
 	Function Detach() As BSTR
-		BString.Move(Detach, bs)
+		Detach = move(bs)
 	End Function
 
 	Function BStr() As BSTR
 		BStr = bs
-	End Function
-/*
-	Static Function Assgin(bs As BSTR) As BString
-		Assgin = New BString
-		Assgin.Assgin(bs)
 	End Function
 
@@ -104,24 +101,20 @@
 		Attach.Attach(bs)
 	End Function
-*/
+
 	Const Function Length() As DWord
-		Length = SysStringLen(bs)
+		Length = GetDWord(bs As VoidPtr - SizeOf (DWord)) 'SysStringLen(bs)
 	End Function
 
 	Const Function Operator [](i As SIZE_T) As OLECHAR
-#ifdef _DEBUG
 		If i > Length Then
-			'Throw OutOfRangeException
-		End If
-#endif
+			Throw New ArgumentOutOfRangeException("i")
+		End If
 		Return bs[i]
 	End Function
 
 	Sub Operator []=(i As SIZE_T, c As OLECHAR)
-#ifdef _DEBUG
 		If i > Length Then
-			'Throw OutOfRangeException
-		End If
-#endif
+			Throw New ArgumentOutOfRangeException("i")
+		End If
 		bs[i] = c
 	End Sub
@@ -135,21 +128,93 @@
 	End Function
 
+	Override Function Equals(o As Object) As Boolean
+		If Not IsNothing(o) Then
+			If This.GetType().Equals(o.GetType()) Then
+				Equals(o As BString)
+			End If
+		End If
+	End Function
+
+	Const Function Equals(s As BString) As Boolean
+		Equals = Compare(This, s) = 0
+	End Function
+
+	Static Function Compare(l As BString, r As BString) As Long
+		If IsNullOrEmpty(l) Then
+			If IsNullOrEmpty(r) Then
+				Compare = 0
+			Else
+				Compare = -1
+			End If
+		Else
+			If IsNullOrEmpty(bsr) Then
+				Compare = 1
+			Else
+				Compare = Strings.ChrCmp(l.bs, l.Length As SIZE_T, r.bs, r.Length As SIZE_T)
+			End If
+		End If
+	End Function
+
+	Static Function IsNullOrEmpty(s As BString)
+		If IsNothing(s) Then
+			IsNullOrEmpty = True
+		ElseIf s.bs = 0 Then
+			IsNullOrEmpty = True
+		ElseIf s.Length = 0 Then
+			IsNullOrEmpty = True
+		Else
+			IsNullOrEmpty = False
+		End If
+	End Function
+
+	Function Operator ==(s As BString) As Boolean
+		Return Compare(This, s) = 0
+	End Function
+
+	Function Operator <>(s As BString) As Boolean
+		Return Compare(This, s) <> 0
+	End Function
+
+	Function Operator <(s As BString) As Boolean
+		Return Compare(This, s) < 0
+	End Function
+
+	Function Operator <=(s As BString) As Boolean
+		Return Compare(This, s) <= 0
+	End Function
+
+	Function Operator >(s As BString) As Boolean
+		Return Compare(This, s) > 0
+	End Function
+
+	Function Operator >=(s As BString) As Boolean
+		Return Compare(This, s) >= 0
+	End Function
+
 Private
 	bs As BSTR
 
-	Sub Init(s As PCSTR, len As DWord)
-		Dim lenBS = MultiByteToWideChar(CP_THREAD_ACP, 0, s, len As Long, 0, 0)
-		bs = SysAllocStringLen(0, lenBS)
-		MultiByteToWideChar(CP_THREAD_ACP, 0, s, len As Long, bs, lenBS)
-	End Sub
-
-	Static Sub Copy(ByRef dst As BSTR, ByVal src As BSTR)
-		dst = SysAllocStringLen(src, SysStringLen(src))
-	End Sub
-
-	Static Sub Move(ByRef dst As BSTR, ByRef src As BSTR)
-		dst = src
-		src = 0
-	End Sub
+	Sub init(s As PCSTR, len As DWord)
+		If <> 0 Then
+			Dim lenBS = MultiByteToWideChar(CP_THREAD_ACP, 0, s, len As Long, 0, 0)
+			bs = SysAllocStringLen(0, lenBS)
+			If bs <> 0 Then
+				MultiByteToWideChar(CP_THREAD_ACP, 0, s, len As Long, bs, lenBS)
+			End If
+		End If
+	End Sub
+
+	Sub reset(newBS As BSTR)
+		Dim old = InterlockedExchangePointer(bs, newBS)
+		SysFreeString(old)
+	End Sub
+
+	Static Function copy(src As BSTR) As BSTR
+		copy = SysAllocStringLen(src, SysStringLen(src))
+	End Function
+
+	Static Function move(ByRef src As BSTR) As BSTR
+		move = InterlockedExchangePointer(src, 0)
+	End Function
 End Class
 
Index: trunk/Include/com/currency.ab
===================================================================
--- trunk/Include/com/currency.ab	(revision 476)
+++ trunk/Include/com/currency.ab	(revision 478)
@@ -2,7 +2,4 @@
 
 #require <com/variant.ab>
-
-#ifndef _COM_CURRENCY_AB
-#define _COM_CURRENCY_AB
 
 Namespace ActiveBasic
@@ -56,5 +53,5 @@
 		Return ret
 	End Function
-/*
+
 	Const Function Operator /(y As Variant) As Double
 		Dim vx = New Variant(This)
@@ -69,5 +66,5 @@
 		Return ret.ValR8
 	End Function
-*/
+
 	Const Function Operator +(y As Currency) As Currency
 		Dim ret = New Currency
@@ -131,5 +128,5 @@
 		Return c = VARCMP_LT
 	End Function
-/*
+
 	Const Function Operator >(y As Currency) As Boolean
 		Dim c = Compare(This, y)
@@ -141,5 +138,5 @@
 		Return c = VARCMP_GT
 	End Function
-*/
+
 	Const Function Operator <=(y As Currency) As Boolean
 		Dim c = Compare(This, y)
@@ -183,5 +180,5 @@
 
 	Const Function Cy() As CY
-		Return cy
+		Cy = cy
 	End Function
 
@@ -203,8 +200,10 @@
 
 	Override Function ToString() As String
-		Dim bs As BSTR
-		VarBstrFromCy(cy, LOCALE_USER_DEFAULT, LOCALE_USE_NLS, bs)
-		ToString = New String(bs As PCWSTR, SysStringLen(bs) As Long)
-		SysFreeString(bs)
+		/*Using*/ Dim bstr = New BString
+			Dim bs As BSTR
+			VarBstrFromCy(cy, LOCALE_USER_DEFAULT, LOCALE_USE_NLS, bs)
+			bstr.Attach(bs)
+			ToString = bstr.ToString
+		bstr.Dispose() 'End Using
 	End Function
 
@@ -223,4 +222,2 @@
 End Namespace 'COM
 End Namespace 'ActiveBasic
-
-#endif '_COM_CURRENCY_AB
Index: trunk/Include/com/decimal.ab
===================================================================
--- trunk/Include/com/decimal.ab	(revision 476)
+++ trunk/Include/com/decimal.ab	(revision 478)
@@ -1,5 +1,4 @@
 ' com/decimal.ab
 
-'#require <oleauto.ab>
 #require <com/variant.ab>
 #require <com/currency.ab>
@@ -14,16 +13,14 @@
 
 	Sub Decimal(d As Decimal)
-'		dec = d なぜかコンパイルできない
-		memcpy(VarPtr(dec), VarPtr(d.dec), Len(dec))
+		dec = d.dec
 	End Sub
 
 	Sub Decimal(ByRef d As DECIMAL)
-		memcpy(VarPtr(dec), VarPtr(d), Len(dec))
+		dec = d
 	End Sub
 
 	Sub Decimal(lo As Long, mid As Long, hi As Long, isNegative As Boolean, scale As Byte)
 		If scale > 28 Then
-			Debug
-			Throw New ArgumentOutOfRangeException
+			Throw New ArgumentOutOfRangeException("scale")
 		End If
 		Dim sign As Byte
@@ -284,5 +281,5 @@
 		Return c = VARCMP_LT
 	End Function
-/*
+
 	Const Function Operator >(y As Decimal) As Boolean
 		Dim c = Compare(This, y)
@@ -294,5 +291,5 @@
 		Return c = VARCMP_GT
 	End Function
-*/
+
 	Const Function Operator <=(y As Decimal) As Boolean
 		Dim c = Compare(This, y)
@@ -348,8 +345,10 @@
 
 	Override Function ToString() As String
-		Dim bs As BSTR
-		VarBstrFromDec(dec, LOCALE_USER_DEFAULT, LOCALE_USE_NLS, bs)
-		ToString = New String(bs As PCWSTR, SysStringLen(bs) As Long)
-		SysFreeString(bs)
+		/*Using*/ Dim bstr = New BString
+			Dim bs As BSTR
+			VarBstrFromDec(dec, LOCALE_USER_DEFAULT, LOCALE_USE_NLS, bs)
+			bstr.Attach(bs)
+			ToString = bstr.ToString
+		bstr.Dispose() 'End Using
 	End Function
 
Index: trunk/Include/com/variant.ab
===================================================================
--- trunk/Include/com/variant.ab	(revision 476)
+++ trunk/Include/com/variant.ab	(revision 478)
@@ -1,9 +1,4 @@
 ' com/variant.ab
 
-#ifndef _COM_VARIANT_AB
-#define _COM_VARIANT_AB
-
-'#require <oaidl.ab>
-'#require <oleauto.ab>
 '#require <com/index.ab>
 
@@ -79,17 +74,17 @@
 	Sub Variant(bs As BString)
 		v.vt = VT_BSTR
-		SetPointer(VarPtr(v.val), SysAllocStringLen(bs.BStr, bs.Length))
-	End Sub
-
-	Sub Variant(p As *IUnknown)
-		p->AddRef()
+		SetPointer(VarPtr(v.val), bs.Copy))
+	End Sub
+
+	Sub Variant(unk As IUnknown)
+		If Not IsNothing(unk) Then unk.AddRef()
 		v.vt = VT_UNKNOWN
-		SetPointer(VarPtr(v.val), p)
-	End Sub
-
-	Sub Variant(p As *IDispatch)
-		p->AddRef()
+		SetPointer(VarPtr(v.val), ObjPtr(unk))
+	End Sub
+
+	Sub Variant(disp As IDispatch)
+		If Not IsNothing(disp) Then disp.AddRef()
 		v.vt = VT_DISPATCH
-		SetPointer(VarPtr(v.val), p)
+		SetPointer(VarPtr(v.val), ObjPtr(disp))
 	End Sub
 /*
@@ -284,5 +279,5 @@
 
 	Static Function Compare(x As Variant, y As Variant, lcid As LCID, flags As DWord) As HRESULT
-		Return VarCmp(x.v, y.v, lcid, flags)
+		Return VarCmp(removeNull(x).v, removeNull(y).v, lcid, flags)
 	End Function
 
@@ -290,64 +285,38 @@
 		Return VarCmp(x.v, y.v, LOCALE_USER_DEFAULT, 0) 'VARCMP_NULL = 3を返す場合があるので注意
 	End Function
-/*
+
 	Const Function Operator ==(y As Variant) As Boolean
 		Dim c = Compare(This, y)
-		If c = VARCMP_EQ Then
-			Return True
-		Else
-			Return False
-		End If
+		Return c = VARCMP_EQ
 	End Function
 
 	Const Function Operator <>(y As Variant) As Boolean
 		Dim c = Compare(This, y)
-		If c <> VARCMP_EQ Then
-			Return True
-		Else
-			Return False
-		End If
+		Return c <> VARCMP_EQ
 	End Function
 
 	Const Function Operator <(y As Variant) As Boolean
 		Dim c = Compare(This, y)
-		If c = VARCMP_LT Then
-			Return True
-		Else
-			Return False
-		End If
-	End Function
-/*
+		Return c = VARCMP_LT
+	End Function
+
 	Const Function Operator >(y As Variant) As Boolean
 		Dim c = Compare(This, y)
-		If c = VARCMP_GT Then
-			Return True
-		Else
-			Return False
-		End If
-	End Function
-*/
-/*
+		Return c = VARCMP_GT
+	End Function
+
 	Const Function Operator <=(y As Variant) As Boolean
 		Dim c = Compare(This, y)
-		If c = VARCMP_LT Or c = VARCMP_EQ Then
-			Return True
-		Else
-			Return False
-		End If
+		Return c = VARCMP_LT Or c = VARCMP_EQ
 	End Function
 
 	Const Function Operator >=(y As Variant) As Boolean
 		Dim c = Compare(This, y)
-		If c = VARCMP_GT Or c = VARCMP_EQ Then
-			Return True
-		Else
-			Return False
-		End If
-	End Function
-*/
+		Return c = VARCMP_GT Or c = VARCMP_EQ
+	End Function
+
 	Const Function ChangeType(vt As VARTYPE, flags As Word) As Variant
-		Dim ret = New Variant
-		ChangeType(ret, flags, vt)
-		Return ret
+		ChangeType = New Variant
+		ChangeType(ChangeType, flags, vt)
 	End Function
 
@@ -369,7 +338,7 @@
 
 	Override Function ToString() As String
-		Dim tmp = ChangeType(VT_BSTR, VARIANT_ALPHABOOL)
-		Dim bs = ((tmp.v.val As ULONG_PTR) As BSTR)
-		Return New String(bs As PCWSTR, SysStringLen(bs) As Long)
+		/*Using*/ Dim bs = ValStr
+		ToString = bs.ToString
+		bstr.Dispose() 'End Using
 	End Function
 
@@ -526,9 +495,8 @@
 
 	Const Function ValStr() As BString
+		ValStr = New BString
 		Dim r As VARIANT
 		ChangeType(r, VARIANT_ALPHABOOL, VT_BSTR)
-		Dim bs = New BString
-		bs.Attach(GetPointer(VarPtr(r.val)) As BSTR)
-		Return bs
+		ValStr.Attach(GetPointer(VarPtr(r.val)) As BSTR)
 	End Function
 
@@ -536,17 +504,23 @@
 		Clear()
 		v.vt = VT_BSTR
-		SetPointer(VarPtr(v.val), x.Copy())
-	End Sub
-
-	Const Function ValUnknown() As *IUnknown
+		If IsNothing(x) Then
+			SetPointer(VarPtr(v.val), SysAllocStringLen(0))
+		Else
+			SetPointer(VarPtr(v.val), x.Copy())
+		End If
+	End Sub
+
+	Const Function ValUnknown() As IUnknown
 		Dim r As VARIANT
 		ChangeType(r, 0, VT_UNKNOWN)
-		Return GetPointer(VarPtr(r.val)) As *IUnknown
-	End Function
-
-	Sub ValUnknown(x As *IUnknown)
-		Clear()
-		SetPointer(VarPtr(v.val), x)
-		x->AddRef()
+		Return _System_PtrUnknown(r.val As ULONG_PTR As VoidPtr)
+	End Function
+
+	Sub ValUnknown(x As IUnknown)
+		Clear()
+		SetPointer(VarPtr(v.val), ObjPtr(x))
+		If Not IsNothing(x) Then
+			x.AddRef()
+		End If
 		v.vt = VT_UNKNOWN
 	End Sub
@@ -587,10 +561,20 @@
 
 	Static Function OptionalParam() As Variant
-'		If _System_VariantOptionalParam = Nothing Then
-'			'ToDo マルチスレッド対応
-			VariantOptionalParam = New Variant
-			VariantOptionalParam.ValError = DISP_E_PARAMNOTFOUND
-'		End If
-		Return VariantOptionalParam
+		If IsNothing(optionalParam) Then
+			Dim t = New Variant
+			t.ValError = DISP_E_PARAMNOTFOUND
+			InterlockedCompareExchangePointer(ByVal VarPtr(optionalParam), ObjPtr(t), 0)
+		End If
+		Return optionalParam
+	End Function
+
+	Static Function Null() As Variant
+		If IsNothing(optionalParam) Then
+			Dim t = New Variant
+			Dim p = t.PtrToVariant
+			p->vt = VT_NULL
+			InterlockedCompareExchangePointer(ByVal VarPtr(optionalParam), ObjPtr(t), 0)
+		End If
+		Return optionalParam
 	End Function
 Private
@@ -605,7 +589,16 @@
 '		src.vt = VT_EMPTY
 	End Sub
+
+	Static Function removeNull(v As Variant) As Varinat
+		If IsNothing(v) Then
+			removeNull = Null
+		Else
+			removeNull = v
+		End If
+	End Function
+
+	Static optionalParam = Nothing As Variant
+	Static null = Nothing As Variant
 End Class
-
-Dim VariantOptionalParam = Nothing As Variant
 
 /*
@@ -629,4 +622,2 @@
 End Namespace 'COM
 End Namespace 'ActiveBasic
-
-#endif '_COM_VARIANT_AB
Index: trunk/Include/objidl.sbp
===================================================================
--- trunk/Include/objidl.sbp	(revision 476)
+++ trunk/Include/objidl.sbp	(revision 478)
@@ -160,5 +160,5 @@
 End Type
 
-Dim IID_IMultiQI = [&h00000020, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
+Dim IID_IMultiQI = [&h00000020, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
 Interface IMultiQI
 	Inherits IUnknown
@@ -169,7 +169,29 @@
 End Interface
 
-' AsyncIMultiQI
-
-' IInternalUnknown
+/* interface AsyncIMultiQI */
+/* [uuid][local][object] */ 
+
+
+Dim IID_AsyncIMultiQI = [&h000e0020, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
+Interface AsyncIMultiQI
+	Inherits IUnknown
+
+	Function Begin_QueryMultipleInterfaces(
+		/* [in] */ cMQIs As DWord,
+		/* [out][in] */ pMQIs As *MULTI_QI) As HRESULT
+	Function Finish_QueryMultipleInterfaces(
+		/* [out][in] */ pMQIs As *MULTI_QI) As HRESULT
+End Interface
+
+/* interface IInternalUnknown */
+/* [uuid][local][object] */ 
+Dim IID_IInternalUnknown = [&h00000021, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
+Interface IInternalUnknown
+	Inherits IUnknown
+
+	Function QueryInternalInterface(
+		/* [in] */ ByRef riid As IID,
+		/* [out] */ ByRef ppv As Any) As HRESULT
+End Interface
 
 /* interface IEnumUnknown */
@@ -180,5 +202,5 @@
 	Inherits IUnknown
 
-	/* [local] */ Function Next_(
+	/* [local] */ Function Next(
 		/* [in] */ celt As DWord,
 		/* [out] */ rgelt As *IUnknown,
@@ -307,5 +329,5 @@
 End Interface
 
-Dim IID_IPersist = [&h0000010c, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
+Dim IID_IPersist = [&h0000010c, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
 Interface IPersist
 	Inherits IUnknown
@@ -315,5 +337,5 @@
 End Interface
 
-Dim IID_IPersistStream = [&h00000109, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
+Dim IID_IPersistStream = [&h00000109, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
 Interface IPersistStream
 	Inherits IPersist
@@ -484,5 +506,5 @@
 End Enum
 
-Dim IID_IStream = [&h0000000c, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
+Dim IID_IStream = [&h0000000c, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
 Interface IStream
 	Inherits ISequentialStream
@@ -552,5 +574,5 @@
 TypeDef SNB = /* [wire_marshal] */ **OLECHAR
 
-Dim IID_IStorage = [&h0000000b, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
+Dim IID_IStorage = [&h0000000b, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
 Interface IStorage
 	Inherits IUnknown
@@ -905,5 +927,5 @@
 TypeDef LPINTERFACEINFO = *INTERFACEINFO
 
-Dim IID_IMessageFilter = [&h00000016, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
+Dim IID_IMessageFilter = [&h00000016, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
 Interface IMessageFilter
 	Inherits IUnknown
@@ -966,5 +988,19 @@
 ' ISurrogate
 
-' IGlobalInterfaceTable
+Dim IID_IGlobalInterfaceTable = [&h00000146, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
+Interface IGlobalInterfaceTable 
+	Inherits IUnknown
+
+	Function RegisterInterfaceInGlobal(
+		/* [in] */ unk As IUnknown,
+		/* [in] */ ByRef riid As IID,
+		/* [out] */ ByRef dwCookie As DWord) As HRESULT
+	Function RevokeInterfaceFromGlobal(
+		/* [in] */ dwCookie As DWord) As HRESULT
+	Function GetInterfaceFromGlobal(
+		/* [in] */ dwCookie As DWord,
+		/* [in] */ ByRef riid As IID,
+		/* [iid_is][out] */ ByRef ppv As Any) As HRESULT
+End Interface
 
 ' IDirectWriterLock
Index: trunk/Include/ole2.ab
===================================================================
--- trunk/Include/ole2.ab	(revision 476)
+++ trunk/Include/ole2.ab	(revision 478)
@@ -8,5 +8,5 @@
 #require <objbase.sbp>
 #require <oleauto.ab>
-
+#ifdef __UNDEFINED '#165が解決するまでの暫定
 ' View OBJECT Error Codes
 
@@ -56,10 +56,10 @@
 
 /* helper functions */
-Declare Function ReadClassStg Lib "ole32.dll" (/*IN*/ ByVal pStg As *IStorage, /*OUT*/ ByRef clsid As CLSID) As HRESULT
-Declare Function WriteClassStg Lib "ole32.dll" (/*IN*/ ByVal pStg As *IStorage, /*IN*/ ByRef clsid As CLSID) As HRESULT
-Declare Function ReadClassStm Lib "ole32.dll" (/*IN*/ ByVal pStm As *IStream, /*OUT*/ ByRef clsid As CLSID) As HRESULT
-Declare Function WriteClassStm Lib "ole32.dll" (/*IN*/ ByVal pStm As *IStream, /*IN*/ ByRef clsid As CLSID) As HRESULT
-Declare Function WriteFmtUserTypeStg Lib "ole32.dll" (/*IN*/ ByVal pstg As *IStorage, /*IN*/ ByVal cf As CLIPFORMAT, /*IN*/ ByVal pszUserType As *OLECHAR) As HRESULT
-Declare Function ReadFmtUserTypeStg Lib "ole32.dll" (/*IN*/ ByVal pstg As *IStorage, /*OUT*/ ByRef cf As CLIPFORMAT, /*OUT*/ ByRef rpszUserType As *OLECHAR) As HRESULT
+Declare Function ReadClassStg Lib "ole32.dll" (/*IN*/ ByVal stg As IStorage, /*OUT*/ ByRef clsid As CLSID) As HRESULT
+Declare Function WriteClassStg Lib "ole32.dll" (/*IN*/ ByVal stg As IStorage, /*IN*/ ByRef clsid As CLSID) As HRESULT
+Declare Function ReadClassStm Lib "ole32.dll" (/*IN*/ ByVal stm As IStream, /*OUT*/ ByRef clsid As CLSID) As HRESULT
+Declare Function WriteClassStm Lib "ole32.dll" (/*IN*/ ByVal stm As IStream, /*IN*/ ByRef clsid As CLSID) As HRESULT
+Declare Function WriteFmtUserTypeStg Lib "ole32.dll" (/*IN*/ ByVal stg As IStorage, /*IN*/ ByVal cf As CLIPFORMAT, /*IN*/ ByVal pszUserType As *OLECHAR) As HRESULT
+Declare Function ReadFmtUserTypeStg Lib "ole32.dll" (/*IN*/ ByVal stg As IStorage, /*OUT*/ ByRef cf As CLIPFORMAT, /*OUT*/ ByRef rpszUserType As *OLECHAR) As HRESULT
 
 
@@ -73,104 +73,104 @@
    the data object */
 
-Declare Function OleQueryLinkFromData Lib "ole32" (/*IN*/ ByVal pSrcDataObject As *IDataObject) As HRESULT
-Declare Function OleQueryCreateFromData Lib "ole32.dll" (/*IN*/ ByVal pSrcDataObject As *IDataObject) As HRESULT
+Declare Function OleQueryLinkFromData Lib "ole32" (/*IN*/ ByVal srcDataObject As IDataObject) As HRESULT
+Declare Function OleQueryCreateFromData Lib "ole32.dll" (/*IN*/ ByVal srcDataObject As IDataObject) As HRESULT
 
 
 /* Object creation APIs */
 
-Declare Function OleCreate Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByRef riid As IID, /*IN*/ ByVal renderopt As DWord, _
-                /*IN*/ ByVal pFormatEtc As *FORMATETC, /*IN*/ ByVal pClientSite As *IOleClientSite, _
-                /*IN*/ ByVal pStg As *IStorage, /*OUT*/ ByRef ppvObj As Any) As HRESULT
+Declare Function OleCreate Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByRef riid As IID, /*IN*/ ByVal renderopt As DWord,
+	/*IN*/ ByVal pFormatEtc As *FORMATETC, /*IN*/ ByVal clientSite As IOleClientSite,
+	/*IN*/ ByVal stg As IStorage, /*OUT*/ ByRef ppvObj As Any) As HRESULT
 
 Declare Function OleCreateEx Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByRef riid As IID, /*IN*/ ByVal dwFlags As DWord,
-                /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord,
-                /*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal pAdviseSink As *IAdviseSink,
-                /*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal pClientSite As *IOleClientSite,
-                /*IN*/ ByVal pStg As *IStorage, /*OUT*/ ByRef ppvObj As Any) As HRESULT
-
-Declare Function OleCreateFromData Lib "ole32.dll" (/*IN*/ ByVal pSrcDataObj As *IDataObject, /*IN*/ ByRef riid As IID,
-                /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC,
-                /*IN*/ ByVal pClientSite As *IOleClientSite, /*IN*/ ByVal pStg As *IStorage,
-                /*OUT*/ ByRef ppvObj As Any) As HRESULT
-
-Declare Function OleCreateFromDataEx Lib "ole32.dll" (/*IN*/ ByVal pSrcDataObj As *IDataObject, /*IN*/ ByRef riid As IID,
-                /*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord,
-                /*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal pAdviseSink As *IAdviseSink,
-                /*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal pClientSite As *IOleClientSite,
-                /*IN*/ ByVal pStg As *IStorage, /*OUT*/ ByRef ppvObj As Any) As HRESULT
-
-Declare Function OleCreateLinkFromData Lib "ole32.dll" (/*IN*/ ByVal pSrcDataObj As *IDataObject, /*IN*/ ByRef riid As IID,
-                /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC,
-                /*IN*/ ByVal pClientSite As *IOleClientSite, /*IN*/ ByVal pStg As *IStorage,
-                /*OUT*/ ByRef ppvObj As Any) As HRESULT
-
-Declare Function OleCreateLinkFromDataEx Lib "ole32.dll" (/*IN*/ ByVal pSrcDataObj As *IDataObject, /*IN*/ ByRef riid As IID,
-                /*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord,
-                /*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal pAdviseSink As *IAdviseSink,
-                /*OUT IN*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal pClientSite As *IOleClientSite,
-                /*IN*/ ByVal pStg As *IStorage, /*OUT*/ ByRef ppvObj As Any) As HRESULT
-
-Declare Function OleCreateStaticFromData Lib "ole32.dll" (/*IN*/ ByVal pSrcDataObj As *IDataObject, /*IN*/ ByRef riid As IID,
-                /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC,
-                /*IN*/ ByVal pClientSite As *IOleClientSite, /*IN*/ ByVal pStg As *IStorage,
-                /*OUT*/ ByRef ppvObj As Any) As HRESULT
-
-
-Declare Function OleCreateLink Lib "ole32.dll" (/*IN*/ ByVal pmkLinkSrc As *IMoniker, /*IN*/ ByRef riid As IID,
-            /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC,
-            /*IN*/ ByVal pClientSite As *IOleClientSite, /*IN*/ ByVal pDataObj As *IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT
-
-Declare Function OleCreateLinkEx Lib "ole32.dll" (/*IN*/ ByVal pmkLinkSrc As *IMoniker, /*IN*/ ByRef riid As IID,
-            /*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord,
-            /*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal pAdviseSink As *IAdviseSink,
-            /*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal pClientSite As *IOleClientSite,
-            /*IN*/ ByVal pDataObj As *IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT
+	/*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord,
+	/*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal adviseSink As IAdviseSink,
+	/*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal clientSite As IOleClientSite,
+	/*IN*/ ByVal stg As IStorage, /*OUT*/ ByRef ppvObj As Any) As HRESULT
+
+Declare Function OleCreateFromData Lib "ole32.dll" (/*IN*/ ByVal srcDataObj As IDataObject, /*IN*/ ByRef riid As IID,
+	/*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC,
+	/*IN*/ ByVal clientSite As IOleClientSite, /*IN*/ ByVal stg As IStorage,
+	/*OUT*/ ByRef ppvObj As Any) As HRESULT
+
+Declare Function OleCreateFromDataEx Lib "ole32.dll" (/*IN*/ ByVal srcDataObj As IDataObject, /*IN*/ ByRef riid As IID,
+	/*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord,
+	/*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal adviseSink As IAdviseSink,
+	/*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal clientSite As IOleClientSite,
+	/*IN*/ ByVal stg As IStorage, /*OUT*/ ByRef ppvObj As Any) As HRESULT
+
+Declare Function OleCreateLinkFromData Lib "ole32.dll" (/*IN*/ ByVal srcDataObj As IDataObject, /*IN*/ ByRef riid As IID,
+	/*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC,
+	/*IN*/ ByVal clientSite As IOleClientSite, /*IN*/ ByVal stg As IStorage,
+	/*OUT*/ ByRef ppvObj As Any) As HRESULT
+
+Declare Function OleCreateLinkFromDataEx Lib "ole32.dll" (/*IN*/ ByVal srcDataObj As IDataObject, /*IN*/ ByRef riid As IID,
+	/*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord,
+	/*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal adviseSink As IAdviseSink,
+	/*OUT IN*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal clientSite As IOleClientSite,
+	/*IN*/ ByVal stg As IStorage, /*OUT*/ ByRef ppvObj As Any) As HRESULT
+
+Declare Function OleCreateStaticFromData Lib "ole32.dll" (/*IN*/ ByVal srcDataObj As IDataObject, /*IN*/ ByRef riid As IID,
+	/*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC,
+	/*IN*/ ByVal clientSite As IOleClientSite, /*IN*/ ByVal stg As IStorage,
+	/*OUT*/ ByRef ppvObj As Any) As HRESULT
+
+
+Declare Function OleCreateLink Lib "ole32.dll" (/*IN*/ ByVal mkLinkSrc As IMoniker, /*IN*/ ByRef riid As IID,
+	/*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC,
+	/*IN*/ ByVal clientSite As IOleClientSite, /*IN*/ ByVal dataObj As IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT
+
+Declare Function OleCreateLinkEx Lib "ole32.dll" (/*IN*/ ByVal mkLinkSrc As IMoniker, /*IN*/ ByRef riid As IID,
+	/*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord,
+	/*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal adviseSink As IAdviseSink,
+	/*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal clientSite As IOleClientSite,
+	/*IN*/ ByVal dataObj As IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT
 
 Declare Function OleCreateLinkToFile Lib "ole32.dll" (/*IN*/ ByVal lpszFileName As LPCOLESTR, /*IN*/ ByRef riid As IID,
-            /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC,
-            /*IN*/ ByVal pClientSite As *IOleClientSite, /*IN*/ ByVal pDataObj As *IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT
+	/*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC,
+	/*IN*/ ByVal clientSite As IOleClientSite, /*IN*/ ByValdataObj As IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT
 
 Declare Function OleCreateLinkToFileEx Lib "ole32.dll" (/*IN*/ ByVal lpszFileName As LPCOLESTR, /*IN*/ ByRef riid As IID,
-            /*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord,
-            /*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal pAdviseSink As *IAdviseSink,
-            /*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal pClientSite As *IOleClientSite,
-            /*IN*/ ByVal pDataObj As *IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT
+	/*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord,
+	/*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal adviseSink As IAdviseSink,
+	/*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal clientSite As IOleClientSite,
+	/*IN*/ ByVal dataObj As IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT
 
 Declare Function OleCreateFromFile Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByVal lpszFileName As LPOLESTR, /*IN*/ ByRef riid As IID,
-            /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC,
-            /*IN*/ ByVal pClientSite As *IOleClientSite, /*IN*/ ByVal pDataObj As *IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT
+	/*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC,
+	/*IN*/ ByVal clientSite As IOleClientSite, /*IN*/ ByVal dataObj As IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT
 
 Declare Function OleCreateFromFileEx Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByVal lpszFileName As LPOLESTR, /*IN*/ ByRef riid As IID,
-            /*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord,
-            /*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal pAdviseSink As *IAdviseSink,
-            /*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal pClientSite As *IOleClientSite,
-            /*IN*/ ByVal pDataObj As *IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT
-
-Declare Function OleLoad Lib "ole32.dll" (/*IN*/ ByVal pStg As *IStorage, /*IN*/ ByRef riid As IID, /*IN*/ ByVal pClientSite As *IOleClientSite,
-            /*OUT*/ ByRef ppvObj As Any) As HRESULT
-
-Declare Function OleSave Lib "ole32.dll" (/*IN*/ ByVal pPS As *IPersistStorage, /*IN*/ ByVal pStg As *IStorage, /*IN*/ fSameAsLoad As BOOL) As HRESULT
-
-Declare Function OleLoadFromStream Lib "ole32.dll" ( /*IN*/ ByVal pStm As *IStream, /*IN*/ ByRef iidInterface As IID, /*OUT*/ ByRef ppvObj As Any) As HRESULT
-Declare Function OleSaveToStream Lib "ole32.dll" ( /*IN*/ ByVal pPStm As *IPersistStream, /*IN*/ ByVal pStm As *IStream) As HRESULT
-
-
-Declare Function OleSetContainedObject Lib "ole32.dll" (/*IN*/ ByVal pUnknown As *IUnknown, /*IN*/ ByVal fContained As BOOL) As HRESULT
-Declare Function OleNoteObjectVisible Lib "ole32.dll" (/*IN*/ ByVal pUnknown As *IUnknown, /*IN*/ ByVal fContained As BOOL) As HRESULT
+	/*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord,
+	/*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal adviseSink As IAdviseSink,
+	/*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal clientSite As IOleClientSite,
+	/*IN*/ ByVal dataObj As IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT
+
+Declare Function OleLoad Lib "ole32.dll" (/*IN*/ ByVal stg As IStorage, /*IN*/ ByRef riid As IID, /*IN*/ ByVal clientSite As IOleClientSite,
+	/*OUT*/ ByRef ppvObj As Any) As HRESULT
+
+Declare Function OleSave Lib "ole32.dll" (/*IN*/ ByVal ps As IPersistStorage, /*IN*/ ByVal stg As IStorage, /*IN*/ fSameAsLoad As BOOL) As HRESULT
+
+Declare Function OleLoadFromStream Lib "ole32.dll" ( /*IN*/ ByVal stm As IStream, /*IN*/ ByRef iidInterface As IID, /*OUT*/ ByRef ppvObj As Any) As HRESULT
+Declare Function OleSaveToStream Lib "ole32.dll" ( /*IN*/ ByVal pstm As IPersistStream, /*IN*/ ByVal stm As IStream) As HRESULT
+
+
+Declare Function OleSetContainedObject Lib "ole32.dll" (/*IN*/ ByVal unknown As IUnknown, /*IN*/ ByVal fContained As BOOL) As HRESULT
+Declare Function OleNoteObjectVisible Lib "ole32.dll" (/*IN*/ ByVal unknown As IUnknown, /*IN*/ ByVal fContained As BOOL) As HRESULT
 
 
 /* Drag/Drop APIs */
 
-Declare Function RegisterDragDrop Lib "ole32.dll" (/*IN*/ ByVal hwnd As HWND, /*IN*/ ByVal pDropTarget As *IDropTarget) As HRESULT
+Declare Function RegisterDragDrop Lib "ole32.dll" (/*IN*/ ByVal hwnd As HWND, /*IN*/ ByVal dropTarget As IDropTarget) As HRESULT
 Declare Function RevokeDragDrop Lib "ole32.dll" (/*IN*/ ByVal hwnd As HWND) As HRESULT
-Declare Function DoDragDrop Lib "ole32.dll" (/*IN*/ ByVal pDataObj As *IDataObject, /*IN*/ ByVal pDropSource As *IDropSource,
-            /*IN*/ ByVal dwOKEffects As DWord, /*OUT*/ ByRef dwEffect As DWord) As HRESULT
+Declare Function DoDragDrop Lib "ole32.dll" (/*IN*/ ByVal dataObj As IDataObject, /*IN*/ ByVal dropSource As IDropSource,
+	/*IN*/ ByVal dwOKEffects As DWord, /*OUT*/ ByRef dwEffect As DWord) As HRESULT
 
 /* Clipboard APIs */
 
-Declare Function OleSetClipboard Lib "ole32.dll" (/*IN*/ ByVal pDataObj As *IDataObject) As HRESULT
-Declare Function OleGetClipboard Lib "ole32.dll" (/*OUT*/ ByRef pDataObj As *IDataObject) As HRESULT
+Declare Function OleSetClipboard Lib "ole32.dll" (/*IN*/ ByVal dataObj As IDataObject) As HRESULT
+Declare Function OleGetClipboard Lib "ole32.dll" (/*OUT*/ ByRef dataObj As IDataObject) As HRESULT
 Declare Function OleFlushClipboard Lib "ole32.dll" () As HRESULT
-Declare Function OleIsCurrentClipboard Lib "ole32.dll" (/*IN*/ ByVal pDataObj As *IDataObject) As HRESULT
+Declare Function OleIsCurrentClipboard Lib "ole32.dll" (/*IN*/ ByVal dataObj As IDataObject) As HRESULT
 
 
@@ -189,37 +189,37 @@
 End Type
 Declare Function OleCreateMenuDescriptor Lib "ole32.dll" (/*IN*/ ByVal hmenuCombined As HMENU,
-                                /*IN*/ ByRef MenuWidths As OLEMENUGROUPWIDTHS) As HOLEMENU
+	/*IN*/ ByRef MenuWidths As OLEMENUGROUPWIDTHS) As HOLEMENU
 Declare Function OleSetMenuDescriptor Lib "ole32.dll" (/*IN*/ ByVal holemenu As HOLEMENU, /*IN*/ ByVal hwndFrame As HWND,
-                                /*IN*/ ByVal hwndActiveObject As HWND,
-                                /*IN*/ ByVal pFrame As *IOleInPlaceFrame,
-                                /*IN*/ ByVal pActiveObj As *IOleInPlaceActiveObject) As HRESULT
+	/*IN*/ ByVal hwndActiveObject As HWND,
+	/*IN*/ ByVal frame As IOleInPlaceFrame,
+	/*IN*/ ByVal activeObj As IOleInPlaceActiveObject) As HRESULT
 Declare Function OleDestroyMenuDescriptor Lib "ole32.dll" (/*IN*/ ByVal holemenu As HOLEMENU) As HRESULT
 
-Declare Function OleTranslateAccelerator Lib "ole32.dll" (/*IN*/ ByVal pFrame As *IOleInPlaceFrame,
-                            /*IN*/ ByRef FrameInfo As OLEINPLACEFRAMEINFO, /*IN*/ ByRef msg As MSG) As HRESULT
+Declare Function OleTranslateAccelerator Lib "ole32.dll" (/*IN*/ ByVal frame As IOleInPlaceFrame,
+	/*IN*/ ByRef FrameInfo As OLEINPLACEFRAMEINFO, /*IN*/ ByRef msg As MSG) As HRESULT
 
 
 /* Helper APIs */
 Declare Function OleDuplicateData Lib "ole32.dll" (/*IN*/ ByVal hSrc As HANDLE, /*IN*/ ByVal cfFormat As CLIPFORMAT,
-                        /*IN*/ ByVal uiFlags As DWord) As HANDLE
-
-Declare Function OleDraw Lib "ole32.dll" (/*IN*/ ByVal pUnknown As *IUnknown, /*IN*/ ByVal dwAspect As DWord, /*IN*/ ByVal hdcDraw As HDC,
-                    /*IN*/ ByRef rcBounds As RECT) As HRESULT
-
-Declare Function OleRun Lib "ole32.dll" (/*IN*/ ByVal pUnknown As *IUnknown) As HRESULT
-Declare Function OleIsRunning Lib "ole32.dll" (/*IN*/ ByVal pObject As *IOleObject) As BOOL
-Declare Function OleLockRunning Lib "ole32.dll" (/*IN*/ ByVal pUnknown As *IUnknown, /*IN*/ ByVal fLock As BOOL, /*IN*/ ByVal fLastUnlockCloses As BOOL) As HRESULT
+	/*IN*/ ByVal uiFlags As DWord) As HANDLE
+
+Declare Function OleDraw Lib "ole32.dll" (/*IN*/ ByVal unknown As IUnknown, /*IN*/ ByVal dwAspect As DWord, /*IN*/ ByVal hdcDraw As HDC,
+	/*IN*/ ByRef rcBounds As RECT) As HRESULT
+
+Declare Function OleRun Lib "ole32.dll" (/*IN*/ ByVal unknown As IUnknown) As HRESULT
+Declare Function OleIsRunning Lib "ole32.dll" (/*IN*/ ByVal object As IOleObject) As BOOL
+Declare Function OleLockRunning Lib "ole32.dll" (/*IN*/ ByVal unknown As IUnknown, /*IN*/ ByVal fLock As BOOL, /*IN*/ ByVal fLastUnlockCloses As BOOL) As HRESULT
 Declare Sub      ReleaseStgMedium Lib "ole32.dll" (/*IN*/ ByRef medium As STGMEDIUM)
-Declare Function CreateOleAdviseHolder Lib "ole32.dll" (/*OUT*/ ByRef pOAHolder As *IOleAdviseHolder) As HRESULT
-
-Declare Function OleCreateDefaultHandler Lib "ole32.dll" (/*IN*/ ByRef clsid As CLSID, /*IN*/ ByVal pUnkOuter As *IUnknown,
-                    /*IN*/ ByRef riid As IID, /*OUT*/ ByRef pObj As Any) As HRESULT
-
-Declare Function OleCreateEmbeddingHelper Lib "ole32.dll" (/*IN*/ ByRef clsid As CLSID, /*IN*/ ByVal pUnkOuter As *IUnknown,
-                    /*IN*/ ByVal flags As DWord, /*IN*/ ByVal pCF As *IClassFactory,
-                    /*IN*/ ByRef riid As IID, /*OUT*/ ByRef pObj As Any) As HRESULT
+Declare Function CreateOleAdviseHolder Lib "ole32.dll" (/*OUT*/ ByRef oaHolder As IOleAdviseHolder) As HRESULT
+
+Declare Function OleCreateDefaultHandler Lib "ole32.dll" (/*IN*/ ByRef clsid As CLSID, /*IN*/ ByVal unkOuter As IUnknown,
+	/*IN*/ ByRef riid As IID, /*OUT*/ ByRef pObj As Any) As HRESULT
+
+Declare Function OleCreateEmbeddingHelper Lib "ole32.dll" (/*IN*/ ByRef clsid As CLSID, /*IN*/ ByVal ukOuter As IUnknown,
+	/*IN*/ ByVal flags As DWord, /*IN*/ ByVal cf As IClassFactory,
+	/*IN*/ ByRef riid As IID, /*OUT*/ ByRef pObj As Any) As HRESULT
 
 Declare Function IsAccelerator Lib "ole32.dll" (/*IN*/ ByVal hAccel As HACCEL, /*IN*/ ByVal cAccelEntries As Long, /*IN*/ ByRef msg As MSG,
-                                        /*OUT*/ ByVal pwCmd As *Word) As BOOL
+	/*OUT*/ ByVal pwCmd As *Word) As BOOL
 /* Icon extraction Helper APIs */
 
@@ -227,8 +227,8 @@
 
 Declare Function OleGetIconOfClass Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByVal lpszLabel As LPOLESTR,
-                                        /*IN*/ ByVal fUseTypeAsLabel As BOOL) As HGLOBAL
+	/*IN*/ ByVal fUseTypeAsLabel As BOOL) As HGLOBAL
 
 Declare Function OleMetafilePictFromIconAndLabel Lib "ole32.dll" (/*IN*/ ByVal hIcon As HICON, /*IN*/ ByVal lpszLabel As LPOLESTR,
-                                        /*IN*/ ByVal lpszSourceFile As LPOLESTR, /*IN*/ ByVal iIconIndex As DWord) As HGLOBAL
+	/*IN*/ ByVal lpszSourceFile As LPOLESTR, /*IN*/ ByVal iIconIndex As DWord) As HGLOBAL
 
 
@@ -237,11 +237,11 @@
 
 Declare Function OleRegGetUserType Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByVal dwFormOfType As DWord,
-                                        /*OUT*/ ByVal pszUserType As LPOLESTR) As HRESULT
+	/*OUT*/ ByVal pszUserType As LPOLESTR) As HRESULT
 
 Declare Function OleRegGetMiscStatus Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByVal dwAspect As DWord,
-                                        /*OUT*/ ByRef dwStatus As DWord) As HRESULT
+	/*OUT*/ ByRef dwStatus As DWord) As HRESULT
 
 Declare Function OleRegEnumFormatEtc Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByVal dwDirection As DWord,
-                                        /*OUT*/ ByRef penum As *IEnumFORMATETC) As HRESULT
+	/*OUT*/ ByRef penum As *IEnumFORMATETC) As HRESULT
 
 Declare Function OleRegEnumVerbs Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*OUT*/ ByRef penum As *IEnumOLEVERB) As HRESULT
@@ -259,12 +259,12 @@
 
 
-Declare Function OleConvertOLESTREAMToIStorage Lib "ole32.dll" ( _
-    /*IN*/ ByVal lpolestream As LPOLESTREAM,
-    /*OUT*/ ByVal pstg As *IStorage,
-    /*IN*/ ByRef td As DVTARGETDEVICE) As HRESULT
-
-Declare Function OleConvertIStorageToOLESTREAM Lib "ole32.dll" ( _
-    /*IN*/ ByVal pstg As *IStorage,
-    /*OUT*/ ByVal lpolestream As LPOLESTREAM) As HRESULT
+Declare Function OleConvertOLESTREAMToIStorage Lib "ole32.dll" (
+	/*IN*/ ByVal lpolestream As LPOLESTREAM,
+	/*OUT*/ ByVal stg As IStorage,
+	/*IN*/ ByRef td As DVTARGETDEVICE) As HRESULT
+
+Declare Function OleConvertIStorageToOLESTREAM Lib "ole32.dll" (
+	/*IN*/ ByVal stg As IStorage,
+	/*OUT*/ ByVal lpolestream As LPOLESTREAM) As HRESULT
 
 
@@ -272,40 +272,40 @@
 Declare Function GetHGlobalFromILockBytes Lib "ole32.dll" (/*IN*/ ByVal plkbyt As *ILockBytes, /*OUT*/ ByRef hglobal As HGLOBAL) As HRESULT
 Declare Function CreateILockBytesOnHGlobal Lib "ole32.dll" (/*IN*/ ByVal hGlobal As HGLOBAL, /*IN*/ ByVal fDeleteOnRelease As BOOL,
-                                    /*OUT*/ ByRef pplkbyt As *ILockBytes) As HRESULT
+	/*OUT*/ ByRef lkbyt As ILockBytes) As HRESULT
 
 Declare Function GetHGlobalFromStream Lib "ole32.dll" (/*IN*/ ByVal pstm As *IStream, /*OUT*/ ByRef hglobal As HGLOBAL) As HRESULT
 Declare Function CreateStreamOnHGlobal Lib "ole32.dll" (/*IN*/ ByVal hGlobal As HGLOBAL, /*IN*/ ByVal fDeleteOnRelease As BOOL,
-                                /*OUT*/ ByRef pstm As *IStream) As HRESULT
+	/*OUT*/ ByRef stm As IStream) As HRESULT
 
 
 /* ConvertTo APIS */
 
-Declare Function OleDoAutoConvert Lib "ole32.dll" (/*IN*/ ByRef pStg As *IStorage, /*OUT*/ ByRef ClsidNew As CLSID) As HRESULT
+Declare Function OleDoAutoConvert Lib "ole32.dll" (/*IN*/ ByRef stg As IStorage, /*OUT*/ ByRef ClsidNew As CLSID) As HRESULT
 Declare Function OleGetAutoConvert Lib "ole32.dll" (/*IN*/ ByRef clsidOld As CLSID, /*OUT*/ ByRef ClsidNew As CLSID) As HRESULT
 Declare Function OleSetAutoConvert Lib "ole32.dll" (/*IN*/ ByRef clsidOld As CLSID, /*IN*/ ByRef ClsidNew As CLSID) As HRESULT
-Declare Function GetConvertStg Lib "ole32.dll" (/*IN*/ ByVal pStg As *IStorage) As HRESULT
-Declare Function SetConvertStg Lib "ole32.dll" (/*IN*/ ByVal pStg As *IStorage, /*IN*/ fConvert As BOOL) As HRESULT
+Declare Function GetConvertStg Lib "ole32.dll" (/*IN*/ ByVal stg As IStorage) As HRESULT
+Declare Function SetConvertStg Lib "ole32.dll" (/*IN*/ ByVal stg As IStorage, /*IN*/ fConvert As BOOL) As HRESULT
 
 
 Declare Function OleConvertIStorageToOLESTREAMEx Lib "ole32.dll" ( _
-    /*IN*/ ByVal pstg As *IStorage,       ' Presentation data to OLESTREAM
-    /*IN*/ ByVal cfFormat As CLIPFORMAT,  '       format
-    /*IN*/ ByVal lWidth As Long,          '       width
-    /*IN*/ ByVal lHeight As Long,         '       height
-    /*IN*/ ByVal dwSize As DWORD,         '       size in bytes
-    /*IN*/ ByRef medium As STGMEDIUM,     '       bits
-    /*OUT*/ ByVal polestm As LPOLESTREAM) As HRESULT
+	/*IN*/ ByVal stg As IStorage,       ' Presentation data to OLESTREAM
+	/*IN*/ ByVal cfFormat As CLIPFORMAT,  '       format
+	/*IN*/ ByVal lWidth As Long,          '       width
+	/*IN*/ ByVal lHeight As Long,         '       height
+	/*IN*/ ByVal dwSize As DWORD,         '       size in bytes
+	/*IN*/ ByRef medium As STGMEDIUM,     '       bits
+	/*OUT*/ ByVal polestm As LPOLESTREAM) As HRESULT
 
 Declare Function OleConvertOLESTREAMToIStorageEx Lib "ole32.dll" ( _
-    /*IN*/ ByVal polestm As LPOLESTREAM,
-    /*OUT*/ ByVal pstg As *IStorage,' Presentation data from OLESTREAM
-    /*OUT*/ ByRef pcfFormat As CLIPFORMAT, '       format
-    /*OUT*/ ByRef plwWidth As Long,        '       width
-    /*OUT*/ ByRef plHeight As Long,        '       height
-    /*OUT*/ ByRef pdwSize As DWord,        '       size in bytes
-    /*OUT*/ ByRef medium As STGMEDIUM) As HRESULT   '      bits
+	/*IN*/ ByVal polestm As LPOLESTREAM,
+	/*OUT*/ ByVal pstg As *IStorage,' Presentation data from OLESTREAM
+	/*OUT*/ ByRef pcfFormat As CLIPFORMAT, '       format
+	/*OUT*/ ByRef plwWidth As Long,        '       width
+	/*OUT*/ ByRef plHeight As Long,        '       height
+	/*OUT*/ ByRef pdwSize As DWord,        '       size in bytes
+	/*OUT*/ ByRef medium As STGMEDIUM) As HRESULT   '      bits
 
 ' olectl.h
-Declare Function OleLoadPicture Lib "olepro32" (pStream As *IStream, lSize As Long, fRunmode As BOOL, ByRef riid As IID, ppvObj As VoidPtr) As HRESULT
-
+Declare Function OleLoadPicture Lib "olepro32" (stream As IStream, lSize As Long, fRunmode As BOOL, ByRef riid As IID, ppvObj As VoidPtr) As HRESULT
+#endif '__UNDEFINED
 #endif ' __OLE2_AB__
Index: trunk/Include/oleidl.ab
===================================================================
--- trunk/Include/oleidl.ab	(revision 476)
+++ trunk/Include/oleidl.ab	(revision 478)
@@ -130,5 +130,5 @@
 End Enum
 
-Dim IID_IOleObject = [&h00000112, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
+Dim IID_IOleObject = [&h00000112, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
 Interface IOleObject
 	Inherits IUnknown
Index: trunk/Include/system/string.sbp
===================================================================
--- trunk/Include/system/string.sbp	(revision 476)
+++ trunk/Include/system/string.sbp	(revision 478)
@@ -5,8 +5,5 @@
 #define _INC_BASIC_STRING
 
-#require <Classes/System/String.ab>
-#require <Classes/System/Text/StringBuilder.ab>
-
-Function StrPtr(s As String) As *StrChar
+Function StrPtr(s As String) As *Char
 	If Not ActiveBasic.IsNothing(s) Then
 		StrPtr = s.StrPtr
@@ -62,7 +59,7 @@
 出力関数: wcs(z)出力GetStr, mbs(z)出力GetStr,
           wcs(z)出力GetStrNT, mbs(z)出力GetStrNT,
-          GetWCStr, GetMBStr, GetTCStr, GetSCStr,
-          ToWCStr, ToMBStr, ToTCStr, ToSCStr
-で、5 * 12 = 60通り。
+          GetWCStr, GetMBStr, GetTCStr,
+          ToWCStr, ToMBStr, ToTCStr,
+で、5 * 10 = 50通り。
 */
 
@@ -261,24 +258,4 @@
 End Function
 
-Function GetSCStr(mbszSrc As PSTR, ByRef ssDst As *StrChar) As SIZE_T
-	Return GetStr(mbszSrc, ssDst)
-End Function
-
-Function GetSCStr(mbsSrc As PSTR, len As SIZE_T, ByRef ssDst As *StrChar) As SIZE_T
-	Return GetStr(mbsSrc, len, ssDst)
-End Function
-
-Function GetSCStr(wcszSrc As PWSTR, ByRef ssDst As *StrChar) As SIZE_T
-	Return GetStr(wcszSrc, ssDst)
-End Function
-
-Function GetSCStr(wcsSrc As PWSTR, len As SIZE_T, ByRef ssDst As *StrChar) As SIZE_T
-	Return GetStr(wcsSrc, len, ssDst)
-End Function
-
-Function GetSCStr(strSrc As String, ByRef ssDst As *StrChar) As SIZE_T
-	Return GetStr(strSrc.StrPtr, strSrc.Length As SIZE_T, ssDst)
-End Function
-
 Function ToWCStr(mbsz As PSTR) As PWSTR
 	GetStrNT(mbsz, ToWCStr)
@@ -339,24 +316,4 @@
 Function ToTCStr(s As String) As PCTSTR
 	GetStrNT(s, ToTCStr)
-End Function
-
-Function ToSCStr(mbsz As PSTR) As *StrChar
-	GetStrNT(mbsz, ToSCStr)
-End Function
-
-Function ToSCStr(mbs As PSTR, len As SIZE_T) As *StrChar
-	GetStrNT(mbs, len, ToSCStr)
-End Function
-
-Function ToSCStr(wcsz As PWSTR) As *StrChar
-	GetStrNT(wcsz, ToSCStr)
-End Function
-
-Function ToSCStr(wcs As PWSTR, len As SIZE_T) As *StrChar
-	GetStrNT(wcs, len, ToSCStr)
-End Function
-
-Function ToSCStr(s As String) As *StrChar
-	ToSCStr = StrPtr(s)
 End Function
 
