ok, no doubt this question has been asked before but here goes!

i'm interested in retrieving the Palmpilot UserID, which i believe is a 
reasonably unique identifier for a particular palm device (well, makes the palm 
more unique when combined with user name).

i have seen sample code that retrieves this value directly from a Palmpilot 
system resource database. this method seems inherently flaky and i would much 
prefer an API call (because of course the system resource database structure 
may change in the future, but the API call will still work).

i believe people are using DlkGetSyncInfo() (from DLServer.h) to retrieve the 
user's hotsync name. there's a function in the DLClient.h header:

Err DlkReadUserInfo(Byte refNum, CharPtr userNameBufP, DWordPtr userIDP,
                DWordPtr lastSyncPCP);

that looks like it can be used to retrieve the userID. however it requires 
a 'refNum' which looks like a handle to identify a 'Dlk' session (as evidenced 
by the 

Err DlkInitClient(DlkClientParamPtr paramP, BytePtr refNumP)

function in the same header). 

alas none of this stuff is documented because it looks to all be PalmOs 
internals (to do with Hotsync?)...i don't think from a normal app i can safely 
call DlkInitClient()? and of course that means i can't call DlkReadUserInfo 
because i don't have a refNum...hmmm, come to think of it DlkReadUserInfo might 
be grabbing stuff from a Hotsync stream (rather than the palm).

ANYWAY, can anybody supply a safe, API call to retrieve the Palm's User ID (i 
already know how to get the username)?

thanks in advance!

stuart
nicholson

Reply via email to