AddGroup

Creates a group in a cabinet.

Public Function AddGroup( ByRef GroupProp() As Byte) As Long

 

Parameters

In/out

Name

Data type

Description

In/Out

GroupProp

Byte [TagGroup]  

Byte Array that specifies group attributes.

 

Description

This function call is used to create a group in a cabinet  according to the properties passed for group.

 

Return value

Name

Description

 1

In case of success

-3

Cabinet not connected.

 

Example

Dim GroupProp()     As Byte

Dim UdtGroup        As TagGroup

Dim gPDb             As PanDb.pdbCls


Set gPDb = New PanDb.pdbCls

 

UdtGroup.CreationDateTime = "28/01/2003"

UdtGroup.ExpiryDateTime = "28/01/2013"

UdtGroup.Owner = 1

UdtGroupName = “MyGroup”

UdtGroup.GroupId = 0

UdtGroup.ParenGroupId = 0

UdtGroup.Privileges = ""

 

Redim GroupProp(Len(UdtGroup) - 1)

Call CopyMemory (GroupProp(0),UdtGroup,Len(UdtGroup))

 

lRetVal=gPDb.AddGroup(GroupProp)

  if lRetVal <> NG_SUCCESS Then

    MsgBox gPDb.ErrDescription, vbInformation

     Screen.MousePointer = vbNormal

Endif