Call a foreign-language function: Difference between revisions

m
Line 349:
<pre>#DLLDECLARE Gdiplus(GdiplusStartup AS SpawnIt, GdipLoadImageFromFile, GdiplusShutdown As KillIt)
#DLLIMPORTS OpenGL32 ' all names here are case-insensitive</pre>
whereby you may start to use the three GDI+ function names (either directly or through arbitrary aliases as shown above) and the entire range of OpenGL functions in your script.
 
ThereLastly, there are at least two methods in FBSL to call machine code routines given their entry points:
<pre>CALLABSOLUTE(ByteBuffer[, parm1[, parm2[, parm3[, parm4]]]]) ' ByteBuffer stores machine code bytes; works as a Sub
FUNCALL(AddrOfEntryPoint[, parameters...) ' works as either a Sub or Function</pre>