Solved

Remote Executing

Posted on 2000-05-04
14
174 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now