whatsthis wrote:
> I'm trying to use an external vc++ program to call some of labviews
> functions in their dll's. Specifically DIO_Port_WriteInterface found
> in port write. Looking closely at the function node you can see the
> dll lvdaq.dll and a prototype: void DIO_Port_WriteInterface(void
> *arg1, void *arg2, void *arg3, void *arg4, void *arg5);.
>
> I can call it from vc++ by dynamically loading it but
> labview/windowsXP complain that:
> The value of ESP was not properly saved accross the function call.This
> is usually a result of calling a function declared with one calling
> convention with a function pointer declared with a different calling
> convention.
>
> I'm assumming I'm not handling void* properly or not passing the
> appropriate values. How
do I handle the parameters being passed into
> the function call? Thanks for any suggestions/help!
It would be a good idea to install the NI-DAQ for C/C++ development
files and include the according header files in your source code. The
problem you see is most probably that the NI-DAQ functions use cdecl
calling convention whereas you defined stdcall or probably nothing at
all in which case Visual C uses stdcall by default.
Rolf Kalbermatter
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390