hello dears
because my English is bad i copy this from
http://www.gamedev.net/topic/322545-vb6-callback-functions---calling-function-pointers-from-vb6/[
^]
my question is exactly that is in below.
thanks
I need to call a function through a functionpointer from within VB6, without the intervention of a DLL written in C. Is this possible? What I have now:
public callBack as long
public callBackInterval as long
Public Function setCallBack(functionPtr As Long, Optional interval As Long = 100) As Long
callBack = functionPtr
callBackInterval = interval
End Function
' setting callback
setCallBack addressOf myCallBackFunction
' Calling the callback somewhere else in the code
Call callBack ' ERROR "expected procedure, not variable"
An error is generated when trying to call the function throught the pointer saying "Expected procedure, not variable". Can I cast/convert this variable to keep VB6 quiet? Is it even possible to do this in VB6? TY