problem with unicode conversion
3rd Party Software
1
Posts
1
Posters
380
Views
-
wrote on 21 Nov 2016, 04:26 last edited by Jeronimo
Hi i am trying to do one program to trigger key's in one game. But my problem is here when i try to convert my key info:
int result = ToUnicodeEx(pKeyboardStruct->vkCode, pKeyboardStruct->scanCode, keyboard_state, buffer,4,0,keyboard_layout);
Here i put the steps to get unicode text:
BYTE keyboard_state[256]; GetKeyboardState(keyboard_state); wchar_t buffer[5]; HKL keyboard_layout = GetKeyboardLayout(0); int result = ToUnicodeEx(pKeyboardStruct->vkCode, pKeyboardStruct->scanCode, keyboard_state, buffer,4,0,keyboard_layout);
But for some strange reason works only with key modificators:
UpdateKeyState(keyboard_state, VK_CONTROL);
So probably for this happen.
For some reason i can't get the unicode text to use in my game.
1/1