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) (Created automatically by Anima Importer) |
||
Line 1: | Line 1: | ||
<!-- Generated @ 08/12/2022 23: | <!-- 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__= <a class="clsStd" href="/techref/objectmodel/objects/channel/index.htm">Channel</a>.CancelSendFile Method (Restricted) = | __NOTOC__= <a class="clsStd" href="/techref/objectmodel/objects/channel/index.htm">Channel</a>.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 | 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 |
Revision as of 22:45, 12 August 2022
<a class="clsStd" href="/techref/objectmodel/objects/channel/index.htm">Channel</a>.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.