Solved

Getting System Name or Device Name for Pocket PC 2002 using .NET Compact Framework

Posted on 2003-11-18
5
906 Views
Last Modified: 2013-12-27
I am programming in .Net compact framework and using vb.net at the moment. I am porting over a desktop program to pocket pc having to recode most of the things, if not all. My question is: I used to use Environ("ComputerName") in vb 6 to get the computer name in order to identify this client that is going to connect to my remote database server running on SQL Server 2000. Now, I need to do the same on a pocket PC and i found out there's System name property under asset viewer>my pocket pc>Identity>System name which is equilvalent to About>Device ID tab > Device name, which i believe could be an equilvalent for a computername under windows Environment.

Can someone enlighten me on how to get this done in VB.net or even c#.net under .net compact framework?
0
Comment
Question by:imchris
5 Comments
 
LVL 48

Accepted Solution

by:
Mikal613 earned 125 total points
ID: 9779704
0
 

Expert Comment

by:papte
ID: 10135483
Hi,

The Device name is there in the registry at[HKEY_LOCAL_MACHINE\Ident] .
I did registry editing in VC6 using RegQueryValueEx() & RegOpenKeyEx().

0
 
LVL 7

Expert Comment

by:CJCraft
ID: 10303931
You can get the Device ID using the following:
http://samples.gotdotnet.com/quickstart/CompactFramework/doc/deviceid.aspx

It is the serial number for the device.

You should be able to get the device name using the following:
System.Net.Dns.GetHostName();
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to stop auto installation of  various app in Micromax A310 4 437
ios, android app to print to pdf 3 44
Snap chat on Android 8 61
smart phone memory and app 3 78
Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question