none
How to connect to the right USB, when multiple are available in windows? RRS feed

  • Question

  • Hello,

    I have a couple of questions about the WDK10:

    Is plist on Mac the same as inf file on Windows? 

    Also for taking(sending messegase using CreateFile and WriteFile from the WDK 10) to a usb modem do I need to create a inf file?

    I found this: http://www.velleman.eu/images/tmp/usbfind.c , for finding all usb devices connect to the PC. In my case I have 4(mouse, wifi adapter ...) of them, but I want to talk only to one of them the board. How can I do that? Do I need to know some kind of specific parameters about it? And where can I find this parameters?

    On Mac I did this:

    IORegistryEntryCreateCFProperty(modem_service,CFSTR(kIOCalloutDeviceKey), kCFAllocatorDefault,0);
    

    and it worked find. But then I didn't have the wifi adapter connected to the Mac...

    Thanks.



    • Edited by sadasir Thursday, July 28, 2016 6:02 PM
    Thursday, July 28, 2016 6:01 PM

Answers

  • You need an INF to install a driver on a device. once a driver is installed, you use SetupApi to find the specific type of device interface you want to talk to and then CreateFile to open a handle. once you have a handle, WriteFile, ReadFile and DeviceIoControl. You should look at the toaster WDK sample, the enum.exe project specifically. it has very generic code that enumerates all instances of a device interface, all you have to do is change the GUID (most likely to GUID_DEVINTERFACE_MODEM).


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, July 29, 2016 1:37 AM