^NyAw^
13th February 2012, 15:13
Hi,
I'm trying to load a library in runtime using QLibrary.
I'm using the QLibrary class inside a class. I'm able to call a resolved function from the library. The problem is on the next function,method, ... call. This call produces a "buffer saturation" error. If I load the library into the main it works perfectly.
I want to use the QLibrary inside a class because it will be like a plugin.
Is there any memory limitation or maybe I'm making a mistake?
Here there is the piece of code in the application constructor:
QLibrary myLib("pci-dask");
typedef I16 (*MyPrototype)(U16,U16);
MyPrototype myFunction = (MyPrototype) myLib.resolve("Register_Card");
myFunction = (MyPrototype) myLib.resolve("Register_Card");
if (myFunction)
card = myFunction(PCI_7230,card_number);
m_qDAQThread.setCard(card); //This cause the crash. Changing it to any call like a "QObject::connect" produces the same error
If I don't call "card = myFunction(PCI_7230,card_number)", there is no problem.
Thanks,
P.S.: I'm using Qt 4.6.1 and Visual Studio 2008 on Windows XP
I'm trying to load a library in runtime using QLibrary.
I'm using the QLibrary class inside a class. I'm able to call a resolved function from the library. The problem is on the next function,method, ... call. This call produces a "buffer saturation" error. If I load the library into the main it works perfectly.
I want to use the QLibrary inside a class because it will be like a plugin.
Is there any memory limitation or maybe I'm making a mistake?
Here there is the piece of code in the application constructor:
QLibrary myLib("pci-dask");
typedef I16 (*MyPrototype)(U16,U16);
MyPrototype myFunction = (MyPrototype) myLib.resolve("Register_Card");
myFunction = (MyPrototype) myLib.resolve("Register_Card");
if (myFunction)
card = myFunction(PCI_7230,card_number);
m_qDAQThread.setCard(card); //This cause the crash. Changing it to any call like a "QObject::connect" produces the same error
If I don't call "card = myFunction(PCI_7230,card_number)", there is no problem.
Thanks,
P.S.: I'm using Qt 4.6.1 and Visual Studio 2008 on Windows XP