| 
            
              WindowsApiAdjustTokenPrivileges Method
             | 
          
        
        
            Win32 AdjustTokenPrivileges function.
            
        
        Namespace: GSF.InteropAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.258-beta+f8b6aa3dbfe0b4cc2b0b0760dd5d2a3dd4f59d09
Syntax[DllImportAttribute("advapi32.dll", SetLastError = true)]
public static bool AdjustTokenPrivileges(
	IntPtr TokenHandle,
	bool DisableAllPrivileges,
	ref WindowsApiTOKEN_PRIVILEGES NewState,
	int BufferLength,
	IntPtr PreviousState,
	ref int ReturnLength
)<DllImportAttribute("advapi32.dll", SetLastError := true>]
Public Shared Function AdjustTokenPrivileges ( 
	TokenHandle As IntPtr,
	DisableAllPrivileges As Boolean,
	ByRef NewState As WindowsApiTOKEN_PRIVILEGES,
	BufferLength As Integer,
	PreviousState As IntPtr,
	ByRef ReturnLength As Integer
) As Booleanpublic:
[DllImportAttribute(L"advapi32.dll", SetLastError = true)]
static bool AdjustTokenPrivileges(
	IntPtr TokenHandle, 
	bool DisableAllPrivileges, 
	WindowsApiTOKEN_PRIVILEGES% NewState, 
	int BufferLength, 
	IntPtr PreviousState, 
	int% ReturnLength
)
[<DllImportAttribute("advapi32.dll", SetLastError = true)>]
static member AdjustTokenPrivileges : 
        TokenHandle : IntPtr * 
        DisableAllPrivileges : bool * 
        NewState : WindowsApiTOKEN_PRIVILEGES byref * 
        BufferLength : int * 
        PreviousState : IntPtr * 
        ReturnLength : int byref -> bool GSF.Interop.WindowsApi.AdjustTokenPrivileges = function(TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength);
 View SourceParameters
- TokenHandle  IntPtr
 -  
 - DisableAllPrivileges  Boolean
 -  
 - NewState  WindowsApiTOKEN_PRIVILEGES
 -  
 - BufferLength  Int32
 -  
 - PreviousState  IntPtr
 -  
 - ReturnLength  Int32
 -  
 
Return Value
Boolean
See Also