PRB: Compiler Warnings Using #import on Mshtml.tlb

ID: Q231931


The information in this article applies to:
  • Microsoft Internet Explorer (Programming) version 5.0
  • Microsoft Visual C++, 32-bit Editions, version 6.0


SYMPTOMS

Building a Visual C++ project that uses #import on Mshtml.tlb may result in a number of compiler warnings of type C4192, C4049, and C4146:

warning C4192: automatically excluding 'wireHDC' while importing type library 'c:\winnt\system32\mshtml.tlb'
-or-
warning C4049: compiler limit : terminating line number emission
-or-
warning C4146: unary minus operator applied to unsigned type, result still unsigned


CAUSE

All of these warnings are indications of normal conditions inside the MSHTML type library:

  • C4192 is a typical warning, as indicated in the documentation for "C4192."


  • C4049 results from Mshtml.tlb's large size.


  • C4146 is an indication of the usage of a negative sign in the FINDTEXT_FLAGS enumeration. This is a low impact bug in the MSHTML type library and can be safely ignored.



RESOLUTION

Ignore these warnings or use #pragma to prevent them while #importing Mshtml.tlb:


#pragma warning(disable : 4192)
#pragma warning(disable : 4049)
#pragma warning(disable : 4146)
#import <mshtml.tlb>
#pragma warning(default: 4192)
#pragma warning(default: 4049)
#pragma warning(default: 4146) 


STATUS

This behavior is by design.


MORE INFORMATION

Note that the type library for MSHTML in Internet Explorer 4 was stored inside Mshtml.dll. As of Internet Explorer 5, the type library is provided in a separate file, Mshtml.tlb.


REFERENCES

For more information, please see the MSDN Web Workshop:

http://msdn.microsoft.com/workshop/default.asp

© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Jason Strayer, Microsoft Corporation

Additional query words:

Keywords : kbDHTML kbMSHTML kbVC600 kbGrpInet kbIE500
Version : WINDOWS:5.0; winnt:6.0
Platform : WINDOWS winnt
Issue type : kbprb


Last Reviewed: November 20, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.