Accessing Host USB in Windows Mobile 5.0 - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Accessing Host USB in Windows Mobile 5.0


I try to access a HID USB device with my PocketPC LOOX with integrated USB Host.

I already figured out - that I can get an handle to the device with -> FindFirstDevice, FindNextDevice
I am quite sure I got the _right_ device, because I looked at the enumeration before an after I plugged it in.
The device name in the DEVMGR_DEVICE_INFORMATION is HID1.
I assume this also means the HID driver was loaded.

To make sure opening is made with the correct options - I do a

HANDLE hFile = CreateFileW(di.szDeviceName,

No error occurs, and I see a value for hFile.

Now I try to write and read from the handle with

Result = WriteFile(handle, &WriteBuffer, 10, &BytesWritten, NULL);
ReadFile(handle, &ReadBuffer, 10, &NumberOfBytesRead, NULL);

of cource with the right Buffer / Bufferlenght handling.

WriteFile and ReadFile does not work an come with error 50 (ERROR_NOT_SUPPORTED).

Does not seem right

So I tried to deal with DeviceIoControl .. and got no luck.

On Windows XP everythink work fine (HidD_GetPreparsedData, HidP_GetCaps, SetupDiGetClassDevsW, SetupDiEnumDeviceInterfaces, SetupDiGetDeviceInterfaceDetailW, CreateFile, ReadFile, WriteFile) but this functions does not seem to be available in Windows Mobile 5.0 (hid.dll, hidsdi.h, setupapi.h ...)

If you wonder which device I want to control ... here you go .. JoyWarrior 24F8 from

Can anyone point me to the right function to access / read / write an HID USB Device in Windows Mobile 5.0.
It does not matter if VB, VC++,C or C#


  • funkyjayfunkyjay Posts: 1Member

    did you find a solution in the meantime?
    i have the same problem but i can't find my HID device.

    are there soem places in the registry where the enumeration is stored when i plug the device in? i even do not know if the device was recognized by WIN CE.
    on WIN XP all works fine :(
Sign In or Register to comment.