To send a char, we can use SendInput. How can I use it to send more than one char?
I tried this code but it does not send anything:
INPUT in;
in.type
If I've got you right, you want something more along the lines of this:
INPUT in[4] = {0}; // four inputs
// first input 0x53
in[0].type=INPUT_KEYBOARD;
in[0].ki.wScan=0;
in[0].ki.dwFlags=0;
in[0].ki.time=0;
in[0].ki.dwExtraInfo=0;
in[0].ki.wVk=0x53;
in[1] = in[0];
in[1].ki.dwFlags |= KEYEVENTF_KEYUP;
// second input 0x54
in[2].type=INPUT_KEYBOARD;
in[2].ki.wScan=0;
in[2].ki.dwFlags=0;
in[2].ki.time=0;
in[2].ki.dwExtraInfo=0;
in[2].ki.wVk=0x54;
in[3] = in[2];
in[3].ki.dwFlags |= KEYEVENTF_KEYUP;
SendInput(4,in,sizeof(INPUT));
Probably want to wrap the grunt work setting up the INPUT structure into a function to reduce duplication.