10-06-2010 04:03 PM
I'm attempting to create a dll in LabVIEW with the following parameters from Test DLL.vi:
Inputs:
IN1 - Word
Buffer - 2D array of Unsigned Byte
Output:
OUT1 - Unsigned Byte
The prototype is constructed as follows in the Build Specifications of the Project:
uint8_t TestDLL(int16_t IN1, TD1Hdl *Buffer)
The dll builds successfully but when I attempt to use it in another VI (using the Call Library Function block) the prototype appears but it does not look like what was defined from the Build Specifications. Instead it looks like the following:
void TestDll(void );
I attached some screen shots of all the settings as described above.
10-08-2010 01:23 AM
jfalcon:
That is strange. Is there a chance you could attach the VI for us to take a look at?
10-08-2010 09:28 AM
The Test DLL.vi is what I used to create dll prototype with in the Build Specifications in the project.
Note: There is no logic implemented yet.
10-11-2010 06:07 PM
jfalcon:
It looks like you haven't defined the parameters of the function on the "Parameters" tab. The function prototype down below reflects what we've entered in there. Since we haven't entered any parameters, it just lists "void" in the display. Once set up the inputs, outputs, and their respective datatypes, it should look a little closer to what you're expecting.
10-12-2010 10:56 AM
Should the parameters already be defined in the build specification for the actual dll? By defining the parameters again this would overwrite what was created.
10-12-2010 05:13 PM
@jfalcon wrote:
Should the parameters already be defined in the build specification for the actual dll? By defining the parameters again this would overwrite what was created.
This is completely normal. There's no way for LabVIEW to read the expected parameters from the DLL, so it defaults to an empty parameter list. You need to define them to match your DLL, or use the DLL import tool which can read the header file to create a VI containing a call library node with the correct parameter list.