SetFolderPropEx
Sets the properties of a folder.
Public Function SetFolderPropEx(ByVal FolderId As Long,ByRef FolderProp() As Byte,ByVal DuplicateFlag As String) As Long
Parameters
In/out |
Name |
Data type |
Description |
In
|
FolderId |
Long |
Index of folder whose properties are to be set |
In,Out
|
FolderProp |
Byte[TagFolder] |
[In]Properties to be set [Out]Properties of folder after being set |
In
|
DuplicateFlag |
String |
Signifies whether folder name can be duplicated or not. |
Description
This function is used to set the properties of a folder whose index is passed as an input parameter. The parameter 'DuplicateFlag' is used at the backend to decide whether a duplicate folder name is allowed or not. If passed as “Y”, folder name with next consecutive number in brackets is created, for example Myfolder->Myfolder(1) and Myfolder(1)->Myfolder(2) and so on.
Return value
Name |
Description |
1 |
In case of success |
-1 |
Invalid cabinet name |
-2 |
Local cabinet is read-only |
-3 |
Cabinet not connected |
-12 |
Invalid folder name |
-16 |
Folder with the same name already exist |
-201 |
Insufficient rights for the current operation |
-133 |
User not logged in |
Example
Dim lRetVal As Long
Dim lFolderId As Long
Dim bFolderProp() As Byte
Dim udtFolderProp As TagFolder
Dim sDuplicateFlag As String
Dim gPDb As PanDb.pdbCls
Set gPDb = New PanDb.pdbCls
udtFolderProp.Name = "Application"
udtFolderProp.sComment = "Important"
udtFolderProp.ExpiryDateTime = "12/03/2003"
lFolderId = 2
s DuplicateFlag = "N"
ReDim bFolderProp(Len(udtFolderProp) - 1)
Call CopyMemory(bFolderProp(0), udtFolderProp, Len(udtFolderProp))
lRetVal = gPDb.SetFolderPropEx(lFolderId,bFolderProp,sDuplicateFlag)
If lRetVal <> 1 Then
MsgBox gPDb.ErrDescription
Else
MsgBox "Success"
End If