Re: compiling error for IWebBrowser2 in .idl

From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 03/15/04


Date: Mon, 15 Mar 2004 10:56:25 -0500

Inside the library block, add

importlib("shdocvw.dll")

after other importlib statements.

-- 
With best wishes,
    Igor Tandetnik
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
"qiru" <qiru@hotmail.com> wrote in message
news:uV$wmaRCEHA.3024@tk2msftngp13.phx.gbl...
> Hi,
>
> I use VC++ 6.0 and ATL. I try to add a property with IWebBrowser2
type, but
> failed: midl\oleaut32.dll : error MIDL2020 : error generating type
library :
> LayOut failed : IWebBrowser. Here is the .idl file:
>
> // myatlcom.idl
> //
> import "ExDisp.Idl";  // define for IWebBrowser2
> import "oaidl.idl";
> import "ocidl.idl";
>  [
>   object,
>   uuid(68491918-9949-4EF6-8F95-5ABAB16DC3E6),
>   dual,
>   helpstring("ISimpleObj Interface"),
>   pointer_default(unique)
>  ]
>  interface ISimpleObj : IDispatch
>  {
>   [propget, id(1), helpstring("property WebBrowser")] HRESULT
> WebBrowser([out, retval] IWebBrowser2* *pVal);
>   [propput, id(1), helpstring("property WebBrowser")] HRESULT
> WebBrowser([in] IWebBrowser2* newVal);
>  };
>
> [
>  uuid(CEBFD10B-9B16-4B84-989A-5A67B4C02B9B),
>  version(1.0),
>  helpstring("myatlcom 1.0 Type Library")
> ]
> library MYATLCOMLib
> {
>  importlib("stdole32.tlb");
>  importlib("stdole2.tlb");
>
>  [
>   uuid(245B13CA-41D1-4B6B-A067-59827647542C),
>   helpstring("SimpleObj Class")
>  ]
>  coclass SimpleObj
>  {
>   [default] interface ISimpleObj;
>  };
> };
>
>
> Thanks for any help,
> qiru
>
>
>


Relevant Pages

  • Re: IWebBrowser2 thread safety
    ... thead safety of IWebBrowser2? ... WebBrowser is an apartment threaded component. ... Note that creating a worker thread is usually ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • pOleObject->DoVerb return E_NOINTERFACE error
    ... I am coding a webbrowser application with VC++ 6.0 and ATL. ... pOleObject is QI ... from a IWebBrowser2, hr = pOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL, ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • PLS HELP : CoCreateInstance on IE object failed on XP/SP2
    ... HRESULT hr; ... IWebBrowser2* pWebBrowser = NULL; ... hr = CoCreateInstance (CLSID_InternetExplorer, NULL, ...
    (microsoft.public.win32.programmer.ole)
  • compiling error for IWebBrowser2 in .idl
    ... I try to add a property with IWebBrowser2 type, ... Here is the .idl file: ... import "ExDisp.Idl"; // define for IWebBrowser2 ... interface ISimpleObj: IDispatch ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Internet Explorer_Server and IWebbrowser2
    ... implementing a webbrowser based on IE core, ... the handle of Iwebbrowser2. ... With spy, ... I am wondering if every Internet ...
    (microsoft.public.vc.atl)