Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LookupAccountName()
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00831399
Message ID:
00831440
Views:
14
Hi Josh,

Here's a sample code. You'll have to add error checking at least.
DECLARE Long LookupAccountName IN Advapi32.DLL ;
  STRING lpSystemName, STRING lpAccountName, STRING @ Sid, Long @ cbSid, ;
  STRING @ ReferencedDomainName, Long @cchReferencedDomainName, STRING @ peUse

lcAccountName = "Josh" + CHR(0)
lcSID = REPLICATE(CHR(0), 32)
lcDomainName = REPLICATE(CHR(0), 64)
lnDNsize = LEN(lcDomainName)
lnSIDsize = LEN(lcSID)
lcpeUse = REPLICATE(CHR(0), 4)
? LookupAccountName(0, lcAccountName, @lcSID, @lnSIDsize, ;
		@lcDomainName, @lnDNsize, @lcpeUse)
>this api call retreives the user SID;
>any clue as to how to get this one to work in vfp?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform