How can i get the owner's name of the device

  • Thread starter Thread starter fox23
  • Start date Start date
F

fox23

hi all~

i wanna access some information about the device owner such as
userName in my application.

But i can't find a way (via C# or Cpp)

Any suggestions?

Thanks in advance

:-)
 
If you're using WM5 you can use the SNAPI extensions namely the
SystemState.OwnerName property:http://msdn2.microsoft.com/en-us/library/microsoft.windowsmobile.stat...

Alternatively on older device read the registry:
HKEY_CURRENT_USER\ControlPanel\Owner - if I remember corrently.
--
Simon Hart
Visual Developer - Device Application Development MVPhttp://simonrhart.blogspot.com










- Show quoted text -

Thanks a lot !
I'll try it later
BTW:I'm using a WM5 Device for test
 
On Windows Mobile 5.0 and above use the
Microsoft.WindowsMobile.Status.SystemState class e.g.

string owner = SystemState.OwnerName;

For C++ you can read the value from the registry (I think it is listed in
snapi.h). For Pocket PC devices prior to 5.0 the owner data was stored in a
binary registry key which you have to parse specific segments of for the
Name, email etc. There is an article here with details:-
http://www.pocketpcdn.com/articles/...=45&atb.set(a_id)=4051&atb.perform(details)=&

Peter
 
Back
Top