07-26-2011 07:00 AM
I am passing an structure to DLL and structure has an character array.
When it Calls dll function its taking address value of the array instead of value.
I tried converting array into cluster of size 1(In this example i m sending only one byte) and then swap bytes swap words.
and it is passed to DLL.But function call crashes.
Here i have attached actual problem VI(LVPassThruIoctl_fivebaudinit.vi) and the tried VI(LVPassThruIoctl_fivebaudinit_temp.vi).And header file.
Function prototype
PassThruIoctl(unsigned long ulChannelID,J2534IOCTLID enumIoctlID,void *pInput,void *pOutput);
Passing this structure
typedef struct
{
unsigned long ulNumOfBytes; // number of bytes in the array
unsigned char *pucBytePtr; // array of bytes
}SBYTE_ARRAY;
Example:
No Of Bytes:1
BytePtr[0]=0x33
Please suggest me i am doing anything wrong here.
This problem i am getting in all functions.
07-26-2011 10:47 AM
Please keep your related questions to one thread. Thank you for finally posting the header file, but why not include it in the thread where you first asked for help?
07-27-2011 05:06 AM
Since in this example I am sending cluster with array to a dll.So thought to post in this thread.
Thanks for your help.I will try with your solution.