Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problem about adjust process privilege,help

Featured Replies

Delphi code

---------------------------------------------------------

procedure TForm1.N1Click(Sender: TObject);

var

Token:Cardinal;

TokenPri:TOKEN_PRIVILEGES;

ProcessDest:int64;

begin

if not OpenProcessToken(GetCurrentProcess,TOKEN_QUERY,Token) then

RaiseLastOSError

else

begin

if LookupPrivilegeValue(nil,'SeDebugPrivilege',ProcessDest) then

begin

TokenPri.PrivilegeCount:=1;

TokenPri.Privileges[0].Attributes:=SE_PRIVILEGE_ENABLED;

TokenPri.Privileges[0].Luid:=ProcessDest;

if AdjustTokenPrivileges(Token,False,TokenPri,sizeof(TokenPri),nil,nil) then

showmessage('successfully')

else

showmessage('faid');

end;

end;

--------------------------------------------------------------------

When I completed these code,it had an error,the error information is "There is no overload version of "AdjustTokenPrivilege" that can be called with these arguments". Who can help me?? TKS.

Edited by lanyus


  • Author

It's ravel out.

AdjustTokenPrivileges(Token,False,TokenPri,sizeof(

TokenPri),nil,nil);

The last variant must be a DWORD variant. But it had another problem,It can't Adjust process privilege,when I run it ,it will showmessage "faid".. Can somebody help me?

  • Author

It's ravel out,too.

not OpenProcessToken(GetCurrentProcess,TOKEN_QUERY,Tok

en)=====not OpenProcessToken(GetCurrentProcess,TOKEN_ADJUST_PRIVILEGES,Tok

en)

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.