-
Notifications
You must be signed in to change notification settings - Fork 40
Console x86 Functions
ConsolePause
Description: Pauses console and waits for a keypress. Optionally displays a message, see the bConMsgType constants for values that can be used.
Parameters: dwConMsgType
ConsoleStdOut / ConsoleText
Description: Output text to console as specified by zero terminated text pointed to by the lpszConText parameter.
Parameters: lpszConText
ConsoleStdOutColor / ConsoleTextColor
Description: Output colored text to console as specified by zero terminated text pointed to by the lpszConText parameter.
Parameters: lpszConText, Color
ConsoleStdIn
Description: Input text from console to a specified buffer.
Parameters: lpszConInputBuffer, dwSizeConInputBuffer
ConsoleStdInW
Description: Input text from console to a specified buffer. Unicode version.
Parameters: lpszWideConInputBuffer, dwSizeWideConInputBuffer
ConsoleStdErr
Description: Output console error text.
Parameters: lpszErrText
ConsoleClearScreen / ConsoleCls
Description: Clears the console screen.
Parameters: None
ConsoleShowCursor
Description: Show the console cursor (caret)
Parameters: None
ConsoleHideCursor
Description: Hide the console cursor (caret)
Parameters: None
ConsoleGetTitle
Description: Retrieve the title of the console window to the buffer specified.
Parameters: lpszConTitle, dwSizeConTitle
ConsoleGetPosition
Description: Get the current cursor (caret) x and y position.
Parameters: lpdwXpos, lpdwYpos
ConsoleSetTitle
Description: Set the console window title as specified by the zero terminated string pointed to by the lpszConTitle parameter.
Parameters: lpszConTitle
ConsoleSetPosition
Description: Set the current cursor (caret) x and y position.
Parameters: dwXpos, dwYpos
ConsoleSetIcon
Description: Set the console window icon.
Parameters: IcoResID
ConsoleAnimateIconStart
Description: Animate a series of icons in the console window icon.
Parameters: IcoResIDStart, IcoResIDFinish, dwTime, dwTimeIconStep
ConsoleAnimateIconStop
Description: Stops the animation of the series of icons animating.
Parameters: None
ConsoleSpinnerStart
Description: Draws a spinner from |-/\ characters at the specified position.
Parameters: dwXpos, dwYpos, dwXoffset, dwYoffset
ConsoleSpinnerStop
Description: Stops the spinner.
Parameters: None
ConsoleStarted
Description: Returns in eax TRUE if started via console or FALSE if started via explorer.
Parameters: None
ConsoleAttach
Description: Attaches a console.
Parameters: None
ConsoleFree
Description: Frees an attached console
Parameters: None
ConsoleParseCmdLine
Description: Parses the command line parameters into array. Make sure buffer is large enough for all parameters. Returns in eax total parameters.
Parameters: dwParametersArray
ConsoleCmdLineParam
Description: Fetches a specified parameter index from the parameters array (from the ConsoleParseCmdLine function) and returns it in the buffer pointed to lpszReturnedParameter
Parameters: dwParametersArray, dwParameterToFetch, dwTotalParameters, lpszReturnedParameter
ConsoleCmdLineParamType
Description: Determines the speficied parameter index type. Returns in eax one of the following constants: CMDLINE_PARAM_TYPE_ERROR, CMDLINE_PARAM_TYPE_UNKNOWN, CMDLINE_PARAM_TYPE_SWITCH, CMDLINE_PARAM_TYPE_COMMAND, CMDLINE_PARAM_TYPE_FILESPEC, CMDLINE_PARAM_TYPE_FILENAME, CMDLINE_PARAM_TYPE_FOLDER
Parameters: dwParametersArray, dwParameterToFetch, dwTotalParameters
ConsoleSwitchRegister
Description: Registers a switch (/ or - or -- followed by letters, symbols or numbers) that is valid for the command line parameters.
Parameters: lpszSwitch, dwSwitchID, bCaseSensitive
ConsoleSwitchID
Description: Returns in eax dwSwitchID or -1 if fail
Parameters: lpszSwitch, bCaseSensitive
ConsoleCommandRegister
Description: Registers a command (Letters without a switch) that is valid for the command line parameters.
Parameters: lpszCommand, dwCommandID, bCaseSensitive
ConsoleCommandID
Description: Returns in eax dwCommandID or -1 if fail
Parameters: lpszCommand, bCaseSensitive
ConsolePause bConMsgType:
-
CON_PAUSE_NO_MSG- Doesnt output any console message. -
CON_PAUSE_ANY_KEY_CONTINUE- Outputs 'Press any key to continue' -
CON_PAUSE_ANY_KEY_EXIT- Outputs 'Press any key to exit'
ConsoleCmdLineParamType return values:
-
CMDLINE_PARAM_TYPE_ERROR- Error occured -
CMDLINE_PARAM_TYPE_UNKNOWN- Unknown switch or command -
CMDLINE_PARAM_TYPE_SWITCH- A switch, ie:/?,/Q -
CMDLINE_PARAM_TYPE_COMMAND- A command, ie:Xa,C -
CMDLINE_PARAM_TYPE_FILESPEC- A file spec, ie:*.*,<filename>.*,*.<ext> -
CMDLINE_PARAM_TYPE_FILENAME- A filename:<filename.ext> -
CMDLINE_PARAM_TYPE_FOLDER- A folder:C:\Windows,.\MyFolder,..\OtherFolder
ConsoleStdOutColor & ConsoleTextColor color values:
FOREGROUND_BLUEFOREGROUND_GREENFOREGROUND_REDFOREGROUND_INTENSITYFOREGROUND_WHITEFOREGROUND_YELLOWFOREGROUND_GREENFOREGROUND_MAGENTAFOREGROUND_BLACKFOREGROUND_INTENSE_REDFOREGROUND_INTENSE_GREENFOREGROUND_INTENSE_BLUEFOREGROUND_INTENSE_WHITEFOREGROUND_INTENSE_YELLOWFOREGROUND_INTENSE_CYANFOREGROUND_INTENSE_MAGENTABACKGROUND_BLUEBACKGROUND_GREENBACKGROUND_REDBACKGROUND_INTENSITYBACKGROUND_WHITEBACKGROUND_YELLOWBACKGROUND_CYANBACKGROUND_MAGENTABACKGROUND_BLACKBACKGROUND_INTENSE_REDBACKGROUND_INTENSE_GREENBACKGROUND_INTENSE_BLUEBACKGROUND_INTENSE_WHITEBACKGROUND_INTENSE_YELLOWBACKGROUND_INTENSE_CYANBACKGROUND_INTENSE_MAGENTA