Dumping the COM Running Object Table (ROT) in ObjectARX

by Fenton Webb

Issue

How can I inspect the running Automation servers on my computer? I’d like to retrieve Automation objects with GetObject in Visual Basic.

Solution

The following code is a simple console application that dumps the contents of the Running Object Table. Use the AdskPlainCOMDocSamp in the ObjectARX SDK to test it…

 

#include     #include     #include          using namespace std;    _COM_SMARTPTR_TYPEDEF(IRunningObjectTable, __uuidof(IRunningObjectTable));    _COM_SMARTPTR_TYPEDEF(IEnumMoniker, __uuidof(IEnumMoniker));    _COM_SMARTPTR_TYPEDEF(IMoniker, __uuidof(IMoniker));    _COM_SMARTPTR_TYPEDEF(IBindCtx, __uuidof(IBindCtx));              class SimpleException    {      const WCHAR* m_strDisc;      HRESULT m_hr;    public:      SimpleException(const WCHAR* strDisc = NULL,HRESULT hr=S_OK):m_strDisc(strDisc),m_hr(hr) {}      wostream& reportIt(wostream& out)const {return out

Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading