OpenNETCF.Net - AdapterInformation - Exception

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

Guest

Hi, I am trying to make a little adapterinfo program and I saw a good sample
(WifiDiscovery Sample). But I get the following exception at this line:

lb_MAC.Text = BitConverter.ToString(m_currentAdapter.MacAddress);

NullReferenceException --> use the new keyword....

How can I solve the problem? Thank you...... juvi
 
Is m_currentAdapter null? Is lb_MAC null? Does MacAddress contain anything?
Can you use breakpoints to debug your code?

Cheers
Daniel
 
Thank you for your reply....I am using the debug mode through the emulator
and I see that m_currentAdapter is null. lb_MAX is not null. If I click in
m_currentAdapter then I only see the Static Member DEVICE_NAME. But When I
try the origin code from the sample application on my ppc then it works. My
code is not working....juvi
 
So you have sample code that works and your code that doesn't. Compare the
two to find out where in the code that works the adapter object gets
created. Clearly in yours, it doesn't.

Cheers
Daniel
 
If someone has the "wi-Fi Discovery" application with NETCF 2.0 working. Will you please post the code. I have been unable to get it to expose the Adapter Information.
Thanks fjp
 
If someone has the "wi-Fi Discovery" application with NETCF 2.0 working. Will you please post the code. I have been unable to get it to expose the Adapter Information.
Thanks fjp
 
If someone has the "wi-Fi Discovery" application with NETCF 2.0 working. Will you please post the code. I have been unable to get it to expose the Adapter Information.
Thanks fjp
 
The 'discovery' code *does* work. What problem are you encountering? What
"Adapter Information" are you talking about?

Paul T.
 
Back
Top