Disable Devices in .NET

  • Thread starter Thread starter Samuel Shulman
  • Start date Start date
S

Samuel Shulman

Hi

Is it possible to disable/enable devices (as one can do in device manager)
in VB code?

Thank you,
Samuel
 
Hi,

I doubt there's a managed class (probably except for WMI aka
System.Management.*) that would be capable of doing this. So, take a look at
System.Management and WMI first, and if there's nothing like that there,
then research MSDN/the Web for a native APIs responsible for device
management and consume those APIs through P/Invoke.

See also this TechNet article:

http://technet2.microsoft.com/WindowsServer/en/Library/afa82316-88d5-4e70-96f8-6c774ca32b981033.mspx

and this CodeProject one:

http://www.codeproject.com/csharp/divingsysprog3.asp?df=100&forumid=35288&exp=0&select=981039

P.S. My research indicates that WMI is good for querying the data, but not
for manipulating the devices. So you are likely to follow the WinAPI route.
 
Thank you for your help

Samuel Shulman


Dmytro Lapshyn said:
Hi,

I doubt there's a managed class (probably except for WMI aka
System.Management.*) that would be capable of doing this. So, take a look
at System.Management and WMI first, and if there's nothing like that
there, then research MSDN/the Web for a native APIs responsible for device
management and consume those APIs through P/Invoke.

See also this TechNet article:

http://technet2.microsoft.com/WindowsServer/en/Library/afa82316-88d5-4e70-96f8-6c774ca32b981033.mspx

and this CodeProject one:

http://www.codeproject.com/csharp/divingsysprog3.asp?df=100&forumid=35288&exp=0&select=981039

P.S. My research indicates that WMI is good for querying the data, but not
for manipulating the devices. So you are likely to follow the WinAPI
route.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top