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."
Do you mean UpdateDriverForPlugAndPlayDevice? That's documented.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.
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...
Like I said, UpdateDriverForPlugAndPlayDevice. That is, assuming you
really want to update the driver, and not just invoke the dialogs.
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
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...
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...