mikewhit_ has asked for the wisdom of the Perl Monks concerning the following question:
Win32::OLE(0.1601) error 0x80020005: "Type mismatch" in METHOD/PROPERTYGET "FlashLamp" argument 1 at CS1.pm line 199
Is this a Win32::OLE calling issue with multiple args, or do I need to look elsewhere?
$cs1 = Win32::OLE->GetActiveObject("CS.CSInterface1") or die "Coul +d not get interface CS1\n"; ... my ($on, $off, $count) = $_; # contains args !!! SHOULD USE ARRAY +HERE !!! $cs1->FlashLamp($on, $off, $count);
C++ code:
Platform stuff:STDMETHODIMP CCSInterface1::FlashLamp(long OnDuration, long OffDuratio +n, long FlashCount) { return S_OK; }
Thanks.
Update
Thanks! I couldn't see the wood for the trees.
Doh! Shows my Perl is rusty from a couple of years of non-use !
Used some code from some earlier work where I'd had a ref to a list, so I'd have had to deref it first anyhow !
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Type mismatch in Win32::OLE method call with multiple args
by VSarkiss (Monsignor) on Jan 13, 2005 at 16:52 UTC |