This documentation is archived and is not being maintained.

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

int GetFirstDefaultPreviewer (
	out string pbstrDefBrowserPath,
	out int pfIsInternalBrowser,
	out int pfIsSystemBrowser
int GetFirstDefaultPreviewer (
	/** @attribute OutAttribute() */ /** @ref */ String pbstrDefBrowserPath, 
	/** @attribute OutAttribute() */ /** @ref */ int pfIsInternalBrowser, 
	/** @attribute OutAttribute() */ /** @ref */ int pfIsSystemBrowser
JScript does not support passing value-type arguments by reference.



[out] Pointer to the full path to the default browser.


[out] true if the default browser is internal.


[out] true if the default browser is the system browser.

Return Value

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 a null reference (Nothing in Visual Basic), *pfIsInternalBrowser is true, and the function returns S_OK.