if(lib.load())
qDebug("\n Library is loaded \n");
else
qDebug ("\n Library is not loaded \n");
typedef int (*MyPrototype)(char*,char* ,char*,char*,char *);
MyPrototype myFunction = (MyPrototype) lib.resolve("func");
if (myFunction){
int tmp = myFunction("qwe","qwe","qwe","qwe","qwe");
qDebug("Library start,tmp =%d", tmp);
}
QLibrary lib("c:/lib.dll");
if(lib.load())
qDebug("\n Library is loaded \n");
else
qDebug ("\n Library is not loaded \n");
typedef int (*MyPrototype)(char*,char* ,char*,char*,char *);
MyPrototype myFunction = (MyPrototype) lib.resolve("func");
if (myFunction){
int tmp = myFunction("qwe","qwe","qwe","qwe","qwe");
qDebug("Library start,tmp =%d", tmp);
}
To copy to clipboard, switch view to plain text mode
Bookmarks