Buchempfehlung
Windows System Programming
Windows System Programming
Das Kompendium liefert viele interessante Informationen zur Windows-Programmierung auf Englisch. [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

Test.bas

Uploader:MitgliedThe_Muh
Datum/Zeit:26.11.2009 22:56:53

#include "PluginList.bi"

'#main prog#

Type pli_CB_type

    Dim a_sub As Sub (id As Integer, msg As String)

    Dim b_sub As Sub (id As Integer, msg As String)

    Dim c_sub As Sub (id As Integer, msg As String)

End Type



enum callback_enum

    a_sub

    b_sub

    c_sub

end enum



Sub show_text(id As Integer, msg As String)

    ? msg & id

End Sub



Sub show_text2(id As Integer, msg As String)

     ? id & msg

End Sub



dim shared pli_list as pluginlist = 3



sub load(cb as any ptr)

    Dim CIndex as UInteger = pli_list.add()



    With *pli_list.item(Cindex)

        .set_pli_cb(a_sub) = cb

        .set_pli_cb(b_sub) = cb

        .set_pli_cb(c_sub) = cb

    End With

    ? pli_list.count

end sub



load(@show_text)

load(@show_text2)

load(@show_text)



for i as integer = 1 to pli_list.count

    pli_list.item(i)->call_pli_cb->a_sub(2, "Muh")

next



pli_list.del(1)



? " "

for i as integer = 1 to pli_list.count

    pli_list.item(i)->call_pli_cb->a_sub(2, "Muh")

next



pl_destroy(pli_list)



? pli_list.count

sleep