T O P I C R E V I E W |
Leo_Li |
Posted - 03/05/2007 : 11:43:31 PM Origin Version (Select Help-->About Origin): 7.5 Operating System: Winxp
Trying to fit a quite complex user-defined external dll function. The template provided in File Exchange supports .c grammar only. Is there any template showing how to code external dll by .cpp in visual c 6.0? thanks.
-leo
|
2 L A T E S T R E P L I E S (Newest First) |
larry_lan |
Posted - 03/07/2007 : 12:14:49 AM Thanks, Leo
God, I just want to wait for CP to answer this post, ^_^
Larry OriginLab Technical Services |
Leo_Li |
Posted - 03/07/2007 : 12:02:11 AM Seems that Ocolleagues are busy so I did it by myself. Here is the procedure to share with those who have the same request.
Definition of the problem: If you want to sovle a complicated fitting problem, which involes 1) calculation of complex numbers (#include <complex>); 2) calling memeber functions of an existing C++ class; 3) you are an OOP lover.
Solution of the problem: General an external DLL for the fitting function based on http://www.originlab.com/FileExchange/details.aspx?fid=105
Modifications required: 1) rename FitFuncs.c to FitFuncs.cpp 2) replace FAR PASCAL by __stdcall 3) delcare LPDOUBLE and LPSHORT in this way instead: typedef double* LPDOUBLE; typedef short* LPSHORT;
that's all. -leo
|