English
Source / code snippets

lists Netzwerkgruppen procedure Prozedursammlung

 
Globale reaches and Definitionen should into File

GLOBALE_DEFS.INC
Declare GU_BUFFER_P#,GU_BUFFER_A#,GU_BUFFER#,Entry_COUNT#
Declare GETERROR_Buffer#

************** Start the procedure to that lists the Netzwerkgruppen ********************

PROC Liste_NetzwerkGruppen

    Clearlist
    Declare Indexzähler&,NT_Fehler&
    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,3,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),20)
            LET Indexzähler&=@Long(GU_BUFFER#,16)
            @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 Error is aufgetreten!",16)

    endif

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

endproc

************** end the procedure to that lists the Netzwerkgruppen ********************
 $I GLOBALE_DEFS.INC
Declare GU_LISTE&
Windowstyle 31
Windowtitle "Netzwerkgruppen listen"
Window 0,0-640,440
LET GU_LISTE&=@CREATECHOICEBOX(%HWND,"",10,100,200,200)
Liste_NetzwerkGruppen
@MoveListToChoice(GU_LISTE&)

While 0=0

    Waitinput

Wend

 
08/17/05  
 




************** Netzwerkgruppen_listen.INC **************
************** Start the procedure to that lists the Netzwerkgruppen ********************

Proc Liste_Netzwerkgruppen

    Clearlist
    Declare Indexzähler&,Nt_fehler&
    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,3,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),20)
            Let Indexzähler&=@Long(Gu_buffer#,16)
            @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 Error is aufgetreten!",16)

    Endif

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

Endproc

************** end the procedure to that lists the Netzwerkgruppen ********************
 
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.834 Views

Untitledvor 0 min.
W.L.06/06/17
AndreasS01/06/16
Andre Rohland02/24/13

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