有人可以给我一个AllocateAndInitializeSid
从 C# 代码调用函数的完整且有效的示例吗?
我发现了这个:
BOOL WINAPI AllocateAndInitializeSid(
__in PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
__in BYTE nSubAuthorityCount,
__in DWORD dwSubAuthority0,
__in DWORD dwSubAuthority1,
__in DWORD dwSubAuthority2,
__in DWORD dwSubAuthority3,
__in DWORD dwSubAuthority4,
__in DWORD dwSubAuthority5,
__in DWORD dwSubAuthority6,
__in DWORD dwSubAuthority7,
__out PSID *pSid
);
而且我不知道如何构造此方法的签名 - 我应该如何处理PSID_IDENTIFIER_AUTHORITY
和PSID
类型?我应该如何通过它们 - 使用ref
or out
?