Greetings, I've created an external DLL for pinging remote hosts, because Qt doesn't have any ping methods.
I load it with QLibrary the following way:

Header file:
Qt Code:
  1. typedef float (*sendPing)(char *ip,int size,int timeout)
  2. ...
  3. class MyClass : public QWidget
  4. {
  5. Q_OBJECT
  6. ...
  7. sendPing pinger;
To copy to clipboard, switch view to plain text mode 
and in my CPP file:
Qt Code:
  1. ...
  2. pinger = (sendPing) QLibrary::resolve("libICMP","libIcmpSendEcho");
  3. ...
  4. if (!pinger) { QMessageBox::critical(this, "Error", "Unable to load libIcmpSendEcho function!"); return; }
  5. else { pinger("127.0.0.1",32,100); }
To copy to clipboard, switch view to plain text mode 
I'm compiling the program and testing under wine and it works fine, but when run the application under Windows with libICMP.dll in the program directory it fails with the QMessage box appearing. I can't see a reason why does it work under wine and not under native windows... Thank you for all replies!