You can do something like this instead
CNiUInt8Vector databuff(xfer_len); //create vector of unsigned chars, Uint16 would be shorts. The following code would work the same with a CNiUint16Vector.
unsigned char *test = (unsigned char*)databuff; //get pointer to underlying data buffer
for(...
len = m_xem->ReadFromPipeOut(0xb1, pkt_len, buf+(pkt_len*i));
...
m_CNiGraphCtrl1.PlotY(databuff
);No need to call free. databuff will be free'ed automatically.
And please try to limit one post per issue. 10 posts for the same problem just ends up cluttering the forums.
Thanks.
Message Edited by bilalD on 02-10-2006 08:57 AM
Bilal Durrani
NI