Article View: borland.public.cppbuilder.nativeapi
Article #9728Re: disable network card
From: Vladimir Afanasyev
Date: Mon, 21 Jun 2004 14:47
Date: Mon, 21 Jun 2004 14:47
22 lines
1904 bytes
1904 bytes
Hi Henry, Frankly you can do it as well as Device Manager can do it and as well as you can do it with another device via Device Manager. For this you need to study how some functions of setupapi.dll and cfgmgr32.dll work. you can download my code from codecentral: (Borland C++ Builder) - http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=21175 (C#) - http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=20338 See also my articles from codeproject: .NET - Diving into System Programming (Parts 1,2,3) http://www.codeproject.com/csharp/DivingSysProg1.asp http://www.codeproject.com/csharp/DivingSysProg2.asp http://www.codeproject.com/csharp/DivingSysProg3.asp Really I do not disable and enable devices but I am sure that it possible via CM_Set_HW_Prof_Flags function from cfgmgr32.dll with flag CSCONFIGFLAG_DISABLE or CSCONFIGFLAG_DO_NOT_CREATE. May be it is subject for Part 4 in codeproject... Vladimir.
Technical Details
Message-ID:
<40d6f515$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40d1fde3@newsgroups.borland.com> <40d30f5f@newsgroups.borland.com> <40d31316$2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,6a66ad479e448f8 X-Google-Attributes: gid10cc67,public From: "Vladimir Afanasyev" <avv@systema.kiev.ua> Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua> Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua> Subject: Re: disable network card Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 212.82.216.226 X-Forwarded-For: unknown References: <40d1fde3@newsgroups.borland.com> <40d30f5f@newsgroups.borland.com> <40d31316$2@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <40d6f515$1@newsgroups.borland.com> Date: 21 Jun 2004 07:47:49 -0700 X-Trace: newsgroups.borland.com 1087829269 207.105.83.66 (21 Jun 2004 07:47:49 -0700) Lines: 22 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail