Returning COM objects from commands

Date : Mon, 7 Aug 2006 14:40:03 +0100 (BST)
To : XSI(at)Softimage.COM
From : "Andy Nicholas" <andy(at)andynicholas.com>
Subject : Returning COM objects from commands
Hi guys,

Does anyone happen to know how to correctly return a COM object from an
XSI command?

I found a function in the SDK called ConvertObject() which supposedly
takes a pointer to an IDispatch interface and converts it to a CRef. It
says in the docs that it "Converts an XSI Automation object to a CRef
object". Does this mean that it won't convert any other COM objects that
are external to XSI?

I tried doing a test yesterday where I created an MSXML document object
and tried returning it from the command. It seemed to work but it wouldn't
let me call any of the methods or properties on it.

I guess an alternative is to use the XSI::Application::ExecuteScriptCode()
method to generate the object using "new ActiveXObject("blah")", but it's
not exactly the most efficient way of going about it.

Does anyone have any ideas?

Andy


---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi

  • References:

Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.