Re: strings chopped in half using COM objects
| From: | Alan Brown | Date: | Thu, 08 Nov 2001 16:18:05 +0000 |
| Subject: | Re: strings chopped in half using COM objects | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-10301@lists.php.net to get a copy of this message | ||
I just grabbed the very latest from CVS (which seems to have a label of
4.2.0-dev) and the problem appears to have been repaired.
In the earlier problem version, the string to VT_BSTR code was changed to
use SysAllocStringByteLen() and the length passed in was incorrect. This
appears to have been fixed and VT_BSTR arguments to COMponents now appear to
working as expected.
Alan.
----- Original Message -----
From: "Giuseppe D'Ambrosio" <boltthrower@libero.it>
To: <php-windows@lists.php.net>
Sent: Thursday, November 08, 2001 5:35
Subject: [PHP-WIN] strings chopped in half using COM objects
> hello,
>
> I got a strange behaviour with this simple script:
>
> $word=new COM("word.application");
> $word->Documents->Add();
>
> $word->Selection->Typetext("this is a test this is a test");
> $word->Documents[1]->SaveAs('c:\temp\test_test_test_test_te');
> $word->Quit();
>
> the result is: a file named test_te.doc, containg "this is a test" (/one/
time!)
>
> both strings (filename and text) come out half the length of the
original..
>
> anyone had experienced this?
> is it a bug?
>
> I'm running php 4.0.8-dev, apache 1.3.12, win/office 2000
>
> thanks,
> --giuse
>
>
>
> PS:
> I posted this also on
http://www.phpbuilder.com/annotate/message.php3?id=1008094
>
>
> ________________end_of_mail_________________________
>
> Find the best deals on the web at AltaVista Shopping!
> http://www.shopping.altavista.com
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>