Retrieve computer name of CE device

  • Thread starter Thread starter Ian Williamson
  • Start date Start date
I

Ian Williamson

Greetings,

Any thoughts on how to return the computer name of the CE
handheld? I am trying to invoke GetComputerName, but
either it is not supported or I am using the wrong
parameter list.

Cheers, Ian Williamson
 
I think that WinSock's gethostname() will give you the name. As far as I
can find, GetComputerName doesn't exist in Windows CE...

Paul T.
 
You can look this up in the registry at HKLM\Ident\Name

Using our Registry class, this is easy:

string deviceName = null;
int size = 128;

RegKey reg = new RegKey();
reg.Open(RegKey._HKEY_LOCAL_MACHINE,"Ident");
reg.QueryValue(out deviceName, "Name", ref size);
reg.Close();

HTH
Neil
 
Back
Top