Getting Device ID / Network name

  • Thread starter Thread starter Zac Maclean
  • Start date Start date
Z

Zac Maclean

First:

Been here:
http://msdn.microsoft.com/mobility/.../retrievedeviceid.asp#retrievedeviceid_topic3

and I downloaded a c# example, but it doesn't work on the 2002 or 2003
emulator.


Ok, so I have 15 PDA units going into rollout, I want to be able to identify
each PDA by deviceID (from the About applet in settings)
Each PDA will be accessing a SQL publication based on this name.

If there is a working example in any language, I can build it as DLL, and
import into my VB project.


This also leads into another question about SQL / SQLCE merge publications,
but if I can't get this part working, the other part isn't as important..


Z
 
Ok, found something no developer should be without....

http://www.opennetcf.org/PermaLink.aspx?guid=3a013afd-791e-45ef-802a-4c1dbe1cfef9

The part in particular that I used deals with the registry, and
HKLM/Ident/Name is where the Device ID is stored.


<code>
Dim reg_reader As OpenNETCF.Win32.Registry

Dim myreader As String

myreader = reg_reader.LocalMachine.OpenSubKey("Ident").GetValue("Name")

</code>



Thats all it took. The install for OpenNETCF made the references
available. Just need to add the base OpenNETCF reference.

Z
 
Back
Top