English
Source / code snippets

lists procedure Prozedursammlung User

 
Globale reaches and Definitionen should into File

GLOBALE_DEFS.INC
CompileMarkSeparation
Declare GU_BUFFER_P#,GU_BUFFER_A#,GU_BUFFER#,Entry_COUNT#
Declare GETERROR_Buffer
e>

procedure with demonstration
CompileMarkSeparation
************** Start der Prozedur zum Listen aller User ********************

PROC Liste_alle_User

    Clearlist
    Declare Indexzähler&,NT_Fehler&
    Declare GETERROR_Buffer$
    DIM Entry_COUNT#,4
    DIM GU_BUFFER_P#,4
    DIM GU_BUFFER_A#,252
    DIM GU_BUFFER#,32
    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&=@External("Netapi32.DLL","NetQueryDisplayInformation",0,1,Indexzähler&,1,-1,Entry_COUNT#,GU_BUFFER_P#)

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

            @External("KERNEL32.DLL","RtlMoveMemory",GU_BUFFER#,@Long(GU_BUFFER_P#,0),24)
            LET Indexzähler&=@Long(GU_BUFFER#,20)
            @External("KERNEL32.DLL","WideCharToMultiByte",0,0,@Long(GU_BUFFER#,0),-1,GU_BUFFER_A#,261,0,0)
            @AddChoice(GU_LISTE&,@String$(GU_BUFFER_A#,0))
            @External("Netapi32.DLL","NetApiBufferFree",@Long(GU_BUFFER_P#,0))

        endif

    wend

    IF NT_Fehler&<>0

        DIM GETERROR_Buffer#,32000
        @External("KERNEL32","FormatMessageA",$1000,0,NT_Fehler&,0,GETERROR_Buffer#,32000,0)
        Let GETERROR_Buffer$=@STRING$(GETERROR_Buffer#,0)
        Dispose GETERROR_Buffer#
        @messagebox(GETERROR_Buffer$,"Ein Fehler ist aufgetreten!",16)

    endif

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

endproc

************** Ende der Prozedur zum Listen aller User ********************
 $I GLOBALE_DEFS.INC
Declare GU_LISTE&
Windowstyle 31
Windowtitle "User listen"
Window 0,0-640,440
LET GU_LISTE&=@CREATECHOICEBOX(%HWND,"",10,100,200,200)
Liste_alle_User
@MoveListToChoice(GU_LISTE&)

While 0=0

    Waitinput

ref='./../../Function-References/XProfan/wend/'>Wend

 
08/17/05  
 




CompileMarkSeparation
************** Alle_User_listen.INC **************
************** Start der Prozedur zum Ermitteln aller User ********************

Proc Liste_alle_user

    Clearlist
    Declare Indexzähler&,Nt_fehler&
    Declare Geterror_buffer$
    Dim Entry_count#,4
    Dim Gu_buffer_p#,4
    Dim Gu_buffer_a#,252
    Dim Gu_buffer#,32
    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&=@External("Netapi32.DLL","NetQueryDisplayInformation",0,1,Indexzähler&,1,-1,Entry_count#,Gu_buffer_p#)

        If @Or(Nt_fehler&=$Ea,Nt_fehler&=0)

            @External("KERNEL32.DLL","RtlMoveMemory",Gu_buffer#,@Long(Gu_buffer_p#,0),24)
            Let Indexzähler&=@Long(Gu_buffer#,20)
            @External("KERNEL32.DLL","WideCharToMultiByte",0,0,@Long(Gu_buffer#,0),-1,Gu_buffer_a#,261,0,0)
            Addstring @String$(Gu_buffer_a#,0)
            @External("Netapi32.DLL","NetApiBufferFree",@Long(Gu_buffer_p#,0))

        Endif

    Wend

    If Nt_fehler&<>0

        Dim Geterror_buffer#,32000
        @External("KERNEL32","FormatMessageA",$1000,0,Nt_fehler&,0,Geterror_buffer#,32000,0)
        Let Geterror_buffer$=@String$(Geterror_buffer#,0)
        Dispose Geterror_buffer#
        @Messagebox(Geterror_buffer$,"Ein Fehler ist aufgetreten!",16)

    Endif

    Dispose Entry_count#
    Dispose Gu_buffer#
    Dispose Gu_buffer_a#
    Dispose Gu_buffer#
    Dispose Gu_buffer_p#

Endproc

************** Ende der Prozedur zum Ermitteln aller User ******************pan class=s2>**
 
08/21/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

2.856 Views

Untitledvor 0 min.
RudiB.04/20/21

Themeninformationen

this Topic has 1 subscriber:

unbekannt (2x)


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