Submitted by Joe on Thu, 06/13/2013 - 22:32
Hi,
A few years ago we created a .dll in Visual C++ to be used with visSim userFunction blocks. We are now moving all of our Visual C++ projects over to MinGW gcc.
After making a few changes to the code that builds in Visual C++ (see below) the dll builds in MinGW gcc and we can connect the resulting dll to a userFunction block.
The issue is this: When we click the green go button to start the simulation we get this error message box in VisSim:
'Bad arg list in user block C:...\libvisSimInterface.dll.readDP'.
Otherwise, after we click Ignore, the dll appears to be working. The second input is passed straight to the output as expected and is displayed in a display block connected to the output of the userFunction block.
What is causing this error message?
When we disconnect the display block from the output of the userFunction block the error message goes away.
Our sample code looks like this:
EXPORT32 void PASCAL readDP(double param[],double inSig[], double outSig[]) { outSig[0] = inSig[1]; // put the second input directly into the output return; }
Thanks for your help