Possible Solution 1: Disable ICS altogether. You can stop the ICS service, so none of the connections will be in a shared state and will not conflict with NetConLib.dll . (Not sure about hidden ones, you should try).
You can control it from the command line using: net start SharedAccess or net stop SharedAccess
In addition, if you need to disable it during reboot, you must disable the service using: sc config SharedAccess start= disabled
Notes and links:
- Running
sc config display "start = OPTIONS" and some others. Space below = and parameter is required. You can check the result of services.msc from Run or cmd. - Exec
net to display options. The name of the service is located on services.msc in the "Service Name" section of ICS. - netsh routing no longer works on Win7, so you can start / stop / enable / disable but not enable a specific interface. You must install handMouse ... This does not work under Win7 ICS in XP system
sc config command was from this cool documentation I found today .
Possible Solution 2: Remove Ghost Interfaces? I also try to use adapters and interfaces in the registry and see nothing about show / hid / ghost / enabled or the like. I am also looking here for kb 314053 for the registry registry.
I can fix the attempt. Possible solution 1 :) or directly remove the hidden / ghost adapters. You can do this in two ways. The Devcon removal option will also remove the drivers.
The main use for finding network cards is devcon findall =net , you can also devcon findall =net *ndis* list all ndis cards. The main use for removal will be devcon remove =net *ndis* to remove all types of ndis cards.
I am also trying to enable / disable commands, but nothing has changed in the list of network interfaces. I removed my own Wi-Fi card to check it :) In any case, I did not notice any options about the "Unhide" function for such devices in the partition panel.
NEW EDIT (too many details, right?)
I found a tool called ics-manager from this superuser entry. - read answer No. 3 You can download directly from the utapyngo Git project page .
It is based on the .Net Framework 4. Yo must download and run build.bat to compile both exe (you also have a C # source). The solution is to get only the compiled version of IcsManager.exe (command line version) with the only necessary library IcsManagerLibrary.dll.
This application also uses NetConLib.dll , so you can use it or read the source to find out which function you need and implement it in your development.
If you have problems with the IP range "192.168.137.1", you can install it from the registry on an ongoing basis or run netsh interface ipv4 set address name="YOUR-INTERFACE" source=static addr=192.168.2.1 mask=255.255.255.0 . You will get ugly errors when starting the netsh interface using tildes or accutes in the interface name (the default Spanish ethernet name is "Conexión de áreal local" ... just kidding).
Note. You can pack it all at once, using Bat to call IcsManager.exe 'first with the necessary arguments, and then run the netsh configure command later from the same batch to the full configuration.
A comment. About the hint when trying to overwrite a common connection, this, of course, because only one can be shared. I also see that they are configured as Public and Home to set the pair, but I can’t find where the registry key is ... Also do some export from reg and use Diffs, no luck. I got stuck in diff and started looking for “ICS C ++ and C #” on Google and then found it.
Optional: I got netsh him in a bat and he launched for Windows Task when an Ethernet cable is connected (here's how) to use it with Android Reverse Tethering. As you can see, I am too interesting in your question because it makes me study better and also learned a lot.
I'm sorry for my bad english. I do not. Best wishes.