Jump to content

Using a 3rd party COM DLL...


drowsymoose

Recommended Posts

Hi there!

 

Had a little question regarding this, and this place seemed like the right place to start :P

 

I am attempting to use a 3rd party COM DLL in a PHP5 script, and I am running in this problem. One of it's method is returning a variant, but var_dump() is not telling me much about it. I don't have any documentation about what's supposed to be returned.

 

Here's what I do:

 

$C2web = new COM("{C038FD2C-A823-4F8D-99B7-A861FB2C6A2F}") or die ("Could not initialise object. - C2web");
$res = $C2web->SetConnectionString("SQLSERVER", "c2_database", 1); //1 is server type, 1 = MSSQL
$clause = "";
$call = $C2web->GetSpecificCall(5803, $clause);

 

 

GetSpecificCall() is a method included in our helpdesk ticketing software's SDK. You get the idea, I am trying to get information about a...specific call.

 

If I var_dump ($call);

 

object(variant)#2 (0) { } 

 

Not very telling :( Then if I var_dump ($call[0]);

 

object(com_safearray_proxy)#3 (0) { }

 

What is this ?  :confused:

 

Then I var_dump($call[0][0]);

 

object(variant)#4 (0) { }

 

:shrug:

 

That seems to be saying it's still an array, but then var_dump($call[0][0][0]); says:

 

Fatal error: Uncaught exception 'com_exception' with message 'this variant is not an array type' in C:\wamp\www\index.php:13 Stack trace: #0 C:\wamp\www\index.php(13): unknown() #1 {main} thrown in C:\wamp\www\index.php on line 13

 

Is there any way I can find my way trough this without the bit of documentation missing you think ? Don't hesitate and ask for more information if need be.

 

Thanks! :)

 

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/181737-using-a-3rd-party-com-dll/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.