The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 dll in origin c code
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Peter.Hors1

Germany
11 Posts

Posted - 05/12/2003 :  09:39:33 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

eparent

118 Posts

Posted - 05/12/2003 :  11:06:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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);


Go to Top of Page

Peter.Hors1

Germany
11 Posts

Posted - 05/13/2003 :  06:39:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000