Dave's Brain

Browse - programming tips - dllcanunloadnow should not be assigned an ordinal

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

Q. Converting a VC++ 6 project to VC++ 7 get this warning:

	'DllCanUnloadNow' should not be assigned an ordinal

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
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.