Have you tried news2news.com? Looks like you need to be a member to access the examples for LookupAccountSid though.
Fred On Fri, Mar 23, 2012 at 10:49 AM, Thierry Nivelet <[email protected]>wrote: > Hi, > > Does anyone have a VFP code sample using LookupAccountSid() Win API > function? > > Thanks, > thn > > --------------------------- > LookupAccountSid > > The LookupAccountSid function accepts a security identifier (SID) as > input. It retrieves the name of the account for this SID and the name of > the first domain on which this SID is found. > > BOOL WINAPI LookupAccountSid( > __in_opt LPCTSTR lpSystemName, > __in PSID lpSid, > __out_opt LPTSTR lpName, > __inout LPDWORD cchName, > __out_opt LPTSTR lpReferencedDomainName, > __inout LPDWORD cchReferencedDomainName, > __out PSID_NAME_USE peUse > ); > > lpSystemName [in, optional] > A pointer to a null-terminated character string that specifies the > target computer. This string can be the name of a remote computer. If > this parameter is NULL, the account name translation begins on the local > system. If the name cannot be resolved on the local system, this > function will try to resolve the name using domain controllers trusted > by the local system. Generally, specify a value for lpSystemName only > when the account is in an untrusted domain and the name of a computer in > that domain is known. > > lpSid [in] > A pointer to the SID to look up. > > lpName [out, optional] > A pointer to a buffer that receives a null-terminated string that > contains the account name that corresponds to the lpSid parameter. > > cchName [in, out] > On input, specifies the size, in TCHARs, of the lpName buffer. If the > function fails because the buffer is too small or if cchName is zero, > cchName receives the required buffer size, including the terminating > null character. > > lpReferencedDomainName [out, optional] > A pointer to a buffer that receives a null-terminated string that > contains the name of the domain where the account name was found. > On a server, the domain name returned for most accounts in the > security database of the local computer is the name of the domain for > which the server is a domain controller. > On a workstation, the domain name returned for most accounts in the > security database of the local computer is the name of the computer as > of the last start of the system (backslashes are excluded). If the name > of the computer changes, the old name continues to be returned as the > domain name until the system is restarted. > Some accounts are predefined by the system. The domain name > returned for these accounts is BUILTIN. > > cchReferencedDomainName [in, out] > On input, specifies the size, in TCHARs, of the > lpReferencedDomainName buffer. If the function fails because the buffer > is too small or if cchReferencedDomainName is zero, > cchReferencedDomainName receives the required buffer size, including the > terminating null character. > > peUse [out] > A pointer to a variable that receives a SID_NAME_USE value that > indicates the type of the account. > > -- > Thierry Nivelet > FoxInCloud > Give your VFP app a second life in the cloud > http://foxincloud.com/ > > > > --- StripMime Report -- processed MIME parts --- > multipart/alternative > text/plain (text body -- kept) > text/html > --- > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAJCBksqRvGc_RHWM+=1Zu66d6otB27sbJjPUcJVX9Q0kKP=c...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

