...of the COM Release method?

I can create two surfaces. Their objects still call the same vtable.

So I am wondering if the AddRef, Release etc I get from DirectDrawCreate is the same AddRef, etc from CreateSurface or Create Clipper?

Or does COM not work that way? Is every AddRef, etc made ONLY for its type of object, or is it just there as a convinience?

Thanks.
Posted on 2002-10-01 23:14:19 by ThoughtCriminal
You can't assume they are the same, or you break the interface.
There are different things required for different objects.
Posted on 2002-10-01 23:45:09 by bitRAKE
Wow, you understood what I wrote. I explained it in such and odd way.

Yeah, you are right. Even if it does resolve to the same function address, it better design to use it the proper way.

I was curious because of name clashes, so I guess I should preappend like this:


DDSAddRef

DDCAddRef

or something. Plus design-wise it's better for the programmer to know just what type of object they are working on.

Thanks.
Posted on 2002-10-02 01:19:23 by ThoughtCriminal