Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the 16x16 icon for the specified file.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)
Syntax
'Declaration
Function GetIconForFile ( _
filename As String, _
desiredFormat As __VSUIDATAFORMAT _
) As IVsUIObject
IVsUIObject GetIconForFile(
string filename,
__VSUIDATAFORMAT desiredFormat
)
IVsUIObject^ GetIconForFile(
[InAttribute] String^ filename,
[InAttribute] __VSUIDATAFORMAT desiredFormat
)
abstract GetIconForFile :
filename:string *
desiredFormat:__VSUIDATAFORMAT -> IVsUIObject
function GetIconForFile(
filename : String,
desiredFormat : __VSUIDATAFORMAT
) : IVsUIObject
Parameters
filename
Type: String[in] The file name of the icon.
desiredFormat
Type: Microsoft.VisualStudio.Shell.Interop.__VSUIDATAFORMAT[in] The data format used in the user interface.
Return Value
Type: Microsoft.VisualStudio.Shell.Interop.IVsUIObject
The icon object. Returns null if the icon cannot be retrieved.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.