[This is preliminary documentation and is subject to change.]
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# |
|---|
[CLSCompliantAttribute(false)] [EditorBrowsableAttribute(EditorBrowsableState.Never)] public int FsExtractCustomIcon( sbyte* RemoteName, int ExtractFlags, HICON__** TheIcon ) |
| Visual Basic |
|---|
<CLSCompliantAttribute(False)> _ <EditorBrowsableAttribute(EditorBrowsableState.Never)> _ Public Function FsExtractCustomIcon ( _ RemoteName As SByte*, _ ExtractFlags As Integer, _ TheIcon As HICON__** _ ) As Integer |
| Visual C++ |
|---|
[CLSCompliantAttribute(false)] [EditorBrowsableAttribute(EditorBrowsableState::Never)] public: int FsExtractCustomIcon( signed char* RemoteName, int ExtractFlags, HICON__** TheIcon ) |
| F# |
|---|
[<CLSCompliantAttribute(false)>] [<EditorBrowsableAttribute(EditorBrowsableState.Never)>] member FsExtractCustomIcon : RemoteName:nativeptr<sbyte> * ExtractFlags:int * TheIcon:nativeptr<nativeptr<HICON__>> -> int |
| JScript |
|---|
|
Parameters
- RemoteName
- Type: System..::..SByte*
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 characters (including terminating 0!). The icon handle must still be returned in TheIcon!
- ExtractFlags
- Type: System..::..Int32
Flags for the extract operation. A combination of IconExtractFlags.
- TheIcon
- Type: HICON__**
Here you need to return the icon handle.
Return Value
One of the IconExtractResult values
Remarks
If you return Delayed, FsExtractCustomIcon(SByte*, Int32, HICON__**) will be called again from a background thread at a later time. A critical section is used by the calling app to ensure that FsExtractCustomIcon(SByte*, Int32, HICON__**) 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.
This function is called by Total Commander and is not intended for direct use.
This function is new in wfx version 1.1. It requires Total Commander >=5.51, but is ignored by older versions.
Exceptions
| Exception | Condition |
|---|---|
| System.IO..::..PathTooLongException | String passed by plugin function ExctractCustomIcon(String%, IconExtractFlags, Icon%) to RemoteName is longer than MaxPath - 1. |