wez Sat Aug 7 17:01:43 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/com_dotnet com_dotnet.c Log: MFH: Fix for Bug #29490 from Michael Sisolak http://cvs.php.net/diff.php/php-src/ext/com_dotnet/com_dotnet.c?r1=1.7&r2=1.7.2.1&ty=u Index: php-src/ext/com_dotnet/com_dotnet.c diff -u php-src/ext/com_dotnet/com_dotnet.c:1.7 php-src/ext/com_dotnet/com_dotnet.c:1.7.2.1 --- php-src/ext/com_dotnet/com_dotnet.c:1.7 Wed Jun 16 19:57:25 2004 +++ php-src/ext/com_dotnet/com_dotnet.c Sat Aug 7 17:01:43 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_dotnet.c,v 1.7 2004/06/16 23:57:25 abies Exp $ */ +/* $Id: com_dotnet.c,v 1.7.2.1 2004/08/07 21:01:43 wez Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -102,6 +102,7 @@ struct dotnet_runtime_stuff *stuff; IObjectHandle *handle; DISPPARAMS params; + OLECHAR *olestring; VARIANT vargs[2]; VARIANT retval; HRESULT hr; @@ -138,10 +139,14 @@ VariantInit(&retval); V_VT(&vargs[0]) = VT_BSTR; - V_BSTR(&vargs[0]) = php_com_string_to_olestring(datatype_name, datatype_name_len, obj->code_page TSRMLS_CC); + olestring = php_com_string_to_olestring(datatype_name, datatype_name_len, obj->code_page TSRMLS_CC); + V_BSTR(&vargs[0]) = SysAllocStringByteLen((char*)olestring, datatype_name_len * sizeof(OLECHAR)); + efree(olestring); V_VT(&vargs[1]) = VT_BSTR; - V_BSTR(&vargs[1]) = php_com_string_to_olestring(assembly_name, assembly_name_len, obj->code_page TSRMLS_CC); + olestring = php_com_string_to_olestring(assembly_name, assembly_name_len, obj->code_page TSRMLS_CC); + V_BSTR(&vargs[1]) = SysAllocStringByteLen((char*)olestring, assembly_name_len * sizeof(OLECHAR)); + efree(olestring); hr = IDispatch_Invoke(stuff->dotnet_domain, stuff->create_instance, &IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, ¶ms, &retval, NULL, NULL);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php