Why would you want to do something like that? The only reason you
would possibly have to do this would be if you were planning to do it
remotely. Because I'm pretty sure you can disable any device locally
without the aid of any third party application. Are your intentions
ethical?????
** "Michael" <[email protected]> ha scritto nel messaggio
** I'm exploring how to programmatically disable/enable devices in a system
** using C#.
**
** -MH
* "Laura T" <laura.t@_yahoo.com> scribed
* No. The WDM provider for WMI does not allow to do these things (for some
* good reasons).
* You need to interface with CfgMgr32 (Win32 API) to do this.
*
Laura T,
I believe Win32 API's setupapi.dll exports a function "SetupDiChangeState"
which allows for this but it's beyond my current skillset to fully
understand how to use it w/o seeing some sort of working C# source code
example. I'll keep plugging away at it. It may be best to start another
thread pertaining to this specific conundrum of mine.
| Michael wrote:
| ** "Michael" <[email protected]> ha scritto nel messaggio
| ** I'm exploring how to programmatically disable/enable devices in a
system
| ** using C#.
| **
| ** -MH
| * "Laura T" <laura.t@_yahoo.com> scribed
| * No. The WDM provider for WMI does not allow to do these things (for
some
| * good reasons).
| * You need to interface with CfgMgr32 (Win32 API) to do this.
| *
| Laura T,
|
| I believe Win32 API's setupapi.dll exports a function
"SetupDiChangeState"
| which allows for this but it's beyond my current skillset to fully
| understand how to use it w/o seeing some sort of working C# source
code
| example. I'll keep plugging away at it. It may be best to start
another
| thread pertaining to this specific conundrum of mine.
|
| Thanks,
| -MH
Anybody know how to use that API in C#? I'd be interested also in how
all the functions and structures are used along w/ the proper way to
pass parameters.
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.