Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sun Mar 18, 2018 4:31 am

All times are UTC - 7 hours

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: LMHOSTS?
PostPosted: Thu Oct 16, 2008 6:45 am 

Joined: Thu Aug 21, 2008 7:23 am
Posts: 2
Is there a way to emulate the behavior of an LMHOSTS file on the Treq? Corporate security won't pass our DNS through the firewall to the Treq (coming in over a cell connection) and I need to be able to resolve hostnames to addresses in a manual way.

 Post subject: Re: LMHOSTS?
PostPosted: Tue Oct 21, 2008 12:58 pm 
Site Admin
Site Admin
User avatar

Joined: Wed Mar 08, 2006 12:35 pm
Posts: 31
Location: Salt Lake City, Utah
This can be done via a registry setting. You will need to add a registry key and value for each host name/IP address pair. For example, the following registry key and value can be used to manually resolve the some_hostname host name to


To test, save a text file with the above 2 lines to a USB memory drive. Name the file <something>.reg. Launch the program \HardDisk\bin\RegEditCE.exe, and use File, Import to import the .reg file. Start a command shell (Start, Programs, Command Prompt), then try to ping some_hostname. The TREQ should resolve the hostname to the correct IP. Note that this test assumes that ICMP ping packets are not blocked by a firewall -- test this by pinging the IP address first to test connectivity.

You can use the Registry API to create these keys and values programmatically (e.g. RegSetValueEx, RegCreateKeyEx).

Brian Crofts

QSI Corporation

801-466-8770 x431

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group