Const wAPIModule = "NNOTES" ' Windows/32
Declare Private Function NSFDbOpen Lib wAPIModule Alias "NSFDbOpen" _
( Byval P As String, hDB As Long) As Integer
Declare Private Function NSFDbClose Lib wAPIModule Alias "NSFDbClose" _
( Byval hDB As Long) As Integer
Declare Private Function NSFDbIsLocallyEncrypted Lib wAPIModule Alias "NSFDbIsLocallyEncrypted" _
( Byval hDB As Long, V 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 IsLocallyEncrypted(db As NotesDatabase) As Variant
np$ = Space(1024)
OSPathNetConstruct 0, db.Server, db.FilePath, np$
Dim hDB As Long
NSFDbOpen np$, hDB
If hDB = 0 Then Exit Function
NSFDbIsLocallyEncrypted hDB, v%
NSFDbClose hDB
IsLocallyEncrypted = Not (v% = 0)
End Function
[
QUELLE]