Lotusscript Access to ODS Version
[syntax="ls"]Const wAPIModule = "NNOTES" ' Windows/32
Declare Private Function NSFDbOpen Lib wAPIModule Alias "NSFDbOpen" _
( Byval PathName As String, DbHandle As Long) As Integer
Declare Private Function NSFDbClose Lib wAPIModule Alias "NSFDbClose" _
( Byval DbHandle As Long) As Integer
Declare Private Function NSFDbMajorMinorVersionGet Lib wAPIModule Alias "NSFDbMajorMinorVersionGet" _
( Byval hDB As Long, J As Integer, N As Integer) As Integer
Declare Private Function OSPathNetConstruct Lib wAPIModule Alias "OSPathNetConstruct" _
( Byval NullPort As Long, Byval Server As String, Byval FIle As String, Byval PathNet As String) As Integer
Function ODSVersion(server As String, filepath As String) As Integer
p$ = Space(1024)
OSPathNetConstruct 0, server, filepath, p$
Dim hDB As Long
NSFDbOpen p$, hDB
If Not hDB = 0 Then
NSFDbMajorMinorVersionGet hDB, ODSVersion, x%
NSFDbClose hDB
End If
End Function[/syntax]
Declare Private Function NSFDbOpen Lib wAPIModule Alias "NSFDbOpen" _
( Byval PathName As String, DbHandle As Long) As Integer
Declare Private Function NSFDbClose Lib wAPIModule Alias "NSFDbClose" _
( Byval DbHandle As Long) As Integer
Declare Private Function NSFDbMajorMinorVersionGet Lib wAPIModule Alias "NSFDbMajorMinorVersionGet" _
( Byval hDB As Long, J As Integer, N As Integer) As Integer
Declare Private Function OSPathNetConstruct Lib wAPIModule Alias "OSPathNetConstruct" _
( Byval NullPort As Long, Byval Server As String, Byval FIle As String, Byval PathNet As String) As Integer
Function ODSVersion(server As String, filepath As String) As Integer
p$ = Space(1024)
OSPathNetConstruct 0, server, filepath, p$
Dim hDB As Long
NSFDbOpen p$, hDB
If Not hDB = 0 Then
NSFDbMajorMinorVersionGet hDB, ODSVersion, x%
NSFDbClose hDB
End If
End Function[/syntax]