CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009

    Question 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,

    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.

  2. #2
    Join Date
    Sep 2008

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.