Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine that the User has Admin privileges
Message
From
04/09/2003 07:21:34
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00824487
Message ID:
00825950
Views:
27
On my PC (Win 2000, VFP6 SP5) SYS(2600) still returns empty string.
Instead of
lcBuffer = SYS(2600, Long2Num(lcBufPtr), 32)
if I use
lcBuffer = GetStrFromMem( lcBufPtr )
it works.
This works for a local user. I still have to make it work for Domain User in which case NetUserGetInfo returns error 2221 which means Username not found.
I guess I'll have to use IADS for it.
Thanx a lot. Your help is widely appreciated.
Hitendra

FUNCTION GetStrFromMem(nAddr)
* converting allocated in memory Unicode string to a VFP string
DECLARE RtlMoveMemory IN kernel32 As CopyMemory STRING @dst, INTEGER src, INTEGER nLen
#DEFINE BUF_SIZE 128
LOCAL cBuffer
cBuffer = Repli(Chr(0), BUF_SIZE)
= CopyMemory(@cBuffer, nAddr, BUF_SIZE)
RETURN cBuffer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform