473,466 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 4296
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Myster Ious | last post by:
Polymorphism replaces switch statements, making the code more compact/readable/maintainable/OO whatever, fine! What I understand, that needs to be done at the programming level, is this: a...
5
by: Bryan Parkoff | last post by:
C++ programmers and I tried to experience by writing 65536 switch cases. It is too large for Windows XP and other operating system to handle. It looks like that JMP Table obtains 256K bytes for...
10
by: Kevin Lawrence | last post by:
Hi Anyone know how much 100MB is in SQL Server 2000? Is it a lot? Thanks Kev
12
by: | last post by:
Is it fine to call another method from Switch? Eg. Switch (stringVar) { case ("a"): somVar = "whatever"; Another_Method(); //call another method return;
12
by: kers | last post by:
Hello, New here. Have been searching this forum for a couple of hours now ( i am not kddin).... Havnt been able to find the solution to my problem. I have a access database. Split front and...
2
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but...
9
by: Clinto | last post by:
Hi, I am trying to find the fastest way to search a txt file for a particular string and return the line that contains the string. I have so for just used the most basic method. Initialized a...
0
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
I suspect this is to do with the configuration of IIS but I posted here as it could be asp.net related... I'm uploading large files through an asp.net 1.1 web app... works fine on my dev box and...
7
by: Rohit | last post by:
Hi, I am working on a switch module which after reading voltage through a port pin and caterogizing it into three ranges(open,low or high), passes this range to a function switch_status() with...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.