I'm trying to call a function Size()
from a custom COM DLL from PHP. That function should return a struct with 4 members (top, left, bottom, right) however when I call that function from PHP I get the following error:
Error [0x80070057] The parameter is incorrect.
I don't pass it any parameter and according to the specs it should not get any parameter but return a struct.
I'm able to succesfully call other COM functions from that same COM DLL.
If I call com_print_typeinfo()
from PHP I can see that PHP thinks the function is defined as follows:
function Size( ) { } /* DISPID=3 */
If I open the tlb file in VS 2005 it shows it as
Function Size() As TBoxRect
And it shows that TBoxRect
is a structure with 4 members just like it should be.
So PHP seems to think that the function returns nothing which is not correct. How can I make this function that should return a struct work from PHP using COM?