• Welcome to Jose's Read Only Forum 2023.
 

ConvertSidToStringSid & ConvertStringSidToSid functions

Started by Jean-Pierre Leroy, April 17, 2013, 05:38:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jean-Pierre Leroy

Dear all,

I was not able to find these two functions in AfxSid.inc

Any idea how to use them with PB.

Thanks.
Jean-Pierre

José Roca


DIM bRes AS LONG, pSid AS SID PTR
bRes = ConvertStringSidToSid("<Sid string>", pSid)
...
Later release it with LocalFree(pSid)

DIM pStrSid AS ASCIIZ PTR  ' or WSTRINGZ if using unicode
bRes = ConvertSidToStringSid(pSid, pStrSid)
IF bRes THEN ? @pStrSid
...
Later release it with LocalFree(pStrSid)


Jean-Pierre Leroy


Jean-Pierre Leroy

#3
Hi Jose,

Sorry for all my questions; it was my fault, I just forgot to include "Sddl.inc" in my source code !

Now with the

#Include "Sddl.inc"


It works perfectly.
Thank for your support.
Jean-Pierre