Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 506311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:41:17+00:00 2026-05-13T06:41:17+00:00

Several have pointed out that there exists an undocumented message that retrieves the IShellBrowser

  • 0

Several have pointed out that there exists an undocumented message that retrieves the IShellBrowser interface pointer from the common dialog HWND for the file open & save dialogs.

But there is conflicting information (or no information) on whether that pointer is AddRef’d, or if it is just the raw address returned, and no Release() should be called on it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:41:18+00:00Added an answer on May 13, 2026 at 6:41 am

    No. You might find the following link useful: The Rules of the Component Object Model .

    Excerpt:

    Reference-Counting Rules

    Rule 1: AddRef must be called for
    every new copy of an interface
    pointer, and Release called for every
    destruction of an interface pointer,
    except where subsequent rules
    explicitly permit otherwise.

    The following rules call out common
    nonexceptions to Rule 1.

    • Rule 1a: In-out-parameters to functions. The caller must AddRef the actual parameter, since it will be Released by the callee when the out-value is stored on top of it.
    • Rule 1b: Fetching a global variable. The local copy of the interface pointer fetched from an existing copy of the pointer in a global variable must be independently reference counted, because called functions might destroy the copy in the global while the local copy is still alive.
    • Rule 1c: New pointers synthesized out of “thin air.” A function that synthesizes an interface pointer using special internal knowledge, rather than obtaining it from some other source, must do an initial AddRef on the newly synthesized pointer. Important examples of such routines include instance creation routines, implementations of IUnknown::QueryInterface, and so on.
    • Rule 1d: Returning a copy of an internally stored pointer. After the pointer has been returned, the callee has no idea how its lifetime relates to that of the internally stored copy of the pointer. Thus, the callee must call AddRef on the pointer copy before returning it.

    Rule 2: Special knowledge on the part
    of a piece of code of the
    relationships of the beginnings and
    the endings of the lifetimes of two or
    more copies of an interface pointer
    can allow AddRef/Release pairs to be
    omitted.

    • From a COM client’s perspective, reference-counting is always a per-interface concept. Clients should never assume that an object uses the same reference count for all interfaces.
    • The return values of AddRef and Release should not be relied upon, and should be used only for debugging purposes.
    • Pointer stability; see details in the OLE Help file under “Reference-Counting Rules,” subsection “Stabilizing the this Pointer and Keeping it Valid.”

    See the excellent “Managing Object
    Lifetimes in OLE” technical article by
    Douglas Hodges, and Chapter 3 of
    Inside OLE, 2nd edition, by Kraig
    Brockschmidt (MSDN Library, Books) for
    more information on
    reference-counting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.