Board index » delphi » how to marshall IWebBrowser2

how to marshall IWebBrowser2

hi all,

how can I pass an IWebbrowser2 interface pointer as a parameter ???
In the TLB, only some pre-defined interfaces are allowed as parameters?

Do I have to use CoMarhallInterface/CoUnMarhallInterface functions?
Or, passing the pointer within a variant and then type-casting runs correct
???

Help, please?
Thanks in advance....

 

Re:how to marshall IWebBrowser2


<<Erhan Erisken:
how can I pass an IWebbrowser2 interface pointer as a
parameter ???
In the TLB, only some pre-defined interfaces are allowed as
parameters?

Quote

No, you can add more. In the type library editor, with the
Project selected in the left hand pane, click on the Uses
tab on the right. Then right-click in the right-hand pane
and select 'Show all type libraries'. Scroll down the list
and select Microsoft Internet Controls, and the
IWebBrowser2 interface will become available as a
parameter.

--
Deborah Pate (TeamB) http://delphi-jedi.org

  Use Borland servers; TeamB don't see posts via ISPs
  http://www.borland.com/newsgroups/genl_faqs.html

Re:how to marshall IWebBrowser2


thanks...

but this time I got the following error on compile time...

"declaration of (method_name) differs from declaration in interface
(interface_name)"

what's happening here ???

"Deborah Pate (TeamB)" <d.p...@cableinet.co.not-this-bit.uk> wrote in
message news:VA.00000c70.00196e59@cableinet.co.not-this-bit.uk...

Quote
> <<Erhan Erisken:
> how can I pass an IWebbrowser2 interface pointer as a
> parameter ???
> In the TLB, only some pre-defined interfaces are allowed as
> parameters?

> No, you can add more. In the type library editor, with the
> Project selected in the left hand pane, click on the Uses
> tab on the right. Then right-click in the right-hand pane
> and select 'Show all type libraries'. Scroll down the list
> and select Microsoft Internet Controls, and the
> IWebBrowser2 interface will become available as a
> parameter.

> --
> Deborah Pate (TeamB) http://delphi-jedi.org

>   Use Borland servers; TeamB don't see posts via ISPs
>   http://www.borland.com/newsgroups/genl_faqs.html

Re:how to marshall IWebBrowser2


<<Erhan Erisken:
"declaration of (method_name) differs from declaration in
interface (interface_name)"

what's happening here ???

Quote

I suspect you've added the wrong file to your uses clause
in the implementation unit - try ShDocVW_TLB.

--
Deborah Pate (TeamB) http://delphi-jedi.org

  Use Borland servers; TeamB don't see posts via ISPs
  http://www.borland.com/newsgroups/genl_faqs.html

Other Threads