I need the pocket pc device name, please help

  • Thread starter Thread starter Chad
  • Start date Start date
C

Chad

In the Pocket PC, under settings, about, deviceID, there
is device name that is used as the partnership/connection
name between the desktop and the pocket PC. I need to use
it in my pocket pc program and the deadline is quickly
approaching. Can anyone tell me how to get the device
name, preferrably using vb?

Chad
 
You need to read it from the registry. You could use the OpenNETCF.Registry
library for this www.opennetcf.org/registry.asp

The key required is located at
\HKeyLocalMachine\Ident\
and called Name

Therefore you could use:-
'place this at the top of your form code
Imports OpenNETCF.Win32


'place this where you want to get the value
Dim deviceName As String
Dim identKey As RegistryKey

identKey = Registry.LocalMachine.OpenSubKey("Ident")
deviceName = ident.GetValue("Name").ToString()

identKey.Dispose()

Hope this helps,

Peter

--
Peter Foot
Windows Embedded MVP

In The Hand
http://www.inthehand.com
 
Back
Top