[This is preliminary documentation and is subject to change.]
Called to retrieve the value of a specific field for a given file, e.g. the date field of a file.
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 ContentGetValue( sbyte* FileName, int FieldIndex, int UnitIndex, void* FieldValue, int maxlen, int flags ) |
| Visual Basic |
|---|
<CLSCompliantAttribute(False)> _ <EditorBrowsableAttribute(EditorBrowsableState.Never)> _ Public Function ContentGetValue ( _ FileName As SByte*, _ FieldIndex As Integer, _ UnitIndex As Integer, _ FieldValue As Void*, _ maxlen As Integer, _ flags As Integer _ ) As Integer |
| Visual C++ |
|---|
[CLSCompliantAttribute(false)] [EditorBrowsableAttribute(EditorBrowsableState::Never)] public: int ContentGetValue( signed char* FileName, int FieldIndex, int UnitIndex, void* FieldValue, int maxlen, int flags ) |
| F# |
|---|
[<CLSCompliantAttribute(false)>] [<EditorBrowsableAttribute(EditorBrowsableState.Never)>] member ContentGetValue : FileName:nativeptr<sbyte> * FieldIndex:int * UnitIndex:int * FieldValue:nativeptr<unit> * maxlen:int * flags:int -> int |
| JScript |
|---|
|
Parameters
- FileName
- Type: System..::..SByte*
The name of the file (in case of file system plugin in plugin namespace) for which the plugin needs to return the field data.
- FieldIndex
- Type: System..::..Int32
The index of the field for which the content has to be returned. This is the same index as the FieldIndex value in ContentGetSupportedField(Int32, SByte*, SByte*, Int32).
- UnitIndex
- Type: System..::..Int32
The index of the unit used. If no unit string was returned, UnitIndex is 0. For FullText, UnitIndex contains the offset of the data to be read.
- FieldValue
- Type: System..::..Void*
Here the plugin needs to return the requested data. The data format depends on the field type. ft_delayed, ft_ondemand: You may return a zero-terminated string as in ft_string, which will be shown until the actual value has been extracted. Requires plugin version>=1.4.
- maxlen
- Type: System..::..Int32
The maximum number of bytes fitting into the FieldValue variable.
- flags
- Type: System..::..Int32
Flags controlling function behavior
Return Value
Return the field type in case of success, or one of the error values otherwise
Remarks
This function is called by Total Commander and is not intended for direct use
Excptions thrown by this function are usually uncatchable, because it is called by Total Commander, which cannot handle managed exceptions. So, do not return valus causeing exceptions from your [M:Tools.TotalCommanderT.ContentPluginBase.GetValue(System.String,System.Int32,System.Int32,System.Int32,Tools.TotalCommanderT.GetFieldValueFlags,System.Nullable`1{System.Double})]!
Exceptions
| Exception | Condition |
|---|---|
| System..::..InvalidOperationException | [M:Tools.TotalCommanderT.ContentPluginBase.GetValue(System.String,System.Int32,System.Int32,System.Int32,Tools.TotalCommanderT.GetFieldValueFlags,System.Nullable`1{System.Double})] returned string that is longer than maxlen-1. |
| Tools..::..TypeMismatchException | [M:Tools.TotalCommanderT.ContentPluginBase.GetValue(System.String,System.Int32,System.Int32,System.Int32,Tools.TotalCommanderT.GetFieldValueFlags,System.Nullable`1{System.Double})] returned value of unexpected type. |
See Also
[M:Tools.TotalCommanderT.ContentPluginBase.GetValue(System.String,System.Int32,System.Int32,System.Int32,Tools.TotalCommanderT.GetFieldValueFlags,System.Nullable`1{System.Double})]
Version History
1.5.3
- This function is new in version 1.5.3