Solved

I need a bug fixed and a minor change the code

Posted on 2008-06-13
4
292 Views
Last Modified: 2013-11-23
Hello,
I need some help with the code from this link (the code from the accepted solution, of TheRealLoki):
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_23399636.html
1. When I try to request another screenshot before the previous one was received (this is a problem for the same client, not the second) the server will freeze and I will have to restart it manually. Could anybody figure out how to fix this? Maybe checking the clientstage?
2. When I get the files (records) command SENDFILES C:\records\??.??.????.rec would it be possible for the server to send a list of local drives to the client on connect? So the form will look something like this for example:

[ D:\    v] [records\??.??.????.rec]
    |                |
    |             Edit just like the one from before...
Combobox with a list of local drives from the server

Thanks.
0
Comment
Question by:tmwtp
  • 2
  • 2
4 Comments
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 21785227
hmm, I'm not getting any problems when I run it here
can you make sure you have this bit of code, as this is what ensures no commands can be sent whie a screenshot is being received

procedure TfClientMain.bRequestScreenshotClick(Sender: TObject);
begin
  if WSocket1.State <> wsConnected then
    MemoClient.lines.add('not connected, cannot login')
  else if ClientStage <> csCommand then
    MemoClient.lines.add('not ready to send commands')
  else
  begin
    ClientStage := csReceiveScreenshot_Start;
    WSocket1.SendLine('SCREENSHOT');
  end;
end;
0
 

Author Comment

by:tmwtp
ID: 21785586
Yeah, I think that must be the problem... when I made my client I only added this code: "WSocket1.SendLine('SCREENSHOT');" for the get screenshot button... I have to be more carefull in the future, i have too many things on my mind... :P Will test now, but i guess it will work if it works on your pc... Can you please help me with the other point of my question? And also, take a look at this queston, and tell me if you have any solution for it: http://www.experts-exchange.com/Programming/Languages/Pascal/Q_23484795.html
0
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 500 total points
ID: 21790044
0
 

Author Comment

by:tmwtp
ID: 21836867
Sorry I didn't have time to check the website sooner. I will test the demo now and then accept your solution.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question