Ok, here it is:
#include <QtCore/QCoreApplication>
#include <QLibrary>
#include <stdio.h>
#include <windows.h>
#define MY_DLL_PATH "C:\\Program Files (x86)\\VideoLAN\\VLC\\libvlc.dll"
int main(int argc, char *argv[])
{
if (qlib.load())
printf("loaded successfully with QLibrary\n");
else printf("failed to load with QLibrary\n");
if (HMODULE hMod = LoadLibraryExA(MY_DLL_PATH, NULL, LOAD_WITH_ALTERED_SEARCH_PATH))
printf("loaded successfully with LoadLibraryEx");
else printf("failed to load with LoadLibraryEx");
return a.exec();
}
#include <QtCore/QCoreApplication>
#include <QLibrary>
#include <stdio.h>
#include <windows.h>
#define MY_DLL_PATH "C:\\Program Files (x86)\\VideoLAN\\VLC\\libvlc.dll"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QLibrary qlib(MY_DLL_PATH);
if (qlib.load())
printf("loaded successfully with QLibrary\n");
else printf("failed to load with QLibrary\n");
if (HMODULE hMod = LoadLibraryExA(MY_DLL_PATH, NULL, LOAD_WITH_ALTERED_SEARCH_PATH))
printf("loaded successfully with LoadLibraryEx");
else printf("failed to load with LoadLibraryEx");
return a.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks