Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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?

Thanks!

MadraghRua
yet another biologist hacking perl....


Comment on Re: Working with COM objects
Download Code
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://765721]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-12-28 21:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls