Ignore:
Timestamp:
Mar 9, 2007, 10:15:34 PM (18 years ago)
Author:
イグトランス (egtra)
Message:

Environment, OperatingSystem, Versionの追加、Unicode対応修正ほか

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/api_console.sbp

    r141 r142  
    33#ifndef _INC_CONSOLE
    44#define _INC_CONSOLE
     5
     6#ifdef UNICODE
     7Const _FuncName_PeekConsoleInput = "PeekConsoleInputW"
     8Const _FuncName_ReadConsoleInput = "ReadConsoleInputW"
     9Const _FuncName_WriteConsoleInput = "WriteConsoleInputW"
     10Const _FuncName_ReadConsoleOutput = "ReadConsoleOutputW"
     11Const _FuncName_WriteConsoleOutput = "WriteConsoleOutputW"
     12Const _FuncName_ReadConsoleOutputCharacter = "ReadConsoleOutputCharacterW"
     13Const _FuncName_WriteConsoleOutputCharacter = "WriteConsoleOutputCharacterW"
     14Const _FuncName_FillConsoleOutputCharacter = "FillConsoleOutputCharacterW"
     15Const _FuncName_ScrollConsoleScreenBuffer = "ScrollConsoleScreenBufferW"
     16Const _FuncName_GetConsoleTitle = "GetConsoleTitleW"
     17Const _FuncName_SetConsoleTitle = "SetConsoleTitleW"
     18Const _FuncName_ReadConsole = "ReadConsoleW"
     19Const _FuncName_WriteConsole = "WriteConsoleW"
     20#else
     21Const _FuncName_PeekConsoleInput = "PeekConsoleInputA"
     22Const _FuncName_ReadConsoleInput = "ReadConsoleInputA"
     23Const _FuncName_WriteConsoleInput = "WriteConsoleInputA"
     24Const _FuncName_ReadConsoleOutput = "ReadConsoleOutputA"
     25Const _FuncName_WriteConsoleOutput = "WriteConsoleOutputA"
     26Const _FuncName_ReadConsoleOutputCharacter = "ReadConsoleOutputCharacterA"
     27Const _FuncName_WriteConsoleOutputCharacter = "WriteConsoleOutputCharacterA"
     28Const _FuncName_FillConsoleOutputCharacter = "FillConsoleOutputCharacterA"
     29Const _FuncName_ScrollConsoleScreenBuffer = "ScrollConsoleScreenBufferA"
     30Const _FuncName_GetConsoleTitle = "GetConsoleTitleA"
     31Const _FuncName_SetConsoleTitle = "SetConsoleTitleA"
     32Const _FuncName_ReadConsole = "ReadConsoleA"
     33Const _FuncName_WriteConsole = "WriteConsoleA"
     34#endif
    535
    636Type COORD
     
    153183Const ENABLE_WRAP_AT_EOL_OUTPUT = &H0002
    154184
    155 Declare Function PeekConsoleInput Lib "kernel32" Alias "PeekConsoleInputA" (hConsoleInput As HANDLE, ByRef lpBuffer As INPUT_RECORD, nLength As DWord, ByRef lpNumberOfEventsRead As DWord) As BOOL
    156 Declare Function ReadConsoleInput Lib "kernel32" Alias "ReadConsoleInputA" (hConsoleInput As HANDLE, ByRef lpBuffer As INPUT_RECORD, nLength As DWord, ByRef lpNumberOfEventsRead As DWord) As BOOL
    157 Declare Function WriteConsoleInput Lib "kernel32" Alias "WriteConsoleInputA" (hConsoleInput As HANDLE, ByRef lpBuffer As INPUT_RECORD, nLength As DWord, ByRef lpNumberOfEventsWritten As DWord) As BOOL
    158 Declare Function ReadConsoleOutput Lib "kernel32" Alias "ReadConsoleOutputA" (hConsoleOutput As HANDLE, lpBuffer As *CHAR_INFO, ByRef dwBufferSize As COORD, ByRef dwBufferCoord As COORD, ByRef lpReadRegion As SMALL_RECT) As BOOL
    159 Declare Function WriteConsoleOutput Lib "kernel32" Alias "WriteConsoleOutputA" (hConsoleOutput As HANDLE, lpBuffer As *CHAR_INFO, ByRef dwBufferSize As COORD, ByRef dwBufferCoord As COORD, ByRef lpWriteRegion As SMALL_RECT) As BOOL
    160 Declare Function ReadConsoleOutputCharacter Lib "kernel32" Alias "ReadConsoleOutputCharacterA" (hConsoleOutput As HANDLE, lpCharacter As LPSTR, nLength As DWord, ByRef dwReadCoord As COORD, ByRef lpNumberOfCharsRead As DWord) As BOOL
     185Declare Function PeekConsoleInput Lib "kernel32" Alias _FuncName_PeekConsoleInput (hConsoleInput As HANDLE, ByRef lpBuffer As INPUT_RECORD, nLength As DWord, ByRef lpNumberOfEventsRead As DWord) As BOOL
     186Declare Function ReadConsoleInput Lib "kernel32" Alias _FuncName_ReadConsoleInput (hConsoleInput As HANDLE, ByRef lpBuffer As INPUT_RECORD, nLength As DWord, ByRef lpNumberOfEventsRead As DWord) As BOOL
     187Declare Function WriteConsoleInput Lib "kernel32" Alias _FuncName_WriteConsoleInput (hConsoleInput As HANDLE, ByRef lpBuffer As INPUT_RECORD, nLength As DWord, ByRef lpNumberOfEventsWritten As DWord) As BOOL
     188Declare Function ReadConsoleOutput Lib "kernel32" Alias _FuncName_ReadConsoleOutput (hConsoleOutput As HANDLE, lpBuffer As *CHAR_INFO, ByRef dwBufferSize As COORD, ByRef dwBufferCoord As COORD, ByRef lpReadRegion As SMALL_RECT) As BOOL
     189Declare Function WriteConsoleOutput Lib "kernel32" Alias _FuncName_WriteConsoleOutput (hConsoleOutput As HANDLE, lpBuffer As *CHAR_INFO, ByRef dwBufferSize As COORD, ByRef dwBufferCoord As COORD, ByRef lpWriteRegion As SMALL_RECT) As BOOL
     190Declare Function ReadConsoleOutputCharacter Lib "kernel32" Alias _FuncName_ReadConsoleOutputCharacter (hConsoleOutput As HANDLE, lpCharacter As LPSTR, nLength As DWord, ByRef dwReadCoord As COORD, ByRef lpNumberOfCharsRead As DWord) As BOOL
    161191Declare Function ReadConsoleOutputAttribute Lib "kernel32" (hConsoleOutput As HANDLE, lpAttribute As *Word, nLength As DWord, ByRef dwReadCoord As COORD, ByRef lpNumberOfAttrsRead As DWord) As BOOL
    162 Declare Function WriteConsoleOutputCharacter Lib "kernel32" Alias "WriteConsoleOutputCharacterA" (hConsoleOutput As HANDLE, lpCharacter As LPSTR, nLength As DWord, ByRef dwWriteCoord As COORD, ByRef lpNumberOfCharsWritten As DWord) As BOOL
     192Declare Function WriteConsoleOutputCharacter Lib "kernel32" Alias _FuncName_WriteConsoleOutputCharacter (hConsoleOutput As HANDLE, lpCharacter As LPSTR, nLength As DWord, ByRef dwWriteCoord As COORD, ByRef lpNumberOfCharsWritten As DWord) As BOOL
    163193Declare Function WriteConsoleOutputAttribute Lib "kernel32" (hConsoleOutput As HANDLE, lpAttribute As *Word, nLength As DWord, ByRef dwWriteCoord As COORD, ByRef lpNumberOfAttrsWritten As DWord) As BOOL
    164 Declare Function FillConsoleOutputCharacter Lib "kernel32" Alias "FillConsoleOutputCharacterA" (hConsoleOutput As HANDLE, cCharacter As Char, nLength As DWord, ByRef dwWriteCoord As COORD, ByRef lpNumberOfCharsWritten As DWord) As BOOL
     194Declare Function FillConsoleOutputCharacter Lib "kernel32" Alias _FuncName_FillConsoleOutputCharacter (hConsoleOutput As HANDLE, cCharacter As Char, nLength As DWord, ByRef dwWriteCoord As COORD, ByRef lpNumberOfCharsWritten As DWord) As BOOL
    165195Declare Function FillConsoleOutputAttribute Lib "kernel32" (hConsoleOutput As HANDLE, wAttribute As Word, nLength As DWord, ByRef dwWriteCoord As COORD, ByRef lpNumberOfAttrsWritten As DWord) As BOOL
    166196Declare Function GetConsoleMode Lib "kernel32" (hConsoleHandle As HANDLE, ByRef lpMode As DWord) As BOOL
     
    176206Declare Function SetConsoleCursorPosition Lib "kernel32" (hConsoleOutput As HANDLE, dwCursorPosition As DWord) As BOOL
    177207Declare Function SetConsoleCursorInfo Lib "kernel32" (hConsoleOutput As HANDLE, ByRef lpConsoleCursorInfo As CONSOLE_CURSOR_INFO) As BOOL
    178 Declare Function ScrollConsoleScreenBuffer Lib "kernel32" Alias "ScrollConsoleScreenBufferA" (hConsoleOutput As HANDLE, ByRef lpScrollRectangle As SMALL_RECT, lpClipRectangle As *SMALL_RECT, ByRef dwDestinationOrigin As COORD, lpFill As *CHAR_INFO) As BOOL
     208Declare Function ScrollConsoleScreenBuffer Lib "kernel32" Alias _FuncName_ScrollConsoleScreenBuffer (hConsoleOutput As HANDLE, ByRef lpScrollRectangle As SMALL_RECT, lpClipRectangle As *SMALL_RECT, ByRef dwDestinationOrigin As COORD, lpFill As *CHAR_INFO) As BOOL
    179209Declare Function SetConsoleWindowInfo Lib "kernel32" (hConsoleOutput As HANDLE, bAbsolute As BOOL, ByRef lpConsoleWindow As SMALL_RECT) As BOOL
    180210Declare Function SetConsoleTextAttribute Lib "kernel32" (hConsoleOutput As HANDLE, wAttributes As Word) As BOOL
     
    183213Declare Function AllocConsole Lib "kernel32" () As BOOL
    184214Declare Function FreeConsole Lib "kernel32" () As BOOL
    185 Declare Function GetConsoleTitle Lib "kernel32" Alias "GetConsoleTitleA" (lpConsoleTitle As LPSTR, nSize As DWord) As DWord
    186 Declare Function SetConsoleTitle Lib "kernel32" Alias "SetConsoleTitleA" (lpConsoleTitle As LPSTR) As BOOL
    187 Declare Function ReadConsole Lib "kernel32" Alias "ReadConsoleA" (hConsoleInput As HANDLE, lpBuffer As VoidPtr, nNumberOfCharsToRead As DWord, ByRef lpNumberOfCharsRead As DWord, lpReserved As VoidPtr) As BOOL
    188 Declare Function WriteConsole Lib "kernel32" Alias "WriteConsoleA" (hConsoleOutput As HANDLE, lpBuffer As VoidPtr, nNumberOfCharsToWrite As DWord, ByRef lpNumberOfCharsWritten As DWord, lpReserved As VoidPtr) As BOOL
     215Declare Function GetConsoleTitle Lib "kernel32" Alias _FuncName_GetConsoleTitle (lpConsoleTitle As LPSTR, nSize As DWord) As DWord
     216Declare Function SetConsoleTitle Lib "kernel32" Alias _FuncName_SetConsoleTitle (lpConsoleTitle As LPSTR) As BOOL
     217Declare Function ReadConsole Lib "kernel32" Alias _FuncName_ReadConsole (hConsoleInput As HANDLE, lpBuffer As VoidPtr, nNumberOfCharsToRead As DWord, ByRef lpNumberOfCharsRead As DWord, lpReserved As VoidPtr) As BOOL
     218Declare Function WriteConsole Lib "kernel32" Alias _FuncName_WriteConsole (hConsoleOutput As HANDLE, lpBuffer As VoidPtr, nNumberOfCharsToWrite As DWord, ByRef lpNumberOfCharsWritten As DWord, lpReserved As VoidPtr) As BOOL
    189219
    190220Const CONSOLE_TEXTMODE_BUFFER = 1
Note: See TracChangeset for help on using the changeset viewer.