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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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)
Note: See TracChangeset for help on using the changeset viewer.