The function for adding several users to a personal contact list of a specified person. If there is no group with such a name, it will be created automatically.

 

We recommend using this function instead of mPersonalContactsAddUser, if you need to add more than one contact at the same time.

 

Syntax

function mPersonalContactsAddUsers(const iUINOwner: integer; const sUINList, sGroupName: string): integer;

 

Parameters and return values

Parameter

Type

Value

iUINOwner

integer

unique user's ID, personal contact list owner >0;

sUINList

string

list of UINns of users divided by commas. All non-existing UINns, duplicates,  0 and UIN of the contact list owner will be ignored;

sGroupName

string

group's name. Do not use control characters; can't be empty.

 

Function result

>=0

number od added users;

-1

non-existing UIN of the personal contact list owner;

-4

group's name can't be empty or consists of spaces;

-5

group's name is too long (limitation is 255 characters by default);

-6

group's name has unsupported characters (CRLF, control unprintable characters UNICODE or ASCII).

 

Example


begin
  mPersonalContactsAddUsers(6, '30,534,3055,3587,3967,5454,7307,7774,7881,7899,7900', 'My department');
  mPersonalContactsRefresh(6);
end.


See also

mPersonalContactsAddUser

mPersonalContactsRefresh