Using define_ecternal with dll written in Visual Basic

zakyn's picture

Hello,

I have problem with define external function with dll written in Visual Basic.

Declaration of function is

Declare Function Tsat_p Lib "c:\Xsteam_V2.6b.dll" Alias "Tsat_p@8" (ByVal p As Double) As Double

Well I tried these, but there is an error.

restart;
f:=define_external( 
     'Tsat_p', 
     LIB="d:/kohoutek/Xsteam_V2.6b.dll",
     'p'::float[8],
RETURN::float[8]):
Error, external lookup of Tsat_p: Uvedená procedura nebyla nalezena.
 

Could you help me please?

Thanks a lot.

Vladimir

Comments

Axel Vogt's picture

i would try

i would try Tsat_p@8 as function name, not Tsat_p  and try to find a "Dependency walker" on the web to look at your DLL (which should show you th exact name of the function in the DLL)

zakyn's picture

Success

Hello,

I tried it yesterday but it does not work. It is because it was used ' '  instead of " " and the @ symbol occures an error. the correct definition is

restart;
f:=define_external( 
     "sat_p@8", 
     LIB="d:/kohoutek/Xsteam_V2.6b.dll",
     'p'::float[8],
RETURN::float[8]):
 

Thank you for your help that told me I was right :)

Vladimir
 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}