?
Solved

How i chnge the linkage order of network adapter with c/c++

Posted on 2004-03-25
6
Medium Priority
?
467 Views
Last Modified: 2013-12-03
In windows you can go  Network and Dial-up->Connections->Advanced->Advanced Settings->Connections
dialog box where you can set priorities for connections.
The dialog box says:
"Connections are listed in the order in which they are accessed by DNS and
other network services".
In "Connections:" part you can set the order of  accessed.
my question is how to changed it in c/c++ (2000 / XP).

0
Comment
Question by:oferpe71
[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
6 Comments
 

Author Comment

by:oferpe71
ID: 10675676
Increase Points to 300
0
 
LVL 14

Expert Comment

by:wayside
ID: 10679256
This stuff is almost certainly stored in the registry, where the sorting is done using an incrementing key of some sort (connection1, connection2, connection3, etc) or they are listed in order within the value (using a REG_MULTI_SZ type for example). If you use regedit to search your registry for the names listed in this dialog you should be able to find exactly where this is stored and then rearrange the order using plain old registry operations.

For example, one key I found is called DhcpServer and the value is "10.0.3.8 10.0.3.7" .

I can't seem to get to exactly the dialog you list in your question so I can't pin down the registry key exactly.

If your needs are more complicated you will probably have to use the COM interfaces such as  INetCfg, IEnumNetCfgComponent, etc., to find and change this information. There is sample code in the DDK that shows how to use these (look for a program called "bindview").

Hope this helps...
0
 
LVL 1

Expert Comment

by:GJanusz
ID: 10683740
After some poking around I found a couple things that may help you.

The connection list appears to be stored in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}

INetConnection looks interesting, but the only INetXXX interface I could find with ordering abilities was INetCfgComponentBindings [methods MoveBefore() and MoveAfter()].
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:oferpe71
ID: 10704418
Both of the answer didn't work.i Increase Points to 600 and ask it again
In windows you can go  Network and Dial-up->Connections->Advanced->Advanced Settings->Connections
dialog box where you can set priorities for connections.
The dialog box says:
"Connections are listed in the order in which they are accessed by DNS and
other network services".
In "Connections:" part you can set the order of  accessed.
my question is how to changed it in c/c++ (2000 / XP).


0
 

Author Comment

by:oferpe71
ID: 10704425
again Increase Points to 600
0
 
LVL 1

Accepted Solution

by:
mblais1 earned 600 total points
ID: 10762535
These articles may provide you with the information you need:

"How to Change the IP Address List Order Returned" -- http://support.microsoft.com/default.aspx?scid=kb;EN-US;171320

"Cannot Change the Binding Order for Remote Access Connections" -- http://support.microsoft.com/default.aspx?scid=kb;EN-US;311218
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

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