your example wouldn't work, because you didn't give DLL_File_Name to QLibrary object
call
myLib->setFileName( DLL_File_Name );
myLib->setFileName( DLL_File_Name );
To copy to clipboard, switch view to plain text mode
in your openDLL and run functions.
but there's a better idea to give dll name in constructor, like this
{
public:
myWidget
(QWidget *parent,
const char * const dllFileName
) , m_dll( dllFileName )
{
}
protected:
class myWidget : public QWidget
{
public:
myWidget(QWidget *parent, const char * const dllFileName )
: QWidget(parent)
, m_dll( dllFileName )
{
}
protected:
QLibrary m_dll;
To copy to clipboard, switch view to plain text mode
and the next. Check, that your function pointers are not zero
MyPrototypeOne Open = (MyPrototypeOne) m_dll.resolve("OD");
if ( Open )
{
... // do something with Open
}
MyPrototypeOne Open = (MyPrototypeOne) m_dll.resolve("OD");
if ( Open )
{
... // do something with Open
}
To copy to clipboard, switch view to plain text mode
Bookmarks