I have an managed DLL that compiles fine in VS2003 but fails on Whidbey Feb CTP. I couldn't find any document about replacement for _vcclrit.h according to http://support.microsoft.com/ id=814472
Any advice
C:\Program Files\Microsoft Visual Studio 8\VC\include\_vcclrit.h(23) : warning CRT1001: _vcclrit.h is deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\_vcclrit.h(94) : warning C4996: '__lock_handle' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\_vcclrit.h(133) : warning C4996: '__terminated' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\_vcclrit.h(137) : warning C4996: '__initialized' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\_vcclrit.h(151) : warning C4996: '__initialized' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\_vcclrit.h(159) : warning C4996: '__lock_handle' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\_vcclrit.h(177) : warning C4996: '__lock_handle' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\_vcclrit.h(209) : warning C4996: '__initialized' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\_vcclrit.h(213) : warning C4996: '__terminated' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\_vcclrit.h(224) : warning C4996: '__terminated' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\_vcclrit.h(231) : warning C4996: '__lock_handle' was declared deprecated
.\DllInit.cpp(47) : warning C4996: '__crt_dll_initialize' was declared deprecated
DllInit.obj : error LNK2020: unresolved token (0A000012) __native_vcclrit_reason
DllInit.obj : error LNK2020: unresolved token (0A000013) __native_startup_state
DllInit.obj : error LNK2020: unresolved token (0A000014) __native_startup_lock

_vcclrit.h is deprecated. What's the replacement?
Thogek
Ricacho
If you have applied the suggested resolution for the loader-lock problem on your VC2003 project. You should remove it again!
It is not longer needed (nor supported) in VC2005:
Old KB-Article (which only applies to VC2002/2003 !!!):
PRB: Linker Warnings When You Build Managed Extensions for C++ DLL Projects
http://support.microsoft.com/ id=814472
With VC2003 you simple must not use managed functions inside DllMain and you must link with the DLL-Version of the CRT.
whattapain
By the way: starting with VC2005 you do not need to care about the "loader-lock" problem.
It is no solved and you do not need to call "__crt_dll_initialize" and all other stuff manually!
See:
http://msdn.microsoft.com/chats/transcripts/vstudio/vstudio_091604.aspx
http://msdn.microsoft.com/library/en-us/dnvs05/html/debgb1LdLk.asp
John Mathiasen
carso
If I simply remark these 2 lines,
//#include "_vcclrit.h"
//__crt_dll_initialize();
I still get this:
DllInit.obj : error LNK2001: unresolved external symbol " .cctor@@$$FYMXXZ" ( .cctor@@$$FYMXXZ)
DllInit.obj : error LNK2001: unresolved external symbol " .cctor@@$$FYMXXZ" ( .cctor@@$$FYMXXZ)