Hi!

I heave a delphi dll, this exported function:

Qt Code:
  1. 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"

Qt Code:
  1. extern "C" { typedef char*(__stdcall * PGetAdminSID)(); }
  2. PGetAdminSID GetAdminSID;
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. lib.setFileName("delphidll");
  2.  
  3. if (!lib.load())
  4. {
  5. qDebug("mainwindow: Can not load library!");
  6. return false;
  7. }
  8.  
  9. GetAdminSID = (PGetAdminSID)lib.resolve("GetAdminSID");
  10.  
  11. if (!GetMachineID)
  12. {
  13. lib.unload();
  14. qDebug("mainwindow: 'GetAdminSID' not found in library!");
  15. return false;
  16. }
  17.  
  18. return true;
To copy to clipboard, switch view to plain text mode 

Thanks!
Hi!