?
Solved

How can I control the network card speed in win2k by using VB6.0

Posted on 2003-02-18
9
Medium Priority
?
217 Views
Last Modified: 2010-05-01
Dear all,
I have one question need your help. How can I control the network card speed(10Mbps or 100Mbps)in win2k by using VB6.0.If it is possible? Can you give me some suggestion or provide me related document?

Your help will highly appreciate
Thanks & Regards
0
Comment
Question by:Roger-T
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 4

Expert Comment

by:Frog357
ID: 7978993
I just helped someone with this earlier, try this page:
http://www.experts-exchange.com/Networking/Broadband/Q_20506497.html

It's possible to do this in VB, it's just a registry modification.

This allows you to throttle the computer so it doesn't use all available bandwidth.
0
 

Author Comment

by:Roger-T
ID: 7979133
Hi,
Many thanks for your quickly response, i will try it

Regards,
0
 

Author Comment

by:Roger-T
ID: 7979726
Hi,
I can't find the code "Psched " in HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\(A) and "Psched\Parameters\Adapters\[GUID]" in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\(B) in win2k. Should I create it? I have do that according to you mentioned in winxp but it seem not useful.I have a few question about the instruction. 1).create the key "Psched"
in (A)and create a new REG_DWORD value named NonBestEffortLimit,right? 2).what is the [GUID] number? can you give me more explanation? 3).add a new REG_DWORD value named NonBestEffortLimit in [GUID] same with 1,right? 4).If I want to switch the connection speed, I need to modify the value in (A)or (B) or only select one?

Please give me more instruction!
Thanks and Regards,  
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Roger-T
ID: 7979732
Hi,
I can't find the code "Psched " in HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\(A) and "Psched\Parameters\Adapters\[GUID]" in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\(B) in win2k. Should I create it? I have do that according to you mentioned in winxp but it seem not useful.I have a few question about the instruction. 1).create the key "Psched"
in (A)and create a new REG_DWORD value named NonBestEffortLimit,right? 2).what is the [GUID] number? can you give me more explanation? 3).add a new REG_DWORD value named NonBestEffortLimit in [GUID] same with 1,right? 4).If I want to switch the connection speed, I need to modify the value in (A)or (B) or only select one?

Please give me more instruction!
Thanks and Regards,  
0
 
LVL 4

Accepted Solution

by:
Frog357 earned 120 total points
ID: 7979888
First do you have the QoS Packet Scheduler installed on your PC?  Check Properties of your connection.

A)  Yes you can create the key if not found. (I said that in the original posting near the bottom of that paragraph.)

B)  The GUID is a special key it looks like
{44B3C207-67F1-3112-8C3E-2AF7573247F2}
This is how windows refers to your network adapter (in the registry).  You should see a few depending on what you have in your system.  If you look at the entries it should tell you enough information to determine which adapter you are looking at.  It shows DHCP info, IP info etc.  I can not tell you what it will be because they are different on every computer.

Global setting:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Psched

Local setting (per adapter):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Psched\Parameters\Adapters\[GUID]


REG_DWORD name = NonBestEffortLimit
Value = Decimal range of 0 to 100 (see below)



Do not create a key named Psched under the local setting, it does not belong there.  This location just happens to take the exact same value if you wanted to enforce the speed of this adapter.


If you want to change the maximum throughput (not connection speed, it'll still be the same speed just not utilize it all) it depends on which value you set.

If you have a broadband connection (via ethernet or USB) and no LAN just apply this setting to the global location and forget the rest.  This will limit throughput even if you switch broadband providers.

The value you are assigning should be decimal and it represents the percentage of the connection the use.  For the rest of this example I'll just say you have a 5mb broadband connection and it's connected via 10mb ethernet connection to your computer, you could limit your connection to 2.5mb by setting NonBestEffortLimit to 25.  Use the value that Windows tells you when you view the status of your connection.  This is the speed windows see's as your connection and this is what you will be limiting.  Windows will not always see your true connection to the internet if you are using a router or other means to share your connection.

I chose easy numbers for this example, since your total connection to the router is 10mb, you would need to reduce this by 75% or only allowing 25% to be utilized.

Valid ranges are from 0-100.
<speculation>
0 and 100 should not be used, 100 is like not using QoS at all and 0 dis-allows use of the connection (if local) or I imagine it would disallow all connections if set globally.
</speculation>

I hope I didn't take this too far, let me know if this clears it up or makes it worse for you!
0
 

Author Comment

by:Roger-T
ID: 7980580
Thanks Froq357 clear explanation,
I don't have the QoS install on my PC. I need to do the link test 10 or 100Mps via network adapter to a board, if the link speed is 10 full(or helf) mode that show on the computer, the LED will show like yellow on the board and if I switch the link speed to 100 full(or helf) mode by manual on the computer, the LED will show like green. So I think it is OK without QoS and this is why I need to control the link speed by programming.  
   
The GUID must include one key "DriverDesc" and the data like "D-link DFE-530 TX PCI Fast Ethernet Adapter(Rev B)" that the data is the description show on the computer, right?
 
I can't found "Psched\Parameters\Adapters\[GUID]" in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ directory in win2000. I also need to create the key "Psched","Parameters","Adapters" and "[GUID]" ,right? if so,I will try it again.

Thanks and Regards,



0
 

Expert Comment

by:CleanupPing
ID: 8940473
Roger-T:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8959589
Moderator, my recommended disposition is:

    Accept 's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8959590
Moderator, my recommended disposition is:

    Accept Frog357's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question