Connecting Tech Pros Worldwide Forums | Help | Site Map

What is the C# equivalent of the Win32 AdjustTokenPrivileges API

Nadav
Guest
 
Posts: n/a
#1: Nov 16 '05
What is the C# equivalent of the Win32 AdjustTokenPrivileges API [???]
Is there any at all?
--
Nadav
http://www.ddevel.com

Ignacio Machin \( .NET/ C# MVP \)
Guest
 
Posts: n/a
#2: Nov 16 '05

re: What is the C# equivalent of the Win32 AdjustTokenPrivileges API


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" <Nadav@discussions.microsoft.com> wrote in message
news:C3059339-064A-48D0-97FB-D4F16AEE9D5D@microsoft.com...[color=blue]
> What is the C# equivalent of the Win32 AdjustTokenPrivileges API [???]
> Is there any at all?
> --
> Nadav
> http://www.ddevel.com[/color]


Brian Keating EI9FXB
Guest
 
Posts: n/a
#3: Nov 16 '05

re: What is the C# equivalent of the Win32 AdjustTokenPrivileges API



[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 )" wrote:
[color=blue]
> 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" <Nadav@discussions.microsoft.com> wrote in message
> news:C3059339-064A-48D0-97FB-D4F16AEE9D5D@microsoft.com...[color=green]
> > What is the C# equivalent of the Win32 AdjustTokenPrivileges API [???]
> > Is there any at all?
> > --
> > Nadav
> > http://www.ddevel.com[/color]
>
>
>[/color]
Closed Thread