Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在运行时检查 void* 是否为 IUnknown*?
IUnknown *unk = dynamic_cast<IUnknown*>(item);
不起作用(编译错误)。
您无法在运行时明确确定。你不能随便取一个地址来确定IUnknown它背后是否有真实的东西。
IUnknown