SimplySane
August 28th, 2008, 11:04 AM
The function prototype for QuerytInterface is this:
STDMETHODIMP QueryInterface( REFIID riid, void** pIFace )
And calling the QueryInterface function is like this:
pICreateCar->QueryInterface( IID_IStats, reinterpret_cast<void**>( &pIStats ) );
What's confusing me is the casting of the address of pIStats to void**
reinterpret_cast<void**>( &pIStats )
What exactly is void** in this context?? Why do we cast the address of the interface ptr to void**??
Thanks!
STDMETHODIMP QueryInterface( REFIID riid, void** pIFace )
And calling the QueryInterface function is like this:
pICreateCar->QueryInterface( IID_IStats, reinterpret_cast<void**>( &pIStats ) );
What's confusing me is the casting of the address of pIStats to void**
reinterpret_cast<void**>( &pIStats )
What exactly is void** in this context?? Why do we cast the address of the interface ptr to void**??
Thanks!