Solved

Remote Executing

Posted on 2000-05-04
14
177 Views
Last Modified: 2010-04-04
i'm using delphi4 and would like to write a cyber cafe management system that able to logoff the client pc from server, then the terminal pc will freeze until the server unable back. any idea on doing this ? all the pc are win95 connected.
0
Comment
Question by:Explorer060599
  • 5
  • 5
  • 2
  • +1
14 Comments
 
LVL 2

Expert Comment

by:craig_capel
ID: 2777596
define a little more......
0
 

Expert Comment

by:niknoxe
ID: 2777852
hi,
should be impossible cause win95 must not be logged on. uses DCOM for IPC. more info from your side would help.
bye
nik
0
 

Author Comment

by:Explorer060599
ID: 2778123
what i wants is actually like what normally cyber cafe system does. from the server i can logoff and login the client pc, here logoff meants client pc would come out with a screen and user unable to get rid of that screen without server response. every client pc would have a some kind of process that running behind to capture server message. once receipt message ie. "LOGOFF" then the process reside in client pc would display one full screen graphic and disable everykey. if receipt message from server ie. "LOGON" then the process in client pc would disable that screen.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Expert Comment

by:craig_capel
ID: 2778424
yes it could be done, u would need to make a client and server program to run on the network, server then talks to the clients, and when u need to log them off.... but surely, they can log themselves back in, the client just tells the server right, there back in!!!, log um....

Craig C....

There is no quick way of doing what you want, your talking about two full programs take a look at the demos provided with delphi 4, look for the chat program, simple tcp ip program and start off there.
0
 
LVL 1

Expert Comment

by:tomer_engel
ID: 2780935
are the programs located in the same place (like an office network?),,beacuse if it does you should do a DCOM program ,,or use the TClientSocket and TServerSocket in the delphi components

it's not so hard to lock the client,, after the client got the message(you'll see how it's done in the chat demo)

just capture ALL windows messages in the client in the WinProc procedure (view the help on this procedure--it's not hard to implemtn it in Delphi)
and in the WinProc procedure if the message is a keyboard or a mouse message and the message from the server had come ,,dont use the inherited on those messagees-->which will not send the messages to the op. system and nothing will happen,,

pretty cool idea,, tell me how it'll come out--> for more help/clarifications ask and i'll try helping

Bye tomer
0
 

Author Comment

by:Explorer060599
ID: 2785429
i need to put the sender program on server and receiver program on client.
tomer_engel, what you said is user even cannot move the mouse or keyboard when you dont use the inherited on those messagees ? was you saying that ? can you please give me a example code.
0
 
LVL 1

Accepted Solution

by:
tomer_engel earned 100 total points
ID: 2785466
no prob :
first some theory:

every message in the windows op.system goes through the   wndProc procedure    this procedure checks if our application overrided the message if it did override it then it hadled the messages as your application wants,, other wise it returns the message to  the op system to furthur hadaling.

so if you override this procedure  youcan do almost everything to your application,so the nextcode specifies how it's done.

a)first add the next override in your public section(in your client,or where ever you want to override  messages)

procedure WndProc(Var message :TMessage);override;

b)i think the  best way to halt your client is with  a simple global boolean variable-->tha't the way i'm gonn'a  implement the wndProc .

so lets imagine you added  a gloabl boolean varibale called:

LockClient:Boolean;

and initilazed it as needed.

b-1)disable all controls on the client form-->for good user interface programming      ,,and maybe add     some indication that client  is locked.
         
c)the client listenes to the network ,and when getting the right message it trigger the LockClient to true.                
d)implement the WndProc procedure (somewhere in the implementation section of your code)

procedure Tform1.WndProc(Var Message : TMessage);
Begin
//check the LockClient variable
  if not LockClient then inherited    
  else {lock the client if the message is a mouse/keyboard or what ever message}
    begin
     case Message.Msg of
     WM_LBUTTONDOWN,
     WM_LBUTTONUP,
     WM_LBUTTONDBLCLK,
     WM_RBUTTONDOWN,
     WM_RBUTTONDBLCLK,
     WM_RBUTTONUP,
     WM_KEYDOWN//add more messages
     ://do nothing
     else  inherited;
     end;//the case

    end;//the else cluase
End;//the procedure

HAVE FUN ,, Lets me   know how it came out..

for more questions,,contact   me..

Tomer


                   


0
 

Author Comment

by:Explorer060599
ID: 2787113
thanks tomer, l've tried your code as follow but it seen still go through op.system. when i ran this application and press CTRL+ESC the Showmessage works and the Start Menu Still Came out. it mean it still went through the op.system right ? can i receive and disable all others applications message like CTRL+ALT+DEL,CTRL+ESC,double click in excell application and so on ?

     case Message.Msg of
     WM_LBUTTONDOWN,
     WM_LBUTTONUP,
     WM_RBUTTONDOWN,
     WM_RBUTTONDBLCLK,
     WM_RBUTTONUP
     :;
     WM_LBUTTONDBLCLK : ShowMessage'Double Click');
     WM_KEYDOWN :
ShowMessage('Key Down');
     else inherited;
     end;//the case
0
 

Expert Comment

by:niknoxe
ID: 2787335
What you want is nearly impossible in a multitasking environment. The only way I can think of is disabling the keyboard driver for this time. I do not know how to do that, but you must be very shure of what you do, because if someone turns of the machine it will restart WITHOUT keyboard driver. WIN?? is not designed for that things. Keyboard events are interrupt processed. You should figure out the program that is responsible for that and then try to hook it. If youve done this you will be informed of any keystroke, but I suppose, that you wont find a single program for that. What you want is an integral part of WinNT, so maybe you better think of using a os that is allready through with it?
0
 

Author Comment

by:Explorer060599
ID: 2787732
niknoxe, what i want is only disable the CTRL+ALT+DEL,CTRL+ESC and ALT+TAB so the user wont be able to get rid of my screen and use the resource of this computer without authorised.
0
 
LVL 1

Expert Comment

by:tomer_engel
ID: 2787858
hey
yes,,what you should dois disablaing     ALL  keys and mouse event in the code.....
0
 
LVL 1

Expert Comment

by:tomer_engel
ID: 2787897
sorry,,submmited by mistake

view the winapi      help ,and add the wanted messages in the case statment
0
 

Author Comment

by:Explorer060599
ID: 2789381
yes..you are right, thanks tomer.
0
 
LVL 1

Expert Comment

by:tomer_engel
ID: 2791407
no problem,, happy i helped. :)
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
delphi prevent click fast 2 242
Delphi XE10, MySQL Query 4 167
Delphi: how to send PJL commands to printer 3 109
Delphi: Connect to running MS Outlook 4 124
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 I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

820 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