Esempio n. 1
0
 internal static extern bool LogonUser([MarshalAs(UnmanagedType.LPWStr)] string lpszUsername,
                                       [MarshalAs(UnmanagedType.LPWStr)] string lpszDomain,
                                       IntPtr lpszPassword,
                                       int dwLogonType,
                                       int dwLogonProvider,
                                       out SafeUserTokenHandle phToken);
Esempio n. 2
0
 internal static extern bool GetTokenInformation(SafeUserTokenHandle tokenHandle,
                                                 TokenInformationClass infoClass,
                                                 [Out] byte[] tokenInformation,
                                                 int cbTokenInformation,
                                                 out int returnLength);
Esempio n. 3
0
 internal static extern bool OpenProcessToken(IntPtr hProcess,
                                              TokenAccessLevels DesiredAccess,
                                              out SafeUserTokenHandle TokenHandle);
Esempio n. 4
0
 internal static extern bool PrivilegeCheck(SafeUserTokenHandle token,
                                            [In][Out] PRIVILEGE_SET requiredPrivileges,
                                            out bool result);