LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX function calls - return immediately?

I have created an ActiveX server in CVI.  I have a client application that launches multiple instances of this server and changes controls on the UI, etc. through ActiveX function calls.  All works well, except the function calls are performed in series.  So, if I send, say, a "Power On" command to all the servers, my CVI code waits for the Power On command to server 1 to return before sending the command to server 2.  This process can take up to 6 seconds to return, so to turn on 10 devices takes 1 minute rather than 6 seconds if I could Power On all 10 at once.  Obviously, I would like the function calls to ActiveX to return immediately, in my client, while the server takes the command and performs in the background.  My first idea was to launch multiple threads for each server to make the calls and I have implemented this.  The calls are made in different threads, but there is still a lot of delay involved because in actuality, I send a Power On command and several other commands to each server.  Barring creating a thread for each ActiveX function call, I think the way to make this happen is on the server side.
 
Is there a way to optimize my server to return from ActiveX funciton calls immediately?
 
Thanks,
Jason Weida
0 Kudos
Message 1 of 1
(2,928 Views)