char DLLfunction()
{
typedef char* (*MyPrototype)();
MyPrototype myFunction =
(MyPrototype
) QLibrary::resolve("dllprog",
"TestDll");
char b = myFunction();
return b;
}
char DLLfunction()
{
QLibrary myLib("dllprog");
typedef char* (*MyPrototype)();
MyPrototype myFunction =
(MyPrototype) QLibrary::resolve("dllprog", "TestDll");
char b = myFunction();
return b;
}
To copy to clipboard, switch view to plain text mode
there is something weird in your code as define MyPrototype as raturning char* and than you do:
char b = myFunction();
char b = myFunction();
To copy to clipboard, switch view to plain text mode
where you are assigning returned value to one char. Is it right?
Bookmarks