3

有没有在不使用付费软件的情况下解锁 Lotus Notes 数据库设计?

锁定数据库的人离开了公司,我们没有这个应用程序的任何模板。所以只有通过解锁这个数据库来开始这个数据库的进一步开发。

4

1 回答 1

4

例如,您是否已经尝试过 Google 快速提供的这段代码?

Const APIModule = "NNOTES" ' Windows/32 only
Const REPLFLG_HIDDEN_DESIGN = &H0020

Type ReplicaInfo
ID(1) As Long
Flags As Integer
CutoffDays As Integer
CutoffDate(1) As Long
End Type

Declare Function NSFDbOpen Lib APIModule Alias "NSFDbOpen" _
( Byval P As String, H As Long) As Integer
Declare Function NSFDbClose Lib APIModule Alias "NSFDbClose" _
( Byval H As Long) As Integer
Declare Function OSPathNetConstruct Lib APIModule Alias "OSPathNetConstruct" _
( Byval Z As Long, Byval S As String, Byval F As String, Byval P As String) As Integer
Declare Function NSFDbReplicaInfoGet Lib APIModule Alias "NSFDbReplicaInfoGet" _
( Byval H As Long, R As ReplicaInfo) As Integer
Declare Function NSFDbReplicaInfoSet Lib APIModule Alias "NSFDbReplicaInfoSet" _
( Byval H As Long, R As ReplicaInfo) As Integer

Sub HideDesign(db As NotesDatabase, hide As Variant)
Dim hDB As Long
p$ = Space(256)
OSPathNetConstruct 0, db.Server, db.FilePath, p$
NSFDbOpen p$, hDB

Dim R As ReplicaInfo
NSFDbReplicaInfoGet hDB, R
If hide Then
R.Flags = R.Flags Or REPLFLG_HIDDEN_DESIGN
Else
R.Flags = R.Flags And Not REPLFLG_HIDDEN_DESIGN
End If
NSFDbReplicaInfoSet hDB, R

NSFDbClose hDB
End Sub
于 2013-09-19T17:18:46.293 回答