There is no GetComputerName API on Windows CE and I could not find any Compact Framework class to obtain this functionality.
On these devices you can find the computer (pda) name in the registry at HKEY_LOCAL_MACHINE\Ident\Name
If you want to take a look at the registry on your devices/emulators, you can use the free PHM registry editor:
The C++ code to obtain the name of the device is the following:
The wstring class comes from the STL (Standard Template Library). To show the PDA name in a MessageBox, you can use this code:
If you need to get it using C#, just use the Microsoft.Win32.Registry class.
Privacy | Legal Copyright © Raffaele Rialdi 2009, Senior Software Developer, Consultant, p.iva IT01741850992, hosted by Vevy Europe Advanced Technologies Division. Site created by Raffaele Rialdi, 2009 - 2015 Hosted by: © 2008-2015 Vevy Europe S.p.A. - via Semeria, 16A - 16131 Genova - Italia - P.IVA 00269300109