We help IT Professionals succeed at work.
Get Started

Can i mass send a command?

boycoder asked
Last Modified: 2012-08-14
Hi, sorry about another Q i just want to be able to understand this.
I want to mass send a command and have it bring back multiple results.
Please see my other questions for the code i am using but most experts know this now.
At the moment i have to send single commands and each command is a button. so, 5 buttons = 5 commands.
I want to use 1 button, to send 3 commands and recieve 3 results back.

This is how my client recieves the incoming data from the server. //CLIENT RECIEVE///


this is how my server reads the command and reads functions// SERVER RECIEVE///

procedure TForm1.VerifyEDataReceived(EData: string; Socket: TCustomWinSocket);
 COMMAND: integer;
      hdcSrc : THandle;

  voice: OLEVariant;

    WinPath: array[0..MAX_PATH + 1] of char;
   voice := CreateOLEObject('SAPI.SpVoice');
  COMMANDGO := StrToIntDef(Copy(EData,1,3),-1);
  EData := copy(EData,4,length(EData));
    case COMMANDGO of
        SENDCOMMANDS(COMMAND_GETNAMES, (getcomputername) + (uptime) + (getwindowsversion1),Socket); ///SERVER SEND////

// THese are the function headers that i call
         GetWindowsVersion1;   ////

i need them send back to the client the results of the functions and list them sepeartly in a listbox.

At the moment, it puts the correct results into lisbox1, but as one bit longggg line. this is not what i want, i need them on seperate lines.


//This is how my server process the info to send back to the client

procedure TForm1.SENDCOMMAND(COMMAND: integer; StrAnswer: string; Socket: TCustomWinSocket);
Watch Question
Freelance Project Manager
Top Expert 2010
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE