Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "AdjustTokenPrivileges" in [All]

fltlib

.

Consider using RtlAdjustPrivilege() to adjust privileges, much easier than getting AdjustTokenPrivileges() to work

user32

.

To 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.

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 & ".")

.
Documentation
[AdjustTokenPrivileges] on MSDN!

 
Access PInvoke.net directly from VS: