12-26-2008 07:03 AM
Function
The prototype of the dll function is
unsigned long PassThruIoctl(unsigned long A, unsigned long B, void *pvar1, void *pvar2);
"void *pvar1" and "void *pvar2" are pointers to different Structures. The value of "unsigned long B" will determine what kind of Structure the pointer will represent.
One sample structure is given below when pvar1 is the pointer to SCONFIG_LIST.
typedef struct
{
unsigned long ParameterID; // this an input to the dll
unsigned long Value; // this is an output from dll
} SCONFIG;
typedef struct
{
unsigned long NumOfParams; // the no. of elements(SCONFIG) in array
(input)
SCONFIG *ConfigPtr; // the pointer to array of SCONFIG
(input)
} SCONFIG_LIST;
The function is supposed to get the values of configuration parameters (from an external interfacing device).
When I tried to run the function as shown in the attached VI, I always end up with error. The error I get is saying something about DLL corrupting the memory of Lab View.
Solved! Go to Solution.
12-26-2008 07:53 AM
12-26-2008 10:17 PM
12-26-2008 11:28 PM
What will be the structure for pVar2?
One issue that I can see in you code is, for pvar1 instead of passing an array of clusters, you are passing a cluster of SCONFIG. Also you need to initialize the numbr of elements in the array before passing it to the DLL (see attached code). In this I have assumed that pVar2 is also expecting a similar input.
I was not able to run the code here becasue the dll is not there. So please try and let me know.
12-27-2008 04:26 AM
12-27-2008 04:46 AM
12-27-2008 01:22 PM
kikiduu wrote:
Attachment mising. Can you post it again?
vinoth.ponnusamy, you should NOT mark this as "accepted solution", because it is not. Please untag it.
Right now, the thread is marked as solved and nobody will look at it ever again. I don't think it is solved yet! 😄