Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine that the User has Admin privileges
Message
 
 
À
04/09/2003 07:21:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00824487
Message ID:
00826104
Vues:
31
This message has been marked as a message which has helped to the initial question of the thread.
I don't think SYS(2600) was implemented fully in VFP6. Can you post your code for Domain User?

>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
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform