packages/Windows API Code Pack 1.1/source/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.cs
/// <summary>
/// Gets the IFolderView2 interface from the explorer browser.
/// </summary>
/// <returns></returns>
Gets the IFolderView2 interface from the explorer browser.
Gets the IFolderView2 interface from the explorer browser .
internal IFolderView2 GetFolderView2()
        {
            Guid iid = new Guid(ExplorerBrowserIIDGuid.IFolderView2);
            IntPtr view = IntPtr.Zero;
            if (this.explorerBrowserControl != null)
            {
                HResult hr = this.explorerBrowserControl.GetCurrentView(ref iid, out view);
                switch (hr)
                {
                    case HResult.Ok:
                        break;
                    case HResult.NoInterface:
                    case HResult.Fail:
#if LOG_KNOWN_COM_ERRORS
                        Debugger.Log( 2, "ExplorerBrowser", "Unable to obtain view. Error=" + e.ToString( ) );
#endif
                        return null;
                    default:
                        throw new CommonControlException(LocalizedMessages.ExplorerBrowserFailedToGetView, hr);
                }
                return (IFolderView2)Marshal.GetObjectForIUnknown(view);
            }
            return null;
        }
internal IFolderView2 GetFolderView2 ( ) { Guid iid = new Guid ( ExplorerBrowserIIDGuid . IFolderView2 ) ; IntPtr view = IntPtr . Zero ; if ( this . explorerBrowserControl != null ) { HResult hr = this . explorerBrowserControl . GetCurrentView ( ref iid , out view ) ; switch ( hr ) { case HResult . Ok : break ; case HResult . NoInterface : case HResult . Fail : if LOG_KNOWN_COM_ERRORS Debugger . Log ( 2 , " " , " " + e . ToString ( ) ) ; endif return null ; default : throw new CommonControlException ( LocalizedMessages . ExplorerBrowserFailedToGetView , hr ) ; } return ( IFolderView2 ) Marshal . GetObjectForIUnknown ( view ) ; } return null ; }
Gets the IFolderView2 interface from the explorer browser.
Gets the IFolderView2 interface from the explorer browser .
None