I have a question about returning HRESULTs while setting properties in activex 
controls.
(see code below)
NOTE: i am making this fail on purpose

in perl, the HRESULT that is returned from setting a property is

Win32::OLE(0.1501) error 0x80020009: "Exception occurred"
    in PROPERTYPUT "Maxrecords"]

while in vbscript, it returns 80020005: "Type Mismatch"

why does perl not return the correct HRESULT when setting properties?

thanks,
---tom

-----perl code-----
use Win32::OLE;
my $o_rs = Win32::OLE->new("AdoDB.Recordset");
$o_rs->{Maxrecords} = "a";
print Win32::OLE->LastError();
-----end perl code-----

-----vbscript code-----
Set oRS = WScript.CreateObject("adodb.recordset")
oRs.Maxrecords = "a"
-----end vbscript code-----





_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

Reply via email to