Hey guys,
lets say this up front: I'm a complete qt-newbie and this is my first QT Project.
First some code (simplified):
net.h :
typedef HRESULT (__stdcall *pInitNet)(bool master, char* path);
extern pInitNet initNet;
typedef HRESULT (__stdcall *pInitNet)(bool master, char* path);
extern pInitNet initNet;
To copy to clipboard, switch view to plain text mode
net.cpp
pInitNet initNet;
bool LoadDLL
(QString pathToDLL
= "") { if (_netLib != NULL)
return false;
if (!_netLib->load())
return false;
initNet = (pInitNet) _netLib->resolve("InitNet");
if (initNet)
return true;
else
return false;
}
pInitNet initNet;
QLibrary *_netLib;
bool LoadDLL(QString pathToDLL = "") {
if (_netLib != NULL)
return false;
_netLib = new QLibrary(pathToDLL);
if (!_netLib->load())
return false;
initNet = (pInitNet) _netLib->resolve("InitNet");
if (initNet)
return true;
else
return false;
}
To copy to clipboard, switch view to plain text mode
main.cpp
LoadDLL("libnet.dll");
initNet( <-<-<-<-<-<-<-<-<- NO AUTOCOMPLETE
LoadDLL("libnet.dll");
initNet( <-<-<-<-<-<-<-<-<- NO AUTOCOMPLETE
To copy to clipboard, switch view to plain text mode
As you can see, I'm trying to load some dll function dynamically. So I define the dll functions, load them by QLibrary and assign them.
It would be very unpleasant if I don't get autocomplete for these functions!
Is there anything I'm doing wrong? Is this a bug if QT-creator?
Some more details:
Compiler-Kit: MinGW_32bit
OS: Windows
Version: QT 5.3.2 /QT Creator 3.2.2
Thanks In advance!
CU
mts
Bookmarks