English
Source / code snippets

Adminrechte user Verify

 
From AH:
CompileMarkSeparation
DEF @CheckTokenMembership(3) !"advapi32","CheckTokenMembership"
DEF @GetProcAddress(2) !"KERNEL32","GetProcAddress"
DEF @GetModuleHandle(1) !"KERNEL32","GetModuleHandleA"
Declare Member&,SID#,MHANDLE&,Module$,Funktion$
LET MODULE$=$SYSPATH+"Advapi32.DLL"
LET Funktion$="CheckTokenMembership"
LET MHANDLE&=@GetModuleHandle(@ADDR(Module$))

IF @GetProcAddress(MHANDLE&,@ADDR(FUNKTION$))<>0

    DIM SID#,16
    LONG SID#,0=513
    LONG SID#,4=83886080
    LONG SID#,8=32
    LONG SID#,12=544
    @CheckTokenMembership(0,SID#,@ADDR(Member&))

    IF Member&=1

        @Messagebox("Du bist auf deinem Rechner ein Administrator!","Admincheck",64)

    else

        @Messagebox("Du hast keine Administratorrechte!","Admincheck",64)

    endif

    DISPOSE SID#

else

    @MESSAGEBOX("Falsche Windowsversion","Son Scheiß!",64)

endif

salvo, iF.
 
09/05/05  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.658 Views

Untitledvor 0 min.
Uwe Lang05/19/24
H.Brill03/31/23
Wolfgang Laube01/13/17
holmol9304/24/13
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie