Desktop Functions: Smart Device Functions:
|
Search Results for "AdjustTokenPrivileges" in [All]user32To shut down or restart the system on NT/2K/XP, the calling process must use the AdjustTokenPrivileges function to enable the SE_SHUTDOWN_NAME privilege. fltlib2: FilterLoad Consider using RtlAdjustPrivilege() to adjust privileges, much easier than getting AdjustTokenPrivileges() to work advapi32
static extern bool AdjustTokenPrivileges(IntPtr TokenHandle,
static extern bool AdjustTokenPrivileges(IntPtr TokenHandle,
Private Function AdjustTokenPrivileges( _
Private Function AdjustTokenPrivileges( _
Declare Function AdjustTokenPrivileges Lib "advapi32.dll" (
internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall,
retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
if (NativeMethods.AdjustTokenPrivileges(tokenHandle, false,
throw new InvalidOperationException("AdjustTokenPrivileges failed.", win32Exception);
throw new InvalidOperationException("AdjustTokenPrivileges failed.", win32Exception);
internal static extern bool AdjustTokenPrivileges(IntPtr tokenhandle,
Private Function AdjustTokenPrivileges( _
If Not AdjustTokenPrivileges(hToken, False, newState, Marshal.SizeOf(prevState), prevState, returnLength) Then
"AdjustTokenPrivileges failed with error " & lastWin32Error.ToString & ".") |