PDA

View Full Version : Delay DLL loading ?



black_coder
1st December 2009, 23:25
Hi,

I have this very annoying message "Qt: Could not initialize OLE (error 80010106)" that I have been trying to get rid off forever. I searched everywhere for a solution for this problem but I can't fixing and I am banging my head against the wall at the moment. It happens because I am using opencv with qt and apprently the opencv "highgui110.dll" is being loaded before the qt dlls causing this annoying message to appear. I searched for the meaning of this error and it's about the inability to change the priority of a thread once it starts. The closest I've been to a solution is if I move "highgui110.dll" from the local folder to another folder that is in the PATH then I don't get this error. So it seems that by doing that I am delaying its loading, is there any way of doing it by delay load linking or whatever .... ? I am using mingw32 by the way so I can't use the /delayload flag used in MS compiler.

wysota
2nd December 2009, 00:00
The only way I know of is to not link against the library but instead load it dynamically using QLibrary and then resolve all the symbols manually. Apart from that I'm afraid it will be easier to solve the problem if you look at some specialized Win32 or MinGW forum.