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