Hi!
I heave a delphi dll, this exported function:
function GetAdminSID: String;
function GetAdminSID: String;
To copy to clipboard, switch view to plain text mode
How to import this function in QT?
I use QLibrary to import but when I call the function GetAdminSID(); my application stopped with this message: "exited with code -1073741819"
extern "C" { typedef char*(__stdcall * PGetAdminSID)(); }
PGetAdminSID GetAdminSID;
extern "C" { typedef char*(__stdcall * PGetAdminSID)(); }
PGetAdminSID GetAdminSID;
To copy to clipboard, switch view to plain text mode
lib.setFileName("delphidll");
if (!lib.load())
{
qDebug("mainwindow: Can not load library!");
return false;
}
GetAdminSID = (PGetAdminSID)lib.resolve("GetAdminSID");
if (!GetMachineID)
{
lib.unload();
qDebug("mainwindow: 'GetAdminSID' not found in library!");
return false;
}
return true;
QLibrary lib;
lib.setFileName("delphidll");
if (!lib.load())
{
qDebug("mainwindow: Can not load library!");
return false;
}
GetAdminSID = (PGetAdminSID)lib.resolve("GetAdminSID");
if (!GetMachineID)
{
lib.unload();
qDebug("mainwindow: 'GetAdminSID' not found in library!");
return false;
}
return true;
To copy to clipboard, switch view to plain text mode
Thanks!
Hi!
Bookmarks