Re: Problem in Win32api.c
| From: | Stefan Martin | Date: | Wed, 17 Sep 2003 13:00:20 +0000 |
| Subject: | Re: Problem in Win32api.c | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-21405@lists.php.net to get a copy of this message | ||
Hi Fabian,
> In (win32, invokefunction) following variables are declared:
> void *w32api_return_buffer = NULL;
> int w32api_return_buffer_size = 0;
> zval **func_arguments = NULL;
>
> func_arguments gets later filled with
> if(zend_get_parameters_array_ex(argc, &func_arguments) == FAILURE)
> But this only works if there are not more than one arguments.
> If there are two or more the values get filled in
> w32api_return_buffer_size (second) and w32api_return_buffer (third) etc...
> I hardly believe that this was the intention. I temporarily fixed it by
> declaring func_arguments as array like func_arguments[10] so it will work
> for up to ten arguments, but I guess the right solution should be better
> than that.
I run into same problem and allocated the memory dynamically according the
number of given parameters. This acutally solved the problem. I commented on
this bug (see http://bugs.php.net/bug.php?id=25235), but there was
no
response.
But there are more problems. If you look at the function
php_w32api_complex_marshall_zval_to_c(), you will see that the relevant part
is commented out. So the handling of complex types simply doesnt work.
I really wonder whether the extension is still being actively developed.
Best Regards
Stefan