AddUser
This call is used to create a new user in the cabinet .
Public Function AddUser(ByRef UserProp() As Byte,ByRef FolderCount As Long,ByRef FolderProp() As Byte)As Long
Parameters
In/out |
Name |
Data type |
Description |
In/Out |
UserProp |
Byte (TagUser) |
User properties |
Out |
FolderCount |
Long |
Folder count. |
Out |
FolderProp |
Byte (TagFolder) |
Folder properties. |
Description
This is only used for shared cabinet.
This function call is used to create new user in a cabinet.
It also creates 'Inbox', 'Sent Items' and 'Trash' folders for the corresponding user and returns their properties also .
Return value
Name |
Description |
1 |
In case of success |
-3 |
Cabinet not connected. |
Example
Dim UserProp() As Byte
Dim FolderCount As Long
Dim FolderProp() As Byte
Dim udtUser As TagUser
Dim gPDb As PanDb.pdbCls
Set gPDb = New PanDb.pdbCls
udtUser.DeletedDateTime = ""
udtUser.ExpiryDateTime = "30/01/2013"
udtUser.UserName = "Anthony"
udtUser.Password = ""
udtUser.Comment = "Application Member"
udtUser.FamilyName = "Application Products"
udtUser.PersonalName = ""
udtUser.DeletedDateTime = ""
udtUser.LoginStatus = "N"
udtUser.UserAlive = "Y"
'//user props byte array
ReDim UserProp(Len(udtUser) - 1)
CopyMemory (UserProp(0),FolderProp,len(FolderProp))
lRetVal=gPDb.AddUser(UserProp,FolderCount,FolderProp)
if lRetVal <> NG_SUCCESS Then
MsgBox gPDb.ErrDescription, vbInformation
Screen.MousePointer = vbNormal
End If