$TYPECHECK ON
DECLARE SUB aevent LIB "DLLevent.dll" ALIAS "aevent"(a AS LONG, b AS LONG)
DECLARE SUB llamar LIB "DLLevent.dll" ALIAS "Llamar"(a AS LONG, b AS LONG)
DECLARE SUB MyFuncTemp
DECLARE SUB hola
DECLARE SUB adios
DECLARE SUB Pasa
DECLARE FUNCTION Llama(Evento AS INTEGER) AS LONG
DECLARE SUB Button1Click (Sender AS QBUTTON)
CREATE Form AS QFORM
CAPTION = "Form1"
Width = 320
Height = 240
Center
CREATE Button1 AS QBUTTON
CAPTION = "Button1"
Left = 114
Top = 72
OnClick = Button1Click
END CREATE
END CREATE
DIM Template AS INTEGER
DIM a AS LONG
DIM b AS INTEGER
DIM c AS INTEGER
DIM d AS INTEGER
a = CODEPTR(Llama)
BIND b TO Hola
BIND c TO Adios
BIND d TO Pasa
BIND Template TO MyFuncTemp
Form.SHOWMODAL
FUNCTION Llama(Evento AS INTEGER)
Template = Evento
CALLFUNC Template
END FUNCTION
SUB Button1Click (Sender AS QBUTTON)
Llamar a,c
END SUB
SUB Hola
SHOWMESSAGE "hola"
END SUB
SUB Adios
SHOWMESSAGE "Adios"
END SUB
SUB Pasa
SHOWMESSAGE "Pasa"
END SUB
|