Topic ".Net Assembly Event Handling in Autoit"

Author Message
[View user's profile]

Joined: 2015-03-06
Posts: 5
Location: United States
I wonder if anyone has any guidance on WinSCP session event handling in AutoIT. I am roughly familiar with general COM handling using something like the folloiwng:
$oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc")
Func _ErrFunc($oError)
ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
@TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number))
EndFunc ;==>_ErrFunc

But I am unsure how to implement a similar handler for the WinSCP.Session events. Would the syntax be something like the following?
$oSession = ObjCreate("WinSCP.Session")
ObjEvent($oSession.Failed, "_WinSCPErrFunc")
Func _WinSCPErrFunc($oError)
ConsoleWrite($oError.ToString() & @crlf)
EndFunc ;==>_WinSCPErrFunc

Does this look correct?

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License