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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 dll in origin c code

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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);



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000