IVsUIShellOpenDocument2::GetDefaultPreviewers Method (UInt32, array<VSDEFAULTPREVIEWER>^, UInt32)
Provides a list of Default Previewers. This is the list of previewers that would be launched if IVsUIShellOpenDocument::OpenStandardPreviewer(NULL) is called.
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
int GetDefaultPreviewers( unsigned int celt, array<VSDEFAULTPREVIEWER>^ rgDefaultPreviewers, [OutAttribute] unsigned int% pcActual )
Parameters
- Celt
[In] A value of unsigned long.
- rgDefaultPreviewers
-
Type:
array<Microsoft.VisualStudio.Shell.Interop::VSDEFAULTPREVIEWER>^
[Out] An array of objects of type VSDEFAULTPREVIEWER.
- pcActual
-
Type:
System::UInt32
[Out] A pointer to an unsigned long value.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
If celt is zero and pcActual is not NULL, the number of standard previewers is returned in *pcActual. If celt is not zero, rgDefaultPreviewers must not be NULL, or E_POINTER is returned.
A common pattern is something like the following (omitting error checks for readability):
hr = pIVsUIShellOpenDocument2->GetDefaultPreviewers(0, NULL, &cExpected);
prgpDefViewers = ::CoTaskMemAlloc(cExpected * sizeof(VSDEFAULTPREVIEWER));
hr = pIVsUIShellOpenDocument2->GetDefaultPreviewers(cExpected, prgpDefViewers, &cActual);