' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ' * ' * OSLoadProgram ' * ' * sample code from ' * LotusScript to Lotus C API Programmer Guide by Normunds Kalnberzins, (c) 2000-2003 ' * ' * http://www.ls2capi.com ' * ' * Author: Normunds Kalnberzins ' * ' * This code has been written as a sample to illustrate aspects of handling of Lotus C API from LotusScript ' * and may be reused, modified on full responsibility of the developer and provided this notice is preserved ' * ' * The author does not guaranty it to fit any particular purpose and it is up to the developer ' * to modify, test it and determine the limits of its applicability ' * ' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ' * * * * * * * * START (Function library) [OSLOAD] ' * * * * * * * * ' * ' * osload sample ' * ' * * * * * * * * START (Declaration) [W32_OSLOADPROGRAM ' * * * * * * * * ' * ' * loads executable module or dll ' * Declare Function W32_OSLoadProgram Lib "nnotes" Alias "OSLoadProgram" (Byval filename As String, Byval WorkingDir As String, Byval Arguments As String, Byval Flags As Integer) As Integer ' * * * * * * * * END (Declaration) [W32_OSLOADPROGRAM] ' * * * * * * * * ' * * * * * * * * START (Declaration) [MAC_OSLOADPROGRAM ' * * * * * * * * ' * Declare Function MAC_OSLoadProgram Lib "NotesLib" Alias "OSLoadProgram" (Byval filename As String, Byval WorkingDir As String, Byval Arguments As String, Byval Flags As Integer) As Integer ' * * * * * * * * END (Declaration) [MAC_OSLOADPROGRAM] ' * * * * * * * * ' * * * * * * * * START (Method) [INITIALIZE] ' * * * * * * * * ' * Sub Initialize Call OSLoadProgram ("c:\winnt\notepad.exe", "c:\temp", "newfile.txt",0) End Sub ' * * * * * * * * END (Method) [INITIALIZE] ' * * * * * * * * ' * * * * * * * * START (Method) [OSLOADPROGRAM] ' * * * * * * * * ' * Public Function OSLoadProgram (filename As String, WorkingDir As String, Arguments As String, Flags As Integer) As Integer Dim s As New NotesSession Select Case s.Platform Case "Windows/32":OSLoadProgram = W32_OSLoadProgram (filename, WorkingDir, Arguments, Flags) Case "Macintosh":OSLoadProgram = MAC_OSLoadProgram (filename, WorkingDir, Arguments, Flags) End Select End Function ' * * * * * * * * END (Method) [OSLOADPROGRAM] ' * * * * * * * * ' * * * * * * * * END (Function library) [OSLOAD] ' * * * * * * * *