473,405 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

What is the C# equivalent of the Win32 AdjustTokenPrivileges API

What is the C# equivalent of the Win32 AdjustTokenPrivileges API [???]
Is there any at all?
--
Nadav
http://www.ddevel.com
Nov 16 '05 #1
2 4915
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" <Na***@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...
What is the C# equivalent of the Win32 AdjustTokenPrivileges API [???]
Is there any at all?
--
Nadav
http://www.ddevel.com

Nov 16 '05 #2

[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:
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" <Na***@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...
What is the C# equivalent of the Win32 AdjustTokenPrivileges API [???]
Is there any at all?
--
Nadav
http://www.ddevel.com


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Gernot Frisch | last post by:
and what for would I need it? -- -Gernot int main(int argc, char** argv) {printf ("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);} ________________________________________...
7
by: Kenjis Kaan | last post by:
I would like to use the crypt function in a Win32 (ie. C program using Visual C++ 6.0 compiler). I wrote a little program to see if it will link but it didn't. So I guess maybe the function isn't...
4
by: groleo | last post by:
Hi. I'm trying to port a piece of code, written for win32, that uses the finddata_t structure. Is there an equivalent , or a work-around, that implement finddata_t on *nix platforms?
6
by: Angus Comber | last post by:
Hello I am testing and think I have a timing issue. On Windows I used sleep function to wait a while. Is there a C Runtime equivalent? I need to port some code to Linux. Angus
9
by: Nadav | last post by:
Hi, I am tring to pass messages between threads, using the good old C++ I would call the GetMessage/PostThreadMessage APIs, Now, I am using C# and i can't find any equivalenty for these calls, any...
5
by: Lonewolf | last post by:
Hi all, I am not sure if it is even possible to do it from .NET itself. Is there something like a waitable timer which can resume the system from its hibernate or standby (S3: suspend to ram)...
2
by: BruceWho | last post by:
Hi, all I used inet_aton in my Visual C++ application, but got an error: error C2065: 'inet_aton' : undeclared identifier I searched the web and it seems that Visual C++ doesn't have...
10
by: Bishoy | last post by:
Hi, In VB.NET there is a keyword called "My" which has a lot of properties collected at it. Is there any equivalent to this "My" in C#? Thank you.
0
by: =?Utf-8?B?c2po?= | last post by:
Writing an app in VB.NET 2005 which needs to load a registry hive. As far as I can determine, there isn't any managed code to do this (sigh), so I need to revert to APIs. Additional privileges...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.