Page 1 of 1

function pointeur in a array !

Posted: Fri Apr 27, 2007 10:54 pm
by minirop
hello,
I want to know if it's possible to create an array or a linked list of pointeur to a function.
example :
dim Array.***(50)
Array(0) = @Beep_()
...
Array(0)() would be the same as Beep_()

somebody knows ?

thx
++

Posted: Fri Apr 27, 2007 11:03 pm
by Inf0Byt3
You mean this?

Code: Select all

If OpenLibrary(0,"kernel32.dll")
 *BeepFuncPointer = GetFunction(0,"Beep")
EndIf

Debug *BeepFuncPointer

Structure Pointer
 MyFuncPointer.l
EndStructure

Dim Array.Pointer(50)
Array(0)\MyFuncPointer = *BeepFuncPointer

CallFunctionFast(Array(0)\MyFuncPointer,500,500)

Posted: Fri Apr 27, 2007 11:08 pm
by Kaeru Gaman
....or look at Prototype...

Posted: Fri Apr 27, 2007 11:26 pm
by minirop
thx !
I never remember that array(0)\f() is possible
;)
++