what is this?

Feb 11, 2013 at 6:07am
What is the member this in visual c++?
ex..
QueryInterface(IExample *this, REFIID vTableGuid, void **ppv)


i need a detailed explanation.
Feb 11, 2013 at 6:58am
What is the member this in visual c++?


It doesn't hold any special meaning in Visual C++ that it doesn't hold in C++. this is a pointer to the object for which a member function is invoked.

If you have some object of type IUnknown object then when QueryInterface is invoked for object, the use of this inside the method implementation resolves to the address of object (&object).
Last edited on Feb 11, 2013 at 6:58am
Topic archived. No new replies allowed.