Changeset 348 for trunk/Include


Ignore:
Timestamp:
Sep 30, 2007, 12:26:35 AM (17 years ago)
Author:
NoWest
Message:

Disposeメソッドを実装しました。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/System/IO/FileStream.ab

    r339 r348  
    243243
    244244Public
    245     Override Function BeginRead(ByRef buffer[] As Byte, offset As Long, count As Long, callback As AsyncCallback, state As Object) As System.IAsyncResult
     245    Override Function BeginRead(buffer As *Byte, offset As Long, count As Long, callback As AsyncCallback, state As Object) As System.IAsyncResult
    246246        If This.IsAsync() Then
    247247        Else
     
    250250    End Function
    251251
    252     Override Function BeginWrite(ByRef buffer[] As Byte, offset As Long, count As Long, callback As AsyncCallback, state As Object) As System.IAsyncResult
     252    Override Function BeginWrite(buffer As *Byte, offset As Long, count As Long, callback As AsyncCallback, state As Object) As System.IAsyncResult
    253253        If This.IsAsync() Then
    254254        Else
     
    258258
    259259    Override Sub Close()
    260         CloseHandle(This.handle)
     260        This.Dispose()
    261261    End Sub
    262262
    263263/*  CreateObjRef*/
    264 /*  Dispose*/
     264   
     265    Override Sub Dispose()
     266        CloseHandle(InterlockedExchangePointer(VarPtr(This.handle),NULL))
     267    End Sub
    265268
    266269    Override Function EndRead(ByRef asyncResult As System.IAsyncResult) As Long
     
    270273    Override Sub EndWrite(ByRef asyncResult As System.IAsyncResult)
    271274        'TODO
    272     End Sub
     275    End Function
    273276
    274277/*  Equals*/
     
    342345                seek.LowPart=LODWORD(offset)
    343346                seek.HighPart=HIDWORD(offset)
    344                 If seek.HighPart=0 And offset<0 Then seek.LowPart=-seek.LowPart
    345347                Select Case origin
    346348                    Case SeekOrigin.Begin
     
    396398    End Sub
    397399
     400
    398401Protected
    399402    Override Function CreateWaitHandle() As System.Threading.WaitHandle
Note: See TracChangeset for help on using the changeset viewer.