April 24th, 2009, 10:09 AM
Accessing USB Host 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,
GENERIC_WRITE | GENERIC_READ,
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 www.codemercs.com
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#
Last edited by _Mirko_; April 24th, 2009 at 10:11 AM.
April 15th, 2010, 06:52 AM
Re: Accessing USB Host in Windows Mobile 5.0
Have you already success?
Last edited by hi1; April 15th, 2010 at 06:56 AM.
Tags for this Thread
Click Here to Expand Forum to Full Width