Board index » cppbuilder » little complex translation

little complex translation

How do you translate this to bcb?  I have not seen one like this.

ConnectionPoints = WebBrowser as IConnectionPointContainer;

WebEvents.Advise( self as IDispatch, dwCookie );

 

Re:little complex translation


Quote
Terry James wrote:

> How do you translate this to bcb?  I have not seen one like this.

> ConnectionPoints = WebBrowser as IConnectionPointContainer;

> WebEvents.Advise( self as IDispatch, dwCookie );

<Pure guess (but educated!)>

ConnectionPoints = static_cast<IConnectionPointContainer*>(WebBrowser);
//or may have to do a reinterpret_cast on above
WebEvents.Advise(static_cast<IDispatch*>(this), dwCookie);
//may also need reinterpret_cast

Other Threads