Changeset 237 for Include


Ignore:
Timestamp:
May 7, 2007, 4:22:52 PM (18 years ago)
Author:
イグトランス (egtra)
Message:

#_fullcompileで検出されたエラーの修正(明らかに判るもののみ)

Location:
Include
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/DateTime.ab

    r228 r237  
    157157
    158158    Function DayOfWeek() As Long 'As DayOfWeek
    159         Return (Ticks \ TimeSpan.TicksPerDay) Mod 7 - 1
     159        Return ((Ticks \ TimeSpan.TicksPerDay) Mod 7) As Long - 1
    160160    End Function
    161161
  • Include/Classes/System/Environment.ab

    r233 r237  
    11' System/Environment.ab
    22
     3#require <api_psapi.sbp>
    34#require <Classes/System/OperatingSystem.ab>
    45
     
    89
    910    Static Function CommandLine() As String
    10         If cmdLine = Nothing Then
     11        If Object.ReferenceEquals(cmdLine, Nothing) Then
    1112#ifdef __STRING_IS_NOT_UNICODE
    1213            cmdLine = New String(GetCommandLineA())
     
    5152
    5253    Static Function OSVersion() As OperatingSystem
    53         If osVer = Nothing Then
     54        If Object.ReferenceEquals(osVer, Nothing) Then
    5455            Dim vi As OSVERSIONINFO
    5556            GetVersionEx(vi)
     
    7172
    7273    Static Function SystemDirectory() As String
    73         If sysDir = Nothing Then
     74        If Object.ReferenceEquals(sysDir, Nothing) Then
    7475            Dim size = GetSystemDirectory(0, 0)
    75             Dim p = _System_malloc(SizeOf (TCHAR) * size)
    76             Dim len = GetSystemDirectory(size, p)
     76            Dim p = _System_malloc(SizeOf (TCHAR) * size) As PTSTR
     77            Dim len = GetSystemDirectory(p, size)
    7778            sysDir = New String(p, len As Long)
    7879            _System_free(p)
     
    9495
    9596    Static Function WorkingSet() As Int64
    96         Dim pGetProcessMemoryInfo As *Function(Process As HANDLE, ByRef mc As PPROCESS_MEMORY_COUNTERS, cb As DWord) As BOOL
     97        TypeDef PFNGetProcessMemoryInfo = *Function(Process As HANDLE, ByRef mc As PROCESS_MEMORY_COUNTERS, cb As DWord) As BOOL
     98        Dim pGetProcessMemoryInfo As PFNGetProcessMemoryInfo
    9799        Dim hmodPSAPI = LoadLibrary("PSAPI.DLL")
    98100        If hmodPSAPI = 0 Then Return 0
    99         pGetProcessMemoryInfo = GetProcAddress(hmodPSAPI, ToMBStr("GetProcessMemoryInfo"))
     101        pGetProcessMemoryInfo = GetProcAddress(hmodPSAPI, ToMBStr("GetProcessMemoryInfo")) As PFNGetProcessMemoryInfo
    100102        If pGetProcessMemoryInfo <> 0 Then
    101             Dim mc As PPROCESS_MEMORY_COUNTERS
     103            Dim mc As PROCESS_MEMORY_COUNTERS
    102104            If pGetProcessMemoryInfo(GetCurrentProcess(), mc, Len (mc)) <> FALSE Then
    103105                WorkingSet = mc.WorkingSetSize
     106               
    104107            End If
    105108        End If
     
    117120        Dim src = ToTCStr(s)
    118121        Dim size = ExpandEnvironmentStrings(src, 0, 0)
    119         Dim dst = _System_malloc(SizeOf (TCHAR) * size)
     122        Dim dst = _System_malloc(SizeOf (TCHAR) * size) As PTSTR
    120123        ExpandEnvironmentStrings(src, dst, size)
    121124        ExpandEnvironmentVariables = New String(dst, size - 1)
  • Include/Classes/System/Math.ab

    r233 r237  
    194194
    195195    Static Function Floor(value As Double) As Long
    196         return Int(value)
     196        Return Int(value)
    197197    End Function
    198198
     
    201201    'GetType
    202202
    203     Static Function IEEERemainder(value1 As Double, value2 As Double) As Double
    204         Dim q As Double
    205         If value2=0 then return _System_GetNaN()
    206         q=value1/value2
    207         If q<>Int(q) then
    208             If q+0.5<>Int(q+0.5) then
    209                 q=Int(q+0.5)
    210             ElseIf Int(q+0.5)=Int(q*2+1)/2 then
    211                 q=Int(q+0.5)
     203    Static Function IEEERemainder(x As Double, y As Double) As Double
     204        If y = 0 Then Return _System_GetNaN()
     205        Dim q = x / y
     206        If q <> Int(q) Then
     207            If q + 0.5 <> Int(q + 0.5) Then
     208                q = Int(q + 0.5)
     209            ElseIf Int(q + 0.5) = Int(q * 2 + 1) / 2 Then
     210                q = Int(q + 0.5)
    212211            Else
    213                 q=Int(q-0.5)
     212                q = Int(q - 0.5)
    214213            End If
    215214        End If
    216         If x-y*q=0 then
    217             If x>0 then
    218                 return +0
     215        If x - y * q = 0 Then
     216            If x > 0 Then
     217                Return +0
    219218            Else
    220                 return -0
     219                Return -0
    221220            End If
    222221        Else
    223             return x-y*q
     222            Return x-y*q
    224223        End If
    225224    End Function
     
    252251
    253252    Static Function Log10(x As Double) As Double
    254         Return Math.Log(x) / Math.Log(10)
     253        Return Math.Log(x) / _System_Ln10
    255254    End Function
    256255
     
    582581
    583582    Static Function Truncate(x As Double) As Double
    584         return Fix(x)
     583        Return Fix(x)
    585584    End Function
    586585
     
    611610Const _System_HalfPI = (_System_PI * 0.5)
    612611Const _System_InverseHalfPI = (2 / _System_PI) '1 / (PI / 2)
     612Const _System_Ln10 = 2.3025850929940456840179914546844 '10の自然対数
    613613
    614614#endif '__SYSTEM_MATH_AB__
  • Include/Classes/System/Object.ab

    r232 r237  
    1010    ' 2つのオブジェクトが等しいかどうかを判断する
    1111    Virtual Function Equals( object As Object ) As Boolean
    12         If This.GetHashCode() = object.GetHashCode() Then
     12        If ObjPtr(This) = ObjPtr(object) Then
     13'       If This.GetHashCode() = object.GetHashCode() Then
    1314            Return True
    1415        Else
     
    1617        End If
    1718    End Function
     19   
    1820    Static Function Equals( objectA As Object, objectB As Object ) As Boolean
    1921        If ObjPtr(objectA) = NULL /*objectA = Nothing*/ Then
    2022            Return ObjPtr(objectB) = NULL 'objectB = Nothing
    2123        Else
    22             Return objectA.Equals( objectB )
     24            Return objectA.Equals(objectB)
    2325        End If
    2426    End Function
     
    3537    ' ハッシュコードを取得する
    3638    Virtual Function GetHashCode() As Long
    37         Return VarPtr( This ) As Long
     39        Return ObjPtr( This ) As Long
    3840    End Function
    3941
  • Include/Classes/System/OperatingSystem.ab

    r233 r237  
    1717
    1818    Sub OperatingSystem(vi As OSVERSIONINFOA)
    19         pf = vi.dwPlatformId As PlatformID,
     19        pf = vi.dwPlatformId As PlatformID
    2020        ver = New Version(vi.dwMajorVersion, vi.dwMinorVersion, vi.dwBuildNumber)
    21         sp = vi.szCSDVersion
     21        sp = New String(vi.szCSDVersion As PCSTR)
    2222    End Sub
    2323
    2424    Sub OperatingSystem(vi As OSVERSIONINFOW)
    25         pf = vi.dwPlatformId As PlatformID,
     25        pf = vi.dwPlatformId As PlatformID
    2626        ver = New Version(vi.dwMajorVersion, vi.dwMinorVersion, vi.dwBuildNumber)
    27         sp = vi.szCSDVersion
     27        sp = New String(vi.szCSDVersion As PCSTR)
    2828    End Sub
    2929
  • Include/Classes/System/String.ab

    r227 r237  
    184184
    185185    Static Function CompareOrdinal(x As String, indexX As Long, y As String, indexY As Long, length As Long) As Long
    186         If x = Nothing Then
    187             If y = Nothing Then
     186        If Object.ReferenceEquals(x, Nothing) Then
     187            If Object.ReferenceEquals(y, Nothing) Then
    188188                Return 0
    189189            Else
    190190                Return -1
    191191            End If
    192         ElseIf y = Nothing Then
     192        ElseIf Object.ReferenceEquals(y, Nothing) Then
    193193            Return 1
    194194        End If
    195         Return _System_StrCmpN(VarPtr(x.Chars[indexX]), VarPtr(y.Chars[indexY]), length)
     195        Return _System_StrCmpN(VarPtr(x.Chars[indexX]), VarPtr(y.Chars[indexY]), length As SIZE_T)
    196196    End Function
    197197
     
    344344#ifdef __STRING_IS_NOT_UNICODE
    345345        With Concat
    346             Dim lenA = MultiByteToWideChar(CP_THREAD_ACP, 0, text, len, 0, 0, 0, 0)
     346            Dim lenA = WideCharToMultiByte(CP_THREAD_ACP, 0, text, len, 0, 0, 0, 0)
    347347            .AllocStringBuffer(m_Length + lenA)
    348348            memcpy(.Chars, This.Chars, m_Length)
    349             MultiByteToWideChar(CP_THREAD_ACP, 0, text, len, VarPtr(.Chars[m_Length]), lenA, 0, 0)
     349            WideCharToMultiByte(CP_THREAD_ACP, 0, text, len, VarPtr(.Chars[m_Length]), lenA, 0, 0)
    350350            .Chars[m_Length + lenA] = 0
    351351        End With
     
    473473        temp.AllocStringBuffer(length)
    474474        memcpy(temp.Chars, VarPtr(Chars[startIndex]), SizeOf (StrChar) * length)
    475         Chars[m_Length] = 0
     475        temp.Chars[m_Length] = 0
    476476        Return temp
    477477    End Function
     
    527527    End Function
    528528
    529     Const Function Replace(oldStr As *StrChar, newStr As *StrChar)
     529    Const Function Replace(oldStr As *StrChar, newStr As *StrChar) As String
    530530        If oldStr = 0 Then Debug 'Throw ArgumentNullException
    531531        If newStr = 0 Then newStr = ""
    532         Return ReplaceCore(oldStr, lstrlen(oldStr), newStr, lstrlen(newStr)) As String
     532        Return ReplaceCore(oldStr, lstrlen(oldStr), newStr, lstrlen(newStr))
    533533    End Function
    534534
  • Include/Classes/System/Threading/Thread.ab

    r234 r237  
    5252    End Sub
    5353
    54     Sub Thread(hThread As HANDLE,dwThreadId As DWord,dummy As Long)
     54    Sub Thread(hThread As HANDLE, dwThreadId As DWord, dummy As Long)
    5555        m_hThread=hThread
    5656        m_dwThreadId=dwThreadId
     
    6161
    6262
    63     Function Equals( thread As Thread ) As Boolean
    64         If m_dwThreadId = thread.m_dwThreadId Then
    65             Return True
    66         End If
    67         Return False
    68     End Function
    69 
    70 
     63    Function Equals(thread As Thread) As Boolean
     64        Return m_dwThreadId = thread.m_dwThreadId
     65    End Function
    7166
    7267    '-----------------------
     
    7469    '-----------------------
    7570
     71   
    7672    'Priority Property
    7773    Sub Priority(value As ThreadPriority)
     
    8783        Return m_dwThreadId
    8884    End Function
     85
    8986
    9087
     
    314311
    315312    'カレントスレッドを取得
    316     Function CurrentThread(ByRef obj_Thread As Thread) As BOOL
     313    Function CurrentThread(ByRef obj_Thread As Thread) As Boolean
    317314        Dim dwNowThreadId As DWord
    318315        dwNowThreadId=GetCurrentThreadId()
     
    322319            If ppobj_Thread[i]->ThreadId=dwNowThreadId Then
    323320                obj_Thread.Thread(ByVal ppobj_Thread[i])
    324                 Return 1
    325             End If
    326         Next
    327 
    328         Return 0
     321                Return True
     322            End If
     323        Next
     324
     325        Return False
    329326    End Function
    330327
  • Include/Classes/System/Threading/WaitHandle.ab

    r119 r237  
    6363
    6464    Static Function SignalAndWait(ByRef toSignal As WaitHandle, ByRef toWaitOn As WaitHandle, millisecondsTimeout As Long, exitContext As BOOL) As BOOL
    65         Dim pSignalObjectAndWait = GetProcAddress(GetModuleHandle("Kernel32.dll"), "SignalObjectAndWait") _
    66             As *Function(hObjectToSignal As HANDLE, hObjectToWaitOn As HANDLE, dwMilliseconds As DWord, bAlertable As DWord) As DWord
     65        TypeDef PFNSignalObjectAndWait = *Function(hObjectToSignal As HANDLE, hObjectToWaitOn As HANDLE, dwMilliseconds As DWord, bAlertable As DWord) As DWord
     66        Dim pSignalObjectAndWait = GetProcAddress(GetModuleHandle("Kernel32.dll"), "SignalObjectAndWait") As PFNSignalObjectAndWait
    6767        If pSignalObjectAndWait = 0 Then
    6868            ' PlatformNotSupportedException
    6969            Debug
    70             ExitThread(0)
     70            ExitThread(-1)
    7171        End If
    72         Return WaitHandle.AfterWait(pSignalAndWait(toSignal.Handle, toWaitOn.Handle, millisecondsTimeout As DWord), 1)
     72        Return WaitHandle.AfterWait(pSignalObjectAndWait(toSignal.Handle, toWaitOn.Handle, millisecondsTimeout As DWord, FALSE), 1)
    7373    End Function
    7474
  • Include/WinNT.ab

    r233 r237  
    63746374
    63756375Sub /*FORCEINLINE*/ TpSetCallbackCleanupGroup(ByRef CallbackEnviron As TP_CALLBACK_ENVIRON, CleanupGroup As PTP_CLEANUP_GROUP, CleanupGroupCancelCallback As PTP_CLEANUP_GROUP_CANCEL_CALLBACK)
    6376     CallbackEnviron->CleanupGroup = CleanupGroup
    6377     CallbackEnviron->CleanupGroupCancelCallback = CleanupGroupCancelCallback
     6376    CallbackEnviron.CleanupGroup = CleanupGroup
     6377    CallbackEnviron.CleanupGroupCancelCallback = CleanupGroupCancelCallback
    63786378End Sub
    63796379
    63806380Sub /*FORCEINLINE*/ TpSetCallbackActivationContext(ByRef CallbackEnviron As TP_CALLBACK_ENVIRON, ActivationContext As PACTIVATION_CONTEXT)
    6381     CallbackEnviron->ActivationContext = ActivationContext
     6381    CallbackEnviron.ActivationContext = ActivationContext
    63826382End Sub
    63836383
    63846384Sub /*FORCEINLINE*/ TpSetCallbackNoActivationContext(ByRef CallbackEnviron As TP_CALLBACK_ENVIRON)
    6385     CallbackEnviron->ActivationContext = (-1 As LONG_PTR) As PACTIVATION_CONTEXT
     6385    CallbackEnviron.ActivationContext = (-1 As LONG_PTR) As PACTIVATION_CONTEXT
    63866386End Sub
    63876387
    63886388Sub /*FORCEINLINE*/ TpSetCallbackLongFunction(ByRef CallbackEnviron As TP_CALLBACK_ENVIRON)
    6389     CallbackEnviron->Flags = 1 'u.s.LongFunction = 1
     6389    CallbackEnviron.Flags = 1 'u.s.LongFunction = 1
    63906390End Sub
    63916391
    63926392Sub /*FORCEINLINE*/ TpSetCallbackRaceWithDll(ByRef CallbackEnviron As TP_CALLBACK_ENVIRON, DllHandle As VoidPtr)
    6393     CallbackEnviron->RaceDll = DllHandle
     6393    CallbackEnviron.RaceDll = DllHandle
    63946394End Sub
    63956395
    63966396Sub /*FORCEINLINE*/ TpSetCallbackFinalizationCallback(ByRef CallbackEnviron As TP_CALLBACK_ENVIRON, FinalizationCallback As PTP_SIMPLE_CALLBACK)
    6397     CallbackEnviron->FinalizationCallback = FinalizationCallback
     6397    CallbackEnviron.FinalizationCallback = FinalizationCallback
    63986398End Sub
    63996399
  • Include/api_winsock2.sbp

    r176 r237  
    4949        Next
    5050        If i = .fd_count Then
    51             If .fd_count < FD_SET_SIZE Then
     51            If .fd_count < FD_SETSIZE Then
    5252                .fd_array[i] = fd
    5353                .fd_count++
  • Include/basic/command.sbp

    r214 r237  
    7474Macro MSGBOX(hwnd As HWND, str As String)(title As String, boxType As DWord, ByRef retAns As DWord)
    7575    If VarPtr(retAns) Then
    76         retAns = _System_MessageBox(hwnd, str, title, boxType)
     76        retAns = _System_MessageBox(hwnd, ToSCStr(str), ToSCStr(title), boxType)
    7777    Else
    78         _System_MessageBox(hwnd, str, title, boxType)
     78        _System_MessageBox(hwnd, ToSCStr(str), ToSCStr(title), boxType)
    7979    End If
    8080End Macro
     
    333333            If length_buf>=length_num Then
    334334                '通常時
    335                 _System_FillChar(VarPtr(buffer[i3]), length_buf - length_num, &h20) 'Asc(" ")
     335                _System_FillChar(VarPtr(buffer.Chars[i3]), length_buf - length_num, &h20) 'Asc(" ")
    336336
    337337                i3 += length_buf - length_num
     
    345345
    346346                If dec > 0 Then
    347                     memcpy(VarPtr(buffer[i3]), temp2, SizeOf (StrChar) * length_num)
     347                    memcpy(VarPtr(buffer.Chars[i3]), temp2, SizeOf (StrChar) * length_num)
    348348                Else
    349349                    buffer[i3] = &H30
     
    353353            Else
    354354                '表示桁が足りないとき
    355                 _System_FillChar(VarPtr(buffer[i3]), length_buf,&h23) 'Asc("#")
     355                _System_FillChar(VarPtr(buffer.Chars[i3]), length_buf, &h23) 'Asc("#")
    356356                i3 += length_buf
    357357            End If
     
    378378            i2++
    379379
    380             'lstrcat(StrPtr(buffer)+i3,_System_UsingStrData[ParmNum])
    381             memcpy(VarPtr(buffer[i3 + lstrlen(VarPtr(buffer[i3]))]), _System_UsingStrData[ParmNum], _
    382                 SizeOf (StrChar) * lstrlen(_System_UsingStrData[ParmNum]))
     380            lstrcat(VarPtr(buffer.Chars[i3]), _System_UsingStrData[ParmNum])
    383381            i3 += lstrlen(_System_UsingStrData[ParmNum])
    384382        ElseIf UsingStr[i2]=Asc("&") Then
     
    396394                    i5=i4
    397395                Else
    398                     _System_FillChar(VarPtr(buffer[i3]), i4, &h20) 'Asc(" ")
     396                    _System_FillChar(VarPtr(buffer.Chars[i3]), i4, &h20) 'Asc(" ")
    399397                End If
    400                 memcpy(VarPtr(buffer[i3]), _System_UsingStrData[ParmNum], SizeOf (StrChar) * i5)
     398                memcpy(VarPtr(buffer.Chars[i3]), _System_UsingStrData[ParmNum], SizeOf (StrChar) * i5)
    401399                i3 += i4
    402400            Else
     
    431429End Macro
    432430Macro GET(FileNumber As Long, RecodeNumber As Long, ByRef lpBuffer As String)
    433     Dim dwAccessByte As Long
     431    Dim dwAccessByte As DWord
    434432
    435433    FileNumber--
     
    444442End Macro
    445443Macro PUT(FileNumber As Long, RecodeNumber As Long, ByRef lpBuffer As String)
    446     Dim dwAccessByte As Long
     444    Dim dwAccessByte As DWord
    447445
    448446    FileNumber--
  • Include/basic/function.sbp

    r223 r237  
    508508    i2=0
    509509    Do
    510         Oct$[i2] = &h30 +((num \ CDWord(8 ^ i)) And &H07) ' &h30 = Asc("0")
     510        Oct$[i2] = &h30 +((num \ CDWord(8 ^ i)) And &H07) As StrChar ' &h30 = Asc("0")
    511511        If i=0 Then Exit Do
    512512        i--
     
    715715    Dim i As Long
    716716    For i=0 To num-1
    717         memcpy(VarPtr(String$[i*length]), StrPtr(buf), SizeOf (StrChar) * length)
     717        memcpy(VarPtr(String$.Chars[i*length]), StrPtr(buf), SizeOf (StrChar) * length)
    718718    Next
    719719End Function
     
    11941194    Dim i = 0 As SIZE_T
    11951195    For i = 0 To ELM(size)
    1196         _System_StrCmp = s1[i] - s2[i]
    1197         If _System_StrCmp <> 0 Then
     1196        _System_StrCmpN = s1[i] - s2[i]
     1197        If _System_StrCmpN <> 0 Then
    11981198            Exit Function
    11991199        End If
     
    12041204    Dim i = 0 As SIZE_T
    12051205    For i = 0 To ELM(size)
    1206         _System_StrCmp = s1[i] - s2[i]
    1207         If _System_StrCmp <> 0 Then
     1206        _System_StrCmpN = s1[i] - s2[i]
     1207        If _System_StrCmpN <> 0 Then
    12081208            Exit Function
    12091209        End If
  • Include/system/exception.ab

    r58 r237  
    8282        '新しいip, spをセット
    8383#ifdef _WIN64
    84         context.Rip = ppTryLayers[nTryLayers - 1]->AddressOfCatch
     84        context.Rip = ppTryLayers[nTryLayers - 1]->AddressOfCatch As QWord
    8585        context.Rsp = ppTryLayers[nTryLayers - 1]->StackPtr
    8686#else
    87         context.Eip = ppTryLayers[nTryLayers - 1]->AddressOfCatch
     87        context.Eip = ppTryLayers[nTryLayers - 1]->AddressOfCatch As DWord
    8888        context.Esp = ppTryLayers[nTryLayers - 1]->StackPtr
    8989#endif
  • Include/system/gc.sbp

    r232 r237  
    245245
    246246    Static Function IsNull( object As Object ) As Boolean
    247         If ObjPtr( object ) = NULL Then
    248             Return True
    249         End If
    250         Return False
     247        Return Object.ReferenceEquals(object, Nothing)
    251248    End Function
    252249
  • Include/system/string.sbp

    r233 r237  
    9292End Function
    9393
    94 Function GetStr(ByRef s As String, ByRef mbs As PSTR) As SIZE_T
     94Function GetStr(s As String, ByRef mbs As PSTR) As SIZE_T
    9595    Return GetStr(s.Chars, s.Length As SIZE_T, mbs)
    9696End Function
    9797
    98 Function GetStr(ByRef s As String, ByRef wcs As PWSTR) As SIZE_T
     98Function GetStr(s As String, ByRef wcs As PWSTR) As SIZE_T
    9999    Return GetStr(s.Chars, s.Length As SIZE_T, wcs)
    100100End Function
     
    116116End Function
    117117
    118 Function GetWCStr(ByRef s As String, ByRef wcs As PWSTR) As SIZE_T
    119     Return GetStr(s.Chars, s.Length, wcs)
     118Function GetWCStr(s As String, ByRef wcs As PWSTR) As SIZE_T
     119    Return GetStr(s.Chars, s.Length As SIZE_T, wcs)
    120120End Function
    121121
     
    136136End Function
    137137
    138 Function GetMBStr(ByRef s As String, ByRef mbs As PSTR) As SIZE_T
    139     Return GetStr(s.Chars, s.Length, mbs)
     138Function GetMBStr(s As String, ByRef mbs As PSTR) As SIZE_T
     139    Return GetStr(s.Chars, s.Length As SIZE_T, mbs)
    140140End Function
    141141
     
    156156End Function
    157157
    158 Function GetTCStr(ByRef s As String, ByRef wcs As PCTSTR) As SIZE_T
     158Function GetTCStr(s As String, ByRef tcs As PCTSTR) As SIZE_T
    159159    Return GetStr(s.Chars, s.Length As SIZE_T, wcs)
    160160End Function
     
    176176End Function
    177177
    178 Function GetSCStr(ByRef s As String, ByRef wcs As *StrChar) As SIZE_T
     178Function GetSCStr(s As String, ByRef ss As *StrChar) As SIZE_T
    179179    Return GetStr(s.Chars, s.Length As SIZE_T, wcs)
    180180End Function
     
    196196End Function
    197197
    198 Function ToWCStr(ByRef s As String) As PWSTR
     198Function ToWCStr(s As String) As PWSTR
    199199    GetStr(s.Chars, s.Length As SIZE_T, ToWCStr)
    200200End Function
     
    216216End Function
    217217
    218 Function ToMBStr(ByRef s As String) As PSTR
     218Function ToMBStr(s As String) As PSTR
    219219    GetStr(s.Chars, s.Length As SIZE_T, ToMBStr)
    220220End Function
     
    236236End Function
    237237
    238 Function ToTCStr(ByRef s As String) As PCTSTR
     238Function ToTCStr(s As String) As PCTSTR
    239239    GetStr(s.Chars, s.Length As SIZE_T, ToTCStr)
    240240End Function
     
    256256End Function
    257257
    258 Function ToSCStr(ByRef s As String) As *StrChar
     258Function ToSCStr(s As String) As *StrChar
    259259    GetStr(s.Chars, s.Length As SIZE_T, ToSCStr)
    260260End Function
  • Include/windows/WindowHandle.sbp

    r223 r237  
    374374    Const Function ScreenToClient(ByRef rc As RECT) As Boolean
    375375        Dim ppt = VarPtr(rc) As *POINTAPI
    376         Return _System_ScreenToClient(hwnd, ppt[0]) And _System_ScreenToClient(hwnd, ppt[1])
     376        Return (_System_ScreenToClient(hwnd, ppt[0]) <> FALSE And _System_ScreenToClient(hwnd, ppt[1]) <> FALSE) As Boolean
    377377    End Function
    378378
Note: See TracChangeset for help on using the changeset viewer.