Link to home
Start Free TrialLog in
Avatar of yuvarani
yuvarani

asked on

com dll vc6 to vc7: Can we ignore these warnings

Hi
Its a conversion of VC6 com dll into .NET 2003.  just want to know how severe are the following warnings.

LINK : warning LNK4222: exported symbol 'DllCanUnloadNow' should not be assigned an ordinal
LINK : warning LNK4222: exported symbol 'DllGetClassObject' should not be assigned an ordinal
LINK : warning LNK4222: exported symbol 'DllRegisterServer' should not be assigned an ordinal
LINK : warning LNK4222: exported symbol 'DllUnregisterServer' should not be assigned an ordinal

LINK : warning LNK4089: all references to 'SHELL32.dll' discarded by /OPT:REF
LINK : warning LNK4089: all references to 'USER32.dll' discarded by /OPT:REF

Will ignoring the above cause any  runtime problems?

Regards,
Shinto
Avatar of Santino_k
Santino_k

No,I don't think so. According to MSDN Remove ordinal numbers as these functions are always located by name, using GetProcAddress.

Refer the following link.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcerrLinkerToolsWarningLNK4222.asp

Hope this helps
Avatar of yuvarani

ASKER


Hi Santino,
      
      Thank you for your comments on LNK4222.  Just a few more queries before closing this:
      1) I got these warning in VC7. Why these warning do not seen  in VC6? Is Ordinal numbers are mandatory in VC6 ?
      2) Is there any scenario where using ordinal numbers are advantageous?
      3) There's another warning also in my initial post:  "LINK : warning LNK4089: all references to 'SHELL32.dll' discarded by /OPT:REF"

ASKER CERTIFIED SOLUTION
Avatar of Santino_k
Santino_k

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To add to what i said above -
Every COM DLL requires following functions to be exported -
'DllCanUnloadNow'
'DllGetClassObject'
'DllRegisterServer'
'DllUnregisterServer'

Thus ordinal positions for these functions are ignored in VC7
hi Santino,
 Thanks for your info.