GetCabinetProp

Gets Cabinet properties.

Public Function GetCabinetProp(ByRef CabinetProp() As Byte) As Long

 

Parameters

In/out

Name

Data type

Description

In/Out

CabinetProp

Byte

Byte Array of Cabinet Properties.

 

Description

This function is used to get the cabinet properties.

 

Return value 

Name

Description

NG_SUCCESS

In case of success

-3

Cabinet not connected

 

Example

Dim lRetVal as long

Dim puiCabinetIndex as long

Dim btCabProp as byte

Dim udtCabProp as TagCabinet

lRetVal = gPDb(puiCabinetIndex).GetCabinetProp(btCabProp)

   If lRetVal = 1 Then

      CopyMemory udtCabProp, btCabProp(0), Len(udtCabProp)

      With udtCabProp

      gudtaDBInfo(puiCabinetIndex).CabType = .CabType

      gudtaDBInfo(puiCabinetIndex).CreatedDateTime = .CreatedDateTime

      gudtaDBInfo(puiCabinetIndex).EnableLog = .EnableLog

      gudtaDBInfo(puiCabinetIndex).FTSDBPath = Trim$(.FTSDBPath)

      gudtaDBInfo(puiCabinetIndex).ImageVolIndex = .ImageVolIndex

      gudtaDBInfo(puiCabinetIndex).LockByUser = Trim$(.LockByUser)

      gudtaDBInfo(puiCabinetIndex).LockStatus = Trim$(.LockStatus)

      gudtaDBInfo(puiCabinetIndex).SecurityLevel = .SecurityLevel

      gudtaDBInfo(puiCabinetIndex).UserRights = Trim$(.UserRights)

      gudtaDBInfo(puiCabinetIndex).VersioningFlag = Trim$(.VersioningFlag)

      'Get the Effective Priviledges from the cabinet Props

      'gudtaDBInfo(puiCabinetIndex).bRightsPrivilege = IIf((Mid$(.Privileges, 7, 1) = "1"), True, False)

      gudtaDBInfo(puiCabinetIndex).bRightsPrivilege = IIf((Mid$(.Privileges, 7, 1) = CONST_1), True, False)

      End With

      With gudtaDBInfo(puiCabinetIndex)

         Call ParseRightsString("", .UserRights, _

               .bCreateRight, .bModifyRight, .bDeleteRight, .bAnnotateRight)

            End With

         Else

      If bFormMode Then

         Screen.MousePointer = vbNormal

         MsgBox gPDb(puiCabinetIndex).ErrDescription, vbInformation

      End If

   End If