Call a function in a shared library: Difference between revisions

no edit summary
(Added Arturo implementation)
No edit summary
Line 1,618:
hi there, world.
17</lang>
=={{header|QB64}}==
<lang vb>
Option _Explicit
 
Declare Dynamic Library "Kernel32"
Sub SetLastError (ByVal dwErr As Long)
Function GetLastError& ()
End Declare
 
SetLastError 20
Print GetLastError</lang>
=={{header|R}}==
This is possible in R in only a few limited ways. If the library function one wishes to call is a (C-level) R function (of type SEXP), then one may call