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
|
-
-
|
|
!
!
-
|
|
!
| #module
#uselib "Kernel32.dll"
#cfunc IsBadReadPtr "IsBadReadPtr" int, int
#defcfunc is_wnd_id int wid
if 927 < wid : return 0
mref bmscr, 96+wid
if 0 = IsBadReadPtr(varptr(bmscr), 79) {
if 1 = bmscr.0 && 1 <= bmscr.17 && bmscr.17 <= 3 {
mref bmscr, 67 return 1
}
}
mref bmscr, 67 return 0
#deffunc get_free_wnd_id
r = -1
repeat 928 if 0 = is_wnd_id(cnt) {
r = cnt
break
}
loop
return r
#global
|