Welcome to the forums!
Why can't you create a window. I think you will be able to create a window and use DirectInput or the joystick API (no guarantees!).
When you have a window, you need a message loop. You will also need to attach your thread to the interactive/input desktop. The code to do that should look something like this:
However, I'm not sure whether you can attach to the WinLogon desktop, so you'll have to try it and see.
// Ensure connection to service window station and desktop, and save their handles.
hwinstaSave = GetProcessWindowStation();
hdeskSave = GetThreadDesktop(dwThreadId);
// Connect to the interactive window station and desktop.
hwinstaUser = OpenWindowStation(TEXT("WinSta0"), FALSE, MAXIMUM_ALLOWED);
hdeskUser = OpenInputDesktop(0, FALSE, MAXIMUM_ALLOWED);
// Create window, receive input, etc here!
// Once you're done restore window station and desktop.