PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Retrieve computer name of CE device
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Retrieve computer name of CE device
![]() |
Retrieve computer name of CE device |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Greetings,
Any thoughts on how to return the computer name of the CE handheld? I am trying to invoke GetComputerName, but either it is not supported or I am using the wrong parameter list. Cheers, Ian Williamson |
|
|
|
#2 |
|
Guest
Posts: n/a
|
I think that WinSock's gethostname() will give you the name. As far as I
can find, GetComputerName doesn't exist in Windows CE... Paul T. "Ian Williamson" <bmcpeake@nospam.shaw.ca> wrote in message news:047c01c344de$6c45ad40$a501280a@phx.gbl... > Greetings, > > Any thoughts on how to return the computer name of the CE > handheld? I am trying to invoke GetComputerName, but > either it is not supported or I am using the wrong > parameter list. > > Cheers, Ian Williamson > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
You can look this up in the registry at HKLM\Ident\Name
Using our Registry class, this is easy: string deviceName = null; int size = 128; RegKey reg = new RegKey(); reg.Open(RegKey._HKEY_LOCAL_MACHINE,"Ident"); reg.QueryValue(out deviceName, "Name", ref size); reg.Close(); HTH Neil -- Neil Cowburn OpenNETCF.org Advisory Board Member www.opennetcf.org "Ian Williamson" <bmcpeake@nospam.shaw.ca> wrote in message news:047c01c344de$6c45ad40$a501280a@phx.gbl... > Greetings, > > Any thoughts on how to return the computer name of the CE > handheld? I am trying to invoke GetComputerName, but > either it is not supported or I am using the wrong > parameter list. > > Cheers, Ian Williamson > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

