Hello good souls,
I am stuck with vaProxy in a sub raised by the AdressOf command, the vaProxy is of curse not recognized in this sub.
How Can i make this works ? Please help.
The code is in VB.net on visual sutio 2017 and I am trying to make a plugin.dll for VA that can watch a directory for new files, and execute a command with vaProxy.
Public Class Class1
Private audio_path As String
Private Shared WithEvents watchfolder As New FileSystemWatcher
Public Shared Function VA_DisplayName() As String
...
End Function
Public Shared Function VA_Id() As Guid
...
End Function
Public Shared Function VA_DisplayInfo() As String
...
End Function
Public Shared Sub VA_Init1(vaProxy As Object)
watchfolder.Path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)"
watchfolder.Filter = IO.Path.GetFileName(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))
watchfolder.EnableRaisingEvents = True
AddHandler watchfolder.Created, AddressOf OnChanged
End Sub
Public Shared Sub VA_Exit1(vaProxy As Object)
...
End Sub
Public Shared Sub VA_StopCommand()
...
End Sub
Public Shared Sub VA_Invoke1(vaProxy As Object)
...
End Sub
Private Shared Sub OnChanged(source As Object, e As FileSystemEventArgs)
' Specify what is done when a file is changed, created, or deleted.
vaProxy.ExecuteCommand("(( new message ))", True)
End Sub
End Class