Can We Enumerate the Users
I Have found but this will not work outside the Palm Desktop
I Have seen applications that do enumerate users
Any Idea ?

BOOL
TraceAllUsers (IDispatch *pDispApp)
{
 ASSERT (pDispApp);

 IDesktopApplicationPtr spApp = pDispApp;
 ASSERT (spApp != NULL);  // QI failed?

 IUsersPtr spUsers = spApp->GetUsers ();
 LONG lCount = spUsers->GetCount ();

 IUserPtr spUser;
 _bstr_t bstrUser;

 for (long i = 0; i < lCount; i++) {  // VB Programmers Note: 0 based index
  spUser = spUsers->GetItem (i);
  bstrUser = spUser->GetName ();
  TRACE ("UserName: %s.\n", (LPCSTR)bstrUser);
 }

 // Finally Trace current user.
 spUser = spApp->GetCurrentUser ();
 bstrUser = spUser->GetName ();
 TRACE ("Current User: %s.\n", (LPCSTR)bstrUser);

 return TRUE;
}



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to