PDA

View Full Version : QAxContainer



Percy
6th August 2009, 18:28
Hi there,

I am trying to use an activex control which drives an usb device. I successfully instantiated the control using CLSID and got its PID number.
The problem began when I tried to get data from it. One of the parameters is a buffer which stores the incoming data and it seems dynamicCall doesn´t recognize that. Here is a snippet of the code:

public:
QAxObject* musb;
unsigned char* out;

void cIO::SendData()
{
QList<QVariant> parametros;
out[0] = 0xFF;
param << 0;
param << out;
param << 10;
param << "ezusb-0";
musb->dynamicCall("Acquire(int, unsigned char*, long, char*)",
param);
}

The variable out should be the buffer where data is stored from usb. This code doesn´t work. When I compile the code I get:

error C2248: 'QVariant::QVariant' : cannot access private member declared in class 'QVariant' c:\Projetos\VisualStudio2005\PartInspector\PartIns pector\cio.cpp

this message is realted to this line: param << out;

Any ideas?

Thanks,

Percy.