forked from Ox18/cheatmatrix-gunbound
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGpsUnit.pas
More file actions
77 lines (60 loc) · 1.81 KB
/
GpsUnit.pas
File metadata and controls
77 lines (60 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
unit GpsUnit;
{ GAME PROTECT SPY }
interface
uses utils, windows, sysutils;
Function CBTProc(nCode: integer; wParam: WPARAM; lParam: LPARAM): integer; stdcall;
implementation
{==============================================================================}
// Função para inject por SetWindowsHookEx
{==============================================================================}
Function CBTProc(nCode: integer; wParam: WPARAM; lParam: LPARAM): integer; stdcall;
begin
result := CallNextHookEx(0, nCode, wParam, lParam);
end;
{==============================================================================}
// Função para inject por SetWindowsHookEx
{==============================================================================}
Function WinMain(hinstance, hprevinstance: HINST; lpcmdline: LPSTR; nshowcmd: integer): integer;
var msg: MSG;
ex: WNDCLASSEX;
begin
ex.cbSize := sizeof(WNDCLASSEX);
ex.style := CS_HREDRAW|CS_VREDRAW|CS_OWNDC;
ex.lpfnWndProc := WinProc;
ex.cbClsExtra := 0;
ex.cbWndExtra := 0;
ex.hInstance := hinstance;
ex.hIcon := LoadIcon(NULL, IDI_APPLICATION);
ex.hCursor := LoadCursor(NULL, IDC_ARROW);
ex.hbrBackground := (HBRUSH)GetStockObject(BLACK_BRUSH);
ex.lpszMenuName := NULL;
ex.lpszClassName := WNDCLASSNAME;
ex.hIconSm = NULL;
RegisterClassEx(&ex);
// Create the window
hwnd = CreateWindowEx(NULL,
WNDCLASSNAME,
"Window",
WS_OVERLAPPEDWINDOW,
0, 0,
300, 300,
NULL,
NULL,
hinstance,
NULL);
ShowWindow(hwnd, SW_SHOW);
UpdateWindow(hwnd);
// The message loop
while(!quit)
{
if(PeekMessage(&msg, NULL, NULL, NULL, PM_REMOVE))
{
if(msg.message == WM_QUIT)
quit = true;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.lParam;
}
end.