Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-16-2006, 05:17 PM
Tavares Tavares is offline
Senior Member
 
Join Date: Feb 2001
Posts: 1,318
Default App to block Orkut.com and MSN Messenger!

Hi!

I need to make an application that will prevent anyone from using www.orkut.com or using msn messenger.

How do I do that?Any good article or place to search ?

Thank You!
Eduardo Tavares
[link=http://www.eduardotavares.com.br]www.EduardoTavares.com.br[/link]


Plz accept if it helps.I always do.
"Daddy,what does Formatting C:... mean?"
---------------------------------------------
Borland Delphi 2006
Reply With Quote
  #2  
Old 02-17-2006, 08:09 AM
gLes gLes is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,273
Default RE: App to block Orkut.com and MSN Messenger!

Perhaps you should add the hosts necessary for these services to the "hosts" file in the %systemroot%\system32\drivers\etc\ directory. I think MSN messenger uses the *.msgr.hotmail.com hosts...

gLes
Reply With Quote
  #3  
Old 02-18-2006, 12:49 PM
WillSmith2050 WillSmith2050 is offline
Junior Member
 
Join Date: Dec 2004
Posts: 25
Default RE: App to block Orkut.com and MSN Messenger!

Create a service that kills a process.

1. MSN Messenger.
if the caption of the window is MSN Messenger.

[delphi]
KillProcess(FindWindow('MSN Messenger',nil));

procedure KillProcess(hWindowHandle: HWND);
var
hprocessID: INTEGER;
processHandle: THandle;
DWResult: DWORD;
begin
SendMessageTimeout(hWindowHandle, WM_CLOSE, 0, 0,
SMTO_ABORTIFHUNG or SMTO_NORMAL, 5000, DWResult);

if isWindow(hWindowHandle) then
begin
// PostMessage(hWindowHandle, WM_QUIT, 0, 0);

{ Get the process identifier for the window}
GetWindowThreadProcessID(hWindowHandle, @hprocessID);
if hprocessID <> 0 then
begin
{ Get the process handle }
processHandle := OpenProcess(PROCESS_TERMINATE or PROCESS_QUERY_INFORMATION,
False, hprocessID);
if processHandle <> 0 then
begin
{ Terminate the process }
TerminateProcess(processHandle, 0);
CloseHandle(ProcessHandle);
end;
end;
end;
end;
[/delphi]

2. Internet explorer
if the url internet explorer is www.orkut.com kill the process. Have look at one of the following:
- http://www.swissdelphicenter.ch/torry/showcode.php?id=2354
- http://www.swissdelphicenter.ch/torry/showcode.php?id=198
- Utilmind IESniffer.

Hope this helps.


Regards,
Will Smith.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 11:47 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.