Manage Learn to apply best practices and optimize your operations.

Send Console Commands with LS

Declare Sub OSMemFree Lib "nnotes.dll" (Byval hBuffer As Long)
'return string instead of long for LS type checking
Declare Function OSLockObject Lib "nnotes.dll" (Byval hBuffer As Long) As String
Declare Sub OSUnlockObject Lib "nnotes.dll" (Byval hBuffer As Long)
Declare Function NSFRemoteConsole Lib "nnotes.dll" (Byval ServerName As String,
Byval ConsoleCommand As String, rethBuffer As Long) As Long

Sub Click(Source As Button)
Dim hBuf As Long
'Dim pBuf As Long ' same as void *, for general case
Dim pBuf As String ' works because of BSTR format ???
Dim result As Long
Dim data As Variant

result = NSFRemoteConsole("< Your Server >","< console command >", hBuf)
pBuf = OSLockObject(hBuf)
Messagebox pbuf ' or whatever string code you want
Call OSUnlockObject(hBuf)
Call OSMemFree(hBuf)
End Sub

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...