Ok, here it is:
Qt Code:
  1. #include <QtCore/QCoreApplication>
  2. #include <QLibrary>
  3.  
  4. #include <stdio.h>
  5. #include <windows.h>
  6.  
  7. #define MY_DLL_PATH "C:\\Program Files (x86)\\VideoLAN\\VLC\\libvlc.dll"
  8.  
  9. int main(int argc, char *argv[])
  10. {
  11. QCoreApplication a(argc, argv);
  12.  
  13. QLibrary qlib(MY_DLL_PATH);
  14. if (qlib.load())
  15. printf("loaded successfully with QLibrary\n");
  16. else printf("failed to load with QLibrary\n");
  17.  
  18. if (HMODULE hMod = LoadLibraryExA(MY_DLL_PATH, NULL, LOAD_WITH_ALTERED_SEARCH_PATH))
  19. printf("loaded successfully with LoadLibraryEx");
  20. else printf("failed to load with LoadLibraryEx");
  21.  
  22. return a.exec();
  23. }
To copy to clipboard, switch view to plain text mode