472,989 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,989 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 4275
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...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.