MC9094 "hosts file" registry entry not working

V Vedsatx Saddvv 3 years ago
0 0 0

Using the Symbol/Motorola MC9094, I'm having no satisfaction trying to use Microsoft's suggested equivalent of an "etc\hosts" file in Windows Mobile: HKLM\Comm\tcpip\Hosts\. Works great on my other WM devices, but no dice with the Motorola unit. My key:   HKLM\Comm\Tcpip\Hosts\www.foo.bar The key's values (name\type\data):   ExpireTime\REG_BINARY\99 99 99 99 99 99 99     - sets a large timeout for caching the entry   ipaddr\REG_BINARY\d1 55 87 67     - should resolve to www.google.com at 209.85.135.103 My (C#) code for testing a new hosts entry:
private

 

void ResolveName( string hostName ) {   try {     IPHostEntry hostEntry = Dns.GetHostEntry( hostName );     foreach( IPAddress ipAddress in hostEntry.AddressList ) {       Debug.WriteLine( ipAddress );     }   } catch( Exception ex ) {     Debug.WriteLine( "Exception: " + ex.ToString() );   } } If I pass in 'www.google.com' as hostName, I get whatever valid IP address the first EXTERNAL DNS returns to me. If I pass in 'www.foo.bar', I get the following exception: Exception: System.Net.Sockets.SocketException: The system detected an invalid pointer address in attempting to use a pointer argument in a call   at System.Net.Dns.ResolveInternal(String hostName)   at System.Net.Dns.GetHostEntry(String hostNameOrAddress)   at NameResolution.Form1.button1_Click(Object sender, EventArgs e)   at System.Windows.Forms.Control.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnClick(EventArgs e)   at System.Windows.Forms.ButtonBase.WnProc(WM wm, Int32 wParam, Int32 lParam)   at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)   at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)   at System.Windows.Forms.Application.Run What gives? Anyone else try to get this to work? Our ISP has been having issues with Name Services recently and I'd like to 'hard code' our IP address into our customers' units for increased reliability. I've got it working great on the Psion iKon, but these units are kicking my behind. Any suggestions are appreciated!

CONTACT
Can’t find what you’re looking for?