I’m working on an application that automates IE and needs to handle IE’s NewWindow2 event. The IE documentation for the event gives the following stytax:
Private Sub object_NewWindow2( _
ByRef ppDisp As Object, _
ByRef Cancel As Boolean)
When handling the event my perl code is entered with:
my( $ie, $event, @args ) = @_;
In my handler I create a new IE object with:
my $ie = Win32::OLE->new( 'InternetExplorer.Application' );
Win32::OLE->WithEvents($ie, \&ie_events, 'DWebBrowserEvents2' );
Now my question. What is the proper way to set @args to return?
$args->Put( $ie );
$args->Put( 0 );
Eventually leads to crashes. Given that the return should be a ppDisp what should I do?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||