Solved

Need to programmatically get the name of my Windows CE device

Posted on 2007-11-27
4
1,037 Views
Last Modified: 2013-12-21
I have a windows CE 5.0 device ( a Psion teklogix 7535 G2 handheld, specifically ), and I am trying to programmatically get the name of my device ( NOT the adapters, but the actual handheld's name).   I am using EVC ( Embedded Visual C++) to code.  You can manually see the device name that I am referring to if you go under System properties and then the device name tab.   I am at a complete loss as to how to do this.  Any help would be greatly appreciated.  Thanks!
0
Comment
Question by:meldsa
  • 2
  • 2
4 Comments
 
LVL 48

Accepted Solution

by:
Mikal613 earned 250 total points
Comment Utility
Its in the registry

HKEY_LOCAL_MACHINE\Ident]
   "OrigName"="WinCE"
   "Name"="DEviceNAme"
0
 

Author Comment

by:meldsa
Comment Utility
How do I programmatically access the registry?
0
 
LVL 48

Expert Comment

by:Mikal613
Comment Utility
0
 

Author Comment

by:meldsa
Comment Utility
The code that worked for me as per Mikal63's helpful suggestions is

if (RegOpenKeyEx( HKEY_LOCAL_MACHINE, _T("Ident"), 	                                    

                                0, KEY_READ, &hKey ) == ERROR_SUCCESS) 

{ 

     DWORD dwType = REG_SZ; 

     DWORD dwDataSize = 0; 

     CString deviceName; 

     if ( RegQueryValueEx( hKey, _T("name"), 0, &dwType, (PBYTE)NULL,   

               &dwDataSize ) == ERROR_SUCCESS) 

     { 

          RegQueryValueEx( hKey, _T("name"), 0, &dwType,

                  (PBYTE)(LPTSTR)deviceName.GetBuffer(dwDataSize + 1), 

                   &dwDataSize ); 

	  deviceName.ReleaseBuffer(); 

     }
 

     RegCloseKey(hKey); 

}

Open in new window

0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

With Windows Embedded Handheld, called Windows Mobile, Microsoft re-designed the user interface. The Start Icon moved down to the bottom, inside the menu bar area.   If you need to hide the Start Icon and/or the SIP (soft input panel, softwar…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now