I googled on this and realized there are probably several causes to this so I will describe my scenario.
This happens when my application tries to load a .dll file built in another version of Visual Studio (2010), if I build the same project on Visual Studio 2008 the DLL file loads just fine...
I don't know if it matters, but Visual Studio 2010 DLL file version is built on Windows 7 x32, and Windows Vista 64-bit is on the other side with Visual Studio 2008.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…