[This is preliminary documentation and is subject to change.]
When overriden in derived class opens or executes given file.
Namespace: Tools.TotalCommanderTAssembly: Tools.TotalCommander (in Tools.TotalCommander.dll) Version: 1.5.3.38916 (1.5.3.38916)
Syntax
| C# |
|---|
[MethodNotSupportedAttribute] protected virtual ExecExitCode OpenFile( IntPtr hMainWin, ref string RemoteName ) |
| Visual Basic |
|---|
<MethodNotSupportedAttribute> _ Protected Overridable Function OpenFile ( _ hMainWin As IntPtr, _ ByRef RemoteName As String _ ) As ExecExitCode |
| Visual C++ |
|---|
[MethodNotSupportedAttribute] protected: virtual ExecExitCode OpenFile( IntPtr hMainWin, String^% RemoteName ) |
| F# |
|---|
[<MethodNotSupportedAttribute>] abstract OpenFile : hMainWin:IntPtr * RemoteName:string byref -> ExecExitCode [<MethodNotSupportedAttribute>] override OpenFile : hMainWin:IntPtr * RemoteName:string byref -> ExecExitCode |
| JScript |
|---|
protected function OpenFile( hMainWin : IntPtr, RemoteName : String ) : ExecExitCode |
Parameters
- hMainWin
- Type: System..::..IntPtr
Handle to Total Commander window.
- RemoteName
- Type: System..::..String%
Full path of file to be opened or executed. In case the file is link (like *.lnk files in Windows) method should assignt link target path to this argument and return Symlink. It will make Total Commander navigate to a new path.Do not assign string longer than MaxPath-1 or uncatchable PathTooLongException will be thrown.
Return Value
Return Yourself if Total Commander should download the file and execute it locally, OK if the command was executed successfully in the plugin (or if the command isn't applicable and no further action is needed), Error if execution failed, or Symlink if this was a (symbolic) link or .lnk file pointing to a different directory.
Remarks
| This method is called only when plugin implements ExecuteFile(IntPtr, String%, String) function and thah function calls base class method. |
Exceptions
| Exception | Condition |
|---|---|
| System..::..UnauthorizedAccessException | The user does not have required access |
| System.Security..::..SecurityException | Security error detected |
| System.IO..::..IOException | An IO error occured |
| System..::..InvalidOperationException | Excution cannot be done from other reason |
| System..::..NotSupportedException | The actual implementation is marked with MethodNotSupportedAttribute which means that the plugin doesnot support operation provided by the method and all most derived implementations of following methods are marked with MethodNotSupportedAttribute as well: FtpModeAdvertisement(IntPtr, String, String), OpenFile(IntPtr, String%), ShowFileInfo(IntPtr, String), ExecuteCommand(IntPtr, String%, String) |