How can i get system or user information with cf?

H

Hans Hahn

Hi,

In standard .net there is the environment class designed to get user name,
machine name, ... and many other infos like this. in the cf.net the
retrieved info is very limited.
how can i get the user name and the machine name with the cf.net.

thx Hans
 
P

Paul G. Tobey [eMVP]

Generally, if you can't find the information that you want in .NET CF
directly, look at the C SDK for the device and see what you can find there.
In this case, GetUserNameEx() might work for you, although you haven't told
us *anything* about your target device. The 'machine name' might be best
found via DNS.GetHostName().

Paul T.
 
P

Peter Foot [MVP]

Some of these settings are wrapped in the EnvironmentEx class in the SDF
(www.opennetcf.org/sdf/) which gets the data from the registry. The
MachineName implementation should work on any Windows CE flavour. The
Username property is a bit less universal, our class reads the owner info
from a Pocket PC/Smartphone.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top