I came up with this, have not tested it since i don't have a dll to test with, let me know what you think, especially if there are errors.
Code: Select all
DefType.double x,y
;the equivalent of:
;OpenLibrary(1, "C:\Program Files\PureBasic\PureLibraries\UserLibraries\myDll.dll")
; CallFunction(1,"MYDLLFUNCTION",x,y)
ModuleHandle.l=LoadLibrary_("C:\Program Files\PureBasic\PureLibraries\UserLibraries\myDll.dll")
FunctionPointer.l=GetProcAddress_(ModuleHandle,"MYDLLFUNCTION")
! lea eax,[v_y]
! push dword [eax+4] ;y\b
! push dword [eax] ;y\a
! lea eax,[v_x]
! push dword [eax+4] ;x\b
! push dword [eax] ;x\a
! call dword [v_FunctionPointer]
