fb:porticula NoPaste
.so & noParam
Uploader: | ThePuppetMaster |
Datum/Zeit: | 31.10.2007 01:46:23 |
'==================================================
'.SO
'================
Dim Shared Bar as integer
Function foo CDECL () as Integer EXPORT
'bzw.
'Function foo CDECL (ByVal Rabi as Integer) as Integer EXPORT
Bar = Bar + 1
foo = Bar
End Function
'==================================================
'Test-APP
'================
Dim foo as Function() as Integer 'Funzt
'bzw.
'Dim foo as Function() as Integer 'Funzt NICHT
Dim XLib as any ptr
XLib = DYLIBLOAD("libcic4u_kernel.so")
If XLIB = 0 then print "Error-1": End
foo = DYLIBSYMBOL(XLib, "FOO")
If foo = 0 then
print "Error-2"
DYLIBFREE XLib
End
End If
Dim X as Integer
for X = 1 to 10
Print foo '(x)
Next
DYLIBFREE XLib
end