Nitrox has asked for the wisdom of the Perl Monks concerning the following question:
I've successfully created an Win32::OLE object which gives me about 95% of the functionality available with this particular 3rd party application. The latest piece that I'm trying to get working is a callback. Here's what
the documentation shows for VB interaction:
RegisterEventCB takes a long, and a reference to a form with a HSEvent(parms as variant) method declared public.
Here is a snippet from my Perl version, which doesn't throw an error, but passing $cb to Data::Dumper shows its empty.Private Sub Form_Load() Set hs = New HS.Application hs.RegisterEventCB 3, Me End Sub
$obj = Win32::OLE->CreateObject('HS.Application'); $self = bless {}; $cb = $obj->RegisterEventCB(3,$self); print Dumper(\$cb); sub HSEvent{ print Dumper(\@_); }
Does anyone see what I'm doing wrong here? Thanks in advance.
-Nitrox
Back to
Seekers of Perl Wisdom