Linker Tools Warning LNK4222
exported symbol 'symbol' should not be assigned an ordinal
The following symbols should not be exported by ordinal:
DllCanUnloadNow
DllGetClassObject
DllGetClassFactoryFromClassString
DllInstall
DllRegisterServer
DllRegisterServerEx
DllUnregisterServer
These functions are always located by name, using GetProcAddress
. The linker warns about this kind of export is because it could result in a larger image. This could happen if the range of your ordinal exports is large with relatively few exports. For example,
EXPORTS
DllGetClassObject @1
MyOtherAPI @100
will require 100 slots in the export address table with 98 of them (2-99) just filler. On the other hand,
EXPORTS
DllGetClassObject
MyOtherAPI @100
will require two slots. (Be aware that you can also export with the /EXPORT linker option.)
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for