Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2003-11-18
5
Medium Priority
?
984 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 48

Accepted Solution

by:
Mikal613 earned 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I think the most popular question in our Windows Mobile Programming zone is about the backlight - we all want to keep it on when our application is running. Few years ago the function SystemIdleTimerReset() did this job. On our side we had to detec…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

704 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