I am new to driver development, so my question might be a bit naive.
The Situation:
I'm developing a USB-based device. A user can connect or disconnect one or
more of these devices at any time.
I provide a dll to interface between a Windows application and my
kernel-mode driver (under construction). Either I or my customer customer
will create his/her own Windows app, in their favorite programming
environment.
The Problem:
I'd like to provide callback functions in my dll that will execute whenever
a device is connected or disconnected.
I can see that there is an SDK Platform function RegisterDeviceNotification
that allows user code to register for a callback to a window or service. But
I don't have either in my dll. This does not therefore seem to meet my
needs.
I also see that the IO Manager exports the IoRegisterPlugPlayNotification
for drivers. It accepts a callback function argument.
The Questions:
Can I use the IoRegisterPlugPlayNotification function and locate the
callback function be in my (user mode) dll?
Or, is there a way to use the RegisterDeviceNotification user-mode
function with my dll?
Or, is there a better way?