How to get the embedded IShellBrowser interface in file open common dialog? (파일열기 대화상자의 IShellBrowser 인터페이스를 얻는 방법) RRS feed

  • 질문

  • I have read a post about 'Querying information from an Explorer window'( 
    Its summary is as follows.
    1. Detecting all currently open window explorers.
    2. Viewing what items are currently focused at a explore.
    3. Getting the full path of each item focused.

    My question is How can i get the full paths of selected (or focused) files by user's click or keyboard in all currently open File Open Dialog?
    This is the same as the content of the post “Querying information from an Explorer windows”. 
    Difference is that the subject is File Open Dialog instead explorer windows.

    Because Common file open dialog have IShellBrowser -> link(,
    If I can get IShellBrowser interface of File Open Dialog, I guess I'll can achieve what i want. 
    At the post, IShellWindows interface is call Item() method for searching all currently open explorer windows but It can't find File Open Dialog.

    I don't know a way for searching the currently open File Open Dialog and getting IShellBrowser.

    This is link about IShellBrowser(
    What should i do for this?

    Currently, I tried using other way.
    1. I got the window handles of all currently open File Open Dialog using EnumWindows() method, IUIAutomationElement interface , etc for searching the windows and separating the File Open Dialog.
    2. I got the list control handle of File Open Dialog using EnumChildWindows() method and I got a IUIAutomationElement about the handle.
    3. I searched the selected items from the IUIAutomationElement interface object (about file open dialog's list view) using IUIAutomationSelectionPattern.
    4. finally, I got the name from IUIAutomationElement of each items.

    But this way have some problem.
    1. I can't get the full path of selected file.(Can get just the file's name)
    2. The gotten file name is different from the real name of it. example, Explorer's real name is 'explorer.exe' or 'explorer' but the gotten name using the IUIAutomationElement::CurrentName() method is '탐색기'.
       ('탐색기' is Korean. Same to 'explorer'.)

    Anyway, My question is as follows.
    Q1. How to retrieve all currently open file open dialog. like IShellWindows interface in the post ('Querying information from an Explorer window').
    Q2. Getting the embedded IShellBrowser (or IShellView or ICommDlgBrowser) in the file open dilaog.
    Q3. Is it possible that getting what i want in Q2 from file open dilaog' s window handle?
    Q4. Is there a solution about the problem of my other way i tried.

    thank you.

    2016년 12월 1일 목요일 오전 2:14