Click to See Complete Forum and Search --> : Invoke() failed: Type mismatch


Anon
10-26-2000, 11:18 AM
Hi,

whenever trying to call the following script. I get "Invoke() failed: Type mismatch".
<?
$instance = new COM("HelloCOM.CHello") or die("error on instan. HelloCom");

$instance->SayHello("hello","world");
?>

SayHello is implemented as:

STDMETHODIMP CHello::SayHello(LPCSTR hello,LPCSTR world)
{
MessageBox(NULL,hello,world,MB_OK);
return S_OK;
}

any tips??

Anon
06-27-2002, 12:22 PM
Hi,
I expirienced quite the same problems with COM-Objects. The solution seems a bit ridiculous to me. If you are running Apache as a Service, try this:
Stop the Apache-Service.
Start the Apache.exe manually, so that it runs as a task.
Thats it, worked perfectly in my case.
For further information, check www.php.net. There is a Thread in tne bug-report section, dealing with this problem. If this solution solves your problem too, do me a fovour and post it, since i found lots of people (including me) going mad about this sh**!