Partager via


ImageLibrary.TryGetMonikerForProgId(String, Boolean, ImageMoniker) Method

Definition

Attempts to get the moniker for the image to use for files matching progId. If we haven't already identified the image to use, we'll attempt to identify it using the DefaultIcon property of progId.

public:
 bool TryGetMonikerForProgId(System::String ^ progId, bool canTheme, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Imaging::Interop::ImageMoniker % moniker);
public bool TryGetMonikerForProgId (string progId, bool canTheme, out Microsoft.VisualStudio.Imaging.Interop.ImageMoniker moniker);
member this.TryGetMonikerForProgId : string * bool * ImageMoniker -> bool
Public Function TryGetMonikerForProgId (progId As String, canTheme As Boolean, ByRef moniker As ImageMoniker) As Boolean

Parameters

progId
String

The ProgID to use for the image

canTheme
Boolean

Indicates whether the image be themed

moniker
ImageMoniker

The moniker for the added image

Returns

True if the image could be added, false if it could not

Applies to