COM and the PHP equivalent of ASP Currency data type

From: Date: Thu, 04 Dec 2008 16:43:53 +0000
Subject: COM and the PHP equivalent of ASP Currency data type
Groups: php.general 
Request: Send a blank email to php-general+get-284102@lists.php.net to get a copy of this message
Hi all, I am working with a COM interface and the specification which is wrtten for ASP calls for a "Currency" data type to be passed to a function. What is the equivalent in PHP? If I call com_print_typeinfo() I can see that the function has the following info: function GetPrice( /* VT_PTR [26] [in][out] --> VT_VARIANT [12] */ &$Account, /* VT_PTR [26] [in][out] --> VT_CY [6] */ &$Quant, /* VT_PTR [26] [in][out] --> VT_I2 [2] */ &$QuantMult, /* VT_PTR [26] [in][out] --> VT_I2 [2] */ &$prMult ) The parameter I am having problems with parameter 2 - $Quant. I tried to create a VARIANT of type VT_CY so I did: $qty = new VARIANT('1.0000', VT_CY); The error I am getting is: Uncaught exception 'com_exception' with message 'Parameter 2: Type mismatch. Thanks all, Alex - Alex Bovey Web Developer | Alex Bovey Consultancy Ltd Registered in England & Wales no. 6471391 | VAT no. 934 8959 65 PHP | MySQL | AJAX | XHTML | CSS | Javascript | XML | W3C Accessibility

« previous php.general (#284102) next »