From: yuer on
We are updating a co-installer for our device. And we need to
disable the device and then enable it again, we use CM_Disable_Devnode/
CM_ENABLE_Devnode before, but MSDN said that "Do not use this
function. Use device installation functions instead". But I can't find
any function in SetupDi group that just disable a device and enable a
device. Could someone help me ? Thanks a lot!
From: Doron Holan [MSFT] on
look at the devcon sample to see how to enable/disable using the right APIs

--

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


"yuer" <yuer1604(a)163.com> wrote in message
news:83af4d69-6d09-4495-a6c6-d28cc00b0117(a)z10g2000prh.googlegroups.com...
> We are updating a co-installer for our device. And we need to
> disable the device and then enable it again, we use CM_Disable_Devnode/
> CM_ENABLE_Devnode before, but MSDN said that "Do not use this
> function. Use device installation functions instead". But I can't find
> any function in SetupDi group that just disable a device and enable a
> device. Could someone help me ? Thanks a lot!

From: yuer on
On 12月5日, 上午2时11分, "Doron Holan [MSFT]"
<doron.ho...(a)online.microsoft.com> wrote:
> look at the devcon sample to see how to enable/disable using the right APIs
>
> --
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "yuer" <yuer1...(a)163.com> wrote in message
>
> news:83af4d69-6d09-4495-a6c6-d28cc00b0117(a)z10g2000prh.googlegroups.com...
>
>
>
> > We are updating a  co-installer  for our device. And we need to
> > disable the device and then enable it again, we use CM_Disable_Devnode/
> > CM_ENABLE_Devnode before, but MSDN said that "Do not use this
> > function. Use device installation functions instead". But I can't find
> > any function in SetupDi group that just disable a device and enable a
> > device. Could someone help me ? Thanks a lot!- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Thanks for your reply. But I have another question.
I've looked at the devcon sample code already, seems that it
called SetupDiCallClassInstaller to issue DIF_PROPERTYCHANGE to enable
(disable) a device. From MSDN we know that "For each DIF request,
SetupDiCallClassInstaller calls any class co-installers registered for
the device's setup class, any device co-installers registered for the
specific device, and then the Class Installer supplied by the system
for the device's setup class, if there is one. " But I want to enable
(disable) a device in my co-installer, does SetupDiCallClassInstaller
() still can be used? Thanks!
From: Maxim S. Shatskih on
> any function in SetupDi group that just disable a device and enable a

SetupDiCallClassInstaller with proper code.

Look at DEVCON source.

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com

From: Mike [MSFT] on
During which DIF_code would you like to enable/disable the devnode? Why?

-Mike

"yuer" <yuer1604(a)163.com> wrote in message
news:d9308a96-b2ff-47e8-8d5d-6dab8d18b525(a)m7g2000prd.googlegroups.com...
> On 12月5日, 上午2时11分, "Doron Holan [MSFT]"
> <doron.ho...(a)online.microsoft.com> wrote:
>> look at the devcon sample to see how to enable/disable using the right
>> APIs
>>
>> --
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "yuer" <yuer1...(a)163.com> wrote in message
>>
>> news:83af4d69-6d09-4495-a6c6-d28cc00b0117(a)z10g2000prh.googlegroups.com...
>>
>>
>>
>> > We are updating a co-installer for our device. And we need to
>> > disable the device and then enable it again, we use CM_Disable_Devnode/
>> > CM_ENABLE_Devnode before, but MSDN said that "Do not use this
>> > function. Use device installation functions instead". But I can't find
>> > any function in SetupDi group that just disable a device and enable a
>> > device. Could someone help me ? Thanks a lot!- 隐藏被引用文字 -
>>
>> - 显示引用的文字 -
>
> Thanks for your reply. But I have another question.
> I've looked at the devcon sample code already, seems that it
> called SetupDiCallClassInstaller to issue DIF_PROPERTYCHANGE to enable
> (disable) a device. From MSDN we know that "For each DIF request,
> SetupDiCallClassInstaller calls any class co-installers registered for
> the device's setup class, any device co-installers registered for the
> specific device, and then the Class Installer supplied by the system
> for the device's setup class, if there is one. " But I want to enable
> (disable) a device in my co-installer, does SetupDiCallClassInstaller
> () still can be used? Thanks!

 | 
Pages: 1
Prev: WinUsb timing issue
Next: Pagefile on virtual disk