[This is preliminary documentation and is subject to change.]
When overriden in derived class, called when a file/directory is displayed in the file list. It can be used to specify a custom icon for that file/directory.
Namespace: Tools.TotalCommanderTAssembly: Tools.TotalCommander (in Tools.TotalCommander.dll) Version: 1.5.3.38916 (1.5.3.38916)
Syntax
| C# |
|---|
[MethodNotSupportedAttribute] public virtual IconExtractResult ExctractCustomIcon( ref string RemoteName, IconExtractFlags ExtractFlags, ref Icon TheIcon ) |
| Visual Basic |
|---|
<MethodNotSupportedAttribute> _ Public Overridable Function ExctractCustomIcon ( _ ByRef RemoteName As String, _ ExtractFlags As IconExtractFlags, _ ByRef TheIcon As Icon _ ) As IconExtractResult |
| Visual C++ |
|---|
[MethodNotSupportedAttribute] public: virtual IconExtractResult ExctractCustomIcon( String^% RemoteName, IconExtractFlags ExtractFlags, Icon^% TheIcon ) |
| F# |
|---|
[<MethodNotSupportedAttribute>] abstract ExctractCustomIcon : RemoteName:string byref * ExtractFlags:IconExtractFlags * TheIcon:Icon byref -> IconExtractResult [<MethodNotSupportedAttribute>] override ExctractCustomIcon : RemoteName:string byref * ExtractFlags:IconExtractFlags * TheIcon:Icon byref -> IconExtractResult |
| JScript |
|---|
public function ExctractCustomIcon( RemoteName : String, ExtractFlags : IconExtractFlags, TheIcon : Icon ) : IconExtractResult |
Parameters
- RemoteName
- Type: System..::..String%
This is the full path to the file or directory whose icon is to be retrieved. When extracting an icon, you can return an icon name here - this ensures that the icon is only cached once in the calling program. The returned icon name must not be longer than MaxPath - 1 characters (otherwise uncatchable PathTooLongException will be thrown by FsExtractCustomIcon(SByte*, Int32, HICON__**)). The icon itself must still be returned in TheIcon!
- ExtractFlags
- Type: Tools.TotalCommanderT..::..IconExtractFlags
Flags for the extract operation. A combination of IconExtractFlags.
- TheIcon
- Type: System.Drawing..::..Icon%
Here you need to return the icon, unless return value is Delayed or UseDefault
Return Value
One of the IconExtractResult values
Remarks
If you return Delayed, ExctractCustomIcon(String%, IconExtractFlags, Icon%) will be called again from a background thread at a later time. A critical section is used by the calling app to ensure that ExctractCustomIcon(String%, IconExtractFlags, Icon%) is never entered twice at the same time. This return value should be used for icons which take a while to extract, e.g. EXE icons. If the user turns off background loading of icons, the function will be called in the foreground with the BackgroundThread flag.
When most-derived method implementation is marked with MethodNotSupportedAttribute, it means that the most derived plugin implementation does not support operation provided by the method.
| Do not thow any other exceptions. Such exception will be passed to Total Commander which cannot handle it. |
Exceptions
| Exception | Condition |
|---|---|
| System..::..NotSupportedException | The actual implementation is marked with MethodNotSupportedAttribute which means that the plugin doesnot support operation provided by the method. |