Get the ComputerName of a PocketPC?

  • Thread starter Thread starter Zanna
  • Start date Start date
Z

Zanna

Hi,

How can I get the Computer name of a PocketPC.
Or at least the username.

I see the class SystemInformation but for the CF is not usefull :(

What's the triks?

Thank you
 
This will give you the name of your device if you execute this call locally
on it: System.Net.Dns.GetHostName();
 
Try the following code:

public static string GetDeviceName()

{

string deviceName = "";

try

{

OpenNETCF.Win32.RegistryKey regKey =
OpenNETCF.Win32.Registry.LocalMachine.OpenSubKey("Ident",true);

if(regKey!=null)

deviceName = regKey.GetValue("Name").ToString();

}

catch{}

return deviceName;

}


--
_________________________________
Jared Miniman, MS-MVP Mobile Devices
Mobile Computer Consultant

ActiveSync problems?
http://www.microsoft.com/mobile/pocketpc/support/help/activesync.asp
Connection Mngr Q's?
http://www.microsoft.com/mobile/pocketpc/tutorials/connectionmanager
 
Back
Top