none
Virtual Driver for MIDI Device RRS feed

  • Question

  • Hello,

    I'm developing an application that controls a MIDI device. One of the requirements for this software to work is having the device connected, i.e. the drivers must exist and it must show up as an active device in device manager.

    I'm wondering if anyone knows a way to load the device drivers in windows without the device actually being plugged in, or to create virtual drivers with the same device ID? Is there a registry key of some sorts or an API function that is possible to call to virtually install a specified driver?

    Thanks,

    Josh

    Saturday, October 22, 2011 1:36 AM

All replies

  • The short answer is no.  The longer answer comes from understanding how the drivers in Windows are designed to operate.  As you know Virtual drivers handle the IRP's that would normally start a device in such a way that the device does not need to exist.  But the IRP's are still being sent.  Real devices need to be started and so their drivers handle this.  If no device exists, their drivers can't start.  They are not designed to load without a device.  That's just the digital life they live.  Your only option is to either provide a virtual driver to handle what your app requires, or modify your app to handle the lack of devices.

    Drivers load when their AddDevice and StartDevice function return successful.  Actual drivers will not succeed these functions if the device is lacking....unless they are designed to allow for this (i.e. virtual). 

    I would suggest reading up on how Windows drivers are designed and how they function in either environment. 

    You could give this a glance: http://www.osronline.com/article.cfm?article=20

     


    Daniel Whitaker WDK Support Team
    Saturday, October 22, 2011 10:23 PM
  • Nezoic wrote:
    >
    >I'm developing an application that controls a MIDI device. One of the
    >requirements for this software to work is having the device connected,
    >i.e. the drivers must exist and it must show up as an active device
    >in device manager.
    >
    >I'm wondering if anyone knows a way to load the device drivers in
    >windows without the device actually being plugged in, or to create
    >virtual drivers with the same device ID? Is there a registry key of
    >some sorts or an API function that is possible to call to virtually
    >install a specified driver?
     
    If a driver expects to talk to a specific piece of hardware, you can't
    force it to load without that hardware.  The driver expects to read
    register values back from the hardware; without those values, what is it
    supposed to tell you?
     
    It is possible to write a driver that simulates live hardware, but it would
    be a new driver from scratch, not one that uses the real driver.
     
    What are you hoping to do?  If your app loaded this fake driver, what would
    you expect the driver to do?  The driver doesn't implement the MIDI
    functionality.  That's all in the device.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.
     

    Tim Roberts, VC++ MVP Providenza & Boekelheide, Inc.
    Saturday, October 22, 2011 10:55 PM