Visual C++ 에서 Callback 메세지를 받아오는 부분에서 착안하여 내맘대로 붙이다가 원하는 결과가 나왔음.
죽이는 유일한 방법은 작업관리자 > 프로세스 리스트에서 골라서 죽이는 것.
 
dpr 프로젝트 파일을 아래와 같은 형태로 만들면 된다.
 
program Project1;
uses
  Forms, Windows, Messages,
  Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
var
  Msg: tagMSG;
  종료금지: Boolean;
const
  WM_MYQUIT = WM_USER+2533;
begin
  종료금지:=True;
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
  while 종료금지 do begin
    while PeekMessage(Msg, 0, 0, 0, PM_REMOVE) do begin
      if MSG.message = WM_MYQUIT then begin
        종료금지:=False;
      end
      else if MSG.message = WM_QUIT then begin

MessageBox(0, '안죽는다!!', '씨발', MB_OK); 

      end
      else begin

           TransLateMessage(&msg);
           DispatchMessage(&msg);
      end;
    end;
    InvalidateRect(Application.Handle, nil, TRUE);
    UpdateWindow(Application.Handle);
    Application.ProcessMessages;
  end;
end







Posted by bloodguy
,