Hi,
I'm also experiencing this problem.
It's a Motorola MC75 with WinMo 6.1 Pro.
I'm using VS2008 and OpenNETCF 2.3.0.39.
I've factory reset the device and just deployed the software.
On this line:
if(oProps.DnsAddresses.Count == 1)
The application bombs out and VS reports loss of connection.
No exception is trappable.
Using .NET Reflector it fail in:
From IPInterfaceProperties
internal unsafe void RefreshPerAdapterInfo()
{
int pOutBufLen = 0;
if (this.m_dnsList != null)
{
this.m_dnsList.Changed -= new AddressChangedHandler(this.m_dnsList_Changed);
this.m_dnsList.InternalClear();
}
NativeMethods.GetPerAdapterInfo(this.m_info.Index, null, ref pOutBufLen);
byte[] buffer = new byte[pOutBufLen];
fixed (byte* numRef = buffer)
{
byte* pPerAdapterInfo = numRef;
NativeMethods.GetPerAdapterInfo(this.m_info.Index, pPerAdapterInfo, ref pOutBufLen);
this.m_autoConfigEnabled = *(((int*) pPerAdapterInfo)) != 0; //THIS IS THE LINE THAT FAILS.
pPerAdapterInfo += 4;
this.m_autoConfigActive = *(((int*) pPerAdapterInfo)) != 0;
pPerAdapterInfo += 8;
this.m_dnsList = (IPAddressCollection) IPUtility.ParseAddressesFromPointer(pPerAdapterInfo, this.m_info.AdapterName);
this.m_dnsList.Changed += new AddressChangedHandler(this.m_dnsList_Changed);
}
}
The bolded line is the line that fails if you step over it:
this.m_autoConfigEnabled = (((int) pPerAdapterInfo)) != 0;
It should be bolded in the code as well, then again it might end up with some *s around it.
Sorry, never used stackoverflow before.
Any, Chris, I hope you're reading this! :)
Regards,
James.