BUG: MIDL2039 Warning with IFontDisp/IPictureDisp Parameter TypeID: Q196830
|
When you compile an .idl file with IFontDisp or IPictureDisp as parameters of methods in Visual C++ 5.0 or Visual C++ 6.0, you get a MIDL2039 warning.
This is due to a bug in Ocidl.idl source. You must add the dual attribute to the interface declarations for IFontDisp and IPictureDisp.
To prevent the warning, add the dual attribute to the IFontDisp and IPictureDisp interface declarations in Ocidl.idl, as in the following example:
[
object,
dual,
uuid(BEF6E003-A874-101A-8BBA-00AA00300CAB),
pointer_default(unique)
]
interface IFontDisp : IDispatch
{
typedef IFontDisp * LPFONTDISP;
}
[
object,
dual,
uuid(7BF80981-BF32-101A-8BBB-00AA00300CAB),
pointer_default(unique)
]
interface IPictureDisp : IDispatch
{
typedef IPictureDisp * LPPICTUREDISP;
}
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
warning MIDL2039 : interface does not conform to [oleautomation]
attribute
warning MIDL2039 : interface does not conform to [oleautomation]
attribute
warning MIDL2039 : interface does not conform to [oleautomation]
attribute
Keywords : kbcode kberrmsg kbActiveX kbATL210bug kbVC500bug kbVC600bug kbATL300bug
Version : WINDOWS:2.1,3.0; WINNT:5.0,6.0
Platform : WINDOWS winnt
Issue type : kbbug
Last Reviewed: August 3, 1999