I was trying to write a C# equivalent for ACCESS_DENIED_ACE
struct as defined in MSDN:
typedef struct _ACCESS_DENIED_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} ACCESS_DENIED_ACE, *PACCESS_DENIED_ACE;
Where SidStart
is the first DWORD of a trustee's SID. The remaining bytes of the SID are stored in contiguous memory after the SidStart member.
I have seen examples where its used like (PSID) &accessAllowedAce->SidStart
as in,
if ( EqualSid (pSid, (PSID) &accessDeniedAce->SidStart) )
{
//
}
Now how can I write the C# StructLayout
for this and how can I use it in EqualSid
function, also explain how your solution works.