Changeset 335
- Timestamp:
- Sep 18, 2007, 12:10:41 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/ActiveBasic/Windows/CriticalSection.ab
r303 r335 53 53 54 54 /*Override*/ Sub Dispose() 55 ' Dim p = ActiveBasic.Windows.Detail.InterlockedExchangeAnyPointer(pcs, 0)56 Dim p = InterlockedExchangePointer(pcs As VoidPtr, 0) As *CRITICAL_SECTION57 If p <> 0 Then58 LeaveCriticalSection(ByVal p )55 ' Dim pcsOld = ActiveBasic.Windows.Detail.InterlockedExchangeAnyPointer(pcs, 0) 56 Dim pcsOld = InterlockedExchangePointer(pcs As VoidPtr, 0) As *CRITICAL_SECTION 57 If pcsOld <> 0 Then 58 LeaveCriticalSection(ByVal pcsOld) 59 59 End If 60 60 End Sub -
trunk/Include/Classes/ActiveBasic/index.ab
r275 r335 1 1 #require "./Core/index.ab" 2 #require "./Windows/index.ab" -
trunk/Include/Classes/System/Diagnostics/TraceListener.ab
r291 r335 141 141 ' デバッグビューへ出力 142 142 Dim tempStr = GetIndentString() + message 143 OutputDebugString( tempStr)143 OutputDebugString( ToTCStr(tempStr) ) 144 144 145 145 ' デバッグログへ書き込む -
trunk/Include/Classes/System/Drawing/Color.ab
r303 r335 4 4 #define __SYSTEM_DRAWING_COLOR_AB__ 5 5 6 #include <Classes/System/Math.ab>6 '#include <Classes/System/Math.ab> 7 7 #include <Classes/System/Drawing/Imaging/misc.ab> 8 8 … … 76 76 ToCOLORREF = RGB(R, G, B) 77 77 End Function 78 78 /* 79 79 Function ToArgb() As ARGB 80 Returnargb81 End Function 82 80 ToArgb = argb 81 End Function 82 */ 83 83 Static Function FromArgb(argb As ARGB) As Color 84 84 Return New Color(argb) -
trunk/Include/Classes/System/Drawing/Rectangle.ab
r303 r335 4 4 #define __SYSTEM_DRAWING_RECTANGLE_AB__ 5 5 6 #require <Classes/System/Math.ab>6 '#require <Classes/System/Math.ab> 7 7 #require <Classes/System/Drawing/RectangleF.ab> 8 8 #require <Classes/System/Drawing/Point.ab> -
trunk/Include/Classes/System/Drawing/RectangleF.ab
r303 r335 4 4 #define __SYSTEM_DRAWING_RECTANGLEF_AB__ 5 5 6 #include <Classes/System/Math.ab>6 '#include <Classes/System/Math.ab> 7 7 #include <Classes/System/Drawing/PointF.ab> 8 8 #include <Classes/System/Drawing/SizeF.ab> -
trunk/Include/Classes/System/Drawing/Size.ab
r303 r335 4 4 #define __SYSTEM_DRAWING_SIZE_AB__ 5 5 6 #include <Classes/System/Math.ab>6 '#include <Classes/System/Math.ab> 7 7 #include <Classes/System/Drawing/SizeF.ab> 8 8 -
trunk/Include/com/bstring.ab
r272 r335 1 1 ' com/bstring.ab 2 2 3 #require <ole2.ab>4 #require <oleauto.ab>3 '#require <ole2.ab> 4 '#require <oleauto.ab> 5 5 6 6 Namespace ActiveBasic … … 19 19 20 20 Sub BString(s As BString) 21 Init(s.bs, s.Length)21 BString.Copy(This.bs, s.bs) 22 22 End Sub 23 23 … … 50 50 Sub Assign(bstr As BString) 51 51 Clear() 52 Init(bstr, bstr.Length)52 BString.Copy(This.bs, bstr.bs) 53 53 End Sub 54 54 55 55 Sub Assign(s As LPCOLESTR) 56 56 Clear() 57 Init(s, lstrlenW(s))57 s = SysAllocString(s) 58 58 End Sub 59 59 60 60 Sub AssignFromBStr(bstr As BSTR) 61 61 Clear() 62 String.Copy(bs, bstr)62 BString.Copy(bs, bstr) 63 63 End Sub 64 64 -
trunk/Include/com/currency.ab
r267 r335 28 28 End Sub 29 29 */ 30 /* 30 31 Const Function Operator +() As Currency 31 32 Return New Currency(This) 32 33 End Function 33 34 */ 34 35 Const Function Operator -() As Currency 35 36 Dim ret = New Currency … … 58 59 Const Function Operator /(y As Variant) As Double 59 60 Dim vx = New Variant(This) 60 Dim ret = vx / y61 Dim ret = vx / y 61 62 Return ret.ValR4 62 63 End Function 63 64 64 65 Const Function Operator /(y As Currency) As Double 65 Return This / New Varinat(y) 66 Dim vx = New Variant(This) 67 Dim vy = New Variant(y) 68 Dim ret = vx / vy 69 Return ret.ValR4 66 70 End Function 67 71 … … 79 83 80 84 Static Function Compare(x As Currency, y As Currency) As HRESULT 81 Return VarCyCmp(x ,y)85 Return VarCyCmp(x.cy, y.cy) 82 86 End Function 83 87 84 88 Static Function Compare(x As Currency, y As Double) As HRESULT 85 Return VarCyCmpR8(x , y)89 Return VarCyCmpR8(x.cy, y) 86 90 End Function 87 91 88 92 Static Function Compare(x As Double, y As Currency) As HRESULT 89 Dim ret = VarCyCmpR8(y , x)93 Dim ret = VarCyCmpR8(y.cy, x) 90 94 Select Case ret 91 95 Case VARCMP_LT … … 140 144 Const Function Operator <=(y As Currency) As Boolean 141 145 Dim c = Compare(This, y) 142 Return result = VARCMP_LT Or result= VARCMP_EQ146 Return c = VARCMP_LT Or c = VARCMP_EQ 143 147 End Function 144 148 145 149 Const Function Operator <=(y As Double) As Boolean 146 150 Dim c = Compare(This, y) 147 Return result = VARCMP_LT Or result= VARCMP_EQ151 Return c = VARCMP_LT Or c = VARCMP_EQ 148 152 End Function 149 153 150 154 Const Function Operator >=(y As Currency) As Boolean 151 155 Dim c = Compare(This, y) 152 Return result = VARCMP_GT Or result= VARCMP_EQ156 Return c = VARCMP_GT Or c = VARCMP_EQ 153 157 End Function 154 158 155 159 Const Function Operator >=(y As Double) As Boolean 156 160 Dim c = Compare(This, y) 157 Return result = VARCMP_GT Or result= VARCMP_EQ161 Return c = VARCMP_GT Or c = VARCMP_EQ 158 162 End Function 159 163 -
trunk/Include/com/decimal.ab
r267 r335 1 1 ' com/decimal.ab 2 2 3 #require <oleauto.ab>3 '#require <oleauto.ab> 4 4 #require <com/variant.ab> 5 5 #require <com/currency.ab> … … 14 14 15 15 Sub Decimal(d As Decimal) 16 dec = d 16 ' dec = d なぜかコンパイルできない 17 memcpy(VarPtr(dec), VarPtr(d), Len(dec)) 17 18 End Sub 18 19 … … 56 57 VarDecFromR8(x, dec) 57 58 End Sub 58 59 /* 59 60 Const Function Operator() As Variant 60 61 Return New Variant(This) … … 195 196 End Function 196 197 */ 198 /* 197 199 Const Function Operator +() As Decimal 198 200 Return New Decimal(dec) 199 201 End Function 200 202 */ 201 203 Const Function Operator -() As Decimal 202 204 Dim ret = New Decimal … … 211 213 End Function 212 214 213 Const Function Operator *(y As Long) As Decimal214 Dim ret = New Decimal215 VarDecMulI4(This.dec, y, ret.dec)216 Return ret217 End Function218 219 Const Function Operator *(y As Int64) As Decimal220 Dim ret = New Decimal221 VarDecMulI8(This.dec, y, ret.dec)222 Return ret223 End Function224 225 215 Const Function Operator /(y As Decimal) As Decimal 226 216 Dim ret = New Decimal … … 242 232 243 233 Static Function Compare(x As Decimal, y As Decimal) As HRESULT 244 Return VarDecCmp(x , y)234 Return VarDecCmp(x.dec, y.dec) 245 235 End Function 246 236 247 237 Static Function Compare(x As Decimal, y As Double) As HRESULT 248 Return VarDecCmpR8(x , y)238 Return VarDecCmpR8(x.dec, y) 249 239 End Function 250 240 251 241 Static Function Compare(x As Double, y As Decimal) As HRESULT 252 Dim ret = VarDecCmpR8(y , x)242 Dim ret = VarDecCmpR8(y.dec, x) 253 243 Select Case ret 254 244 Case VARCMP_LT … … 303 293 Const Function Operator <=(y As Decimal) As Boolean 304 294 Dim c = Compare(This, y) 305 Return result = VARCMP_LT Or result= VARCMP_EQ295 Return c = VARCMP_LT Or c = VARCMP_EQ 306 296 End Function 307 297 308 298 Const Function Operator <=(y As Double) As Boolean 309 299 Dim c = Compare(This, y) 310 Return result = VARCMP_LT Or result= VARCMP_EQ300 Return c = VARCMP_LT Or c = VARCMP_EQ 311 301 End Function 312 302 313 303 Const Function Operator >=(y As Decimal) As Boolean 314 304 Dim c = Compare(This, y) 315 Return result = VARCMP_GT Or result= VARCMP_EQ305 Return c = VARCMP_GT Or c = VARCMP_EQ 316 306 End Function 317 307 318 308 Const Function Operator >=(y As Double) As Boolean 319 309 Dim c = Compare(This, y) 320 Return result = VARCMP_GT Or result= VARCMP_EQ310 Return c = VARCMP_GT Or c = VARCMP_EQ 321 311 End Function 322 312 -
trunk/Include/com/variant.ab
r267 r335 4 4 #define _COM_VARIANT_AB 5 5 6 #require <oaidl.ab>7 #require <oleauto.ab>6 '#require <oaidl.ab> 7 '#require <oleauto.ab> 8 8 #require <com/index.ab> 9 9 … … 127 127 v.vt = VT_EMPTY 128 128 End Sub 129 129 /* 130 130 Sub Operator =(y As Variant) 131 131 Assign(y.v) … … 135 135 Assign(y) 136 136 End Sub 137 137 */ 138 138 Sub Assign(from As Variant) 139 139 Assign(from.v) … … 202 202 Const Function Operator \(y As Variant) As Variant 203 203 Dim ret = New Variant 204 VarI Div(This.v, y.v, ret.v)204 VarIdiv(This.v, y.v, ret.v) 205 205 Return ret 206 206 End Function … … 340 340 Const Function Operator <=(y As Variant) As Boolean 341 341 Dim c = Compare(This, y) 342 If result = VARCMP_LT Or result= VARCMP_EQ Then342 If c = VARCMP_LT Or c = VARCMP_EQ Then 343 343 Return True 344 344 Else … … 349 349 Const Function Operator >=(y As Variant) As Boolean 350 350 Dim c = Compare(This, y) 351 If result = VARCMP_GT Or result= VARCMP_EQ Then351 If c = VARCMP_GT Or c = VARCMP_EQ Then 352 352 Return True 353 353 Else … … 391 391 Const Function ValUI1() As Byte 392 392 Dim r = ChangeType(VT_UI1) 393 Return GetByte(VarPtr(r.v al))393 Return GetByte(VarPtr(r.v.val)) 394 394 End Function 395 395 … … 402 402 Const Function ValUI2() As Word 403 403 Dim r = ChangeType(VT_UI2) 404 Return GetWord(VarPtr(r.v al))404 Return GetWord(VarPtr(r.v.val)) 405 405 End Function 406 406 … … 413 413 Const Function ValUI4() As DWord 414 414 Dim r = ChangeType(VT_UI4) 415 Return GetDWord(VarPtr(r.v al))415 Return GetDWord(VarPtr(r.v.val)) 416 416 End Function 417 417 … … 424 424 Const Function ValUI8() As QWord 425 425 Dim r = ChangeType(VT_UI8) 426 Return GetQWord(VarPtr(r.v al))426 Return GetQWord(VarPtr(r.v.val)) 427 427 End Function 428 428 … … 501 501 Const Function ValBool() As VARIANT_BOOL 502 502 Dim r = ChangeType(VT_BOOL) 503 Return GetWord(VarPtr(r.v al))503 Return GetWord(VarPtr(r.v.val)) 504 504 End Function 505 505 … … 557 557 Sub ValUnknown(x As *IUnknown) 558 558 Clear() 559 SetPointer(VarPtr(v.val), x .Copy())559 SetPointer(VarPtr(v.val), x) 560 560 x->AddRef() 561 561 v.vt = VT_UNKNOWN -
trunk/Include/com/vbobject.ab
r267 r335 165 165 End Function 166 166 167 Sub Prop( ByRefarg As Variant)167 Sub Prop(arg As Variant) 168 168 Prop(ByVal arg.PtrToVariant) 169 169 End Sub … … 173 173 End Sub 174 174 175 Sub PropRef( ByRefarg As Variant)176 PropRef( arg.PtrToVariant)175 Sub PropRef(arg As Variant) 176 PropRef(ByVal arg.PtrToVariant) 177 177 End Sub 178 178 … … 297 297 298 298 Function CreateObject(className As PCWSTR) As VBObject 299 Return New VBObject(className )299 Return New VBObject(className, 0, CLSCTX_ALL) 300 300 End Function 301 301 302 302 Function CreateObject(className As String) As VBObject 303 Return New VBObject(ToWCStr(className) )303 Return New VBObject(ToWCStr(className), 0, CLSCTX_ALL) 304 304 End Function 305 305 /* -
trunk/TestCase/SimpleTestCase/SimpleTestCase.idx
r334 r335 22 22 #include "BlittableTest.ab" 23 23 _ClearNamespaceImported 24 #include "SPrintFTest.ab" 25 _ClearNamespaceImported 26 27 'リソースファイル 28 #include "resource.ab" 29 #resource "SimpleTestCase.rc" -
trunk/TestCase/SimpleTestCase/SimpleTestCase.pj
r334 r335 23 23 #DEBUG_EXE_PATH= 24 24 25 #RESOURCE= 025 #RESOURCE=SimpleTestCase.rc 26 26 27 27 #SOURCE … … 36 36 StringBuilderTest.ab 37 37 BlittableTest.ab 38 SPrintFTest.ab
Note:
See TracChangeset
for help on using the changeset viewer.