AnsweredAssumed Answered

vrf How to transfer the dll file into VEE?

Question asked by VRFuser on Dec 3, 2004

Sorry to disturb you again,I've tried the headerfile,but it doesn't work either,here is the original code of the headerfile:

#define CHEMNOISE_API __declspec(dllexport)
#define CHEMNOISE_API __declspec(dllimport)

CHEMNOISE_API int Calculate_Noise(long sig_Length, double * time, double * signal,/*raw data*/
                                          double t_Start, double t_End, /*time range*/
                                          double * SD6, /*6SD*/
                                          double * P2P, /*PtoP*/
                                          double * ASTM, /*ASTM*
                                          double * Wander, /*Wander*/
                                          double * Drift /*Drift*/);

VEE can recognize it,but can't use it.What's the problem?Thank you very much!

Best Regards,

-----Original Message-----
From: Shawn Fessenden []
Sent: Thursday, December 02, 2004 5:17 AM
To: 'HUANG,BO-NAN (A-China,ex2)'; 'VRF'
Subject: RE: [vrf] RE: How to transfer the dll file into VEE?

> Thanks,and what confused me is that I don't know whether the
> format of the headfile is right

Oh! Gosh, I'm sorry! I thought you wanted to actually read the dll file into a variable. This is much different.

You use an Import Library object. Set it to Compile Library (From the dropdown), name the dll file (in filename) and name the .h file (in definition file).

This looks ok except for calltype - which I assume is either _stdcall or _cdecl. Whichever it is VEEs 6 and 7 need the proper declaration. VEE 5 just figures it out for itself.

The complete def would be (depending on linkage type):

int _stdcall Calculate_Noise(long sig_Length, double *time,
  double *signal, double t_Start, double t_End, double *SD6,
  double *P2P, double *ASTM, double *Wander, double *Drift);

The long is Int32, the doubles are Real64 and the double pointers are Real64 arrays. All reference params (all except sig_Length, t_Start and t_End) *must* be allocated with enough space for output results before calling. Note that if _stdcall linkage is specified then the function name will actually be _Calculate_Noise@48 unless the name is specified via a .def file to the compiler or via a compiler switch. Use a export table dump to find the actual name of the function.

You are currently subscribed to vrf as:
To subscribe send a blank email to "".
To unsubscribe send a blank email to "".
To send messages to this mailing list,  email "". 
If you need help with the mailing list send a message to "".