Hello:
I am new in PureBasic.
I have some programs in VisualBasic and I would like to create a dll in Purebasic and pass the "AddressOf" of a procedure of VisualBasic (like some api functions in WinOS).
My question is how I can call the function of VisualBasic from PureBasic Dll once I have the address number of the procedure.
Is there a way to call this procedure by a simple "long" number recieved by the PureBasic Dll?
My final goal is not to use PureBasic as simple Wrapper dll but gain some power to my app dividing the tasks into threads managed by Purebasic Dlls.
Thanks to all.
CallBack function question
Something like this:
Code: Select all
Prototype.l ProtoMyFunctionType(Parameter.l)
Global MyVariable.ProtoMyFunctionType
MyVariable = GetAddressOfFunction() ; Associate MyVariable with the function address
MyVariable(12345) ; Call function address
Trond uses Prototypes, which is a technique of PureBasic that has various advantages over the following, much more simple method:
Code: Select all
address.l = SomeFunctionThatReturnsAFunctionAddress()
CallFunctionFast(address)Windows 7 & PureBasic 4.4



