Win.pas
上传用户:jiansibo
上传日期:2015-07-04
资源大小:524k
文件大小:2k
源码类别:

破解

开发平台:

Delphi

  1. unit Win;
  2. interface
  3. uses
  4.   Windows,
  5.   Messages,
  6.   SysUtils,
  7.   proc,
  8.   keyscan;
  9. procedure Run;
  10. procedure Init;
  11. implementation
  12. function WindowProc(hWnd,Msg,wParam,lParam:longint):Longint; stdcall;
  13. begin
  14.   Result:=DefWindowProc(hWnd,Msg,wParam,lParam);
  15.   case Msg of
  16.     WM_CREATE:wincreate(hwnd);
  17.     WM_TIMER:ontimer;
  18.     WM_HOTKEY:winhotkey;
  19.     WM_DESTROY:windestroy;
  20.   end;
  21.   if msg=SHELL_EVENT then OnShellHook(wParam,lparam);
  22.   if msg=KEY_EVENT then OnkeyHook(wParam,lParam);
  23.   if msg=MOUSE_EVENT then OnMouseHook(wParam,lParam);
  24.   if msg=WNDPROC_EVENT then OnWndProcHook(wParam,lParam);
  25. end;
  26. procedure Init;
  27. begin
  28.   hInst:=GetModuleHandle(nil);
  29.   with wClass do
  30.   begin
  31.     Style:=         CS_PARENTDC;
  32.     hIcon:=         LoadIcon(hInst,'MAINICON');
  33.     lpfnWndProc:=   @WindowProc;
  34.     hInstance:=     hInst;
  35.     hbrBackground:= COLOR_BTNFACE+1;
  36.     lpszClassName:= 'HackSoft-UoSpy';
  37.     hCursor:=       LoadCursor(0,IDC_ARROW);
  38.   end;
  39.   RegisterClass(wClass);
  40.   hmain:=CreateWindowEx(0,wClass.lpszClassName,'UoSpy 2001',WS_OVERLAPPEDWINDOW or WS_VISIBLE,10,10,410,400,0,0,hInst,nil);
  41.   hlist:=CreateWindowEx(WS_EX_CLIENTEDGE,'LISTBOX','hello',WS_VISIBLE or WS_CHILD or WS_VSCROLL,10,10,380,330,hmain,0,hinst,nil);
  42.   //if GetKeyboardState(lpKBS)=true then
  43.   begin
  44. //    if (lpKbs[$14]=$81) or (lpKbs[$14]=1) then cslock:=1;
  45. //    if (lpKbs[$14]=$80) or (lpKbs[$14]=0) then cslock:=0;
  46. //    strcopy(sbuf,pchar(format('%x',[cslock])));
  47. //    sendmessage(hlist,LB_ADDSTRING,0,integer(@sbuf));
  48.     lpKBS[$14]:=0;
  49.     SetKeyboardState(lpKBS);
  50.     cslock:=0;
  51.     skey:='';
  52.   end;
  53.   newtime:=SetTimer(hmain,0,300,nil);
  54. end;
  55. procedure Run;
  56. begin
  57.   while(GetMessage(Msg,hmain,0,0))do
  58.   begin
  59.     TranslateMessage(Msg);
  60.     DispatchMessage(Msg);
  61.   end;
  62. end;
  63. end.