Ignore:
Timestamp:
Aug 24, 2007, 11:14:46 AM (17 years ago)
Author:
イグトランス (egtra)
Message:

フルコンパイルでのミスあぶり出し。註:修正は全て@300や@301以前に行われた。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/basic/command.sbp

    r288 r303  
    77#require <windows.sbp>
    88#require <Classes/System/Environment.ab>
     9#require <Classes/ActiveBasic/Windows/Windows.ab>
    910
    1011Const _System_Type_SByte = 1
     
    6566'----------------
    6667
    67 Function _System_MessageBox(hw As HWND, s As PCSTR, t As PCSTR, b As DWord) As DWord
    68     Return MessageBoxA(hw, s, t, b)
    69 End Function
    70 
    71 Function _System_MessageBox(hw As HWND, s As PCWSTR, t As PCWSTR, b As DWord) As DWord
    72     Return MessageBoxW(hw, s, t, b)
    73 End Function
    74 
    7568Macro MSGBOX(hwnd As HWND, str As String)(title As String, boxType As DWord, ByRef retAns As DWord)
     69    Dim ret = ActiveBasic.Windows.Detail._System_MessageBox(hwnd, ToSCStr(str), ToSCStr(title), boxType)
    7670    If VarPtr(retAns) Then
    77         retAns = _System_MessageBox(hwnd, ToSCStr(str), ToSCStr(title), boxType)
    78     Else
    79         _System_MessageBox(hwnd, ToSCStr(str), ToSCStr(title), boxType)
     71        retAns = ret
    8072    End If
    8173End Macro
     
    424416Macro FIELD(FileNumber As Long, FieldSize As Long)
    425417    FileNumber--
    426 
    427418    _System_FieldSize(FileNumber)=FieldSize
    428419End Macro
    429 Macro GET(FileNumber As Long, RecodeNumber As Long, ByRef lpBuffer As String)
     420Macro GET(FileNumber As Long, RecodeNumber As Long, ByRef buffer As String)
    430421    Dim dwAccessByte As DWord
    431422
     
    434425
    435426    SetFilePointer(_System_hFile(FileNumber), SizeOf (StrChar) * RecodeNumber * _System_FieldSize(FileNumber), 0, FILE_BEGIN)
    436     lpBuffer = ZeroString(_System_FieldSize(FileNumber))
    437     ReadFile(_System_hFile(FileNumber), StrPtr(lpBuffer), SizeOf (StrChar) * _System_FieldSize(FileNumber), VarPtr(dwAccessByte),ByVal 0)
    438     If Not dwAccessByte=_System_FieldSize(FileNumber) Then
    439         lpBuffer = Left$(lpBuffer, dwAccessByte)
     427    Dim t = ZeroString(_System_FieldSize(FileNumber))
     428    ReadFile(_System_hFile(FileNumber), StrPtr(t), SizeOf (StrChar) * _System_FieldSize(FileNumber), VarPtr(dwAccessByte), ByVal 0)
     429    If dwAccessByte = _System_FieldSize(FileNumber) Then
     430        buffer = t.ToString
     431    Else
     432        buffer = Left$(t.ToString, dwAccessByte)
    440433    End If
    441434End Macro
    442 Macro PUT(FileNumber As Long, RecodeNumber As Long, ByRef lpBuffer As String)
     435Macro PUT(FileNumber As Long, RecodeNumber As Long, buffer As String)
    443436    Dim dwAccessByte As DWord
    444437
     
    447440
    448441    SetFilePointer(_System_hFile(FileNumber), SizeOf (StrChar) * RecodeNumber*_System_FieldSize(FileNumber), 0, FILE_BEGIN)
    449     WriteFile(_System_hFile(FileNumber), StrPtr(lpBuffer),SizeOf (StrChar) * _System_FieldSize(FileNumber), VarPtr(dwAccessByte), ByVal 0)
     442    WriteFile(_System_hFile(FileNumber), StrPtr(buffer), SizeOf (StrChar) * _System_FieldSize(FileNumber), VarPtr(dwAccessByte), ByVal 0)
    450443End Macro
    451444
Note: See TracChangeset for help on using the changeset viewer.