Accessing IP Settings from C# .Net application

  • Thread starter Thread starter venkatyv
  • Start date Start date
V

venkatyv

Hi,

I am working with OMAP3530 platform and Windows CE 6.0. Which has working
wired network adaptor and i am writing managed device application in C# .Net.

Can any one tell me the way to access (read and update with new one) network
settings like IP Address, Net Mask, Default Gateway, DNS Server,,etc of the
ethernet adaptor from C# application.

I looked at www.opennetcf.com, but not able to identify the solution for
this.

I am very new to Managed apps. Kindly suggest me a URL where i find find
some sort of code.

Thanks in advance,
Venkat
 
In OpenNETCF, you need to enumerate the available Adapters, select the one
that you want, and modify its CurrentIpAddress (I'm looking at the older
version of the SDF that I had a hand in, but it probably hasn't changed that
much). When you do this, the registry should be changed with the new
address. You should be able to do the same thing with the subnet mask, etc.
Once you've made all of the changes, you need to tell NDIS to reload the
information from the registry, so you'd do something like Rebind-ing the
adapter.

If you want details on what you need to do yourself, you can search the old
messages from the days when OpenNETCF didn't yet exist or when it was just
starting to come together. I'm sure one or more of us posted about writing
stuff to the registry in HKLM/Comm/<AdapterName>, etc.

Paul T.
 
Back
Top