#include "tlpp-core.th"
Function U_DynCall()
Local oDll as Object
Local nValue as Numeric
If (IsSrvUnix())
oDll := tRunDll():New("dllc.so")
Else
oDll := tRunDll():New("dllc.dll")
EndIf
oDll:GetVar("nGlobal", "D", nValue)
nValue := 3.14
oDll:SetVar("nGlobal", "D", nValue*2)
oDll:GetVar("nGlobal", "D", nValue)
Conout(nValue) // espera-se 6.28
oDll:Free()
Return |