I would like to use a dll which can calculate thermodynamics properties. This dll is working in Excel visual basic with a declaration like this: Public Declare Function R6_Refprex_Version Lib "refprex6.dll" _ (ByVal Message As String) As Double I tried to include this dll in Origin C without success.
Can anybody help me or give me an example of included dlls ?
You need to make an OriginC header file. I don't know Visual Basic, but if I understand the syntax of your VB call correctly (returning a double and passing a string) then the following header file will work for you. Include this header file in your OriginC .c file and you will be ready to call the R6_Refprex_Version function. You can then add declarations for other functions you need.
// OriginC Header file for calling refprex6.dll functions
#pragma dll(originc\refprex6) // dll is in Origin's OriginC folder //#pragma dll(refprex6) // dll is in installation folder
quote: You need to make an OriginC header file. I don't know Visual Basic, but if I understand the syntax of your VB call correctly (returning a double and passing a string) then the following header file will work for you. Include this header file in your OriginC .c file and you will be ready to call the R6_Refprex_Version function. You can then add declarations for other functions you need.
// OriginC Header file for calling refprex6.dll functions
#pragma dll(originc\refprex6) // dll is in Origin's OriginC folder //#pragma dll(refprex6) // dll is in installation folder