[DllImport("advapi32.dll", SetLastError=true, PreserveSig=true)]
static extern uint LsaAddAccountRights(
IntPtr PolicyHandle,
IntPtr AccountSid,
LSA_UNICODE_STRING[] UserRights,
uint CountOfRights);
Declare Function LsaAddAccountRights Lib "advapi32.dll" (TODO) As TODO
None.
From the SDK:
If the function succeeds, the return value is STATUS_SUCCESS.
If the function fails, the return value is an NTSTATUS code, which can be the following value or one of the LSA Policy Function Return Values.
Return code Description
STATUS_NO_SUCH_PRIVILEGE One of the privilege names is invalid.
You can use the LsaNtStatusToWinError function to convert the NTSTATUS code to a Windows error code.
Please add some!
See LsaOpenPolicy
Do you know one? Please contribute it!