09-12-2005 01:42 PM
09-12-2005 01:58 PM - edited 09-12-2005 01:58 PM
I'm not sure what your question is exactly, but you won't be able to pass pointers from LabVIEW to your dll as they won't be sharing the same memory space, and as far as I know there isn't a direct coorelation in LabVIEW to having pointers from one data element to another within LabVIEW's memory space.
P.M.
Message Edited by LV_Pro on 09-12-2005 03:01 PM

09-13-2005 08:57 AM - edited 09-13-2005 08:57 AM
//Structure as given for an 8-byte aligned module
struct given
{
short s1;
long l2;
char* p3;
char c4;
void* p5;
double d6;
};
//How to create the structure if compiler is building with 1-byte alignment
struct given_padded
{
short s1; //offset+0
short pad1; //offset+2
long l2; //offset+4: 4 byte boundary
char* p3; //offset+8: 4 byte boundary
char c4; //offset+12: 1 byte boundary
short pad2; //offset+13
char pad3; //offset+15
void* p5; //offset+16: 4 byte boundary
long pad4; //offset+20:
double d6; //offset+24: 8 byte boundary
}
So, probably what you will need to do is create a helper DLL that can
convert LabVIEW's 1-byte aligned aggregated clusters into 8-byte
aligned referenced structures and have that DLL call the driver.
Message Edited by Jason S on 09-13-2005 08:58 AM