IVsUIShellOpenDocument.GetFirstDefaultPreviewer Method

Returns the .exe file path of the first default web browser.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)


Function GetFirstDefaultPreviewer ( _
    <OutAttribute> ByRef pbstrDefBrowserPath As String, _
    <OutAttribute> ByRef pfIsInternalBrowser As Integer, _
    <OutAttribute> ByRef pfIsSystemBrowser As Integer _
) As Integer
‘사용 방법
Dim instance As IVsUIShellOpenDocument
Dim pbstrDefBrowserPath As String
Dim pfIsInternalBrowser As Integer
Dim pfIsSystemBrowser As Integer
Dim returnValue As Integer

returnValue = instance.GetFirstDefaultPreviewer(pbstrDefBrowserPath, _
    pfIsInternalBrowser, pfIsSystemBrowser)
int GetFirstDefaultPreviewer(
    out string pbstrDefBrowserPath,
    out int pfIsInternalBrowser,
    out int pfIsSystemBrowser
int GetFirstDefaultPreviewer(
    [OutAttribute] String^% pbstrDefBrowserPath, 
    [OutAttribute] int% pfIsInternalBrowser, 
    [OutAttribute] int% pfIsSystemBrowser
abstract GetFirstDefaultPreviewer : 
        pbstrDefBrowserPath:string byref * 
        pfIsInternalBrowser:int byref * 
        pfIsSystemBrowser:int byref -> int 
function GetFirstDefaultPreviewer(
    pbstrDefBrowserPath : String, 
    pfIsInternalBrowser : int, 
    pfIsSystemBrowser : int
) : int


  • pbstrDefBrowserPath
    Type: System.String%
    [out] Pointer to the full path to the default browser.
  • pfIsInternalBrowser
    Type: System.Int32%
    [out] true if the default browser is internal.
  • pfIsSystemBrowser
    Type: System.Int32%
    [out] true if the default browser is the system browser.

Return Value

Type: System.Int32
Returns S_OK if a default previewer is defined. Returns S_FALSE if there are no default previewers.


COM Signature

From vsshell.idl:

HRESULT IVsUIShellOpenDocument::GetFirstDefaultPreviewer(
   [out] BSTR *pbstrDefBrowserPath,
   [out] BOOL *pfIsInternalBrowser,
   [out] BOOL *pfIsSystemBrowser

This method returns the same browser that would have been launched if OSP_LaunchSingleBrowser were passed to OpenStandardPreviewer. If it is the internal browser, pbstrDefBrowserPath is nulla null reference (Nothing in Visual Basic), *pfIsInternalBrowser is true, and the function returns S_OK.

.NET Framework Security

See Also


IVsUIShellOpenDocument Interface

IVsUIShellOpenDocument Members

Microsoft.VisualStudio.Shell.Interop Namespace