Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Working with COM objects

by MadraghRua (Vicar)
on May 22, 2009 at 17:37 UTC ( #765721=note: print w/replies, xml ) Need Help??

in reply to Working with COM objects

Alas I tried this and several variations on the theme but to no avail.

OK, so here's the question reconfigured - I have two instances of two separate COM objects - tool and data. Tool instance has several attributes and a couple of methods. However one of the attributes is that it takes an instance of a data object for Tools->{data}. When I look at these things via Dumpvalue, I see that objects are typically represented in the data structure as a hash address and then you see a cascade of the data present under that hash address. So in the example above, I can see tools->{Results} has a Win32::OLE hash address and then you see the data under it.

How would I do something like this for my Data object - perhaps there is something FUBAR'd under creating this Win32::OLE hash address for this COM object and simply supplying this would solve the problem. I've tried passing $data instance as /$data and as a passed reference

$thingref = /$data; $tool->{Data} = $thingref;
I know in Jscript that I can simply pass set tool.Data = data How do I do this in Perl?

Win32::OLE is the best way to tackle this - yes? Or is there something else I should be looking at?


yet another biologist hacking perl....

Replies are listed 'Best First'.
Re^2: Working with COM objects
by Anonymous Monk on May 22, 2009 at 18:47 UTC
    | \|/ V my $data = server->Object->Item; ^ /|\ |

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://765721]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2018-01-23 10:59 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (243 votes). Check out past polls.