![]() |
|
Here's an example of code (from Daniel Nashed) on how you can issue Remote Console commands from Lotuscript:
Dim rcmd_server As String Dim rcmd_command As String Dim rcmd_result as String
rcmd_server = "notes.nashcom.de" rcmd_command = "show server"
Dim remoteConsole As New RemoteConsole (rcmd_server)
recmd_result = remoteConsole.Execute (rcmd_command)
REM W32 De
clares Declare Function W32_NSFRemoteConsole Lib "NNOTES.DLL" Alias "NSFRemoteConsole" (Byval server As Lmbcs String, Byval cmd As Lmbcs String, ret As Long) As Integer Declare Function W32_OSLockObject Lib "NNOTES.DLL" Alias "OSLockObject" (Byval handle As Long) As Lmbcs String Declare Sub W32_OSUnlockObject Lib "NNOTES.DLL" Alias "OSUnlockObject" (Byval handle As Long) Declare Sub W32_OSMemFree Lib "NNOTES.DLL" Alias "OSMemFree" (Byval handle As Long) Declare Function W32_OSLoadString Lib "NNOTES.DLL" Alias "OSLoadString" (Byval hModule As Long, Byval stringCode As Integer, _ Byval retBuffer As Lmbcs String, Byval bufferLen As Integer) As Integer
REM MAC Declares Declare Function MAC_NSFRemoteConsole Lib "NotesLib" Alias "NSFRemoteConsole" (Byval server As Lmbcs String, Byval cmd As Lmbcs String, ret As Integer) As Integer Declare Function MAC_OSLockObject Lib "NotesLib" Alias "OSLockObject" (Byval handle As Integer) As Lmbcs String Declare Sub MAC_OSUnlockObject Lib "NotesLib" Alias "OSUnlockObject" (Byval handle As Integer) Declare Sub MAC_OSMemFree Lib "NotesLib" Alias "OSMemFree" (Byval handle As Integer) Declare Function MAC_OSLoadString Lib "NotesLib" Alias "OSLoadString" (Byval hModule As Integer, Byval stringCode As Integer, _ Byval retBuffer As Lmbcs String, Byval bufferLen As Integer) As Integer
REM Linux Declares Declare Function LINUX_NSFRemoteConsole Lib "libnotes.so" Alias "NSFRemoteConsole" (Byval server As Lmbcs String, Byval cmd As Lmbcs String, ret As Long) As Integer Declare Function LINUX_OSLockObject Lib "libnotes.so" Alias "OSLockObject" (Byval handle As Long) As Lmbcs String Declare Sub LINUX_OSUnlockObject Lib "libnotes.so" Alias "OSUnlockObject" (Byval handle As Long) Declare Sub LINUX_OSMemFree Lib "libnotes.so" Alias "OSMemFree" (Byval handle As Long) Declare Function LINUX_OSLoadString Lib "libnotes.so" Alias "OSLoadString" (Byval hModule As Long, Byval stringCode As Integer, _ Byval retBuffer As Lmbcs String, Byval bufferLen As Integer) As Integer
REM AIX Declares Declare Function AIX_NSFRemoteConsole Lib "libnotes_r.a" Alias "NSFRemoteConsole" (Byval server As Lmbcs String, Byval cmd As Lmbcs String, ret As Integer) As Integer Declare Function AIX_OSLockObject Lib "libnotes_r.a" Alias "OSLockObject" (Byval handle As Integer) As Lmbcs String Declare Sub AIX_OSUnlockObject Lib "libnotes_r.a" Alias "OSUnlockObject" (Byval handle As Integer) Declare Sub AIX_OSMemFree Lib "libnotes_r.a" Alias "OSMemFree" (Byval handle As Integer) Declare Function AIX_OSLoadString Lib "libnotes_r.a" Alias "OSLoadString" (Byval hModule As Integer, Byval stringCode As Integer, _ Byval retBuffer As Lmbcs String, Byval bufferLen As Integer) As Integer
REM Solaris Declares Declare Function SOLARIS_NSFRemoteConsole Lib "libnotes.so" Alias "NSFRemoteConsole" (Byval server As Lmbcs String, Byval cmd As Lmbcs String, ret As Integer) As Integer Declare Function SOLARIS_OSLockObject Lib "libnotes.so" Alias "OSLockObject" (Byval handle As Integer) As Lmbcs String Declare Sub SOLARIS_OSUnlockObject Lib "libnotes.so" Alias "OSUnlockObject" (Byval handle As Integer) Declare Sub SOLARIS_OSMemFree Lib "libnotes.so" Alias "OSMemFree" (Byval handle As Integer) Declare Function SOLARIS_OSLoadString Lib "libnotes.so" Alias "OSLoadString" (Byval hModule As Integer, Byval stringCode As Integer, _ Byval retBuffer As Lmbcs String, Byval bufferLen As Integer) As Integer
Class RemoteConsole