Changeset 269 for Include/Classes


Ignore:
Timestamp:
Jun 2, 2007, 7:08:26 PM (17 years ago)
Author:
イグトランス (egtra)
Message:

basicディレクトリの一部の_System関数をActiveBasic名前空間へ入れた

Location:
Include/Classes/ActiveBasic
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/ActiveBasic/Windows/CriticalSection.ab

    r261 r269  
    66Namespace Windows
    77
     8Namespace Detail
     9    Const InterlockedExchangeAnyPointer(p, x) = InterlockedExchangePointer(VarPtr(p) As VoidPtr, x)
     10End Namespace
     11
    812Class CriticalSection
    9     Inherits System.IDisposable
     13'   Inherits System.IDisposable
    1014Public
    1115    Sub CriticalSection()
     
    1822    End Sub
    1923
    20     Override Sub Dispose()
     24    /*Override*/ Sub Dispose()
    2125        If InterlockedIncrement(disposed) = 0 Then
    2226            DeleteCriticalSection(cs)
     
    2428    End Sub
    2529
    26     Function Enter() As CriticalSectionLock
     30    Function Enter() As ActiveBasic.Windows.CriticalSectionLock
    2731        Return New CriticalSectionLock(cs)
    2832    End Function
     
    3337
    3438Class CriticalSectionLock
    35     Inherits System.IDisposable
     39'   Inherits System.IDisposable
    3640Public
    3741    Sub CriticalSectionLock(ByRef cs As CRITICAL_SECTION)
     
    4852    End Sub
    4953
    50     Override Sub Dispose()
    51         Dim p = InterlockedExchangePointer(ByVal VarPtr(pcs), 0)
     54    /*Override*/ Sub Dispose()
     55        Dim p = InterlockedExchangeAnyPointer(pcs, 0)
    5256        If p <> 0 Then
    5357            LeaveCriticalSection(ByVal p)
  • Include/Classes/ActiveBasic/Windows/index.ab

    r261 r269  
    11'Classes/ActiveBasic/Windows/index.ab
    22
     3#require <Classes/ActiveBasic/Windows/Windows.ab>
    34#require <Classes/ActiveBasic/Windows/CriticalSection.ab>
Note: See TracChangeset for help on using the changeset viewer.