There already is a working WAMP instance in a Windows 7 in which the line
$x = new COM(\"X\");
does instantiate a COM object.
I was
You need to register the DLL, using
regsvr32 yourdll.dll
Managed to solve the problem by changing the working directory (using chdir) to be the same as the php.exe just before $x = new COM("X");.
chdir
php.exe
$x = new COM("X");
I think the DLL wasn't propery registered, or lacked something in itself.