Call a foreign-language function: Difference between revisions

Content added Content deleted
Line 347:
 
Other DLL's can be mapped into the process memory either on a per-function basis or entirely in one swoop, e.g.:
#DLLIMPORTS OpenGL32 '<pre>// all names here are case-insensitive</pre>
<pre>#DLLDECLARE Gdiplus(GdiplusStartup AS SpawnIt, GdipLoadImageFromFile, GdiplusShutdown AS KillIt)
#DLLIMPORTS OpenGL32 ' all names here are case-insensitive</pre>
#DLLIMPORTS OpenGL32</pre>
whereby you may start to use the three GDI+ function names (either directly or through arbitrary aliases as shown above), as well as the entire namespace of OpenGL functions, in your script.