Click to See Complete Forum and Search --> : Migrating to VS 2005: DLL initializing issue


Pankajmo
August 13th, 2007, 06:06 AM
Hello, I am new to managed C++. I have migrated a stable project in VC 6 to VS 2005. After removing the compilation and linked issues, the project is built. But the problem comes when I start debugging. Main exe is having around 10 extension DLL's and when the program starts, it call DLLMain only for 5 DLL's and fires an exception somewhere in assembly. and rest of DLL doesn't get initialized. Program runs after that but as the static members are not initialized for some DLL's, it crashs at a numbers of places. Any suggestions to initialize rest of the dll's forcibly. DLLMain is not called even when some function from the uninitialized dll is referred.

darwen
August 14th, 2007, 03:06 PM
fires an exception


Which exception ?

Try checking that all the 'enable managed extensions' flags (in the project settings/general tab) are turned off.

Darwen.

NandiniY
August 17th, 2007, 07:34 AM
me too facing similar kind of issue...

I try checking out the "enable managed extensions" flag.. But I couldn't find it anywhere in .NET 2005 project settings...

If its "Common Language Runtime Support" that you are talking about under Settings>General tab, then its been set to "No Common Language Runtime Support".

I'm still clueless as to how can I enforce dlls to get instantiated ...

Please any help is much appreciated.

Thanks...

Krishnaa
August 17th, 2007, 08:45 AM
Well, all you need to do is to build debug version of all those DLLs and run it in debugger, see the call stack and figure out the probable function call (of your code) which originated it.