| T O P I C R E V I E W |
| Peter.Hors1 |
Posted - 05/12/2003 : 09:39:33 AM 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 ?
Robert Bosch GmbH |
| 2 L A T E S T R E P L I E S (Newest First) |
| Peter.Hors1 |
Posted - 05/13/2003 : 06:39:08 AM I solved my problem. It works like written below.
thank you for the help.
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
double R6_Refprex_Version(LPSTR message);
Robert Bosch GmbH |
| eparent |
Posted - 05/12/2003 : 11:06:08 AM 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
double R6_Refprex_Version(LPSTR message);
|