x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

How do I configure my network adapter programmatically?

I dunk for bananas Page Icon Posted 2024-02-14 10:12 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
707
Location:
Europe
Status:
I'm looking to make a tool (ideally using eVB) that configures my ethernet adapter to use a static IP and a specific DNS server. I'm looking to be able to programmatically change this.

Any ideas? Is it just a specific registry section I need to edit?
 Top of the page
stingraze Page Icon Posted 2024-02-15 1:58 AM
#
Avatar image of stingraze
Subscribers
H/PC Vanguard

Posts:
3,689
Location:
Japan
Status:
A good starting point might be this:
I can't seem to connect to the site now so this is an archive link.

https://web.archive.org/web/20151019101728/https://www.codeproject.com/Articles/3403/Power-up-the-TCP-IP-capability-in-your-PocketPC-ap

Maybe study more about obtaining IP address from eVB and you'll be good.

This is VB.NET, but you might be able to figure out similar methods for eVB.
https://stackoverflow.com/questions/30648584/setting-static-ip-address-vb-net

Edited by stingraze 2024-02-15 1:59 AM
 Top of the page
torch Page Icon Posted 2024-02-15 2:44 AM
#
Avatar image of torch
Subscribers
H/PC Guru

Posts:
5,761
Location:
United States 
Status:
Idea number two could the registry be used to do this? Like export a backup and reimport a backup?

Obviously doesn’t answer your question but it’s potentially a different way it could be possible ?
Sorry if that doesn’t help at all
 Top of the page
C:Amie Page Icon Posted 2024-02-15 12:20 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,012
Location:
United Kingdom
Status:
It is in HKLM\comm\{your driver}\Parms\Tcpip

You will have to re-bind the adapter though, newer CE has IOCTL_NDIS_REBIND_ADAPTER for this.
https://learn.microsoft.com/en-us/previous-versions/windows/embedded/ms901403(v=msdn.10)?redirectedfrom=MSDN

https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/304296

I think you can also use
https://learn.microsoft.com/en-us/previous-versions/ms892862(v=msdn.10)


Older than that, I've no clue.



https://sps-support.honeywell.com/s/article/How-to-programmatically-add-change-a-static-IP-address-without-rebooting-the-device
 Top of the page
I dunk for bananas Page Icon Posted 2024-02-16 4:12 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
707
Location:
Europe
Status:
C:Amie - 2024-02-15 12:20 PM


It is in HKLM\comm\{your driver}\Parms\Tcpip

You will have to re-bind the adapter though, newer CE has IOCTL_NDIS_REBIND_ADAPTER for this.
https://learn.microsoft.com/en-us/previous-versions/windows/embedded/ms901403(v=msdn.10)?redirectedfrom=MSDN

https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/304296

I think you can also use
https://learn.microsoft.com/en-us/previous-versions/ms892862(v=msdn.10)


Older than that, I've no clue.



https://sps-support.honeywell.com/s/article/How-to-programmatically-add-change-a-static-IP-address-without-rebooting-the-device


Thank you, those are the entries I was looking for! I can use ndisconfig to rebind it

Do you know how I can write to the registry using eVB?
 Top of the page
C:Amie Page Icon Posted 2024-02-16 4:48 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,012
Location:
United Kingdom
Status:
I think you just need to call RegCreateKeyEx and RegSetValueEx as needed

http://www.jasinskionline.com/windowsapi/ref/r/regsetvalueex.html
 Top of the page
Jump to forum:
Seconds to generate: 0.140 - Cached queries : 64 - Executed queries : 8