Tech Support > Microsoft Windows > Drivers > IoRegisterDeviceInterface?
IoRegisterDeviceInterface?
Posted by Mike Pulice on December 8th, 2003


In Walter Oney's book 2nd ed Ch 2, section on registering device interfaces

If a driver does not call IoRegisterDeviceInterface what are the
implications?
Is there a reason not to do this?

I am working with a device multifunction usb where the modem interface is
indeed registered
but the diagnostic serial interface is not. Of course I used the sample
from the WDM book
for enumerating interfaces and used my own tool and this interface does not
show up.

I started this quest because I do not get notifications for this interface
and it is killing me.

~mike


Posted by Jim Cavalaris [MS] on December 8th, 2003


registering a device interface with IoRegisterDeviceInterface
provides a persistent storage location with which drivers and
applications can store and retrieve interface-specific device
settings.

IoRegisterDeviceInterface:
http://msdn.microsoft.com/library/en.../k104_27n6.asp

drivers can open this registry key using:
IoOpenDeviceInterfaceRegistryKey:
http://msdn.microsoft.com/library/en.../k104_8kz6.asp

applications can open this registry using:
SetupDiOpenDeviceInterfaceRegKey:
http://msdn.microsoft.com/library/en...-rtns_375e.asp

once a device interface is registered against a device, it can also
be located in a standard way by other components.

IoGetDeviceInterfaces:
http://msdn.microsoft.com/library/en.../k104_24vm.asp

SetupDiGetClassDevs, DIGCF_DEVICEINTERFACE:
http://msdn.microsoft.com/library/en...-rtns_9ks2.asp

when a device interface is enabled (with IoSetDeviceInterfaceState),
a symbolic link to the device driver stack is provided for clients
to initiate I/O operations. when the interface is disabled, the
symbolic link is removed.

IoSetDeviceInterfaceState:
http://msdn.microsoft.com/library/en.../k104_3epe.asp

enabling or disabling the device interface is also what causes
notification events to be sent to components that have registered
for device interface notification for that interface's class.

kernel-mode components register for device interface event
notification using:

IoRegisterPlugPlayNotification:
http://msdn.microsoft.com/library/en.../k104_7diq.asp

user-mode components register for device interface event
notification using:

RegisterDeviceNotification:
http://msdn.microsoft.com/library/en...tification.asp

if a driver does not register or enable a device interface for a
device, it will not receive the benefit of having a persistant
symbolic link name and associated storage location that is managed by
pnp, or a standard mechanism for other components to receive event
notification on the arrival and removal of this interface.

hope this helps,
jim.

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


"Mike Pulice" <badvox@nospam.verizon.net> wrote in message
news:OIGntpSvDHA.1196@TK2MSFTNGP12.phx.gbl...


Posted by Mike Pulice on December 8th, 2003


Very good. Thanks Jim.

mike


"Jim Cavalaris [MS]" <jamesca@online.microsoft.com> wrote in message
news:3fd43f27$1@news.microsoft.com...
n.asp



Similar Posts