为了Direct3D,COM快速上手

用D3D开发,不得不了解COM接口,但没必要深究。

What Is a COM Interface?

Creating an Object in COM
Asking an Object for an Interface

Release方法:引用计数减一,减到零就释放object。

最后,把我认为最启发的一句话放在下面。

You can think of QueryInterface as a language-independent version of the dynamic_cast keyword in C++.

See also: COM Smart Pointers Revisited

Reference Counting Rules

你可能感兴趣的:(com)