Browse - Programming Tips - 'DllCanUnloadNow' should not be assigned an ordinal

Date: 2009oct11
Language: C/C++
Framework: MFC

Q.  'DllCanUnloadNow' should not be assigned an ordinal
When converting a VC++ 6 project to VC++ 7 get this warning.
What should I do?

A.  Change:

DllCanUnloadNow @1 PRIVATE DllGetClassObject @2 PRIVATE DllRegisterServer @3 PRIVATE DllUnregisterServer @4 PRIVATE
to:
DllCanUnloadNow PRIVATE DllGetClassObject PRIVATE DllRegisterServer PRIVATE DllUnregisterServer PRIVATE
in your .def file. More info: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcerrLinkerToolsWarningLNK4222.asp