I'm trying to connect to a dll that was supplied to me, I don't have the ability to edit it. Is the "Invalid syntax" error refering to a method within the dll or something with the php code?
try { $testConnection = new COM("SomebodySpecial.DLL"); } catch (com_exception $e) { echo ""; print_r( array( 'errorCode' => $e->getCode(), 'errorMessage' => $e->getMessage(), 'errorFile' => $e->getFile(), 'errorLine' => $e->getLine())); echo ""; } [errorCode] => -2147221020 [errorMessage] => Failed to create COM object `SomebodySpecial.DLL': Invalid syntax [errorFile] => D:\Inetpub\wwwroot-dev\test.php [errorLine] => 9
As the error message indicates, you provided an invalid parameter to the
COM
constructor.The parameter is a COM ID, not a DLL filename.