I want to load DLL in a C++ program and create function pointers. To avoid any confusion, I am providing the absolute path of the DLL. But still, the DLL is not loaded.
My Code:
void CallFunctionPointers()
{
QString strMsg;
QString strLibPath("D:\\dll\\AtmoRemote.dll");
QLibrary* m_p_lib = new QLibrary();
m_p_lib->setFileName(strLibPath);
if (!m_p_lib->load())
{
strMsg = QString("Could not load %1").arg(strLibPath); //<<<<-----------PROGRAM ALWAYS ENTERS HERE
}
else
{
strMsg = QString("Successfully loaded: %1").arg(strLibPath);
}
}