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

Threaded View

  1. #4
    Join Date
    Jan 2007
    Posts
    90

    Re: COM interface and inheritance

    hello Igor,

    here is the attached sample for it. it would be very nice if you could explain. i am stuck here


    Case 3: Ibase has Iunknown implemented.
    one more confusion i have is that when i return the interface pointer do it need to addref or client needs to. i think i need to call addref(). client would just release it. so that it would be unloaded automatically.

    however i do not see any addRef() when i use Case 3. i e.

    Derived1::CreateInstance (ppbase ) // does it mean that it would call addref automatically

    because in all other cases (case 1 and case 2 )i saw random crashes if i do not explicitly call AddRef()

    regards
    d
    Attached Files Attached Files

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