English
Regulars table & Café

CheckTokenMembership.

 


Description:

CheckTokenMembership screen, whether the SID of/ one group in a Token present and active is. These function there only under windows2000 and XP.




Deklaration:

DEF @CheckTokenMembership(3) !advapi32,CheckTokenMembership




Parameter:

1.Parameter: lever one Access Tokens or 0, for Token the current Prozesses.
2.Parameter: Memory-Variable with of/ one SID structure of/ one group.
3.Parameter: 4 byte Memory-Variable or The address of/ one LongIntvariablen, The a Flag aufnimmt, the angibt whether The in Parameter 2 angegebene group in the Token active is. =>
-$1 = group is present and active.
- $0 = group isn't present or inaktiv.



Return Value:

0 with Error, otherwise <>0.


Examples:

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


[keywords:d12e752cea]
Token Gruppenzugehörigkeit group present active activate rights Privilegien Admin Administrator Administratoren system
[/keywords:d12e752cea]
 
05/25/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.494 Views

Untitledvor 0 min.
RudiB.11/18/21
p.specht12/30/18

Themeninformationen

this Topic has 1 subscriber:

unbekannt (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