I have a C++ program with a depedency on external Dll [lets say dependent.dll], now If I keep..
- dependent.dll in executable folder, it works fine, but if I keep
- dependent.dll in somne custom Folder, it doesn't.
I have tried
LPCTSTR deplibFullPath = "C:\Program Files\My_Program\Dlls\dependent.dll";
HMODULE hMod = LoadLibraryEx(deplibFullPath , NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
It returns not null but whenever I access any function in dependent.dll, it doesnt works fine (crashes)
Any idea where I am doing wrong or what extra for i need to do.
Thanks
-Pankaj