G Guest Nov 17, 2004 #1 What is the C# equivalent of the Win32 AdjustTokenPrivileges API [???] Is there any at all?
I Ignacio Machin \( .NET/ C# MVP \) Nov 17, 2004 #2 Hi, I'm not aware pf a replacement in the framework, did you tried to P/Invoke it? Cheers,
G Guest Nov 17, 2004 #3 [DllImport("advapi32.dll", SetLastError=true)] static extern bool AdjustTokenPrivileges(IntPtr TokenHandle, bool DisableAllPrivileges, ref TOKEN_PRIVILEGES NewState, UInt32 BufferLength, IntPtr PreviousState, IntPtr ReturnLength); Ignacio Machin ( .NET/ C# MVP ) said: Hi, I'm not aware pf a replacement in the framework, did you tried to P/Invoke it? Cheers, -- Ignacio Machin, ignacio.machin AT dot.state.fl.us Florida Department Of Transportation Nadav said: What is the C# equivalent of the Win32 AdjustTokenPrivileges API [???] Is there any at all? Click to expand... Click to expand...
[DllImport("advapi32.dll", SetLastError=true)] static extern bool AdjustTokenPrivileges(IntPtr TokenHandle, bool DisableAllPrivileges, ref TOKEN_PRIVILEGES NewState, UInt32 BufferLength, IntPtr PreviousState, IntPtr ReturnLength); Ignacio Machin ( .NET/ C# MVP ) said: Hi, I'm not aware pf a replacement in the framework, did you tried to P/Invoke it? Cheers, -- Ignacio Machin, ignacio.machin AT dot.state.fl.us Florida Department Of Transportation Nadav said: What is the C# equivalent of the Win32 AdjustTokenPrivileges API [???] Is there any at all? Click to expand... Click to expand...