From: David G. <dav...@po...> - 2002-06-22 08:01:52
|
void ConsoleDebugger::Write (Message *msg) { if (injectorIPC != 0L) { // do something logical here for turning chars into keys. } delete msg; } Anyone have any thoughts on this? What's out-going on the IPC is an INPUT_RECORD. http://msdn.microsoft.com/library/en-us/dllproc/conchar_8p6a.asp I think this looks like an ok start.. void ConsoleDebugger::Write (Message *msg) { if (injectorIPC != 0L) { int i; for (i = 0; i < msg->size; i++) { INPUT_RECORD ir = new INPUT_RECORD; ir->EventType = KEY_EVENT; ir->u.KeyEvent.bKeyDown = TRUE; ir->u.KeyEvent.wRepeatCount = 1; ir->u.KeyEvent.wVirtualKeyCode = 0; // ???? ir->u.KeyEvent.wVirtualScanCode = 0; // ???? ir->u.KeyEvent.uChar.AsciiChar = msg->bytes[i]; ir->u.KeyEvent.dwControlKeyState = 0; injectorIPC->Put(ir); // then again with ir->u.KeyEvent.bKeyDown // set to FALSE. } } delete msg; } I'll go check Gordon's code for any mapping routines. He had some, I think. -- David Gravereaux <dav...@po...> Tomasoft Engineering, Hayward, CA [species: human; planet: earth,milkyway,alpha sector] |