LoadLibrary with Short Path & Execute EXE with long path
Hi,
I have encountered a very strange situation. I have an MFC EXE developed using VC2008 that simply displays a dialog with a "Show Dialog" button. When I click on "Show Dialog" button, it shows another model dialog that comes from an MFC Extension DLL. The Extension DLL is loaded in EXE in OnInitDialog() by converting the DLL path to short path using GetShortPathName() API.
Now the EXE is built and deployed on another machine where VC2008 is not installed. The deployment directory is provided with CRT and MFC redistributable DLLs with manifest from VC2008 redist directory. I mean I provide all the dependent DLLs and manifest in the application's folder.
Now I run the EXE. Then click on "Show Dialog" button; the application hangs.
But if I load the DLL in EXE's OnInitDialog() with long path (I mean fully qualified path), this situation does not occur.
Re: LoadLibrary with Short Path & Execute EXE with long path
Hi,
There is not an obvious reason, but I did it for fun. Furthermore, this problem occurs on XP Service Pack 2 only. I tested it on Vista HP, it's working fine. For further information please check the following thread
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.