Need help with network infos!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I know that I asked this the last time, but now I have got some troubles
with the network infos...I do not want to use the OpenNETCF so I used the
sample by Alex F
(http://www.alexfeinman.com/download.asp?doc=AdapterInfo.zip) This project
works fine, but when I put it into my project (on Form2) then the compiler
tell me, that something is missing (Assembly or ...) for SelfMarshalledStruct.

And my second question is, how I can view the information e.g. on
label1.Text and not in the listView like in the sample...thx juvi
 
That sample works great.. if you can run the sample and it works and then it
doesn't work in your own project... clearly you forgot to add something. As
for the label versus listview question, I am sure you can adapt the code to
do that for you... Where are you having difficulty i.e. what have you tried
and failed... at some point you have to write your own code..

Cheers
Daniel
 
thx for your quick reply...I do not really find my mistake in my source...But
now I found a way the get the IP address:

IPHostEntry entry = Dns.GetHostByName(Dns.GetHostName());
foreach (IPAddress add in entry.AddressList)
lb_ip.Text = "IP address: " + add.ToString();

Is there a way to get the gateway, MAC address, subnet, DNS....like this
way? thx juvi
 
Is there a way to get the gateway, MAC address, subnet, DNS....like this
Only by pinvoking the APIs that Alex already has done in the wrapper (that
you already have).

A dirtier way is to read the subnet, router, dns entries from the
registry... I know this works on custom wince devices but never tried it on
a ppc.

Cheers
Daniel
 
Back
Top