Win32::OLE, InternetExplorer, NewWindow, Events --- crashes

Discussion in 'Perl Misc' started by puff, Jan 12, 2006.

  1. puff

    puff Guest

    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:

    sub ie_events(){ 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?

    The code

    $args[0]->Put( $ie ); $args[1]->Put( 0 );

    Eventually leads to crashes. Given that the return should be a ppDisp
    what is the proper way to return $ie?
    puff, Jan 12, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patrick.O.Ige

    Ole ole

    Patrick.O.Ige, Jul 16, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    477
    Patrick.O.Ige
    Jul 16, 2006
  2. Drew Pihera
    Replies:
    0
    Views:
    622
    Drew Pihera
    Feb 4, 2004
  3. JDP@Work

    Help newWindow

    JDP@Work, Feb 7, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    120
    Mohamed El Ashmawy
    Feb 8, 2005
  4. psyshrike
    Replies:
    0
    Views:
    86
    psyshrike
    Sep 14, 2003
  5. Lance Hoffmeyer
    Replies:
    0
    Views:
    230
    Lance Hoffmeyer
    Nov 17, 2003
Loading...

Share This Page