471,339 Members | 1,268 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,339 software developers and data experts.

Switch between 10Mb and 100Mb

Hello

I've got a need to be able to switch, or set the speed for my NIC between
10Mb and 100Mb for parametric testing purposes.

Using C# how can I accomplish, or can it even be done?

Thanks
Sep 5 '08 #1
3 4143
On Sep 5, 5:11*pm, "Jason" <nos...@spam.comwrote:
Hello

I've got a need to be able to switch, or set the speed for my NIC between
10Mb and 100Mb for parametric testing purposes.

Using C# how can I accomplish, or can it even be done?

Thanks
I'm not sure if you can do it. but if you can you have to use WMI. My
advice would be to first check if it's possible at all. then how it's
done with WMI and finally write the C# code that does it using WMI
Sep 5 '08 #2
Jason wrote:
Hello

I've got a need to be able to switch, or set the speed for my NIC
between 10Mb and 100Mb for parametric testing purposes.

Using C# how can I accomplish, or can it even be done?
One approach is to edit the appropriate registry values--whether this
will work on a particular NIC without restarting the driver you'll
have to determine by experiment.

Here's a brief description of the process for editing the registry
from C#
http://radio.weblogs.com/0111551/sto...stryRwInC.html

And an example of changing the NIC speed by registry manipulation
under vbscript
http://www.eggheadcafe.com/forumarch...st24721211.asp

A description of restarting device drivers in C#, should you need to
do that with your particular NICs, can be found at
http://www.codeproject.com/KB/cs/HardwareHelper.aspx

Between them they should be enough to get you started.

As always, be _very_ careful when editing the registry.

--
--
--John
to email, dial "usenet" and validate
(was jclarke at eye bee em dot net)
Sep 5 '08 #3
I was thinking it would have to be WMI. I don't think there is any other
option through .NET

In the Configuration... Advanced tab of a network port, a person is able to
select the speed and duplex, so I'm guessing my program would be doing the
same thing. My question, is even if I set the speed of my port to 10Mb, is
that really going to send data at a 10Mb/sec rate? What happens is I
plugged into a switch that is 100Mb ?
"Ignacio Machin ( .NET/ C# MVP )" <ig************@gmail.comwrote in
message
news:99**********************************@l42g2000 hsc.googlegroups.com...
On Sep 5, 5:11 pm, "Jason" <nos...@spam.comwrote:
Hello

I've got a need to be able to switch, or set the speed for my NIC between
10Mb and 100Mb for parametric testing purposes.

Using C# how can I accomplish, or can it even be done?

Thanks
I'm not sure if you can do it. but if you can you have to use WMI. My
advice would be to first check if it's possible at all. then how it's
done with WMI and finally write the C# code that does it using WMI
Sep 6 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Myster Ious | last post: by
5 posts views Thread by Bryan Parkoff | last post: by
10 posts views Thread by Kevin Lawrence | last post: by
12 posts views Thread by | last post: by
reply views Thread by =?Utf-8?B?UGhpbCBKb2huc29u?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.