有没有办法查询 _com_ptr_t 对象的当前引用计数?
Is there a way to query the current reference count of a _com_ptr_t object?
我在使用包含在 _com_ptr_t
模板对象中的 COM 对象时遇到一些问题(崩溃)。我需要询问该对象以查看引用计数是多少,因为我很确定该对象正在过早销毁。
如果我能以某种方式连接到 AddRef()
和 Release()
函数会更好,但我似乎无法找到 [=11 中的函数之外的这些函数=] class。想法?
_com_ptr_t wraps an IUnknown instance, but hides the return of AddRef and Release which would be the current reference count. GetInterfacePtr 应该 "lift the fog".
我在使用包含在 _com_ptr_t
模板对象中的 COM 对象时遇到一些问题(崩溃)。我需要询问该对象以查看引用计数是多少,因为我很确定该对象正在过早销毁。
如果我能以某种方式连接到 AddRef()
和 Release()
函数会更好,但我似乎无法找到 [=11 中的函数之外的这些函数=] class。想法?
_com_ptr_t wraps an IUnknown instance, but hides the return of AddRef and Release which would be the current reference count. GetInterfacePtr 应该 "lift the fog".