drowsymoose Posted November 16, 2009 Share Posted November 16, 2009 Hi there! Had a little question regarding this, and this place seemed like the right place to start 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 ? Then I var_dump($call[0][0]); object(variant)#4 (0) { } 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.