How Do GUI programs disable COM / ActiveX / OLE automation RRS feed

  • Question

  • How do programs disable the ability to interact with them through COM (Component Object Model) controls.

    For example, in Internet Explorer you can simply "Disable ActiveX".  Please explain how programs are able to disable COM.  Many other programs have ActiveX and they can simply "disable" the feature, why and how?  

    Thursday, November 28, 2019 4:16 AM

All replies

  • Well you are describing two different things. 1 stop reacting to automation and 2 stop acting as ActiveX container. 

    You cannot just take your COM interface implementation away. It is part of contract. But you can return error codes like RPC_E_SERVERCALL_RETRYLATER to indicate you are busy at the moment. You better document all your error codes so callers would write error handling code accordingly. 

    As for ActiveX containers, to provide a feature to disable ActiveX, just add the setting and check it before executing the actual creating code. 

    Visual C++ MVP

    Friday, November 29, 2019 3:53 AM