General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › Unable to case COM object.
-
Anonymous December 4, 2013 at 2:55 am
Unable to case COM object.
December 4, 2013 at 2:55 amParticipants 0Replies 1Last Activity 9 years, 1 month agoHi,
I'm developing an addin for XMAU-ESSENTIAL-EN 7.0. The addin works fine until I try to use WebSocket to communicate with my addin. In my scenario, the server will send a message to the addin, then the addin will call some XMetaL APIs. But I met with the following errors while calling XMetaL.Application.ActiveDocument.[code]Additional information: Unable to cast COM object of type 'System.__ComObject' to interface type 'XMetaL._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3BBEE986-742B-11D2-BD0A-00A024C36143}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).[/code]
Does anyone has ideas about this failure?
XMetaLOldTimer December 6, 2013 at 1:05 am
Reply to: Unable to case COM object.
December 6, 2013 at 1:05 amOnly a guess here…if you are starting up XMetaL as an out-of-process COM server, you must busy-wait until the XMetaL.Application.InitComplete property returns VARIANT_TRUE. Otherwise, calling any other COM API method or property will likely fail.
Addam
-
AuthorPosts
- You must be logged in to reply to this topic.