06-01-2012 06:06 AM
Hi,
I'm using CVI2010 to generate DLLs that are used with TS2010, but I'm now facing a curious (actually two...) problem.
When I reload prototypes, arrays are not seen as arrays by TS, but they are seen as pointers (see PICT_01). This could be a pain if I need to reload the prototype of a step type that is used in hundreds of steps. The only way I found to make TS adapter automatically set an array type to a parameter is to generated a CVI FP and add the type library to the DLL. This works fine (except that the dimension size remains empty) (see PICT_02).
The problem is that I also have parameters passed as structures.
typedef struct sError
{
int Code;
char Msg[1024];
short Occurred;
}rErr_t
int CVIFUNC DLLEXPORT ESS_Array(rErr_t *rError, double tdValues[64], unsigned int uiSize, double *pdMean)
When I include the type library to the DLL, TS tells the structure is seen as an unsupported type and sets the parameter to a default type (long).
(see PICT_02)
The type library inclusion works well with enums, basic types, but does not with structures.
When I generate the ODL file from the CVI FP, there is no definition of the structure, so I guess there is something missing for TS to recognize the type (but there is not either for enums and it works...)
Any idea? Any direction? Any solution?
Thanks for any help.
Stephane
Note : there is the solution thats consists in getting the array inside the function with the TS activeX API but I would prefer not to use the API so that the functions could be called from outside TS.