Error sending massive commands

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
friman
Posts: 25
Joined: Fri Jul 17, 2015 4:26 am

Error sending massive commands

Post by friman » Wed Aug 12, 2015 8:05 pm

I am trying send massive commands to allowed guids, executing the follow sentences

Code: Select all

Cmd := TRVCmd.Create;
  Cmd.Cmd := _CMD_USER_STATUS;
  with Cmd.Params.Add  do begin
    Name      := 'Status';
    ParamType := rvptString;
    Value     := Status;
  end;

  for I := 0 to Length(AllUsers)-1 do begin
     RVCamSender1.SendCmd(Cmd, AllUsers[i].GUID, '');
     RVCamSender1.WaitForSendCmd;
  end;
The first normal, the second return error. Is there some suitable way to do that?

Sergey Tkachenko
Site Admin
Posts: 14649
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Thu Aug 13, 2015 1:33 pm

SendCmd frees TRVCmd object, so you cannot use the same object for sending multiple commands.
Create a new TRVCmd object for each call of SendCmd

Post Reply