Document objects, Dm a – Kofax DM API User Manual
Page 45

T
HE
DM A
RCHITECTURE
25
Document Objects
txtDefaultRights = Str(DefaultRights)
pclient.ReleaseResults
Set PDoc = _
CreateObject("PCDClient.PCDDocObject")
PDoc.SetDST DST
PDoc.SetProperty "%TARGET_LIBRARY", library
PDoc.SetObjectType("DEF_PROF")
PDoc.SetProperty "%OBJECT_IDENTIFIER", _
docnumber
PDoc.Fetch
'Check for error.
Dim lngENum As Long
lngENum = PDoc.ErrNumber
If lngENum <> 0 Then
Dim strEDesc As String, strENum As String
strEDesc = PDoc.ErrDescription
strENum = CStr( lngENum )
MsgBox "Error " & strENum & ": " & strEDesc
'Handle the error...
End If
EffectiveRights = _
PDoc.GetPropertyValue("%EFFECTIVE_RIGHTS")
AccessControl = _
PDoc.HasRight("%PR_ACCESS_CONTROL", _
EffectiveRights)
txtEffectiveRights = Str(EffectiveRights)
txtAccessControl = Str(AccessControl)
'Only display trustees if security is set.
If DefaultRights Then
Call DisplayTrustees(PDoc, _
TreeTrustees, AccessControl)
If AccessControl Then
cmdAddTrustee.Enabled = True
cmdRemoveTrustee.Enabled = True
End If
Else
MsgBox "No security set for this profile."
End If
Set PDoc = Nothing
Set pclient = Nothing