LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dll configuring problem.

Hello All,
        I am trying to get a function of a dll to work correctly with my Labview application. There a several features working fine and they have simple numbers passed in order to execute particular commands.
 
There is also a PC application previously written in C that succesfully executes all the commands from the DLL.
 
A couple of the functions are more complex named...set and ...get and require data structures configured in a specific way before the DLL can accept and handle the passed data correctly. I havent manged to find the correct orientation/structure of bytes but have seen several documents which explain the potential hazards of trying to configure labview data in terms of C style pointers for input to a DLL.
 
The problem seems to revolve around passing data in the form of pointers to the dll. The following text describes how the dll expects to see the incoming data, the problem is how to configure labview so it maps its data relative to the description below.
*****************************************************************************************************
The structure of the data expcted follows:
Points to the structure SCONFIG_LIST, which is defined as follows:
typedef struct
{
unsigned long NumOfParams; /* number of SCONFIG elements */
SCONFIG *ConfigPtr; /* array of SCONFIG */
} SCONFIG_LIST
where:
NumOfParms is an INPUT, which contains the number of SCONFIG elements in the array
pointed to by ConfigPtr.
ConfigPtr is a pointer to an array of SCONFIG structures.
The structure SCONFIG is defined as follows:
typedef struct
{
unsigned long Parameter; /* name of parameter */
unsigned long Value; /* value of the parameter */
} SCONFIG
where:
Parameter is an INPUT that represents the parameter to be set (See Figure 30 for a list of
valid parameters).
Value is an INPUT that represents the value of that parameter (See Figure 30 for a list of valid
values).
******************************************************************************************************
Advice appreciated.
 
Regards
 
Chris
0 Kudos
Message 1 of 2
(2,455 Views)
Hi Chris,

I am just posting the same soloution I already gave you so it is available on the fourms

S
0 Kudos
Message 2 of 2
(2,419 Views)