IVsUIShellOpenDocument::GetFirstDefaultPreviewer Method (String^, Int32, Int32)

 

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)

int GetFirstDefaultPreviewer(
	[OutAttribute] String^% pbstrDefBrowserPath,
	[OutAttribute] int% pfIsInternalBrowser,
	[OutAttribute] int% pfIsSystemBrowser
)

Parameters

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.

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 null, *pfIsInternalBrowser is true, and the function returns S_OK.

Return to top
Show: