I'm trying to replicate a CTRL + UP ARROW message but it's like ignoring the CTRL key, the result is like only sending UP ARROW, without sending CTRL
This is how the Spy++ results looks:

CTRL KEYDOWN:
UP ARROW KEYDOWN:
UP ARROW KEYUP:
CTRL KEYUP:
This is the code I'm using:
[DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern IntPtr SendMessage(IntPtr hWnd, int Msg, int wParam, uint lParam);
SendMessage(whandle, 0x100, 0x00000011, 0x011D0001);
SendMessage(whandle, 0x100, 0x00000026, 0x01480001);
SendMessage(whandle, 0x101, 0x00000026, 0xC1480001);
SendMessage(whandle, 0x101, 0x00000011, 0xC11D0001);
I've changed this SendMessage signature to accept KEYUP lParams:
private static extern IntPtr SendMessage(IntPtr hWnd, int Msg, int wParam, uint lParam);
Maybe the signature is wrong? I don't really know what I'm missing
I can't use SendKeys or any method that requires setting the window in front, it must work in background, neither SetKeyBoardState that could affect to other programs running
EDIT:
Tested with PostMessage and I get the same results, CTRL key is ignored
PostMessage(whandle, 0x100, 0x00000011, 0x011D0001);
PostMessage(whandle, 0x100, 0x00000026, 0x01480001);
PostMessage(whandle, 0x101, 0x00000026, 0xC1480001);
PostMessage(whandle, 0x101, 0x00000011, 0xC11D0001);




I've just solved similar issue (using non managed C++) however i am sending keystroke to DOS window and by one key not 2 or more simultaneously, you could see original issue here: How to send keyboard input to dos application running in window mode in Windows98
I have used many approaches: SendMessage, SendInput and VxD driver, i also solved issue with activating window before sending keystroke, you could find project on github - https://github.com/MossbauerLab/Sm2201Autosave. in MossbauerLab.Sm2201.ExtSaveUtility/src/saveManager you could find method:
void activateWindow(HWND window);
I am using executable name and window name to search HWND (see MossbauerLab.Sm2201.ExtSaveUtility/src/utils/windows/windowsInfo.h) Most of classes were tested with MS tests (managed C++), test project is also in this repo: MossbauerLab.Sm2201.ExtSaveUtility.Tests
Maybe it could be helpful for you