I want to use the following:-
CallFunction(0,"ReadConsoleInputA",hConsoleInput.l, lpBuffer.PUT_RECORD, nLength.l, lpNumberOfEventsRead.l)
Can someone help me with structuring of the parameters and also the PUT_RECORD layout.
I don't know how to define them.
Many thanks
Alan
API structure
Re: API structure
See here:
http://msdn.microsoft.com/library/defau ... einput.asp
http://msdn.microsoft.com/library/defau ... einput.asp
Code: Select all
Structure INPUT_RECORD_EVENT
StructureUnion
KeyEvent.KEY_EVENT_RECORD
MouseEvent.MOUSE_EVENT_RECORD
WindowBufferSizeEvent.WINDOW_BUFFER_SIZE_RECORD
MenuEvent.MENU_EVENT_RECORD
FocusEvent.FOCUS_EVENT_RECORD
EndStructureUnion
EndStructure
Structure INPUT_RECORD
EventType.w
Event.INPUT_RECORD_EVENT
EndStructure
Code: Select all
Dim inputBuffer.INPUT_RECORD(127)
hStdIn.l = GetStdHandle_(#STD_INPUT_HANDLE)
ReadConsoleInput_(hStdin, inputBuffer(), 128, @numRead.l)
Good programmers don't comment their code. It was hard to write, should be hard to read.

