English
Forum

Local groups lists

 
Hello Profaner...

I Search after a Possibility any groups one Systems in a ChoiceBox aufzulisten. has someone a idea - a Link???
 
06/07/05  
 



Habs - faith I - already. write tommorrow code...
 
06/07/05  
 



OK, here the View source:
CompileMarkSeparation
DEF @NetQueryDisplayInformation(7) !"Netapi32","NetQueryDisplayInformation"
DEF @NetApiBufferFree(1) !"Netapi32","NetApiBufferFree"
DEF @NetLocalGroupEnum(7) !"Netapi32","NetLocalGroupEnum"
Declare GU_LISTE&,Indexzähler&,GU_BUFFER_P#,GU_BUFFER_A#,GU_BUFFER#
Declare NT_Fehler&,Entry_COUNT#
Declare E_READ&,E_TOTAL&,resumehandle&
DEF @WideCharToMultiByte(8) !"kernel32","WideCharToMultiByte"
DEF @CopyMemory(3) !"kernel32","RtlMoveMemory"
Windowstyle 31
Windowtitle "User und Gruppen listen"
Window 0,0-640,440
DIM Entry_COUNT#,4
DIM GU_BUFFER_P#,4
DIM GU_BUFFER_A#,1000
DIM GU_BUFFER#,1000
LET GU_LISTE&=@CREATECHOICEBOX(%HWND,"",10,100,200,200)
LET NT_Fehler&=$EA
LET Resumehandle&=0
LET Indexzähler&=0

While NT_Fehler&=$EA

    Clear Entry_COUNT#,GU_BUFFER_P#,GU_BUFFER_A#,GU_BUFFER#
    LET NT_Fehler&=@NetLocalGroupEnum(0,0,GU_BUFFER_P#,-1,@ADDR(E_READ&),@ADDR(E_TOTAL&),@ADDR(Resumehandle&))

    IF @or(NT_Fehler&=$EA,NT_Fehler&=0)

        While Indexzähler&<E_READ&

            @CopyMemory(GU_BUFFER#,@Long(GU_BUFFER_P#,0)+Indexzähler&*4,4)
            @WideCharToMultiByte(0,0,@Long(GU_BUFFER#,0),-1,GU_BUFFER_A#,1000,0,0)
            @AddChoice(GU_LISTE&,@String$(GU_BUFFER_A#,0))
            LET INDEXZÄHLER&=INDEXZÄHLER&+1

        wend

        @NetApiBufferFree(@Long(GU_BUFFER_P#,0))

    endif

wend

LET NT_Fehler&=$EA
LET Indexzähler&=0

While NT_Fehler&=$EA

    Clear Entry_COUNT#,GU_BUFFER_P#,GU_BUFFER_A#,GU_BUFFER#
    LET NT_Fehler&=@NetQueryDisplayInformation(0,3,Indexzähler&,1,-1,Entry_COUNT#,GU_BUFFER_P#)

    IF @or(NT_Fehler&=$EA,NT_Fehler&=0)

        @CopyMemory(GU_BUFFER#,@Long(GU_BUFFER_P#,0),20)
        LET Indexzähler&=@Long(GU_BUFFER#,16)
        @WideCharToMultiByte(0,0,@Long(GU_BUFFER#,0),-1,GU_BUFFER_A#,1000,0,0)
        @AddChoice(GU_LISTE&,@String$(GU_BUFFER_A#,0))
        @NetApiBufferFree(@Long(GU_BUFFER_P#,0))

    endif

wend

LET NT_Fehler&=$EA
LET Indexzähler&=0

While NT_Fehler&=$EA

    Clear Entry_COUNT#,GU_BUFFER_P#,GU_BUFFER_A#,GU_BUFFER#
    LET NT_Fehler&=@NetQueryDisplayInformation(0,1,Indexzähler&,1,-1,Entry_COUNT#,GU_BUFFER_P#)

    IF @or(NT_Fehler&=$EA,NT_Fehler&=0)

        @CopyMemory(GU_BUFFER#,@Long(GU_BUFFER_P#,0),24)
        LET Indexzähler&=@Long(GU_BUFFER#,20)
        @WideCharToMultiByte(0,0,@Long(GU_BUFFER#,0),-1,GU_BUFFER_A#,1000,0,0)
        @AddChoice(GU_LISTE&,@String$(GU_BUFFER_A#,0))
        @NetApiBufferFree(@Long(GU_BUFFER_P#,0))

    endif

wend

Dispose Entry_COUNT#
Dispose GU_BUFFER#
Dispose GU_BUFFER_A#
Dispose GU_BUFFER#

While 0=0

    Wend


I need urgently a couple Tests aud NT/2000/XP. who help me?
 
06/08/05  
 



$ea?

small hint: 1 is faster as 0=0.

salvo.
 
06/08/05  
 



Hello IF...

have right - is a Relikt from middle-aged Basiczeiten. Läufts?
 
06/08/05  
 



Yes it working.
 
06/08/05  
 



Hello IF...

best Thanks! Have straight found out, How one The Size each beliebigen Speicherbereichs find out can, without XProfan to own => fehlte me yet for PrivAktivate...
 
06/08/05  
 




CB
Runs too tadellos under WinNT!

LG,
Christian
 
XProfan 8/9.1, Win XP, AMD 64/3200
06/08/05  
 



thanks Christian!
 
06/08/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.729 Views

Untitledvor 0 min.
W.L.06/06/17

Themeninformationen

this Topic has 3 subscriber:

unbekannt (6x)
iF (2x)
CB (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