Share via


IVsImageService2.GetIconForFile(String, __VSUIDATAFORMAT) Method

Definition

Caution

Use IVsImageService2.GetImageMonikerForFile instead

Gets the icon for the specified file.

public:
 Microsoft::VisualStudio::Shell::Interop::IVsUIObject ^ GetIconForFile(System::String ^ filename, Microsoft::VisualStudio::Shell::Interop::__VSUIDATAFORMAT desiredFormat);
public:
 Microsoft::VisualStudio::Shell::Interop::IVsUIObject ^ GetIconForFile(Platform::String ^ filename, Microsoft::VisualStudio::Shell::Interop::__VSUIDATAFORMAT desiredFormat);
Microsoft::VisualStudio::Shell::Interop::IVsUIObject GetIconForFile(std::wstring const & filename, Microsoft::VisualStudio::Shell::Interop::__VSUIDATAFORMAT desiredFormat);
public Microsoft.VisualStudio.Shell.Interop.IVsUIObject GetIconForFile (string filename, Microsoft.VisualStudio.Shell.Interop.__VSUIDATAFORMAT desiredFormat);
[System.Obsolete("Use IVsImageService2.GetImageMonikerForFile instead")]
public Microsoft.VisualStudio.Shell.Interop.IVsUIObject GetIconForFile (string filename, Microsoft.VisualStudio.Shell.Interop.__VSUIDATAFORMAT desiredFormat);
abstract member GetIconForFile : string * Microsoft.VisualStudio.Shell.Interop.__VSUIDATAFORMAT -> Microsoft.VisualStudio.Shell.Interop.IVsUIObject
[<System.Obsolete("Use IVsImageService2.GetImageMonikerForFile instead")>]
abstract member GetIconForFile : string * Microsoft.VisualStudio.Shell.Interop.__VSUIDATAFORMAT -> Microsoft.VisualStudio.Shell.Interop.IVsUIObject
Public Function GetIconForFile (filename As String, desiredFormat As __VSUIDATAFORMAT) As IVsUIObject

Parameters

filename
String

The name of the file.

desiredFormat
__VSUIDATAFORMAT

The desired format.

Returns

Returns IVsUIObject.

Implements

Attributes

Applies to