Broadcasting my cry for help to a wider audience...
On Sun, Nov 23, 2008 at 4:06 PM, David Ho <[EMAIL PROTECTED]> wrote:

> Hello Jan,
>
> Sorry to bother you, but I have been trying to find a solution to pass a
> UDP payload from Perl to a COM server without much luck.
>
> I would very much like to get your input on this.
>
> My first go at it is to try passing in a VARIANT(VT_ARRAY|VT_UI1,
> "Payload") to an IDL interface method of the following.
>
>  my $Data = Variant(VT_ARRAY|VT_UI1, "Payload");
>  my $DataUnit = $SDU->{DataUnit};
>  $DataUnit->SetDataBits($BitLength, $Data);
>
> [id(3)] HRESULT SetDataBits([in] long Bitlength, [in] SAFEARRAY(char)
> *ppsa);
> However Perl is complaining about a type mismatch.
>
> [4216:0183F33C] Dispatch "SetDataBits"
> [4216:0183F33C] QueryPkgVar(Win32::OLE::Warn) returns 1
> [4216:0183F33C] ReportOleError: hr=0x80020005 warnlvl=1
> Win32::OLE(0.1709-QC1) error 0x80020005: "Type mismatch"
>     in METHOD/PROPERTYGET "SetDataBits" argument 2[4216:0183F33C]
> Win32::OLE::Tie::Fetch(0x01931f94,'___Perl___OleObject___')
>
> Can you shine some light as to what I am doing horribly wrong? Is there a
> better way of passing a byteArray to COM?
>
> Because the Perl Socket interface returns UDP packets as scalars, I am
> wondering what the most efficient method to pass that to COM.
>
> Thanks very much in advance,
> David
>
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to