Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / November 2003

Tip: Looking for answers? Try searching our database.

Network Adapter configuration

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
- 11 Nov 2003 14:44 GMT
How can I programmatically configure an ETHERNET ADAPTER
to use DHCP in a WORKSTATION that can be running Windows
98/ME/NT/2K/XP?

Can I do it with a managed code using C# ? If not, how can
I do it with VC++ / Platform SDK?

Thanks in advance,

Alvaro Pereira
Rhett Gong - 12 Nov 2003 07:52 GMT
Hi Alvaro:
    There are two ways can be used to achieve your goal.
   1. the Win32_NetworkAdapterConfiguration.EnableDHCP in WMI class can be
used to configure the Adapter to use DHCP. If you know WMI, you can go here
for more
information:http://msdn.microsoft.com/library/default.asp?url=/library/en-us
/wmisdk/wmi/win32_networkadapterconfiguration.asp
   2. you can modify the registry programmatically to achieve the goal:
System Key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\{Adapter}\
Parameters\Tcpip]
Value Name: EnableDHCP
Data Type: REG_BINARY (Binary Value)
1--Enable
0--Disable

Best regards,

Rhett Gong [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
Rhett Gong - 12 Nov 2003 07:56 GMT
Hi Alvaro:
   I think no direct class in C# can be used to configure the adapter to
use DHCP.

Best regards,

Rhett Gong [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.