CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Jun 2008
    Posts
    11

    void** in relation to QueryInterface??

    The function prototype for QuerytInterface is this:
    Code:
     STDMETHODIMP QueryInterface( REFIID riid, void** pIFace )
    And calling the QueryInterface function is like this:

    Code:
    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!
    Last edited by SimplySane; August 28th, 2008 at 11:11 AM. Reason: not yet done

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured