I'd suggest you use the COM (or ActiveX) control included in the CDK to
access the user list and other user data. Download the Conduit Developer's
Kit to get the control, docs and examples.
----- Original Message -----
From: "vikrant" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, December 15, 2003 2:00 AM
Subject: How To Enumerate Users
> 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/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/