AcAxOleLinkManager
AcAxOleLinkManager用于管理从驻留数据库对象到其 COM 对象的链接。这是通过将瞬态电抗器连接到 .瞬态反应器有一个变量,其中包含指向 的 的指针 的 对象。该瞬态电抗器也用于在修改时调用。AcDbObjectIUnknownIAcadBaseObject::OnModified()AcDbObject AutoCAD 在每个任务中维护一个实例。若要获取指向 OLE 链接管理器的指针,请使用该函数。在 oleaprot.h 文件中声明的类如下所述:AcAxOleLinkManagerAcAxGetOleLinkManager()AcAxOleLinkManager // AcAxOleLinkManager is used to maintain the link between ARX // objects and their respective COM wrapper. // class AcAxOleLinkManager { public: // Given a pointer to a database-resident object, return // the IUnknown of the COM wrapper. NULL is returned if // no wrapper is found. // virtual IUnknown* GetIUnknown(AcDbObject* pObject) = 0; // Set the link between a database-resident object and a // COM wrapper. If the IUnknown is NULL, then the link // is removed. // virtual Adesk::Boolean SetIUnknown(AcDbObject* pObject, IUnknown* pUnknown) = 0; // Given a pointer to a database object, return // the IUnknown of the COM wrapper. NULL is returned if // no wrapper is found. // virtual IUnknown* GetIUnknown(AcDbDatabase* pDatabase) = 0; // Set the link between a database object and a COM wrapper. // If the IUnknown is NULL, then the link is removed. // virtual Adesk::Boolean SetIUnknown(AcDbDatabase* pDatabase, IUnknown* pUnknown) = 0; // Given a pointer to a database object, return the // IDispatch of the document object. NULL is returned if // the database does not belong to a particular document. // virtual IDispatch* GetDocIDispatch(AcDbDatabase* pDatabase)= 0; // Set the link between a database object and the IDispatch // of the document it belongs to. If the IDispatch is NULL, then // the link is removed. // virtual Adesk::Boolean SetDocIDispatch(AcDbDatabase* pDatabase, IDispatch* pDispatch) = 0; }; |
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-3-14 06:08
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.