Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Programatically display Device Driver Update Dialog,...

1 view
Skip to first unread message

Kerem Gümrükcü

unread,
Jul 31, 2008, 12:26:36 PM7/31/08
to
Hi,

i would like to display the "Update Device Driver" Dialog from
my application for a special device i want to show this option for.
I could not find a documented call for this, maybe i couldnt find
it, but after tracking devmgr down with Process Monitor, i found
this:

24 newdev.dll pInstallDeviceInstanceUpdateDevice + 0x2b 0x58ad2526
C:\WINDOWS\system32\newdev.dll
25 newdev.dll InstallDeviceInstance + 0x2db 0x58ad2a31
C:\WINDOWS\system32\newdev.dll
26 newdev.dll InstallDevInstEx + 0x4c 0x58ad2c75
C:\WINDOWS\system32\newdev.dll
27 newdev.dll InstallDevInst + 0x18 0x58ad2c96
C:\WINDOWS\system32\newdev.dll

Am i right here, or is there a documented way of doing this,...

Regards

Kerem

--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project: http://www.codeplex.com/restarts
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."

Tim Roberts

unread,
Aug 2, 2008, 6:32:44 PM8/2/08
to
Kerem Gümrükcü <kare...@hotmail.com> wrote:
>
>i would like to display the "Update Device Driver" Dialog from
>my application for a special device i want to show this option for.
>I could not find a documented call for this, maybe i couldnt find
>it, but after tracking devmgr down with Process Monitor, i found
>this:

Do you mean UpdateDriverForPlugAndPlayDevice? That's documented.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Kerem Gümrükcü

unread,
Aug 2, 2008, 9:15:29 PM8/2/08
to
Hi Tim,

thanks for the kind answer! I am talking about
these dialogs:

http://www.pro-it-education.de/staff/keremg/misc/1.JPG
http://www.pro-it-education.de/staff/keremg/misc/2.JPG

How do i invoke them on a selected Device,...can you tell
me how to do this,...?

Regards

Kerem

--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project: http://www.codeplex.com/restarts
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."

"Tim Roberts" <ti...@probo.com> schrieb im Newsbeitrag
news:i3o994lagriknb4dq...@4ax.com...

Tim Roberts

unread,
Aug 4, 2008, 10:54:31 PM8/4/08
to
Kerem Gümrükcü <kare...@hotmail.com> wrote:
>
>thanks for the kind answer! I am talking about
>these dialogs:
>
>http://www.pro-it-education.de/staff/keremg/misc/1.JPG
>http://www.pro-it-education.de/staff/keremg/misc/2.JPG
>
>How do i invoke them on a selected Device,...can you tell
>me how to do this,...?

Like I said, UpdateDriverForPlugAndPlayDevice. That is, assuming you
really want to update the driver, and not just invoke the dialogs.

Ray Trent

unread,
Aug 5, 2008, 2:29:16 PM8/5/08
to Tim Roberts
I'm pretty sure he's asking how to bring up the user interface (not sure
why).

I'm guessing there isn't an easy way to do that, because it's
functionality inside the MMC device manager snap in (devmgmt.msc). In
order to show that UI, I'm guessing you'd have to write your own MMC
host application, bypass the original UI, and instruct the snap-in
(which is an ActiveX control, essentially) to display its interface.

It looks like it's not a separate part of the OS that you can just "invoke".

Tim Roberts wrote:
> Kerem Gümrükcü <kare...@hotmail.com> wrote:
>> thanks for the kind answer! I am talking about
>> these dialogs:
>>
>> http://www.pro-it-education.de/staff/keremg/misc/1.JPG
>> http://www.pro-it-education.de/staff/keremg/misc/2.JPG
>>
>> How do i invoke them on a selected Device,...can you tell
>> me how to do this,...?
>
> Like I said, UpdateDriverForPlugAndPlayDevice. That is, assuming you
> really want to update the driver, and not just invoke the dialogs.


--
Ray

Kerem Gümrükcü

unread,
Aug 5, 2008, 4:27:37 PM8/5/08
to
Hi Tim, Hi Robert,

i investigatet a little on the Device Manager and i found out,
that the call is InstallDevInst, calling the InstallDevInstEx. I am not
really sure on its parameters except the first three, first is a window
handle to the
owner window, the second is a unicode string to the device instance string
(as i expected)
and the third is always "1", for whatever reason. The fourth parameter seems
to be a out parameter to maybe something like "Reboot needed" and the fifth
parameter is always NULL. Invoking the Function is straightforward and
brings
up the dialog on the selected device instance string. Please correct me if
i am wrong,
but it works for me on my XP machine,...

It is the siganture for InstallDevInstEx(...) in newdev.dll
Can someone please check if this works for him/her,...

Regards

Kerem


--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project: http://www.codeplex.com/restarts
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."

"Ray Trent" <r...@nospam.nospam> schrieb im Newsbeitrag
news:48989BFC...@nospam.nospam...

Kerem Gümrükcü

unread,
Aug 5, 2008, 7:06:11 PM8/5/08
to
An thats what someone posted to my question
on "comp.os.ms-windows.programmer.win32":

For InstallDevInst(), =>

typedef BOOL (WINAPI *PINSTALLDEVINST)(HWND hWnd, LPWSTR wszDeviceId,
BOOL bUpdate, DWORD* dwReboot);
PINSTALLDEVINST InstallDevInst;

I hope this helps someone who needs to do the same,...

Regards

Kerem

--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project: http://www.codeplex.com/restarts
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."

"Ray Trent" <r...@nospam.nospam> schrieb im Newsbeitrag
news:48989BFC...@nospam.nospam...

0 new messages