{"id":357,"date":"2011-01-21T07:51:20","date_gmt":"2011-01-21T14:51:20","guid":{"rendered":"http:\/\/cknotes.com\/?p=357"},"modified":"2012-07-04T05:57:16","modified_gmt":"2012-07-04T12:57:16","slug":"ftp2-activex-events","status":"publish","type":"post","link":"https:\/\/cknotes.com\/ftp2-activex-events\/","title":{"rendered":"FTP2 ActiveX Events"},"content":{"rendered":"<p>The Chilkat FTP2 ActiveX provides the following event callbacks:<\/p>\n<pre>\r\n' IMPORTANT: For all callbacks, arguments named \"skip\" or \"abort\" are output-only arguments.\r\n' These arguments may be set to 1 within the callback to either skip a\r\n' particular file upload\/download,  or abort the entire operation.\r\n\r\nDim WithEvents ftp As ChilkatFtp2\r\n\r\n' Called just before a file is to be downloaded.\r\nPrivate Sub ftp_BeginDownloadFile(ByVal path As String, skipFlag As Long)\r\n\r\nEnd Sub\r\n\r\n' Called just before a file is to be uploaded.\r\nPrivate Sub ftp_BeginUploadFile(ByVal path As String, skipFlag As Long)\r\n\r\nEnd Sub\r\n\r\n' Called periodically to indicate the current performance.\r\nPrivate Sub ftp_DownloadRate(ByVal byteCount As Long, ByVal bytesPerSec As Long)\r\n\r\nEnd Sub\r\n\r\n' Called just after a download has completed.\r\nPrivate Sub ftp_EndDownloadFile(ByVal path As String, ByVal numBytes As Long)\r\n\r\nEnd Sub\r\n\r\n' Called just after an upload has completed.\r\nPrivate Sub ftp_EndUploadFile(ByVal path As String, ByVal numBytes As Long)\r\n\r\nEnd Sub\r\n\r\n' Indicate percentage completed for a download.  Note: This is only called\r\n' for cases where it is possible to know the percent complete (0 to 100).\r\n' For directory tree synchronization methods, it is not possible to know ahead of time\r\n' how much work is to be done, and therefore it is not possible to know a percent-compete number.\r\nPrivate Sub ftp_GetProgress(ByVal pctDone As Long)\r\n\r\nEnd Sub\r\n\r\n' Indicate percentage completed for an upload.\r\nPrivate Sub ftp_PutProgress(ByVal pctDone As Long)\r\n    ProgressBar1.Value = pctDone\r\nEnd Sub\r\n\r\n' Called periodically for upload performance information.\r\nPrivate Sub ftp_UploadRate(ByVal byteCount As Long, ByVal bytesPerSec As Long)\r\n\r\nEnd Sub\r\n\r\n' Called just before a remote directory is to be deleted.\r\nPrivate Sub ftp_VerifyDeleteDir(ByVal path As String, skipFlag As Long)\r\n\r\nEnd Sub\r\n\r\n' Called just before a remote file is to be deleted.\r\nPrivate Sub ftp_VerifyDeleteFile(ByVal path As String, skipFlag As Long)\r\n\r\nEnd Sub\r\n\r\n' Called just before a remote directory is going to be downloaded.\r\n' Setting skip = 1 allows for entire sub-trees to be skipped.\r\nPrivate Sub ftp_VerifyDownloadDir(ByVal path As String, skipFlag As Long)\r\n\r\nEnd Sub\r\n\r\n' Called just before a remote directory is going to be uploaded.\r\n' Setting skip = 1 allows for entire sub-trees to be skipped.\r\nPrivate Sub ftp_VerifyUploadDir(ByVal path As String, skipFlag As Long)\r\n\r\nEnd Sub<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The Chilkat FTP2 ActiveX provides the following event callbacks: &#8216; IMPORTANT: For all callbacks, arguments named &#8220;skip&#8221; or &#8220;abort&#8221; are output-only arguments. &#8216; These arguments may be set to 1 within the callback to either skip a &#8216; particular file upload\/download, or abort the entire operation. Dim WithEvents ftp As ChilkatFtp2 &#8216; Called just before [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[440],"class_list":["post-357","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-ftp"],"_links":{"self":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/comments?post=357"}],"version-history":[{"count":0,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/357\/revisions"}],"wp:attachment":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/media?parent=357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/categories?post=357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/tags?post=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}