Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Channel/Methods/CancelSendFile: Difference between revisions
Jump to navigation
Jump to search
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
Animadoria (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<!-- Generated @ 08/12/2022 23:45:56 +01:00 using Anima's CHM converter based on techref/objectmodel/objects/channel/methods/CancelSendFile.htm --> | <!-- Generated @ 08/12/2022 23:45:56 +01:00 using Anima's CHM converter based on techref/objectmodel/objects/channel/methods/CancelSendFile.htm --> | ||
{{Protocols/MSNP|section=Activities}} | {{Protocols/MSNP|section=Activities}} | ||
__NOTOC__= | __NOTOC__= [[Protocols/MSNP/Activities/SDK/Techref/Objectmodel/Objects/Channel/Index|Channel]].CancelSendFile Method (Restricted) = | ||
This method cancels a file transfer in progress. The method is labeled "restricted" because it is only available if the application has the SendFile permission flag. For more information, see [[Protocols/MSNP/Activities/SDK/Sandbox|Standard vs. Advanced Applications]]. | This method cancels a file transfer in progress. The method is labeled "restricted" because it is only available if the application has the SendFile permission flag. For more information, see [[Protocols/MSNP/Activities/SDK/Sandbox|Standard vs. Advanced Applications]]. | ||
VBScript Syntax | === VBScript Syntax === | ||
<div class="clsCodeStd"> | <div class="clsCodeStd"> | ||
Line 20: | Line 20: | ||
:Handler | :Handler | ||
Document.Write("CancelSendFile failed. Error Description: " & err.description) | Document.Write("CancelSendFile failed. Error Description: " & err.description) | ||
End Sub | End Sub</pre> | ||
</div> | </div> | ||
JavaScript Syntax | === JavaScript Syntax === | ||
<div class="clsCodeStd"> | <div class="clsCodeStd"> | ||
Line 42: | Line 40: | ||
</div> | </div> | ||
Parameters | === Parameters === | ||
; aSendFile | ; aSendFile | ||
: A <span class="clsAttribute">FileInfo</span> type representing the file transfer to cancel. | : A <span class="clsAttribute">FileInfo</span> type representing the file transfer to cancel. | ||
Return Values | === Return Values === | ||
No return value. | No return value. | ||
Remarks | === Remarks === | ||
An exception is thrown if the application does not have SendFile permission, or if the parameter does not correspond to a file transfer. | An exception is thrown if the application does not have SendFile permission, or if the parameter does not correspond to a file transfer. |
Latest revision as of 00:56, 13 August 2022
Channel.CancelSendFile Method (Restricted)
This method cancels a file transfer in progress. The method is labeled "restricted" because it is only available if the application has the SendFile permission flag. For more information, see Standard vs. Advanced Applications.
VBScript Syntax
set myChannel = external.Channel sub cmdFileCancelButton_OnClick ' User clicked stop file transfer button On Error Goto Handler myChannel.CancelSendFile(myFile) Exit Sub :Handler Document.Write("CancelSendFile failed. Error Description: " & err.description) End Sub
JavaScript Syntax
myChannel = window.external.Channel; function cmdFileCancelButton_OnClick() { // User clicked stop file transfer button try { myChannel.CancelSendFile(myFile) } catch(ex) { document.write("CancelSendFile failed. Error Description: " + ex.description); } }
Parameters
- aSendFile
- A FileInfo type representing the file transfer to cancel.
Return Values
No return value.
Remarks
An exception is thrown if the application does not have SendFile permission, or if the parameter does not correspond to a file transfer.
If the active file transfer is canceled, and a file queue is set up, the next file in the queue begins transferring.
If more than one file is queued for transfer, each file must be canceled individually to clear the queue.