BUG: Error MIDL2311 When You Compile an MFC ActiveX Control with Internet Explorer 5.5 Headers (282068)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 5.5
This article was previously published under Q282068 SYMPTOMS
When you compile a Microsoft Foundation Class (MFC) ActiveX control project with the Internet Explorer 5.5 header files, you may receive the following error message:
error MIDL2311 : statements outside library block are illegal in mktyplib compatability mode : [ ]
CAUSE
This problem occurs because the Olectl.h file, as shown below, does not hide the #pragma once directive as expected:
#ifndef _OLECTL_H_
#define _OLECTL_H_
#if _MSC_VER > 1000
#pragma once
#endif
#if !defined(__MKTYPLIB__) && !defined(__midl)
Olectl.h is located in the Ie55headers\Ie55_lib\Include folder.
RESOLUTION
There are two ways to work around this problem:
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. REFERENCESFor more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
Modification Type: | Major | Last Reviewed: | 5/11/2006 |
---|
Keywords: | kbBug kbCtrl kbpending KB282068 |
---|
|