smiggles Posted November 29, 2007 Share Posted November 29, 2007 Hi everyone, This one seems to be a bit gnarly! I want to call a COM function that has the following definition in IDL: /* DISPID=37 */ /* VT_I4 [3] */ function Connect( /* VT_VARIANT [12] [in] */ $SecurityToken, /* VT_BSTR [8] [in] */ $Workstation, /* VT_BSTR [8] [in] */ $Context, /* VT_PTR [26] [out] --> VT_PTR [26] */ &$Connection ) { /* method Connect */ } As you can see the 4th parameter is defined as an OUT only parameter. This out parameter is actually another com object that the server creates and returns to me - its a 'AccServer.SAConnection' COM object. If I pre-create an object and pass it as the fourth parameter - like this: $connection = new COM("AccServer.SAConnection"); and then call the function: $failurecode=$server->Connect($token,"PHPScript",$v5[0],$connection); the code executes fine -but the returned object ($connection) is still the empty one that I passed in rather than the one that should have been created and returned. I've tried passing by the object by reference (&) but this makes no difference. Can anybody tell me what the correct syntax is? Thanks in advance... Paul Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.