Hoi.
I am supplying some kind of application with my driver, which gives the user
the possibility of adding or removing the driver dynamically.
But since I got feedback of customers, the windows driver warning window
sometimes appeares behind my application window, I am working on a patch
(along with a few other bugfixes) right now.

To solve the problem, I thought passing a HWND to the
UpdateDriverForPlugAndPlayDevices function call should be the solution. But I
cannot tell exactly, because every time I pass the window handle to the
function, it stops responding. The window handle is a valid one from an mfc
propertysheet of a different process. This propertysheet calls a method of an
com interface of an local server com object (interactive user privilegs)
which is loaded by an system service.

The problem appears in the UpdateDriverForPlugAndPlayDevices as I found out
with the debugger. The function hangs on forever, except for the case I kill
the propertysheet's app. Doing so brings the
UpdateDriverForPlugAndPlayDevices function back to life, reporting an error.

Does anybody have an idea what causes the problem and how to solve it, or
has anybody experienced similar situations with
UpdateDriverForPlugAndPlayDevices?

Thanks in advance,

Laurents C. R. Meyer