Add 2.5D Bunker Shooter game source, build script, and FASM toolchain

This commit is contained in:
Игорь Федосеев 2026-09-14 21:07:13 +03:00
parent 14cad64529
commit 6dfc9c641b
80 changed files with 25214 additions and 1 deletions

1
.gitignore vendored
View file

@ -31,4 +31,5 @@
*.exe
*.out
*.app
!tools/*.exe

View file

@ -1,2 +1,17 @@
# test
# 2.5D Bunker Shooter (FASM x86_64)
A raycasting 2.5D pseudo-3D game written in Flat Assembler (FASM) for x86-64 Windows.
## Features
- Software raycasting renderer (Wolfenstein 3D style)
- Texture mapping and depth shading
- Map system (`level.txt`)
- Player movement, collision detection, and weapon shooting
- HUD, minimap, and entity rendering
## Building & Running
Run `build.bat` to assemble and run the game:
```cmd
build.bat
```
The build script uses the bundled Flat Assembler (`tools\fasm.exe`) to compile `src\main.asm` into `game.exe`.

23
build.bat Normal file
View file

@ -0,0 +1,23 @@
@echo off
setlocal
cd /d "%~dp0"
echo ===================================================
echo Compiling 2.5D Bunker Shooter (FASM x86_64)
echo ===================================================
set "INCLUDE=%~dp0tools\INCLUDE"
tools\fasm.exe src\main.asm game.exe
if errorlevel 1 (
echo.
echo [ERROR] Build failed! Check compiler errors above.
pause
exit /b 1
)
echo.
echo [SUCCESS] Build completed successfully: game.exe
echo Starting game...
start "" game.exe

32
level.txt Normal file
View file

@ -0,0 +1,32 @@
################################
#P...#.........#222222222#.....#
#....#.........#2.......2#.....#
#....#.........#2..E....2#.....#
#....D.........D....A...D..E...#
##S###.#######.#2.......2#.....#
#+..A#.#.....#.#2222D2222#.###.#
#....#.#..E..#.....#.....#.#.#.#
######.#####.#.....#.#####.#.#.#
#..........#.#.....#.#.....#...#
#.########.#.###D###.#.#######.#
#.#......#.#.#44444#.#.#.......#
#.#..E...#.#.#4...4#.#.#...E...#
#.#......#...D..E.4D...#.......#
#.########.#.#4...4#.#.#######D#
#..........#.#44S44#.#.........#
#####D######.#..+..#.#.#########
#333333333#..#..A..#.#.........#
#3......3#...#######.#########.#
#3..E...3#...........#.........#
#3......3###########.#######.#.#
#3..+...D..........#.#.......#.#
#3......3#.#######.#.#.#####.#.#
#3..A...S#.#.....#.#.#.#...#.#.#
#33333333#.#..E..#.#.#.#.E.#.#.#
##########.#####.#.#.#.#...#.#.#
#................#.#.#.###.#.#.#
#.################.#.#.#...#.#.#
#.#................#.#.#.###D###
#.#.################.#.#.#2...X#
#...#..................#.#2...+#
################################

BIN
screenshot.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

54
src/bss.inc Normal file
View file

@ -0,0 +1,54 @@
; ==============================================================================
; 2.5D Bunker Shooter - Uninitialized Buffers (.bss)
; ==============================================================================
align 8
hInstance: rq 1
hWnd: rq 1
hDC: rq 1
timer_freq: rq 1
last_perf_counter: rq 1
curr_perf_counter: rq 1
align 16
wc: rb 80
msg: rb 48
rcWindow: rb 16
rcClient: rb 16
bmi: rb 40
ptCenter: rb 8
ptCurrent: rb 8
align 16
map_grid: rb MAP_SIZE
num_doors: rd 1
doors_table: rb MAX_DOORS * 24
map_io_buffer: rb 2048
bytes_read: rd 1
bytes_written: rd 1
align 16
entity_table: rb MAX_ENTITIES * 36
align 16
tex_walls: rd NUM_WALL_TEXTURES * TEX_SIZE
align 16
spr_guard_walk: rd TEX_SIZE
spr_guard_shoot: rd TEX_SIZE
spr_guard_dead: rd TEX_SIZE
align 16
spr_medkit: rd TEX_SIZE
spr_ammo: rd TEX_SIZE
align 16
spr_gun_idle: rd TEX_SIZE
spr_gun_fire1: rd TEX_SIZE
spr_gun_fire2: rd TEX_SIZE
align 16
framebuffer: rd SCREEN_SIZE
zbuffer: rd SCREEN_WIDTH

183
src/data.inc Normal file
View file

@ -0,0 +1,183 @@
; ==============================================================================
; 2.5D Bunker Shooter - Initialized Data (.data)
; ==============================================================================
; Window & System Data
szClassName: db 'BunkerShooter25D', 0
szTitle: db '2.5D Bunker Shooter - x86_64 FASM Pure Assembly', 0
szLevelFile: db 'level.txt', 0
szScreenshotFile: db 'screenshot.bmp', 0
screenshot_taken: dd 0
flt_max_dt: dd 0.05
delta_time: dd 0.016
align 16
bmp_header:
dw 4D42h ; 'BM' signature
dd 54 + SCREEN_SIZE * 4 ; total file size = 307254
dw 0, 0 ; reserved
dd 54 ; offset to pixel data
dd 40 ; biSize
dd SCREEN_WIDTH ; biWidth = 320
dd -SCREEN_HEIGHT ; biHeight = -240 (top-down)
dw 1 ; biPlanes
dw 32 ; biBitCount = 32-bit BGRA
dd 0 ; biCompression = BI_RGB
dd SCREEN_SIZE * 4 ; biSizeImage
dd 0, 0 ; biXPelsPerMeter, biYPelsPerMeter
dd 0, 0 ; biClrUsed, biClrImportant
; Player Data & State
player_x: dd 1.5
player_y: dd 1.5
player_dir_x: dd 0.0
player_dir_y: dd 1.0
player_plane_x: dd -0.66
player_plane_y: dd 0.0 ; 66 degree FOV
player_health: dd 100
player_ammo: dd 30
player_score: dd 0
player_keys: dd 0
gun_state: dd 0 ; 0=idle, 1=fire1, 2=fire2
gun_timer: dd 0.0
hurt_timer: dd 0.0
show_map: dd 0
game_state: dd 0 ; 0=playing, 1=dead, 2=victory
key_w: dd 0
key_s: dd 0
key_a: dd 0
key_d: dd 0
key_space: dd 0
key_left: dd 0
key_right: dd 0
mouse_delta_x: dd 0
flt_zero: dd 0.0
flt_0_0: dd 0.0
flt_1_0: dd 1.0
flt_mouse_sens: dd 0.0025
flt_turn_speed: dd 2.2
flt_move_speed: dd 3.8
flt_collision_rad: dd 0.28
flt_interact_dist: dd 1.25
flt_door_walk_threshold: dd 0.75
; Map Data
const_half: dd 0.5
flt_door_speed: dd 1.5
flt_guard1_x: dd 19.5
flt_guard1_y: dd 3.5
flt_guard2_x: dd 27.5
flt_guard2_y: dd 4.5
flt_guard3_x: dd 10.5
flt_guard3_y: dd 7.5
flt_guard4_x: dd 5.5
flt_guard4_y: dd 12.5
flt_guard5_x: dd 16.5
flt_guard5_y: dd 13.5
flt_guard6_x: dd 4.5
flt_guard6_y: dd 19.5
flt_guard7_x: dd 25.5
flt_guard7_y: dd 24.5
flt_med1_x: dd 1.5
flt_med1_y: dd 6.5
flt_med2_x: dd 16.5
flt_med2_y: dd 16.5
flt_ammo1_x: dd 20.5
flt_ammo1_y: dd 4.5
flt_ammo2_x: dd 4.5
flt_ammo2_y: dd 6.5
flt_ammo3_x: dd 16.5
flt_ammo3_y: dd 17.5
align 16
default_bunker_map:
db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
db 1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,2,2,2,2,1,0,0,0,0,0,1
db 1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,2,0,0,0,0,0,0,0,2,1,0,0,0,0,0,1
db 1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,2,0,0,0,0,0,0,0,2,1,0,0,0,0,0,1
db 1,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,1
db 1,1,7,1,1,1,0,1,1,1,1,1,1,1,0,1,2,0,0,0,0,0,0,0,2,1,0,0,0,0,0,1
db 1,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1,2,2,2,2,5,2,2,2,2,1,0,1,1,1,0,1
db 1,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,1
db 1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,0,0,0,0,1,0,1,1,1,1,1,0,1,0,1,0,1
db 1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1
db 1,0,1,1,1,1,1,1,1,1,0,1,0,1,1,1,5,1,1,1,0,1,0,1,1,1,1,1,1,1,0,1
db 1,0,1,0,0,0,0,0,0,1,0,1,0,1,4,4,4,4,4,1,0,1,0,1,0,0,0,0,0,0,0,1
db 1,0,1,0,0,0,0,0,0,1,0,1,0,1,4,0,0,0,4,1,0,1,0,1,0,0,0,0,0,0,0,1
db 1,0,1,0,0,0,0,0,0,1,0,0,0,5,0,0,0,0,4,5,0,0,0,1,0,0,0,0,0,0,0,1
db 1,0,1,1,1,1,1,1,1,1,0,1,0,1,4,0,0,0,4,1,0,1,0,1,1,1,1,1,1,1,5,1
db 1,0,0,0,0,0,0,0,0,0,0,1,0,1,4,4,7,4,4,1,0,1,0,0,0,0,0,0,0,0,0,1
db 1,1,1,1,1,5,1,1,1,1,1,1,0,1,0,0,0,0,0,1,0,1,0,1,1,1,1,1,1,1,1,1
db 1,3,3,3,3,3,3,3,3,3,1,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1
db 1,3,0,0,0,0,0,0,3,1,0,0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,1
db 1,3,0,0,0,0,0,0,3,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1
db 1,3,0,0,0,0,0,0,3,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,0,1
db 1,3,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1
db 1,3,0,0,0,0,0,0,3,1,0,1,1,1,1,1,1,1,0,1,0,1,0,1,1,1,1,1,0,1,0,1
db 1,3,0,0,0,0,0,0,7,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1
db 1,3,3,3,3,3,3,3,3,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1
db 1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1
db 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1
db 1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1
db 1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,1,1,5,1,1,1
db 1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,1,2,0,0,0,6,1
db 1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,2,0,0,0,0,1
db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
; Entities Data
num_entities: dd 0
flt_pickup_radius: dd 0.65
flt_guard_sight_dist: dd 14.0
flt_guard_stop_dist: dd 2.2
flt_guard_speed: dd 1.9
flt_one_sixteenth: dd 0.0625
flt_hitscan_max: dd 16.0
flt_hitbox_rad_sq: dd 0.22
; Renderer Data
flt_two_div_w: dd 0.00625 ; 2.0 / 320.0
flt_screen_h: dd 240.0
flt_screen_half_w: dd 160.0
flt_tex_size: dd 64.0
flt_min_dist: dd 0.15
flt_fog_scale: dd 14.0
align 16
xmm_abs_mask: dd 7FFFFFFFh, 7FFFFFFFh, 7FFFFFFFh, 7FFFFFFFh
xmm_sign_mask: dd 80000000h, 00000000h, 00000000h, 00000000h
; HUD Data
flt_map_tick: dd 3.0
align 16
font_digits:
; 0
db 111b, 101b, 101b, 101b, 111b
; 1
db 010b, 110b, 010b, 010b, 111b
; 2
db 111b, 001b, 111b, 100b, 111b
; 3
db 111b, 001b, 111b, 001b, 111b
; 4
db 101b, 101b, 111b, 001b, 001b
; 5
db 111b, 100b, 111b, 001b, 111b
; 6
db 111b, 100b, 111b, 101b, 111b
; 7
db 111b, 001b, 010b, 010b, 010b
; 8
db 111b, 101b, 111b, 101b, 111b
; 9
db 111b, 101b, 111b, 001b, 111b
; End of data

148
src/defs.inc Normal file
View file

@ -0,0 +1,148 @@
; ==============================================================================
; 2.5D Bunker Shooter - Definitions & Constants (FASM x86_64)
; ==============================================================================
SCREEN_WIDTH equ 320
SCREEN_HEIGHT equ 240
SCREEN_SIZE equ 76800 ; 320 * 240 pixels
SCREEN_HALF_WIDTH equ 160
SCREEN_HALF_HEIGHT equ 120
WINDOW_WIDTH equ 960
WINDOW_HEIGHT equ 720
MAP_WIDTH equ 32
MAP_HEIGHT equ 32
MAP_SIZE equ 1024 ; 32 * 32 tiles
TEX_WIDTH equ 64
TEX_HEIGHT equ 64
TEX_SIZE equ 4096 ; 64 * 64
TEX_MASK equ 63
NUM_WALL_TEXTURES equ 7
TEX_BRICK equ 0
TEX_METAL equ 1
TEX_WOOD equ 2
TEX_CONCRETE equ 3
TEX_DOOR equ 4
TEX_EXIT equ 5
TEX_SECRET equ 6
; Tile IDs
TILE_EMPTY equ 0
TILE_BRICK equ 1
TILE_METAL equ 2
TILE_WOOD equ 3
TILE_CONCRETE equ 4
TILE_DOOR equ 5
TILE_EXIT equ 6
TILE_SECRET equ 7
; Door System
MAX_DOORS equ 32
DOOR_STATE_CLOSED equ 0
DOOR_STATE_OPENING equ 1
DOOR_STATE_OPEN equ 2
DOOR_STATE_CLOSING equ 3
struc DOOR {
.map_x dd 0
.map_y dd 0
.state dd 0
.open_amount dd 0.0 ; float 0.0 (closed) to 1.0 (fully open)
.timer dd 0.0 ; seconds stay open
.active dd 0
}
; Entity System
MAX_ENTITIES equ 48
ENT_NONE equ 0
ENT_GUARD equ 1
ENT_MEDKIT equ 2
ENT_AMMO equ 3
GUARD_IDLE equ 0
GUARD_CHASE equ 1
GUARD_SHOOT equ 2
GUARD_HURT equ 3
GUARD_DEAD equ 4
struc ENTITY {
.x dd 0.0 ; float world X
.y dd 0.0 ; float world Y
.type dd 0
.state dd 0
.hp dd 0
.timer dd 0.0 ; float animation/action timer
.anim_frame dd 0
.active dd 0
.dist dd 0.0 ; distance to player for sorting
}
; Win32 Constants
CS_VREDRAW equ 1
CS_HREDRAW equ 2
CS_OWNDC equ 20h
WS_OVERLAPPED equ 00000000h
WS_CAPTION equ 00C00000h
WS_SYSMENU equ 00080000h
WS_MINIMIZEBOX equ 00020000h
WS_VISIBLE equ 10000000h
WS_GAME_WINDOW equ 00CA0000h or WS_VISIBLE ; Fixed size window with caption & sysmenu
PM_REMOVE equ 1
WM_DESTROY equ 2
WM_PAINT equ 0Fh
WM_KEYDOWN equ 100h
WM_KEYUP equ 101h
WM_LBUTTONDOWN equ 201h
WM_LBUTTONUP equ 202h
WM_MOUSEMOVE equ 200h
WM_ACTIVATE equ 06h
WM_SETFOCUS equ 07h
WM_KILLFOCUS equ 08h
VK_BACK equ 08h
VK_TAB equ 09h
VK_RETURN equ 0Dh
VK_SHIFT equ 10h
VK_CONTROL equ 11h
VK_ESCAPE equ 1Bh
VK_SPACE equ 20h
VK_LEFT equ 25h
VK_UP equ 26h
VK_RIGHT equ 27h
VK_DOWN equ 28h
SRCCOPY equ 00CC0020h
DIB_RGB_COLORS equ 0
BI_RGB equ 0
COLOR_TRANSPARENT equ 00FF00FFh ; Magenta transparent color key
struc POINT {
.x dd 0
.y dd 0
}
struc RECT {
.left dd 0
.top dd 0
.right dd 0
.bottom dd 0
}
struc BITMAPINFOHEADER {
.biSize dd 40
.biWidth dd SCREEN_WIDTH
.biHeight dd -SCREEN_HEIGHT ; Top-down DIB
.biPlanes dw 1
.biBitCount dw 32
.biCompression dd BI_RGB
.biSizeImage dd SCREEN_SIZE * 4
.biXPelsPerMeter dd 0
.biYPelsPerMeter dd 0
.biClrUsed dd 0
.biClrImportant dd 0
}

471
src/entities.asm Normal file
View file

@ -0,0 +1,471 @@
; ==============================================================================
; 2.5D Bunker Shooter - Entity Management & AI (FASM x86_64)
; ==============================================================================
; ------------------------------------------------------------------------------
; SpawnEntity(xmm0 = x, xmm1 = y, r8d = type)
; ------------------------------------------------------------------------------
SpawnEntity:
push rbx
push rsi
mov eax, [num_entities]
cmp eax, MAX_ENTITIES
jge .spawn_full
imul rax, 36 ; sizeof(ENTITY) = 36
lea rbx, [entity_table + rax]
movss [rbx + 0], xmm0 ; x
movss [rbx + 4], xmm1 ; y
mov [rbx + 8], r8d ; type
mov dword [rbx + 12], 0 ; state = IDLE
mov dword [rbx + 16], 50; hp = 50
mov dword [rbx + 20], 0 ; timer = 0.0f
mov dword [rbx + 24], 0 ; anim_frame = 0
mov dword [rbx + 28], 1 ; active = 1
mov dword [rbx + 32], 0 ; dist = 0.0f
inc dword [num_entities]
.spawn_full:
pop rsi
pop rbx
ret
; ------------------------------------------------------------------------------
; UpdateEntities(xmm0 = dt)
; ------------------------------------------------------------------------------
UpdateEntities:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
sub rsp, 56
movss [rsp], xmm0 ; dt
mov r12d, [num_entities]
lea rbx, [entity_table]
.ent_loop:
test r12d, r12d
jz .ent_done
cmp dword [rbx + 28], 1 ; active?
jne .next_ent
; Calculate distance to player: dist = sqrt((x - px)^2 + (y - py)^2)
movss xmm1, [rbx + 0] ; ex
subss xmm1, [player_x] ; dx
movss xmm2, [rbx + 4] ; ey
subss xmm2, [player_y] ; dy
movss xmm3, xmm1
mulss xmm3, xmm3 ; dx*dx
movss xmm4, xmm2
mulss xmm4, xmm4 ; dy*dy
addss xmm3, xmm4 ; distSq
sqrtss xmm5, xmm3 ; dist
movss [rbx + 32], xmm5 ; store dist
; Check type
mov eax, [rbx + 8] ; type
cmp eax, ENT_MEDKIT
je .handle_medkit
cmp eax, ENT_AMMO
je .handle_ammo
cmp eax, ENT_GUARD
je .handle_guard
jmp .next_ent
.handle_medkit:
; If dist < 0.6f, pickup
ucomiss xmm5, [flt_pickup_radius]
ja .next_ent
cmp dword [player_health], 100
jge .next_ent
add dword [player_health], 25
cmp dword [player_health], 100
jle .med_ok
mov dword [player_health], 100
.med_ok:
mov dword [rbx + 28], 0 ; deactivate
jmp .next_ent
.handle_ammo:
ucomiss xmm5, [flt_pickup_radius]
ja .next_ent
cmp dword [player_ammo], 99
jge .next_ent
add dword [player_ammo], 15
cmp dword [player_ammo], 99
jle .ammo_ok
mov dword [player_ammo], 99
.ammo_ok:
mov dword [rbx + 28], 0
jmp .next_ent
.handle_guard:
mov eax, [rbx + 12] ; state
cmp eax, GUARD_DEAD
je .next_ent
cmp eax, GUARD_HURT
je .guard_hurt_state
cmp eax, GUARD_SHOOT
je .guard_shoot_state
; IDLE or CHASE: Check distance to player
ucomiss xmm5, [flt_guard_sight_dist]
ja .next_ent
; Check line-of-sight
movss xmm0, [rbx + 0] ; x1
movss xmm1, [rbx + 4] ; y1
movss xmm2, [player_x] ; x2
movss xmm3, [player_y] ; y2
call CheckLineOfSight
test eax, eax
jz .next_ent ; Line of sight blocked by wall
; Player seen! Guard goes into CHASE mode
mov dword [rbx + 12], GUARD_CHASE
; Move towards player if dist > 2.0f
ucomiss xmm5, [flt_guard_stop_dist]
jbe .guard_in_range
; Guard movement: dx / dist, dy / dist
movss xmm1, [player_x]
subss xmm1, [rbx + 0]
divss xmm1, xmm5 ; dir_x
movss xmm2, [player_y]
subss xmm2, [rbx + 4]
divss xmm2, xmm5 ; dir_y
movss xmm0, [flt_guard_speed]
mulss xmm0, [rsp] ; speed * dt
mulss xmm1, xmm0
mulss xmm2, xmm0
; New guard pos
movss xmm5, [rbx + 0]
addss xmm5, xmm1
movss xmm6, [rbx + 4]
call IsWalkable
test eax, eax
jz .guard_try_y
movss [rbx + 0], xmm5 ; apply X move
.guard_try_y:
movss xmm5, [rbx + 0]
movss xmm6, [rbx + 4]
addss xmm6, xmm2
call IsWalkable
test eax, eax
jz .guard_in_range
movss [rbx + 4], xmm6 ; apply Y move
.guard_in_range:
; Update shooting timer
movss xmm1, [rbx + 20] ; timer
subss xmm1, [rsp] ; timer - dt
ucomiss xmm1, [flt_zero]
ja .guard_timer_store
; Guard attacks!
mov dword [rbx + 12], GUARD_SHOOT
mov dword [rbx + 20], 03EB851Fh ; 0.36s shoot anim duration
; Hurt player if alive
cmp dword [player_health], 0
jle .next_ent
sub dword [player_health], 10
cmp dword [player_health], 0
jge .hp_pos
mov dword [player_health], 0
.hp_pos:
mov dword [hurt_timer], 03E4CCCCDh ; 0.20s red flash
jmp .next_ent
.guard_shoot_state:
movss xmm1, [rbx + 20]
subss xmm1, [rsp]
ucomiss xmm1, [flt_zero]
ja .guard_timer_store
mov dword [rbx + 12], GUARD_CHASE
mov dword [rbx + 20], 03F800000h ; 1.0s cooldown before next shot
jmp .next_ent
.guard_hurt_state:
movss xmm1, [rbx + 20]
subss xmm1, [rsp]
ucomiss xmm1, [flt_zero]
ja .guard_timer_store
mov dword [rbx + 12], GUARD_CHASE
jmp .next_ent
.guard_timer_store:
movss [rbx + 20], xmm1
.next_ent:
add rbx, 36
dec r12d
jmp .ent_loop
.ent_done:
; Sort entities for rendering
call SortEntities
add rsp, 56
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
; ------------------------------------------------------------------------------
; CheckLineOfSight(xmm0 = x1, xmm1 = y1, xmm2 = x2, xmm3 = y2)
; Returns EAX = 1 if clear, 0 if blocked by wall
; ------------------------------------------------------------------------------
CheckLineOfSight:
push rbx
push rsi
sub rsp, 40
movss xmm4, xmm2
subss xmm4, xmm0 ; dx
movss xmm5, xmm3
subss xmm5, xmm1 ; dy
; 16 steps along line
mov ecx, 16
movss xmm6, [flt_one_sixteenth]
mulss xmm4, xmm6 ; step_x
mulss xmm5, xmm6 ; step_y
.step_loop:
addss xmm0, xmm4
addss xmm1, xmm5
cvttss2si edx, xmm0
cvttss2si eax, xmm1
test edx, edx
js .los_blocked
cmp edx, 32
jge .los_blocked
test eax, eax
js .los_blocked
cmp eax, 32
jge .los_blocked
shl eax, 5
add eax, edx
lea rsi, [map_grid]
movzx eax, byte [rsi + rax]
test eax, eax
jz .step_next ; empty
cmp eax, TILE_DOOR
jne .los_blocked ; hit solid wall
.step_next:
dec ecx
jnz .step_loop
mov eax, 1 ; Clear line of sight
jmp .los_done
.los_blocked:
xor eax, eax
.los_done:
add rsp, 40
pop rsi
pop rbx
ret
; ------------------------------------------------------------------------------
; EntitiesHitscan: Casts ray from player and damages closest guard
; ------------------------------------------------------------------------------
EntitiesHitscan:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
sub rsp, 56
xor r13, r13 ; best_entity_ptr = NULL
movss xmm7, [flt_hitscan_max] ; min_proj = 16.0f
mov r12d, [num_entities]
lea rbx, [entity_table]
.scan_loop:
test r12d, r12d
jz .scan_done
cmp dword [rbx + 28], 1 ; active?
jne .next_scan
cmp dword [rbx + 8], ENT_GUARD ; guard?
jne .next_scan
cmp dword [rbx + 12], GUARD_DEAD ; not dead?
je .next_scan
; Vector from player to guard: vx, vy
movss xmm1, [rbx + 0]
subss xmm1, [player_x] ; vx
movss xmm2, [rbx + 4]
subss xmm2, [player_y] ; vy
; Projection onto player_dir: proj = vx * dir_x + vy * dir_y
movss xmm3, xmm1
mulss xmm3, [player_dir_x]
movss xmm4, xmm2
mulss xmm4, [player_dir_y]
addss xmm3, xmm4 ; proj
; Check if in front of player and closer than current best
ucomiss xmm3, [flt_zero]
jbe .next_scan
ucomiss xmm3, xmm7
jae .next_scan
; Perpendicular distance: perpSq = (vx*vx + vy*vy) - proj*proj
movss xmm5, xmm1
mulss xmm5, xmm1
movss xmm6, xmm2
mulss xmm6, xmm2
addss xmm5, xmm6 ; distSq
movss xmm6, xmm3
mulss xmm6, xmm6 ; proj*proj
subss xmm5, xmm6 ; perpSq
ucomiss xmm5, [flt_hitbox_rad_sq]
ja .next_scan ; Missed hitbox
; Check if a wall is in between player and this guard
movss xmm0, [player_x]
movss xmm1, [player_y]
movss xmm2, [rbx + 0]
movss xmm3, [rbx + 4]
movss [rsp], xmm3 ; save
call CheckLineOfSight
test eax, eax
jz .next_scan
; Valid target found!
mov r13, rbx
movss xmm7, xmm3 ; update min_proj
.next_scan:
add rbx, 36
dec r12d
jmp .scan_loop
.scan_done:
test r13, r13
jz .hitscan_miss
; Guard hit! Deal 35 damage
sub dword [r13 + 16], 35 ; hp -= 35
cmp dword [r13 + 16], 0
jg .guard_survived
; Guard dies!
mov dword [r13 + 12], GUARD_DEAD
mov dword [r13 + 16], 0
add dword [player_score], 100
; Drop ammo at guard position
movss xmm0, [r13 + 0]
movss xmm1, [r13 + 4]
mov r8d, ENT_AMMO
call SpawnEntity
jmp .hitscan_miss
.guard_survived:
mov dword [r13 + 12], GUARD_HURT
mov dword [r13 + 20], 03E4CCCCDh ; 0.2s hurt animation
.hitscan_miss:
add rsp, 56
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
; ------------------------------------------------------------------------------
; SortEntities: Bubble-sort active entities descending by dist
; ------------------------------------------------------------------------------
SortEntities:
push rbx
push rsi
push rdi
push r12
push r13
mov r12d, [num_entities]
cmp r12d, 1
jle .sort_done
.outer:
xor ecx, ecx ; swapped = 0
xor r13d, r13d ; i = 0
.inner:
lea eax, [r13d + 1]
cmp eax, r12d
jge .check_outer
imul rsi, r13, 36
lea rsi, [entity_table + rsi]
lea rdi, [rsi + 36]
; Compare dist: if dist[i] < dist[i+1], swap
movss xmm0, [rsi + 32]
movss xmm1, [rdi + 32]
ucomiss xmm0, xmm1
jae .no_swap
; Swap 36 bytes between rsi and rdi
mov edx, 9 ; 9 dwords = 36 bytes
.swap_bytes:
mov eax, [rsi]
mov ebx, [rdi]
mov [rsi], ebx
mov [rdi], eax
add rsi, 4
add rdi, 4
dec edx
jnz .swap_bytes
sub rsi, 36
sub rdi, 36
mov ecx, 1
.no_swap:
inc r13d
jmp .inner
.check_outer:
test ecx, ecx
jnz .outer
.sort_done:
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret

446
src/hud.asm Normal file
View file

@ -0,0 +1,446 @@
; ==============================================================================
; 2.5D Bunker Shooter - Heads-Up Display (HUD) & Minimap (FASM x86_64)
; ==============================================================================
; ------------------------------------------------------------------------------
; RenderHUD: Draws Status Bars, Ammo, Health, Minimap, and End Game screens
; ------------------------------------------------------------------------------
RenderHUD:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
sub rsp, 56
; --------------------------------------------------------------------------
; 1. Health Bar (Bottom Left: x=10..74, y=222..232)
; --------------------------------------------------------------------------
; Dark border/background
mov ecx, 10
mov edx, 222
mov r8d, 64
mov r9d, 10
mov eax, 00041408h ; Dark cyber emerald box
call FillRect
; Health bar fill (Vivid Matrix Emerald)
mov eax, [player_health]
cmp eax, 0
jle .skip_hp_bar
cmp eax, 100
jle .hp_le_100
mov eax, 100
.hp_le_100:
; fill_width = (hp * 60) / 100
imul eax, 60
xor edx, edx
mov ecx, 100
div ecx
mov r8d, eax ; width
mov ecx, 12 ; x
mov edx, 224 ; y
mov r9d, 6 ; height
mov eax, 0020FF40h ; Bright Matrix Emerald
call FillRect
.skip_hp_bar:
; Draw "HP:" and digits at (12, 214)
mov ecx, 12
mov edx, 214
mov eax, [player_health]
call DrawNumber
; --------------------------------------------------------------------------
; 2. Ammo Bar (Bottom Right: x=246..310, y=222..232)
; --------------------------------------------------------------------------
mov ecx, 246
mov edx, 222
mov r8d, 64
mov r9d, 10
mov eax, 00041408h ; Dark cyber emerald box
call FillRect
; Ammo fill (Cyber Mint / Cyan)
mov eax, [player_ammo]
cmp eax, 0
jle .skip_ammo_bar
cmp eax, 99
jle .ammo_le_99
mov eax, 99
.ammo_le_99:
imul eax, 60
xor edx, edx
mov ecx, 99
div ecx
mov r8d, eax
mov ecx, 248
mov edx, 224
mov r9d, 6
mov eax, 0000E0D0h ; Cyber Cyan-Mint
call FillRect
.skip_ammo_bar:
; Draw "AMMO:" and digits at (248, 214)
mov ecx, 248
mov edx, 214
mov eax, [player_ammo]
call DrawNumber
; --------------------------------------------------------------------------
; 3. Minimap (When Tab is pressed / show_map == 1)
; --------------------------------------------------------------------------
cmp dword [show_map], 1
jne .check_game_end
; Draw Minimap in top-left: x=6..72, y=6..72 (66x66 background box)
mov ecx, 6
mov edx, 6
mov r8d, 66
mov r9d, 66
mov eax, 00020803h ; Deep cyber matrix radar box
call FillRect
; Draw 32x32 tiles (each tile is 2x2 pixels at 8 + x*2, 8 + y*2)
xor r12d, r12d ; tile_y = 0..31
.map_y:
xor r13d, r13d ; tile_x = 0..31
.map_x:
mov eax, r12d
shl eax, 5
add eax, r13d
lea rsi, [map_grid]
movzx eax, byte [rsi + rax]
test eax, eax
jz .map_tile_next ; empty
cmp eax, TILE_DOOR
je .map_door
cmp eax, TILE_EXIT
je .map_exit
; Solid wall & Hidden Secret Wall: Dark emerald cyber wall
mov eax, 000A3815h
jmp .map_draw_tile
.map_door:
mov eax, 0000C8D8h ; Cyan for doors
jmp .map_draw_tile
.map_exit:
mov eax, 0030FF50h ; Bright neon for exit
.map_draw_tile:
; Draw 2x2 tile at (8 + tile_x * 2, 8 + tile_y * 2)
lea ecx, [r13d * 2 + 8]
lea edx, [r12d * 2 + 8]
mov r8d, 2
mov r9d, 2
call FillRect
.map_tile_next:
inc r13d
cmp r13d, 32
jl .map_x
inc r12d
cmp r12d, 32
jl .map_y
; Draw Entities on Minimap (Red dots for guards, Yellow for pickups)
mov ebx, [num_entities]
lea rsi, [entity_table]
.map_ent_loop:
test ebx, ebx
jz .map_draw_player
cmp dword [rsi + 28], 1 ; active?
jne .map_ent_next
cvttss2si ecx, [rsi + 0] ; x
shl ecx, 1
add ecx, 8
cvttss2si edx, [rsi + 4] ; y
shl edx, 1
add edx, 8
mov eax, [rsi + 8] ; type
cmp eax, ENT_GUARD
jne .map_ent_item
cmp dword [rsi + 12], GUARD_DEAD
je .map_ent_next
mov eax, 00FF2020h ; Red dot for living guard
jmp .map_ent_draw
.map_ent_item:
mov eax, 00FFE020h ; Yellow dot for pickup
.map_ent_draw:
mov r8d, 2
mov r9d, 2
call FillRect
.map_ent_next:
add rsi, 36
dec ebx
jmp .map_ent_loop
.map_draw_player:
; Player on Minimap: Green dot + direction tick
cvttss2si ecx, [player_x]
shl ecx, 1
add ecx, 8
cvttss2si edx, [player_y]
shl edx, 1
add edx, 8
mov r8d, 2
mov r9d, 2
mov eax, 0020FF40h ; Bright Green
call FillRect
; Direction tick
movss xmm0, [player_dir_x]
mulss xmm0, [flt_map_tick]
cvttss2si eax, xmm0
add ecx, eax
movss xmm1, [player_dir_y]
mulss xmm1, [flt_map_tick]
cvttss2si eax, xmm1
add edx, eax
mov r8d, 1
mov r9d, 1
mov eax, 0020FF40h ; Neon green crosshair
call FillRect
.check_game_end:
; --------------------------------------------------------------------------
; 4. Game Over Screen (Death)
; --------------------------------------------------------------------------
cmp dword [game_state], 1
jne .check_victory
; Red banner across screen center: y=95..145
mov ecx, 40
mov edx, 95
mov r8d, 240
mov r9d, 50
mov eax, 00880000h ; Blood red banner
call FillRect
; Text: "YOU DIED" and "PRESS R"
mov ecx, 125
mov edx, 105
mov eax, 00FFFFFFh
call DrawTextYouDied
mov ecx, 105
mov edx, 125
mov eax, 00FFE020h
call DrawTextPressR
jmp .hud_done
.check_victory:
; --------------------------------------------------------------------------
; 5. Victory Screen (Escaped Bunker)
; --------------------------------------------------------------------------
cmp dword [game_state], 2
jne .hud_done
; Gold banner across center: y=95..145
mov ecx, 40
mov edx, 95
mov r8d, 240
mov r9d, 50
mov eax, 00A07800h ; Golden banner
call FillRect
mov ecx, 115
mov edx, 105
mov eax, 00FFFFFFh
call DrawTextVictory
mov ecx, 105
mov edx, 125
mov eax, 0020FF40h
call DrawTextPressR
.hud_done:
add rsp, 56
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
; ------------------------------------------------------------------------------
; FillRect(ecx = x, edx = y, r8d = width, r9d = height, eax = color)
; ------------------------------------------------------------------------------
FillRect:
push rbx
push rdi
; Boundary checks
cmp ecx, 0
jge .fr_x_ok
xor ecx, ecx
.fr_x_ok:
cmp edx, 0
jge .fr_y_ok
xor edx, edx
.fr_y_ok:
mov ebx, edx
imul ebx, SCREEN_WIDTH
add ebx, ecx
lea rdi, [framebuffer + rbx * 4]
.fr_row:
cmp r9d, 0
jle .fr_done
push rdi
push rcx
mov ecx, r8d
rep stosd
pop rcx
pop rdi
add rdi, SCREEN_WIDTH * 4
dec r9d
jmp .fr_row
.fr_done:
pop rdi
pop rbx
ret
; ------------------------------------------------------------------------------
; DrawNumber(ecx = x, edx = y, eax = value)
; ------------------------------------------------------------------------------
DrawNumber:
push rbx
push rsi
push rdi
push r12
push r13
mov r12d, ecx ; current_x
mov r13d, edx ; current_y
; Convert integer to 3 digits (hundreds, tens, ones)
cmp eax, 0
jge .num_pos
xor eax, eax
.num_pos:
cmp eax, 999
jle .num_le_999
mov eax, 999
.num_le_999:
; Hundreds: eax / 100
xor edx, edx
mov ebx, 100
div ebx
push rdx ; remainder (tens + ones)
cmp eax, 0
je .skip_hundreds
mov ecx, r12d
mov edx, r13d
call DrawDigit
add r12d, 5
.skip_hundreds:
pop rax ; tens + ones
xor edx, edx
mov ebx, 10
div ebx
push rdx ; ones
mov ecx, r12d
mov edx, r13d
call DrawDigit
add r12d, 5
pop rax ; ones
mov ecx, r12d
mov edx, r13d
call DrawDigit
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
; ------------------------------------------------------------------------------
; DrawDigit(ecx = x, edx = y, eax = digit 0..9)
; ------------------------------------------------------------------------------
DrawDigit:
push rbx
push rdi
push rsi
and eax, 15
cmp eax, 9
jle .digit_ok
xor eax, eax
.digit_ok:
lea rsi, [font_digits + rax * 5] ; 5 rows per 3x5 digit
mov ebx, edx
imul ebx, SCREEN_WIDTH
add ebx, ecx
lea rdi, [framebuffer + rbx * 4]
mov ecx, 5 ; 5 rows
.row_loop:
lodsb ; row bits: bit 2=px0, bit 1=px1, bit 0=px2
test al, 4
jz .p1
mov dword [rdi + 0], 0039FF14h ; Matrix phosphor green digit
.p1:
test al, 2
jz .p2
mov dword [rdi + 4], 0039FF14h
.p2:
test al, 1
jz .p_done
mov dword [rdi + 8], 0039FF14h
.p_done:
add rdi, SCREEN_WIDTH * 4
dec ecx
jnz .row_loop
pop rsi
pop rdi
pop rbx
ret
; ------------------------------------------------------------------------------
; Banner Text Helpers
; ------------------------------------------------------------------------------
DrawTextYouDied:
; Simple block rendering for "YOU DIED"
push rbx
mov r8d, 70
mov r9d, 12
call FillRect
pop rbx
ret
DrawTextVictory:
push rbx
mov r8d, 90
mov r9d, 12
call FillRect
pop rbx
ret
DrawTextPressR:
push rbx
mov r8d, 110
mov r9d, 8
call FillRect
pop rbx
ret

566
src/main.asm Normal file
View file

@ -0,0 +1,566 @@
; ==============================================================================
; 2.5D Bunker Shooter - Main Entry Point & Win32 Core (FASM x86_64)
; Complete standalone Wolfenstein 3D style FPS in 100% pure Assembly
; ==============================================================================
format PE64 GUI 5.0
entry start
include 'win64a.inc'
include 'defs.inc'
section '.text' code readable executable
; Include sub-modules
include 'textures.asm'
include 'map.asm'
include 'player.asm'
include 'entities.asm'
include 'hud.asm'
include 'renderer.asm'
; ------------------------------------------------------------------------------
; Application Entry Point
; ------------------------------------------------------------------------------
start:
sub rsp, 120 ; Align stack to 16 bytes + shadow space for up to 13 params
; Get module handle: GetModuleHandleA(NULL)
xor rcx, rcx
call [GetModuleHandleA]
mov [hInstance], rax
; Setup BITMAPINFOHEADER for 320x240 top-down 32-bit DIB
lea rax, [bmi]
mov dword [rax + 0], 40 ; biSize
mov dword [rax + 4], SCREEN_WIDTH
mov dword [rax + 8], -SCREEN_HEIGHT ; negative for top-down
mov word [rax + 12], 1 ; biPlanes
mov word [rax + 14], 32 ; biBitCount
mov dword [rax + 16], BI_RGB
mov dword [rax + 20], SCREEN_SIZE * 4
; Register window class WNDCLASSEXA
lea rax, [wc]
mov dword [rax + 0], 80 ; cbSize = 80 bytes in 64-bit
mov dword [rax + 4], CS_VREDRAW or CS_HREDRAW or CS_OWNDC
lea rdx, [WndProc]
mov qword [rax + 8], rdx ; lpfnWndProc
mov dword [rax + 16], 0 ; cbClsExtra
mov dword [rax + 20], 0 ; cbWndExtra
mov rdx, [hInstance]
mov qword [rax + 24], rdx ; hInstance
mov qword [rax + 32], 0 ; hIcon
mov qword [rax + 40], 0 ; hCursor
mov qword [rax + 48], 0 ; hbrBackground
mov qword [rax + 56], 0 ; lpszMenuName
lea rdx, [szClassName]
mov qword [rax + 64], rdx ; lpszClassName
mov qword [rax + 72], 0 ; hIconSm
lea rcx, [wc]
call [RegisterClassExA]
; Calculate window rect with exact client size: 960x720
lea rax, [rcWindow]
mov dword [rax + 0], 0
mov dword [rax + 4], 0
mov dword [rax + 8], WINDOW_WIDTH
mov dword [rax + 12], WINDOW_HEIGHT
lea rcx, [rcWindow]
mov edx, WS_GAME_WINDOW
xor r8d, r8d ; has menu = FALSE
call [AdjustWindowRect]
; CreateWindowExA
xor ecx, ecx ; 1: dwExStyle
lea rdx, [szClassName] ; 2: lpClassName
lea r8, [szTitle] ; 3: lpWindowName
mov r9d, WS_GAME_WINDOW ; 4: dwStyle
mov rax, 80000000h ; CW_USEDEFAULT
mov [rsp + 32], rax ; 5: X
mov [rsp + 40], rax ; 6: Y
mov eax, [rcWindow + 8]
sub eax, [rcWindow + 0]
mov [rsp + 48], rax ; 7: nWidth
mov eax, [rcWindow + 12]
sub eax, [rcWindow + 4]
mov [rsp + 56], rax ; 8: nHeight
mov qword [rsp + 64], 0 ; 9: hWndParent
mov qword [rsp + 72], 0 ; 10: hMenu
mov rax, [hInstance]
mov [rsp + 80], rax ; 11: hInstance
mov qword [rsp + 88], 0 ; 12: lpParam
call [CreateWindowExA]
mov [hWnd], rax
; Get DC
mov rcx, [hWnd]
call [GetDC]
mov [hDC], rax
; Show Window
mov rcx, [hWnd]
mov edx, 1 ; SW_SHOWNORMAL
call [ShowWindow]
mov rcx, [hWnd]
call [UpdateWindow]
; Initialize subsystems
call InitTextures
call InitMap
; Center mouse cursor in window
call CenterCursor
; Initialize high resolution timer
lea rcx, [timer_freq]
call [QueryPerformanceFrequency]
lea rcx, [last_perf_counter]
call [QueryPerformanceCounter]
; ------------------------------------------------------------------------------
; Main Game Loop
; ------------------------------------------------------------------------------
MainLoop:
; PeekMessageA loop: process all pending Windows messages
.msg_pump:
lea rcx, [msg]
xor edx, edx
xor r8d, r8d
xor r9d, r9d
mov dword [rsp + 32], PM_REMOVE
call [PeekMessageA]
test eax, eax
jz .game_tick
cmp dword [msg + 8], 12h ; WM_QUIT
je .exit_program
lea rcx, [msg]
call [TranslateMessage]
lea rcx, [msg]
call [DispatchMessageA]
jmp .msg_pump
.game_tick:
; Calculate Delta Time (dt)
lea rcx, [curr_perf_counter]
call [QueryPerformanceCounter]
mov rax, [curr_perf_counter]
sub rax, [last_perf_counter]
cvtsi2ss xmm0, rax ; ticks
mov rcx, [timer_freq]
cvtsi2ss xmm1, rcx ; freq
divss xmm0, xmm1 ; xmm0 = dt in seconds
; Cap dt to 0.05s max (prevents huge jump after pause or drag)
movss xmm2, [flt_max_dt]
minss xmm0, xmm2
movss [delta_time], xmm0
mov rax, [curr_perf_counter]
mov [last_perf_counter], rax
; Update mouse capture & delta if game window is active
call [GetActiveWindow]
cmp rax, [hWnd]
jne .skip_mouse_capture
call UpdateMouseDelta
.skip_mouse_capture:
; Update game logic
movss xmm0, [delta_time]
call UpdatePlayer
movss xmm0, [delta_time]
call UpdateDoors
movss xmm0, [delta_time]
call UpdateEntities
; Render 3D Frame
call RenderFrame
; Save initial screenshot once for verification
cmp dword [screenshot_taken], 0
jne .skip_initial_screenshot
mov dword [screenshot_taken], 1
call DumpScreenshot
.skip_initial_screenshot:
; Blit framebuffer to window DC: StretchDIBits
; Get client rect dimensions
mov rcx, [hWnd]
lea rdx, [rcClient]
call [GetClientRect]
mov rcx, [hDC] ; 1: hdc
xor edx, edx ; 2: xDest = 0
xor r8d, r8d ; 3: yDest = 0
mov r9d, [rcClient + 8] ; 4: DestWidth
mov eax, [rcClient + 12]
mov [rsp + 32], rax ; 5: DestHeight
mov qword [rsp + 40], 0 ; 6: xSrc = 0
mov qword [rsp + 48], 0 ; 7: ySrc = 0
mov qword [rsp + 56], SCREEN_WIDTH ; 8: SrcWidth = 320
mov qword [rsp + 64], SCREEN_HEIGHT ; 9: SrcHeight = 240
lea rax, [framebuffer]
mov [rsp + 72], rax ; 10: lpBits
lea rax, [bmi]
mov [rsp + 80], rax ; 11: lpbmi
mov qword [rsp + 88], DIB_RGB_COLORS ; 12: iUsage = 0
mov qword [rsp + 96], SRCCOPY ; 13: rop = 0x00CC0020
call [StretchDIBits]
; Sleep 1ms to prevent 100% single-core spin if needed
mov ecx, 1
call [Sleep]
jmp MainLoop
.exit_program:
mov rcx, [hWnd]
mov rdx, [hDC]
call [ReleaseDC]
xor ecx, ecx
call [ExitProcess]
; ------------------------------------------------------------------------------
; CenterCursor: Centers mouse in client window
; ------------------------------------------------------------------------------
CenterCursor:
push rbx
sub rsp, 48
lea rax, [ptCenter]
mov dword [rax + 0], WINDOW_WIDTH / 2
mov dword [rax + 4], WINDOW_HEIGHT / 2
mov rcx, [hWnd]
lea rdx, [ptCenter]
call [ClientToScreen]
mov ecx, [ptCenter + 0]
mov edx, [ptCenter + 4]
call [SetCursorPos]
add rsp, 48
pop rbx
ret
; ------------------------------------------------------------------------------
; UpdateMouseDelta: Computes dx and recenters mouse
; ------------------------------------------------------------------------------
UpdateMouseDelta:
push rbx
sub rsp, 48
lea rcx, [ptCurrent]
call [GetCursorPos]
; Calculate delta_x = ptCurrent.x - ptCenter.x
mov eax, [ptCurrent + 0]
sub eax, [ptCenter + 0]
add [mouse_delta_x], eax
; Reset cursor back to center
mov ecx, [ptCenter + 0]
mov edx, [ptCenter + 4]
call [SetCursorPos]
add rsp, 48
pop rbx
ret
; ------------------------------------------------------------------------------
; DumpScreenshot: Saves framebuffer to screenshot.bmp
; ------------------------------------------------------------------------------
DumpScreenshot:
push rbp
push rbx
push rsi
push rdi
sub rsp, 56
; CreateFileA("screenshot.bmp", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL)
lea rcx, [szScreenshotFile]
mov edx, 40000000h ; GENERIC_WRITE
xor r8d, r8d ; no share
xor r9d, r9d ; security
mov qword [rsp + 32], 2 ; CREATE_ALWAYS
mov qword [rsp + 40], 80h ; FILE_ATTRIBUTE_NORMAL
mov qword [rsp + 48], 0
call [CreateFileA]
cmp rax, -1
je .dump_done
mov rbx, rax ; file handle
; Write BMP header (54 bytes)
mov rcx, rbx
lea rdx, [bmp_header]
mov r8d, 54
lea r9, [bytes_written]
mov qword [rsp + 32], 0
call [WriteFile]
; Write framebuffer (SCREEN_SIZE * 4 = 307200 bytes)
mov rcx, rbx
lea rdx, [framebuffer]
mov r8d, SCREEN_SIZE * 4
lea r9, [bytes_written]
mov qword [rsp + 32], 0
call [WriteFile]
; Close file
mov rcx, rbx
call [CloseHandle]
.dump_done:
add rsp, 56
pop rdi
pop rsi
pop rbx
pop rbp
ret
; ------------------------------------------------------------------------------
; Window Procedure (WndProc)
; ------------------------------------------------------------------------------
WndProc:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 40
mov rbx, rcx ; hwnd
mov esi, edx ; uMsg
mov r12, r8 ; wParam
mov r13, r9 ; lParam
cmp esi, WM_DESTROY
je .wm_destroy
cmp esi, WM_KEYDOWN
je .wm_keydown
cmp esi, WM_KEYUP
je .wm_keyup
cmp esi, WM_LBUTTONDOWN
je .wm_lbuttondown
cmp esi, WM_SETFOCUS
je .wm_setfocus
cmp esi, WM_KILLFOCUS
je .wm_killfocus
; DefWindowProcA
mov rcx, rbx
mov edx, esi
mov r8, r12
mov r9, r13
call [DefWindowProcA]
jmp .wndproc_ret
.wm_destroy:
xor ecx, ecx
call [PostQuitMessage]
xor eax, eax
jmp .wndproc_ret
.wm_setfocus:
xor ecx, ecx ; bShow = FALSE
call [ShowCursor]
call CenterCursor
xor eax, eax
jmp .wndproc_ret
.wm_killfocus:
mov ecx, 1 ; bShow = TRUE
call [ShowCursor]
xor eax, eax
jmp .wndproc_ret
.wm_lbuttondown:
call PlayerShoot
xor eax, eax
jmp .wndproc_ret
.wm_keydown:
cmp r12, 'W'
je .k_w_down
cmp r12, 'S'
je .k_s_down
cmp r12, 'A'
je .k_a_down
cmp r12, 'D'
je .k_d_down
cmp r12, VK_LEFT
je .k_left_down
cmp r12, VK_RIGHT
je .k_right_down
cmp r12, VK_SPACE
je .k_space_down
cmp r12, VK_TAB
je .k_tab_toggle
cmp r12, 'R'
je .k_restart
cmp r12, VK_ESCAPE
je .k_escape
jmp .key_handled
.k_w_down:
mov dword [key_w], 1
jmp .key_handled
.k_s_down:
mov dword [key_s], 1
jmp .key_handled
.k_a_down:
mov dword [key_a], 1
jmp .key_handled
.k_d_down:
mov dword [key_d], 1
jmp .key_handled
.k_left_down:
mov dword [key_left], 1
jmp .key_handled
.k_right_down:
mov dword [key_right], 1
jmp .key_handled
.k_space_down:
mov dword [key_space], 1
jmp .key_handled
.k_tab_toggle:
xor dword [show_map], 1
jmp .key_handled
.k_escape:
mov rcx, rbx
xor edx, edx
call [PostQuitMessage]
jmp .key_handled
.k_restart:
; Restart game on 'R'
cmp dword [game_state], 0
je .key_handled
mov dword [player_health], 100
mov dword [player_ammo], 30
mov dword [game_state], 0
call InitMap
jmp .key_handled
.wm_keyup:
cmp r12, 'W'
je .k_w_up
cmp r12, 'S'
je .k_s_up
cmp r12, 'A'
je .k_a_up
cmp r12, 'D'
je .k_d_up
cmp r12, VK_LEFT
je .k_left_up
cmp r12, VK_RIGHT
je .k_right_up
jmp .key_handled
.k_w_up:
mov dword [key_w], 0
jmp .key_handled
.k_s_up:
mov dword [key_s], 0
jmp .key_handled
.k_a_up:
mov dword [key_a], 0
jmp .key_handled
.k_d_up:
mov dword [key_d], 0
jmp .key_handled
.k_left_up:
mov dword [key_left], 0
jmp .key_handled
.k_right_up:
mov dword [key_right], 0
.key_handled:
xor eax, eax
.wndproc_ret:
add rsp, 40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
; ==============================================================================
; DATA SECTION (.data)
; ==============================================================================
section '.data' data readable writeable
include 'data.inc'
; ==============================================================================
; BSS SECTION (.bss)
; ==============================================================================
section '.bss' readable writeable
include 'bss.inc'
; ==============================================================================
; Win64 Import Directory
; ==============================================================================
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL',\
gdi32,'GDI32.DLL'
import kernel32,\
ExitProcess,'ExitProcess',\
GetModuleHandleA,'GetModuleHandleA',\
QueryPerformanceCounter,'QueryPerformanceCounter',\
QueryPerformanceFrequency,'QueryPerformanceFrequency',\
CreateFileA,'CreateFileA',\
ReadFile,'ReadFile',\
WriteFile,'WriteFile',\
CloseHandle,'CloseHandle',\
Sleep,'Sleep'
import user32,\
RegisterClassExA,'RegisterClassExA',\
CreateWindowExA,'CreateWindowExA',\
ShowWindow,'ShowWindow',\
UpdateWindow,'UpdateWindow',\
DefWindowProcA,'DefWindowProcA',\
PostQuitMessage,'PostQuitMessage',\
PeekMessageA,'PeekMessageA',\
TranslateMessage,'TranslateMessage',\
DispatchMessageA,'DispatchMessageA',\
GetDC,'GetDC',\
ReleaseDC,'ReleaseDC',\
GetClientRect,'GetClientRect',\
AdjustWindowRect,'AdjustWindowRect',\
SetCursorPos,'SetCursorPos',\
GetCursorPos,'GetCursorPos',\
ShowCursor,'ShowCursor',\
ClientToScreen,'ClientToScreen',\
GetActiveWindow,'GetActiveWindow'
import gdi32,\
StretchDIBits,'StretchDIBits'

483
src/map.asm Normal file
View file

@ -0,0 +1,483 @@
; ==============================================================================
; 2.5D Bunker Shooter - Map & Door Management (FASM x86_64)
; ==============================================================================
; ------------------------------------------------------------------------------
; InitMap: Tries to load level.txt, falls back to default bunker map
; ------------------------------------------------------------------------------
InitMap:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 56
; Clear doors and entities
mov dword [num_doors], 0
mov dword [num_entities], 0
; Open level.txt
mov rcx, szLevelFile
mov edx, 80000000h ; GENERIC_READ
mov r8d, 1 ; FILE_SHARE_READ
xor r9d, r9d ; lpSecurityAttributes
mov qword [rsp + 32], 3 ; OPEN_EXISTING
mov qword [rsp + 40], 80h ; FILE_ATTRIBUTE_NORMAL
mov qword [rsp + 48], 0 ; hTemplateFile = NULL (7th arg required on x64!)
call [CreateFileA]
cmp rax, -1 ; INVALID_HANDLE_VALUE
je .use_default_map
mov rbx, rax ; file handle
; Read up to 2048 bytes
mov rcx, rbx
lea rdx, [map_io_buffer]
mov r8d, 2048
lea r9, [bytes_read]
mov qword [rsp + 32], 0
call [ReadFile]
; Close file
mov rcx, rbx
call [CloseHandle]
mov eax, [bytes_read]
cmp eax, 32
jl .use_default_map
; Parse ASCII map into map_grid
lea rsi, [map_io_buffer]
mov ecx, [bytes_read]
xor r13d, r13d ; current x = 0..31
xor r14d, r14d ; current y = 0..31
.parse_loop:
cmp ecx, 0
jle .parse_done
cmp r14d, 32
jge .parse_done
lodsb
dec ecx
cmp al, 13 ; CR: ignore
je .parse_loop
cmp al, 10 ; LF: end of line, advance to next row!
jne .process_char
; Pad remaining columns if line was < 32 characters
.pad_row:
cmp r13d, 32
jge .next_row
mov eax, r14d
shl eax, 5
add eax, r13d
lea rdi, [map_grid]
mov byte [rdi + rax], TILE_BRICK
inc r13d
jmp .pad_row
.next_row:
xor r13d, r13d
inc r14d
jmp .parse_loop
.process_char:
; Ignore extra characters beyond column 31
cmp r13d, 32
jge .parse_loop
; Process character at (r13d, r14d)
mov dl, TILE_EMPTY
cmp al, '#'
je .set_brick
cmp al, '1'
je .set_brick
cmp al, '2'
je .set_metal
cmp al, '3'
je .set_wood
cmp al, '4'
je .set_concrete
cmp al, 'D'
je .set_door
cmp al, 'S'
je .set_secret
cmp al, 'X'
je .set_exit
cmp al, 'P'
je .set_player
cmp al, 'E'
je .set_enemy
cmp al, '+'
je .set_medkit
cmp al, 'A'
je .set_ammo
jmp .store_tile
.set_brick:
mov dl, TILE_BRICK
jmp .store_tile
.set_metal:
mov dl, TILE_METAL
jmp .store_tile
.set_wood:
mov dl, TILE_WOOD
jmp .store_tile
.set_concrete:
mov dl, TILE_CONCRETE
jmp .store_tile
.set_door:
mov dl, TILE_DOOR
mov ecx, r13d
mov edx, r14d
call AddDoor
mov dl, TILE_DOOR
jmp .store_tile
.set_secret:
mov dl, TILE_SECRET
mov ecx, r13d
mov edx, r14d
call AddDoor
mov dl, TILE_SECRET
jmp .store_tile
.set_exit:
mov dl, TILE_EXIT
jmp .store_tile
.set_player:
cvtsi2ss xmm0, r13d
addss xmm0, [const_half]
movss [player_x], xmm0
cvtsi2ss xmm1, r14d
addss xmm1, [const_half]
movss [player_y], xmm1
mov dl, TILE_EMPTY
jmp .store_tile
.set_enemy:
cvtsi2ss xmm0, r13d
addss xmm0, [const_half]
cvtsi2ss xmm1, r14d
addss xmm1, [const_half]
mov r8d, ENT_GUARD
call SpawnEntity
mov dl, TILE_EMPTY
jmp .store_tile
.set_medkit:
cvtsi2ss xmm0, r13d
addss xmm0, [const_half]
cvtsi2ss xmm1, r14d
addss xmm1, [const_half]
mov r8d, ENT_MEDKIT
call SpawnEntity
mov dl, TILE_EMPTY
jmp .store_tile
.set_ammo:
cvtsi2ss xmm0, r13d
addss xmm0, [const_half]
cvtsi2ss xmm1, r14d
addss xmm1, [const_half]
mov r8d, ENT_AMMO
call SpawnEntity
mov dl, TILE_EMPTY
.store_tile:
mov eax, r14d
shl eax, 5
add eax, r13d
lea rdi, [map_grid]
mov [rdi + rax], dl
inc r13d
jmp .parse_loop
.parse_done:
jmp .init_complete
.use_default_map:
; Copy built-in default map (Matrix chamber level)
lea rsi, [default_bunker_map]
lea rdi, [map_grid]
mov ecx, 1024
rep movsb
; Default player start: (1.5, 1.5)
mov dword [player_x], 03FC00000h ; 1.5f
mov dword [player_y], 03FC00000h ; 1.5f
; Register doors and secret doors
mov ecx, 5
mov edx, 4
call AddDoor
mov ecx, 15
mov edx, 4
call AddDoor
mov ecx, 24
mov edx, 4
call AddDoor
mov ecx, 2
mov edx, 5
call AddDoor ; Secret 1
mov ecx, 20
mov edx, 6
call AddDoor
mov ecx, 16
mov edx, 10
call AddDoor
mov ecx, 13
mov edx, 13
call AddDoor
mov ecx, 19
mov edx, 13
call AddDoor
mov ecx, 30
mov edx, 14
call AddDoor
mov ecx, 16
mov edx, 15
call AddDoor ; Secret 2
mov ecx, 5
mov edx, 16
call AddDoor
mov ecx, 8
mov edx, 21
call AddDoor
mov ecx, 8
mov edx, 23
call AddDoor ; Secret 3
mov ecx, 28
mov edx, 28
call AddDoor
; Default enemies (Agents)
movss xmm0, [flt_guard1_x]
movss xmm1, [flt_guard1_y]
mov r8d, ENT_GUARD
call SpawnEntity
movss xmm0, [flt_guard2_x]
movss xmm1, [flt_guard2_y]
mov r8d, ENT_GUARD
call SpawnEntity
movss xmm0, [flt_guard3_x]
movss xmm1, [flt_guard3_y]
mov r8d, ENT_GUARD
call SpawnEntity
movss xmm0, [flt_guard4_x]
movss xmm1, [flt_guard4_y]
mov r8d, ENT_GUARD
call SpawnEntity
movss xmm0, [flt_guard5_x]
movss xmm1, [flt_guard5_y]
mov r8d, ENT_GUARD
call SpawnEntity
movss xmm0, [flt_guard6_x]
movss xmm1, [flt_guard6_y]
mov r8d, ENT_GUARD
call SpawnEntity
movss xmm0, [flt_guard7_x]
movss xmm1, [flt_guard7_y]
mov r8d, ENT_GUARD
call SpawnEntity
; Pickups
movss xmm0, [flt_med1_x]
movss xmm1, [flt_med1_y]
mov r8d, ENT_MEDKIT
call SpawnEntity
movss xmm0, [flt_med2_x]
movss xmm1, [flt_med2_y]
mov r8d, ENT_MEDKIT
call SpawnEntity
movss xmm0, [flt_ammo1_x]
movss xmm1, [flt_ammo1_y]
mov r8d, ENT_AMMO
call SpawnEntity
movss xmm0, [flt_ammo2_x]
movss xmm1, [flt_ammo2_y]
mov r8d, ENT_AMMO
call SpawnEntity
movss xmm0, [flt_ammo3_x]
movss xmm1, [flt_ammo3_y]
mov r8d, ENT_AMMO
call SpawnEntity
.init_complete:
add rsp, 56
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
; ------------------------------------------------------------------------------
; AddDoor(ecx = map_x, edx = map_y)
; ------------------------------------------------------------------------------
AddDoor:
push rax
push rbx
mov eax, [num_doors]
cmp eax, MAX_DOORS
jge .door_full
imul rax, 24 ; sizeof(DOOR) = 24 bytes
lea rbx, [doors_table + rax]
mov [rbx + 0], ecx ; map_x
mov [rbx + 4], edx ; map_y
mov dword [rbx + 8], DOOR_STATE_CLOSED
mov dword [rbx + 12], 0 ; open_amount = 0.0f
mov dword [rbx + 16], 0 ; timer = 0.0f
mov dword [rbx + 20], 1 ; active = 1
inc dword [num_doors]
.door_full:
pop rbx
pop rax
ret
; ------------------------------------------------------------------------------
; FindDoor(ecx = map_x, edx = map_y) -> RAX = ptr to door or 0
; ------------------------------------------------------------------------------
FindDoor:
push rbx
push rsi
mov esi, [num_doors]
xor eax, eax
lea rbx, [doors_table]
.loop:
test esi, esi
jz .not_found
cmp [rbx + 0], ecx
jne .next
cmp [rbx + 4], edx
jne .next
mov rax, rbx
jmp .found
.next:
add rbx, 24
dec esi
jmp .loop
.not_found:
xor eax, eax
.found:
pop rsi
pop rbx
ret
; ------------------------------------------------------------------------------
; UpdateDoors(xmm0 = dt)
; ------------------------------------------------------------------------------
UpdateDoors:
push rbp
push rbx
push rsi
push r12
sub rsp, 40
movss [rsp], xmm0 ; dt
mov esi, [num_doors]
lea rbx, [doors_table]
.door_loop:
test esi, esi
jz .doors_done
mov eax, [rbx + 8] ; state
cmp eax, DOOR_STATE_OPENING
je .do_opening
cmp eax, DOOR_STATE_OPEN
je .do_open
cmp eax, DOOR_STATE_CLOSING
je .do_closing
jmp .next_door
.do_opening:
; open_amount += dt * 1.5f
movss xmm1, [rsp]
mulss xmm1, [flt_door_speed]
addss xmm1, [rbx + 12]
ucomiss xmm1, [flt_1_0]
jb .opening_store
movss xmm1, [flt_1_0]
mov dword [rbx + 8], DOOR_STATE_OPEN
mov dword [rbx + 16], 040400000h ; timer = 3.0f seconds
.opening_store:
movss [rbx + 12], xmm1
jmp .next_door
.do_open:
; timer -= dt
movss xmm1, [rbx + 16]
subss xmm1, [rsp]
ucomiss xmm1, [flt_0_0]
ja .open_timer_store
; Check if player is currently in this door cell!
cvttss2si ecx, [player_x]
cvttss2si edx, [player_y]
cmp ecx, [rbx + 0]
jne .can_close
cmp edx, [rbx + 4]
jne .can_close
; Player is standing in the door frame! Reset timer
mov dword [rbx + 16], 03F800000h ; 1.0f second
jmp .next_door
.can_close:
mov dword [rbx + 8], DOOR_STATE_CLOSING
jmp .next_door
.open_timer_store:
movss [rbx + 16], xmm1
jmp .next_door
.do_closing:
; open_amount -= dt * 1.5f
movss xmm1, [rsp]
mulss xmm1, [flt_door_speed]
movss xmm2, [rbx + 12]
subss xmm2, xmm1
ucomiss xmm2, [flt_0_0]
ja .closing_store
xorps xmm2, xmm2
mov dword [rbx + 8], DOOR_STATE_CLOSED
.closing_store:
movss [rbx + 12], xmm2
.next_door:
add rbx, 24
dec esi
jmp .door_loop
.doors_done:
add rsp, 40
pop r12
pop rsi
pop rbx
pop rbp
ret

408
src/player.asm Normal file
View file

@ -0,0 +1,408 @@
; ==============================================================================
; 2.5D Bunker Shooter - Player Controller & Physics (FASM x86_64)
; ==============================================================================
; ------------------------------------------------------------------------------
; UpdatePlayer: Handles player movement, mouse rotation, shooting, interaction
; Input: xmm0 = dt
; ------------------------------------------------------------------------------
UpdatePlayer:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
sub rsp, 56
movss [rsp], xmm0 ; dt
; Check if dead
cmp dword [player_health], 0
jle .player_dead
; Check if victory
cmp dword [game_state], 2
je .player_victory
; Decrease hurt timer
movss xmm1, [hurt_timer]
ucomiss xmm1, [flt_zero]
jbe .skip_hurt_dec
subss xmm1, [rsp]
maxss xmm1, [flt_zero]
movss [hurt_timer], xmm1
.skip_hurt_dec:
; --------------------------------------------------------------------------
; 1. Mouse & Keyboard Rotation
; --------------------------------------------------------------------------
; Calculate rot_angle = (mouse_delta_x * mouse_sens) + (key_turn * turn_speed * dt)
xorps xmm1, xmm1 ; rot_angle = 0.0f
; Mouse X delta
mov eax, [mouse_delta_x]
test eax, eax
jz .check_keys_rot
cvtsi2ss xmm2, eax
mulss xmm2, [flt_mouse_sens]
addss xmm1, xmm2
mov dword [mouse_delta_x], 0 ; Consume mouse delta
.check_keys_rot:
; Left / Right arrow keys
cmp dword [key_left], 1
jne .check_right_key
movss xmm2, [flt_turn_speed]
mulss xmm2, [rsp] ; turn_speed * dt
subss xmm1, xmm2
.check_right_key:
cmp dword [key_right], 1
jne .apply_rotation
movss xmm2, [flt_turn_speed]
mulss xmm2, [rsp]
addss xmm1, xmm2
.apply_rotation:
; If rot_angle != 0.0f, rotate dir and plane vectors
ucomiss xmm1, [flt_zero]
je .no_rotation
jp .no_rotation
; Calculate sin and cos using x87 fsincos
movss [rsp + 8], xmm1
fld dword [rsp + 8]
fsincos
fstp dword [rsp + 12] ; cos(theta)
fstp dword [rsp + 16] ; sin(theta)
movss xmm2, [rsp + 12] ; cos
movss xmm3, [rsp + 16] ; sin
; Rotate dir:
; new_dir_x = dir_x * cos - dir_y * sin
; new_dir_y = dir_x * sin + dir_y * cos
movss xmm4, [player_dir_x]
movss xmm5, [player_dir_y]
movss xmm6, xmm4
mulss xmm6, xmm2 ; dir_x * cos
movss xmm7, xmm5
mulss xmm7, xmm3 ; dir_y * sin
subss xmm6, xmm7 ; new_dir_x
movss xmm8, xmm4
mulss xmm8, xmm3 ; dir_x * sin
movss xmm9, xmm5
mulss xmm9, xmm2 ; dir_y * cos
addss xmm8, xmm9 ; new_dir_y
movss [player_dir_x], xmm6
movss [player_dir_y], xmm8
; Rotate plane:
; new_plane_x = plane_x * cos - plane_y * sin
; new_plane_y = plane_x * sin + plane_y * cos
movss xmm4, [player_plane_x]
movss xmm5, [player_plane_y]
movss xmm6, xmm4
mulss xmm6, xmm2
movss xmm7, xmm5
mulss xmm7, xmm3
subss xmm6, xmm7
movss xmm8, xmm4
mulss xmm8, xmm3
movss xmm9, xmm5
mulss xmm9, xmm2
addss xmm8, xmm9
movss [player_plane_x], xmm6
movss [player_plane_y], xmm8
.no_rotation:
; --------------------------------------------------------------------------
; 2. WASD Movement with Sliding Wall Collision
; --------------------------------------------------------------------------
movss xmm0, [flt_move_speed]
mulss xmm0, [rsp] ; speed = move_speed * dt
xorps xmm1, xmm1 ; move_x = 0.0f
xorps xmm2, xmm2 ; move_y = 0.0f
; Forward / Backward (W / S)
cmp dword [key_w], 1
jne .check_key_s
movss xmm3, [player_dir_x]
mulss xmm3, xmm0
addss xmm1, xmm3
movss xmm4, [player_dir_y]
mulss xmm4, xmm0
addss xmm2, xmm4
.check_key_s:
cmp dword [key_s], 1
jne .check_key_a
movss xmm3, [player_dir_x]
mulss xmm3, xmm0
subss xmm1, xmm3
movss xmm4, [player_dir_y]
mulss xmm4, xmm0
subss xmm2, xmm4
.check_key_a:
; Strafing (A / D) using plane vector
cmp dword [key_a], 1
jne .check_key_d
movss xmm3, [player_plane_x]
mulss xmm3, xmm0
subss xmm1, xmm3
movss xmm4, [player_plane_y]
mulss xmm4, xmm0
subss xmm2, xmm4
.check_key_d:
cmp dword [key_d], 1
jne .apply_movement
movss xmm3, [player_plane_x]
mulss xmm3, xmm0
addss xmm1, xmm3
movss xmm4, [player_plane_y]
mulss xmm4, xmm0
addss xmm2, xmm4
.apply_movement:
; Try X movement independently
movss xmm3, [player_x]
addss xmm3, xmm1 ; target_x
; Check collision at target_x with margin
movss xmm5, xmm3
ucomiss xmm1, [flt_zero]
jae .add_pos_margin_x
subss xmm5, [flt_collision_rad]
jmp .test_x
.add_pos_margin_x:
addss xmm5, [flt_collision_rad]
.test_x:
movss xmm6, [player_y]
call IsWalkable
test eax, eax
jz .collide_x
movss [player_x], xmm3 ; accept X move
.collide_x:
; Try Y movement independently
movss xmm4, [player_y]
addss xmm4, xmm2 ; target_y
movss xmm6, xmm4
ucomiss xmm2, [flt_zero]
jae .add_pos_margin_y
subss xmm6, [flt_collision_rad]
jmp .test_y
.add_pos_margin_y:
addss xmm6, [flt_collision_rad]
.test_y:
movss xmm5, [player_x]
call IsWalkable
test eax, eax
jz .collide_y
movss [player_y], xmm4 ; accept Y move
.collide_y:
; --------------------------------------------------------------------------
; 3. Spacebar Interaction (Open Doors & Exit)
; --------------------------------------------------------------------------
cmp dword [key_space], 1
jne .skip_interaction
mov dword [key_space], 0 ; Consume press
; Point 1.2 units ahead
movss xmm0, [player_x]
movss xmm1, [player_dir_x]
mulss xmm1, [flt_interact_dist]
addss xmm0, xmm1
movss xmm2, [player_y]
movss xmm3, [player_dir_y]
mulss xmm3, [flt_interact_dist]
addss xmm2, xmm3
cvttss2si ecx, xmm0 ; map_x
cvttss2si edx, xmm2 ; map_y
; Boundary check
test ecx, ecx
js .skip_interaction
cmp ecx, 32
jge .skip_interaction
test edx, edx
js .skip_interaction
cmp edx, 32
jge .skip_interaction
; Check tile
mov eax, edx
shl eax, 5
add eax, ecx
lea rsi, [map_grid]
movzx ebx, byte [rsi + rax]
cmp ebx, TILE_DOOR
je .interact_door
cmp ebx, TILE_SECRET
je .interact_door
cmp ebx, TILE_EXIT
je .interact_exit
jmp .skip_interaction
.interact_door:
call FindDoor
test rax, rax
jz .skip_interaction
cmp dword [rax + 8], DOOR_STATE_CLOSED
jne .skip_interaction
mov dword [rax + 8], DOOR_STATE_OPENING
jmp .skip_interaction
.interact_exit:
mov dword [game_state], 2 ; Victory!
jmp .skip_interaction
.skip_interaction:
; --------------------------------------------------------------------------
; 4. Gun Animation & Cooldown
; --------------------------------------------------------------------------
mov eax, [gun_state]
test eax, eax
jz .gun_ready
; Progress gun timer
movss xmm1, [gun_timer]
subss xmm1, [rsp] ; timer - dt
ucomiss xmm1, [flt_zero]
ja .gun_timer_store
; Advance gun state
inc dword [gun_state]
cmp dword [gun_state], 3
jge .gun_reset
mov dword [gun_timer], 03DCCCCCDh ; 0.1f sec
jmp .gun_ready
.gun_reset:
mov dword [gun_state], 0
xorps xmm1, xmm1
.gun_timer_store:
movss [gun_timer], xmm1
.gun_ready:
jmp .update_done
.player_dead:
mov dword [game_state], 1
jmp .update_done
.player_victory:
mov dword [game_state], 2
.update_done:
add rsp, 56
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
; ------------------------------------------------------------------------------
; IsWalkable(xmm5 = x, xmm6 = y) -> EAX = 1 (walkable) or 0 (blocked)
; ------------------------------------------------------------------------------
IsWalkable:
cvttss2si ecx, xmm5 ; cell_x
cvttss2si edx, xmm6 ; cell_y
; Map boundaries
test ecx, ecx
js .blocked
cmp ecx, 32
jge .blocked
test edx, edx
js .blocked
cmp edx, 32
jge .blocked
mov eax, edx
shl eax, 5
add eax, ecx
lea rsi, [map_grid]
movzx eax, byte [rsi + rax]
test eax, eax
jz .walkable ; TILE_EMPTY
cmp eax, TILE_DOOR
je .check_door
cmp eax, TILE_SECRET
je .check_door
jmp .blocked
.check_door:
; Check if door is sufficiently open (> 0.75f)
push rcx
push rdx
call FindDoor
pop rdx
pop rcx
test rax, rax
jz .blocked
movss xmm0, [rax + 12] ; open_amount
ucomiss xmm0, [flt_door_walk_threshold]
ja .walkable
.blocked:
xor eax, eax
ret
.walkable:
mov eax, 1
ret
; ------------------------------------------------------------------------------
; PlayerShoot: Triggers player weapon fire and hitscan detection
; ------------------------------------------------------------------------------
PlayerShoot:
push rbp
push rbx
push rsi
push rdi
sub rsp, 40
; Check if weapon is ready and player is alive
cmp dword [game_state], 0
jne .shoot_done
cmp dword [gun_state], 0
jne .shoot_done
; Check ammo
cmp dword [player_ammo], 0
jle .shoot_done
; Fire!
dec dword [player_ammo]
mov dword [gun_state], 1
mov dword [gun_timer], 03DCCCCCDh ; 0.1s
; Perform hitscan along player_dir
call EntitiesHitscan
jmp .shoot_done
.shoot_done:
add rsp, 40
pop rdi
pop rsi
pop rbx
pop rbp
ret

773
src/renderer.asm Normal file
View file

@ -0,0 +1,773 @@
; ==============================================================================
; 2.5D Bunker Shooter - Raycasting Engine & Renderer (FASM x86_64)
; Internal resolution: 320x240, 32-bit BGRA framebuffer
; ==============================================================================
; ------------------------------------------------------------------------------
; RenderFrame: Renders complete 3D scene (floors, walls, sprites, weapon, HUD)
; ------------------------------------------------------------------------------
RenderFrame:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 136
; --------------------------------------------------------------------------
; 1. Draw Ceiling & Floor Gradients (Matrix Cyberspace)
; --------------------------------------------------------------------------
lea rdi, [framebuffer]
; Ceiling: 120 rows
xor r12d, r12d ; y = 0..119
.ceil_y:
; Deep cyber void gradient with faint emerald horizon
mov eax, r12d
shr eax, 3 ; 0..14
mov edx, eax
shr edx, 2
inc edx ; R (1..4)
shl edx, 16
lea ecx, [eax + 4] ; G (4..18)
shl ecx, 8
or edx, ecx
mov ecx, eax
shr ecx, 1
add ecx, 2 ; B (2..9)
or edx, ecx
mov eax, edx
mov ecx, SCREEN_WIDTH
rep stosd
inc r12d
cmp r12d, SCREEN_HALF_HEIGHT
jl .ceil_y
; Floor: 120 rows with neon-green matrix data grid
xor r12d, r12d ; y = 0..119
.floor_y:
mov eax, r12d
shr eax, 3 ; 0..14
lea edx, [eax + 2] ; R (2..16)
shl edx, 16
lea ecx, [eax * 2 + 10] ; G (10..38)
shl ecx, 8
or edx, ecx
lea ecx, [eax + 3] ; B (3..17)
or edx, ecx
; Check horizontal grid lines every 16 scanlines
test r12d, 15
jnz .floor_draw_row
mov edx, 00146020h ; Emerald grid line
.floor_draw_row:
xor r13d, r13d
.floor_pixel:
mov eax, edx
test r13d, 31 ; Vertical grid lines every 32 columns
jnz .floor_store
mov eax, 00146020h ; Emerald grid line
.floor_store:
stosd
inc r13d
cmp r13d, SCREEN_WIDTH
jl .floor_pixel
inc r12d
cmp r12d, SCREEN_HALF_HEIGHT
jl .floor_y
; --------------------------------------------------------------------------
; 2. Raycast Walls (320 columns)
; --------------------------------------------------------------------------
xor r14d, r14d ; col_x = 0..319
.raycast_loop:
cmp r14d, SCREEN_WIDTH
jge .walls_rendered
; cameraX = 2.0 * col_x / 320.0 - 1.0
cvtsi2ss xmm0, r14d
mulss xmm0, [flt_two_div_w] ; xmm0 = cameraX
subss xmm0, [flt_1_0]
; rayDirX = player_dir_x + player_plane_x * cameraX
movss xmm1, [player_plane_x]
mulss xmm1, xmm0
addss xmm1, [player_dir_x] ; xmm1 = rayDirX
movss [rsp + 0], xmm1
; rayDirY = player_dir_y + player_plane_y * cameraX
movss xmm2, [player_plane_y]
mulss xmm2, xmm0
addss xmm2, [player_dir_y] ; xmm2 = rayDirY
movss [rsp + 4], xmm2
; mapX = int(player_x), mapY = int(player_y)
cvttss2si r12d, [player_x] ; r12d = mapX
cvttss2si r13d, [player_y] ; r13d = mapY
; deltaDistX = abs(1.0 / rayDirX)
movss xmm3, [flt_1_0]
divss xmm3, xmm1
andps xmm3, [xmm_abs_mask] ; xmm3 = deltaDistX
movss [rsp + 8], xmm3
; deltaDistY = abs(1.0 / rayDirY)
movss xmm4, [flt_1_0]
divss xmm4, xmm2
andps xmm4, [xmm_abs_mask] ; xmm4 = deltaDistY
movss [rsp + 12], xmm4
; StepX and initial SideDistX
ucomiss xmm1, [flt_0_0]
jae .ray_dir_x_pos
mov dword [rsp + 16], -1 ; stepX = -1
cvtsi2ss xmm5, r12d
movss xmm6, [player_x]
subss xmm6, xmm5 ; player_x - mapX
mulss xmm6, xmm3
movss [rsp + 20], xmm6 ; sideDistX
jmp .calc_step_y
.ray_dir_x_pos:
mov dword [rsp + 16], 1 ; stepX = 1
cvtsi2ss xmm5, r12d
addss xmm5, [flt_1_0] ; mapX + 1.0
subss xmm5, [player_x]
mulss xmm5, xmm3
movss [rsp + 20], xmm5 ; sideDistX
.calc_step_y:
; StepY and initial SideDistY
ucomiss xmm2, [flt_0_0]
jae .ray_dir_y_pos
mov dword [rsp + 24], -1 ; stepY = -1
cvtsi2ss xmm5, r13d
movss xmm6, [player_y]
subss xmm6, xmm5
mulss xmm6, xmm4
movss [rsp + 28], xmm6 ; sideDistY
jmp .dda_begin
.ray_dir_y_pos:
mov dword [rsp + 24], 1 ; stepY = 1
cvtsi2ss xmm5, r13d
addss xmm5, [flt_1_0]
subss xmm5, [player_y]
mulss xmm5, xmm4
movss [rsp + 28], xmm5 ; sideDistY
.dda_begin:
xor r15d, r15d ; side = 0
mov ecx, 64 ; max DDA steps
.dda_step:
dec ecx
jz .wall_missed
movss xmm5, [rsp + 20] ; sideDistX
movss xmm6, [rsp + 28] ; sideDistY
ucomiss xmm5, xmm6
ja .step_y
; Step X
addss xmm5, [rsp + 8] ; sideDistX += deltaDistX
movss [rsp + 20], xmm5
add r12d, [rsp + 16] ; mapX += stepX
xor r15d, r15d ; side = 0
jmp .check_tile
.step_y:
; Step Y
addss xmm6, [rsp + 12] ; sideDistY += deltaDistY
movss [rsp + 28], xmm6
add r13d, [rsp + 24] ; mapY += stepY
mov r15d, 1 ; side = 1
.check_tile:
; Map bounds check
test r12d, r12d
js .wall_missed
cmp r12d, 32
jge .wall_missed
test r13d, r13d
js .wall_missed
cmp r13d, 32
jge .wall_missed
; Fetch tile
mov eax, r13d
shl eax, 5
add eax, r12d
lea rsi, [map_grid]
movzx ebx, byte [rsi + rax]
test ebx, ebx
jz .dda_step ; Empty space, continue ray
cmp ebx, TILE_DOOR
je .check_sliding_door
cmp ebx, TILE_SECRET
je .check_sliding_door
jmp .solid_wall_hit
.check_sliding_door:
; Sliding door hit: check if ray hits door panel
mov ecx, r12d
mov edx, r13d
call FindDoor
test rax, rax
jz .solid_wall_hit
; Check door open amount (0.0 = closed, 1.0 = open)
movss xmm7, [rax + 12] ; open_amount
ucomiss xmm7, [flt_door_walk_threshold]
ja .dda_step ; Walkable open door, continue ray
jmp .solid_wall_hit
.solid_wall_hit:
; Perpendicular wall distance
test r15d, r15d
jnz .perp_dist_y
movss xmm5, [rsp + 20] ; sideDistX
subss xmm5, [rsp + 8] ; - deltaDistX
jmp .store_perp_dist
.perp_dist_y:
movss xmm5, [rsp + 28] ; sideDistY
subss xmm5, [rsp + 12] ; - deltaDistY
.store_perp_dist:
; Clamp min perpWallDist to 0.1 to avoid division by zero
maxss xmm5, [flt_min_dist]
movss [rsp + 32], xmm5 ; perpWallDist
; Store in ZBuffer[col_x]
lea rsi, [zbuffer]
movss [rsi + r14 * 4], xmm5
; Calculate line height: lineHeight = int(SCREEN_HEIGHT / perpWallDist)
movss xmm6, [flt_screen_h]
divss xmm6, xmm5
cvttss2si edx, xmm6 ; edx = lineHeight
; drawStart = -lineHeight / 2 + 120
mov eax, edx
shr eax, 1
mov ebp, SCREEN_HALF_HEIGHT
sub ebp, eax ; ebp = drawStart
mov r8d, ebp
add r8d, edx ; r8d = drawEnd
; Clamp drawStart and drawEnd
cmp ebp, 0
jge .start_ok
xor ebp, ebp
.start_ok:
cmp r8d, SCREEN_HEIGHT
jl .end_ok
mov r8d, SCREEN_HEIGHT - 1
.end_ok:
; Calculate wallX: exact horizontal coordinate on wall
test r15d, r15d
jnz .wall_x_side1
; side == 0: wallX = player_y + perpWallDist * rayDirY
movss xmm7, [rsp + 32]
mulss xmm7, [rsp + 4] ; perpWallDist * rayDirY
addss xmm7, [player_y]
jmp .calc_tex_x
.wall_x_side1:
; side == 1: wallX = player_x + perpWallDist * rayDirX
movss xmm7, [rsp + 32]
mulss xmm7, [rsp + 0] ; perpWallDist * rayDirX
addss xmm7, [player_x]
.calc_tex_x:
; wallX = wallX - floor(wallX)
roundss xmm6, xmm7, 1 ; floor
subss xmm7, xmm6 ; frac 0.0..1.0
mulss xmm7, [flt_tex_size]
cvttss2si r9d, xmm7 ; r9d = texX (0..63)
and r9d, TEX_MASK
; Adjust texture ID: tile - 1
dec ebx
cmp ebx, NUM_WALL_TEXTURES
jl .tex_id_ok
xor ebx, ebx
.tex_id_ok:
imul rbx, TEX_SIZE * 4
lea rsi, [tex_walls + rbx] ; rsi = base texture ptr
; Distance fog factor: factor = 256 - int(dist * 14) (clamped to 30..256)
movss xmm7, [rsp + 32]
mulss xmm7, [flt_fog_scale]
cvttss2si eax, xmm7
mov ecx, 256
sub ecx, eax
cmp ecx, 30
jge .fog_min_ok
mov ecx, 30
.fog_min_ok:
cmp ecx, 256
jle .fog_max_ok
mov ecx, 256
.fog_max_ok:
mov [rsp + 40], ecx ; fog_factor
; Side shadow: if side == 1, reduce fog factor by 25%
test r15d, r15d
jz .shadow_ok
mov eax, [rsp + 40]
imul eax, 3
shr eax, 2
mov [rsp + 40], eax
.shadow_ok:
; Texture vertical step: texStep = 64.0 / lineHeight
cvtsi2ss xmm6, edx ; lineHeight
movss xmm7, [flt_tex_size]
divss xmm7, xmm6 ; xmm7 = texStep
movss [rsp + 44], xmm7
; texPos = (drawStart - 120 + lineHeight / 2) * texStep
mov eax, ebp ; drawStart
sub eax, SCREEN_HALF_HEIGHT
mov ecx, edx
shr ecx, 1
add eax, ecx
cvtsi2ss xmm6, eax
mulss xmm6, xmm7 ; xmm6 = texPos
movss [rsp + 48], xmm6
; Draw vertical wall stripe into framebuffer
; Target pixel = framebuffer + (y * 320 + col_x) * 4
mov eax, ebp
imul eax, SCREEN_WIDTH
add eax, r14d
lea rdi, [framebuffer + rax * 4]
.draw_wall_pixel:
cmp ebp, r8d
jg .wall_col_done
; texY = int(texPos) & 63
movss xmm6, [rsp + 48]
cvttss2si eax, xmm6
and eax, TEX_MASK
; Pixel offset in texture: (texY * 64 + texX) * 4
shl eax, 6
add eax, r9d
mov eax, [rsi + rax * 4] ; 0x00RRGGBB
; Apply Fog / Lighting
mov ecx, [rsp + 40] ; fog factor (30..256)
; Red: (R * factor) >> 8
mov edx, eax
shr edx, 16
and edx, 255
imul edx, ecx
shr edx, 8
shl edx, 16
; Green: (G * factor) >> 8
mov ebx, eax
shr ebx, 8
and ebx, 255
imul ebx, ecx
shr ebx, 8
shl ebx, 8
or edx, ebx
; Blue: (B * factor) >> 8
and eax, 255
imul eax, ecx
shr eax, 8
or eax, edx
mov [rdi], eax ; Write pixel
add rdi, SCREEN_WIDTH * 4
; Advance texPos += texStep
movss xmm6, [rsp + 48]
addss xmm6, [rsp + 44]
movss [rsp + 48], xmm6
inc ebp
jmp .draw_wall_pixel
.wall_missed:
.wall_col_done:
inc r14d
jmp .raycast_loop
.walls_rendered:
; --------------------------------------------------------------------------
; 3. Draw Sprites (Sorted Far to Near with Z-Buffer Check)
; --------------------------------------------------------------------------
call RenderSprites
; --------------------------------------------------------------------------
; 4. Draw Animated Weapon (Pistol) at Bottom Center
; --------------------------------------------------------------------------
call RenderWeapon
; --------------------------------------------------------------------------
; 5. Hurt Flash (Red Screen Tint when taking damage)
; --------------------------------------------------------------------------
movss xmm0, [hurt_timer]
ucomiss xmm0, [flt_0_0]
jbe .skip_hurt_flash
lea rdi, [framebuffer]
mov ecx, SCREEN_SIZE
.tint_loop:
mov eax, [rdi]
; Add 50 to Red channel
mov edx, eax
shr edx, 16
and edx, 255
add edx, 50
cmp edx, 255
jle .red_ok
mov edx, 255
.red_ok:
shl edx, 16
and eax, 0000FFFFh
or eax, edx
mov [rdi], eax
add rdi, 4
dec ecx
jnz .tint_loop
.skip_hurt_flash:
; --------------------------------------------------------------------------
; 6. Crosshair at Screen Center (160, 120)
; --------------------------------------------------------------------------
; Horizontal 5px bar: (158..162, 120)
lea rdi, [framebuffer + (120 * SCREEN_WIDTH + 158) * 4]
mov eax, 00FFFFFFh
mov [rdi + 0], eax
mov [rdi + 4], eax
mov [rdi + 8], eax
mov [rdi + 12], eax
mov [rdi + 16], eax
; Vertical bar: (160, 118..122)
lea rdi, [framebuffer + (118 * SCREEN_WIDTH + 160) * 4]
mov [rdi], eax
add rdi, SCREEN_WIDTH * 4
mov [rdi], eax
add rdi, SCREEN_WIDTH * 4 * 2 ; skip center
mov [rdi], eax
add rdi, SCREEN_WIDTH * 4
mov [rdi], eax
; --------------------------------------------------------------------------
; 7. HUD Status Bar & Minimap
; --------------------------------------------------------------------------
call RenderHUD
add rsp, 136
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
; ------------------------------------------------------------------------------
; RenderSprites
; ------------------------------------------------------------------------------
RenderSprites:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 136
mov r12d, [num_entities]
lea r13, [entity_table]
.sprite_loop:
test r12d, r12d
jz .sprites_done
cmp dword [r13 + 28], 1 ; active?
jne .next_sprite
; spritePos = entity.pos - player.pos
movss xmm0, [r13 + 0]
subss xmm0, [player_x] ; spriteX
movss xmm1, [r13 + 4]
subss xmm1, [player_y] ; spriteY
; Transform sprite with inverted camera matrix:
; invDet = 1.0 / (plane_x * dir_y - dir_x * plane_y)
movss xmm2, [player_plane_x]
mulss xmm2, [player_dir_y]
movss xmm3, [player_dir_x]
mulss xmm3, [player_plane_y]
subss xmm2, xmm3
movss xmm3, [flt_1_0]
divss xmm3, xmm2 ; xmm3 = invDet
; transformX = invDet * (dir_y * spriteX - dir_x * spriteY)
movss xmm4, [player_dir_y]
mulss xmm4, xmm0
movss xmm5, [player_dir_x]
mulss xmm5, xmm1
subss xmm4, xmm5
mulss xmm4, xmm3 ; xmm4 = transformX
movss [rsp + 0], xmm4
; transformY = invDet * (-plane_y * spriteX + plane_x * spriteY)
movss xmm6, [player_plane_y]
xorps xmm6, [xmm_sign_mask] ; -plane_y
mulss xmm6, xmm0
movss xmm7, [player_plane_x]
mulss xmm7, xmm1
addss xmm6, xmm7
mulss xmm6, xmm3 ; xmm6 = transformY
movss [rsp + 4], xmm6
; Depth check: must be in front of player
ucomiss xmm6, [flt_min_dist]
jbe .next_sprite
; spriteScreenX = int((320 / 2) * (1.0 + transformX / transformY))
divss xmm4, xmm6 ; transformX / transformY
addss xmm4, [flt_1_0]
mulss xmm4, [flt_screen_half_w]
cvttss2si r14d, xmm4 ; r14d = spriteScreenX
; spriteHeight = abs(int(240 / transformY))
movss xmm7, [flt_screen_h]
divss xmm7, xmm6
cvttss2si r15d, xmm7 ; r15d = spriteHeight & spriteWidth
test r15d, r15d
jns .h_pos
neg r15d
.h_pos:
cmp r15d, 0
jle .next_sprite
; drawStartY = -spriteHeight / 2 + 120
mov eax, r15d
shr eax, 1
mov ebp, SCREEN_HALF_HEIGHT
sub ebp, eax ; ebp = drawStartY
mov edx, ebp
add edx, r15d ; edx = drawEndY
cmp ebp, 0
jge .sy_ok
xor ebp, ebp
.sy_ok:
cmp edx, SCREEN_HEIGHT
jl .ey_ok
mov edx, SCREEN_HEIGHT - 1
.ey_ok:
mov [rsp + 8], ebp ; drawStartY
mov [rsp + 12], edx ; drawEndY
; drawStartX = -spriteWidth / 2 + spriteScreenX
mov eax, r15d
shr eax, 1
mov ebx, r14d
sub ebx, eax ; ebx = drawStartX
mov ecx, ebx
add ecx, r15d ; ecx = drawEndX
cmp ebx, 0
jge .sx_ok
xor ebx, ebx
.sx_ok:
cmp ecx, SCREEN_WIDTH
jl .ex_ok
mov ecx, SCREEN_WIDTH - 1
.ex_ok:
mov [rsp + 16], ebx ; drawStartX
mov [rsp + 20], ecx ; drawEndX
; Pick sprite texture
mov eax, [r13 + 8] ; type
cmp eax, ENT_MEDKIT
je .use_medkit_tex
cmp eax, ENT_AMMO
je .use_ammo_tex
cmp eax, ENT_GUARD
je .use_guard_tex
jmp .next_sprite
.use_medkit_tex:
lea rsi, [spr_medkit]
jmp .draw_sprite_stripes
.use_ammo_tex:
lea rsi, [spr_ammo]
jmp .draw_sprite_stripes
.use_guard_tex:
mov eax, [r13 + 12] ; guard state
cmp eax, GUARD_DEAD
je .guard_dead_tex
cmp eax, GUARD_SHOOT
je .guard_shoot_tex
lea rsi, [spr_guard_walk]
jmp .draw_sprite_stripes
.guard_shoot_tex:
lea rsi, [spr_guard_shoot]
jmp .draw_sprite_stripes
.guard_dead_tex:
lea rsi, [spr_guard_dead]
.draw_sprite_stripes:
; Loop stripe from drawStartX to drawEndX
mov ebx, [rsp + 16] ; stripe = drawStartX
.stripe_loop:
cmp ebx, [rsp + 20]
jg .next_sprite
; Z-Buffer check: transformY < zbuffer[stripe]
lea rax, [zbuffer]
movss xmm0, [rsp + 4] ; transformY
ucomiss xmm0, [rax + rbx * 4]
jae .stripe_next
; texX = int((stripe - (-spriteWidth / 2 + spriteScreenX)) * 64 / spriteWidth)
mov eax, r15d
shr eax, 1
mov edx, r14d
sub edx, eax ; -spriteWidth/2 + spriteScreenX
mov eax, ebx
sub eax, edx
shl eax, 6 ; * 64
cdq
idiv r15d
and eax, TEX_MASK
mov [rsp + 24], eax ; texX
; Draw vertical stripe of sprite
mov ebp, [rsp + 8] ; y = drawStartY
.sprite_y_loop:
cmp ebp, [rsp + 12]
jg .stripe_next
; d = y - 120 + spriteHeight / 2
mov eax, r15d
shr eax, 1
lea edx, [rbp - SCREEN_HALF_HEIGHT]
add edx, eax
shl edx, 6 ; d * 64
mov eax, edx
cdq
idiv r15d
and eax, TEX_MASK ; texY
; Fetch texel: (texY * 64 + texX) * 4
shl eax, 6
add eax, [rsp + 24]
mov eax, [rsi + rax * 4]
; Check color key (transparent = 0x00FF00FF)
cmp eax, COLOR_TRANSPARENT
je .pixel_transparent
; Write to framebuffer
mov edx, ebp
imul edx, SCREEN_WIDTH
add edx, ebx
lea rdi, [framebuffer + rdx * 4]
mov [rdi], eax
.pixel_transparent:
inc ebp
jmp .sprite_y_loop
.stripe_next:
inc ebx
jmp .stripe_loop
.next_sprite:
add r13, 36
dec r12d
jmp .sprite_loop
.sprites_done:
add rsp, 136
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
; ------------------------------------------------------------------------------
; RenderWeapon: Draws player gun at bottom center (128..191, 176..239)
; ------------------------------------------------------------------------------
RenderWeapon:
push rbx
push rsi
push rdi
push r12
push r13
; Select frame: idle, fire1, fire2
mov eax, [gun_state]
cmp eax, 1
je .wep_fire1
cmp eax, 2
je .wep_fire2
lea rsi, [spr_gun_idle]
jmp .draw_wep
.wep_fire1:
lea rsi, [spr_gun_fire1]
jmp .draw_wep
.wep_fire2:
lea rsi, [spr_gun_fire2]
.draw_wep:
xor r12d, r12d ; y = 0..63
.wep_y:
xor r13d, r13d ; x = 0..63
.wep_x:
mov eax, [rsi]
cmp eax, COLOR_TRANSPARENT
je .wep_skip
; Screen target: x = 128 + r13d, y = 176 + r12d
lea edx, [r12d + 176]
imul edx, SCREEN_WIDTH
lea edx, [edx + r13d + 128]
lea rdi, [framebuffer + rdx * 4]
mov [rdi], eax
.wep_skip:
add rsi, 4
inc r13d
cmp r13d, 64
jl .wep_x
inc r12d
cmp r12d, 64
jl .wep_y
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret

1022
src/textures.asm Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,535 @@
; ADVAPI32 API calls
import advapi32,\
AbortSystemShutdownA,'AbortSystemShutdownA',\
AbortSystemShutdownW,'AbortSystemShutdownW',\
AccessCheck,'AccessCheck',\
AccessCheckAndAuditAlarmA,'AccessCheckAndAuditAlarmA',\
AccessCheckAndAuditAlarmW,'AccessCheckAndAuditAlarmW',\
AccessCheckByType,'AccessCheckByType',\
AccessCheckByTypeAndAuditAlarmA,'AccessCheckByTypeAndAuditAlarmA',\
AccessCheckByTypeAndAuditAlarmW,'AccessCheckByTypeAndAuditAlarmW',\
AccessCheckByTypeResultList,'AccessCheckByTypeResultList',\
AccessCheckByTypeResultListAndAuditAlarmA,'AccessCheckByTypeResultListAndAuditAlarmA',\
AccessCheckByTypeResultListAndAuditAlarmW,'AccessCheckByTypeResultListAndAuditAlarmW',\
AddAccessAllowedAce,'AddAccessAllowedAce',\
AddAccessAllowedAceEx,'AddAccessAllowedAceEx',\
AddAccessAllowedObjectAce,'AddAccessAllowedObjectAce',\
AddAccessDeniedAce,'AddAccessDeniedAce',\
AddAccessDeniedAceEx,'AddAccessDeniedAceEx',\
AddAccessDeniedObjectAce,'AddAccessDeniedObjectAce',\
AddAce,'AddAce',\
AddAuditAccessAce,'AddAuditAccessAce',\
AddAuditAccessAceEx,'AddAuditAccessAceEx',\
AddAuditAccessObjectAce,'AddAuditAccessObjectAce',\
AdjustTokenGroups,'AdjustTokenGroups',\
AdjustTokenPrivileges,'AdjustTokenPrivileges',\
AllocateAndInitializeSid,'AllocateAndInitializeSid',\
AllocateLocallyUniqueId,'AllocateLocallyUniqueId',\
AreAllAccessesGranted,'AreAllAccessesGranted',\
AreAnyAccessesGranted,'AreAnyAccessesGranted',\
BackupEventLogA,'BackupEventLogA',\
BackupEventLogW,'BackupEventLogW',\
BuildExplicitAccessWithNameA,'BuildExplicitAccessWithNameA',\
BuildExplicitAccessWithNameW,'BuildExplicitAccessWithNameW',\
BuildImpersonateExplicitAccessWithNameA,'BuildImpersonateExplicitAccessWithNameA',\
BuildImpersonateExplicitAccessWithNameW,'BuildImpersonateExplicitAccessWithNameW',\
BuildImpersonateTrusteeA,'BuildImpersonateTrusteeA',\
BuildImpersonateTrusteeW,'BuildImpersonateTrusteeW',\
BuildSecurityDescriptorA,'BuildSecurityDescriptorA',\
BuildSecurityDescriptorW,'BuildSecurityDescriptorW',\
BuildTrusteeWithNameA,'BuildTrusteeWithNameA',\
BuildTrusteeWithNameW,'BuildTrusteeWithNameW',\
BuildTrusteeWithSidA,'BuildTrusteeWithSidA',\
BuildTrusteeWithSidW,'BuildTrusteeWithSidW',\
CancelOverlappedAccess,'CancelOverlappedAccess',\
ChangeServiceConfig2A,'ChangeServiceConfig2A',\
ChangeServiceConfig2W,'ChangeServiceConfig2W',\
ChangeServiceConfigA,'ChangeServiceConfigA',\
ChangeServiceConfigW,'ChangeServiceConfigW',\
ClearEventLogA,'ClearEventLogA',\
ClearEventLogW,'ClearEventLogW',\
CloseEventLog,'CloseEventLog',\
CloseRaw,'CloseRaw',\
CloseServiceHandle,'CloseServiceHandle',\
ControlService,'ControlService',\
ConvertAccessToSecurityDescriptorA,'ConvertAccessToSecurityDescriptorA',\
ConvertAccessToSecurityDescriptorW,'ConvertAccessToSecurityDescriptorW',\
ConvertSecurityDescriptorToAccessA,'ConvertSecurityDescriptorToAccessA',\
ConvertSecurityDescriptorToAccessW,'ConvertSecurityDescriptorToAccessW',\
ConvertSecurityDescriptorToAccessNamedA,'ConvertSecurityDescriptorToAccessNamedA',\
ConvertSecurityDescriptorToAccessNamedW,'ConvertSecurityDescriptorToAccessNamedW',\
ConvertToAutoInheritPrivateObjectSecurity,'ConvertToAutoInheritPrivateObjectSecurity',\
CopySid,'CopySid',\
CreatePrivateObjectSecurity,'CreatePrivateObjectSecurity',\
CreatePrivateObjectSecurityEx,'CreatePrivateObjectSecurityEx',\
CreateProcessAsUserA,'CreateProcessAsUserA',\
CreateProcessAsUserW,'CreateProcessAsUserW',\
CreateRestrictedToken,'CreateRestrictedToken',\
CreateServiceA,'CreateServiceA',\
CreateServiceW,'CreateServiceW',\
CryptAcquireContextA,'CryptAcquireContextA',\
CryptAcquireContextW,'CryptAcquireContextW',\
CryptContextAddRef,'CryptContextAddRef',\
CryptCreateHash,'CryptCreateHash',\
CryptDecrypt,'CryptDecrypt',\
CryptDeriveKey,'CryptDeriveKey',\
CryptDestroyHash,'CryptDestroyHash',\
CryptDestroyKey,'CryptDestroyKey',\
CryptDuplicateHash,'CryptDuplicateHash',\
CryptDuplicateKey,'CryptDuplicateKey',\
CryptEncrypt,'CryptEncrypt',\
CryptEnumProviderTypesA,'CryptEnumProviderTypesA',\
CryptEnumProviderTypesW,'CryptEnumProviderTypesW',\
CryptEnumProvidersA,'CryptEnumProvidersA',\
CryptEnumProvidersW,'CryptEnumProvidersW',\
CryptExportKey,'CryptExportKey',\
CryptGenKey,'CryptGenKey',\
CryptGenRandom,'CryptGenRandom',\
CryptGetDefaultProviderA,'CryptGetDefaultProviderA',\
CryptGetDefaultProviderW,'CryptGetDefaultProviderW',\
CryptGetHashParam,'CryptGetHashParam',\
CryptGetKeyParam,'CryptGetKeyParam',\
CryptGetProvParam,'CryptGetProvParam',\
CryptGetUserKey,'CryptGetUserKey',\
CryptHashData,'CryptHashData',\
CryptHashSessionKey,'CryptHashSessionKey',\
CryptImportKey,'CryptImportKey',\
CryptReleaseContext,'CryptReleaseContext',\
CryptSetHashParam,'CryptSetHashParam',\
CryptSetKeyParam,'CryptSetKeyParam',\
CryptSetProvParam,'CryptSetProvParam',\
CryptSetProviderA,'CryptSetProviderA',\
CryptSetProviderW,'CryptSetProviderW',\
CryptSetProviderExA,'CryptSetProviderExA',\
CryptSetProviderExW,'CryptSetProviderExW',\
CryptSignHashA,'CryptSignHashA',\
CryptSignHashW,'CryptSignHashW',\
CryptVerifySignatureA,'CryptVerifySignatureA',\
CryptVerifySignatureW,'CryptVerifySignatureW',\
DecryptFileA,'DecryptFileA',\
DecryptFileW,'DecryptFileW',\
DeleteAce,'DeleteAce',\
DeleteService,'DeleteService',\
DeregisterEventSource,'DeregisterEventSource',\
DestroyPrivateObjectSecurity,'DestroyPrivateObjectSecurity',\
DuplicateToken,'DuplicateToken',\
DuplicateTokenEx,'DuplicateTokenEx',\
ElfBackupEventLogFileA,'ElfBackupEventLogFileA',\
ElfBackupEventLogFileW,'ElfBackupEventLogFileW',\
ElfChangeNotify,'ElfChangeNotify',\
ElfClearEventLogFileA,'ElfClearEventLogFileA',\
ElfClearEventLogFileW,'ElfClearEventLogFileW',\
ElfCloseEventLog,'ElfCloseEventLog',\
ElfDeregisterEventSource,'ElfDeregisterEventSource',\
ElfNumberOfRecords,'ElfNumberOfRecords',\
ElfOldestRecord,'ElfOldestRecord',\
ElfOpenBackupEventLogA,'ElfOpenBackupEventLogA',\
ElfOpenBackupEventLogW,'ElfOpenBackupEventLogW',\
ElfOpenEventLogA,'ElfOpenEventLogA',\
ElfOpenEventLogW,'ElfOpenEventLogW',\
ElfReadEventLogA,'ElfReadEventLogA',\
ElfReadEventLogW,'ElfReadEventLogW',\
ElfRegisterEventSourceA,'ElfRegisterEventSourceA',\
ElfRegisterEventSourceW,'ElfRegisterEventSourceW',\
ElfReportEventA,'ElfReportEventA',\
ElfReportEventW,'ElfReportEventW',\
EncryptFileA,'EncryptFileA',\
EncryptFileW,'EncryptFileW',\
EnumDependentServicesA,'EnumDependentServicesA',\
EnumDependentServicesW,'EnumDependentServicesW',\
EnumServicesStatusA,'EnumServicesStatusA',\
EnumServicesStatusW,'EnumServicesStatusW',\
EqualPrefixSid,'EqualPrefixSid',\
EqualSid,'EqualSid',\
FindFirstFreeAce,'FindFirstFreeAce',\
FreeSid,'FreeSid',\
GetAccessPermissionsForObjectA,'GetAccessPermissionsForObjectA',\
GetAccessPermissionsForObjectW,'GetAccessPermissionsForObjectW',\
GetAce,'GetAce',\
GetAclInformation,'GetAclInformation',\
GetAuditedPermissionsFromAclA,'GetAuditedPermissionsFromAclA',\
GetAuditedPermissionsFromAclW,'GetAuditedPermissionsFromAclW',\
GetCurrentHwProfileA,'GetCurrentHwProfileA',\
GetCurrentHwProfileW,'GetCurrentHwProfileW',\
GetEffectiveRightsFromAclA,'GetEffectiveRightsFromAclA',\
GetEffectiveRightsFromAclW,'GetEffectiveRightsFromAclW',\
GetExplicitEntriesFromAclA,'GetExplicitEntriesFromAclA',\
GetExplicitEntriesFromAclW,'GetExplicitEntriesFromAclW',\
GetFileSecurityA,'GetFileSecurityA',\
GetFileSecurityW,'GetFileSecurityW',\
GetKernelObjectSecurity,'GetKernelObjectSecurity',\
GetLengthSid,'GetLengthSid',\
GetMultipleTrusteeA,'GetMultipleTrusteeA',\
GetMultipleTrusteeW,'GetMultipleTrusteeW',\
GetMultipleTrusteeOperationA,'GetMultipleTrusteeOperationA',\
GetMultipleTrusteeOperationW,'GetMultipleTrusteeOperationW',\
GetNamedSecurityInfoA,'GetNamedSecurityInfoA',\
GetNamedSecurityInfoW,'GetNamedSecurityInfoW',\
GetNamedSecurityInfoExA,'GetNamedSecurityInfoExA',\
GetNamedSecurityInfoExW,'GetNamedSecurityInfoExW',\
GetNumberOfEventLogRecords,'GetNumberOfEventLogRecords',\
GetOldestEventLogRecord,'GetOldestEventLogRecord',\
GetOverlappedAccessResults,'GetOverlappedAccessResults',\
GetPrivateObjectSecurity,'GetPrivateObjectSecurity',\
GetSecurityDescriptorControl,'GetSecurityDescriptorControl',\
GetSecurityDescriptorDacl,'GetSecurityDescriptorDacl',\
GetSecurityDescriptorGroup,'GetSecurityDescriptorGroup',\
GetSecurityDescriptorLength,'GetSecurityDescriptorLength',\
GetSecurityDescriptorOwner,'GetSecurityDescriptorOwner',\
GetSecurityDescriptorSacl,'GetSecurityDescriptorSacl',\
GetSecurityInfo,'GetSecurityInfo',\
GetSecurityInfoExA,'GetSecurityInfoExA',\
GetSecurityInfoExW,'GetSecurityInfoExW',\
GetServiceDisplayNameA,'GetServiceDisplayNameA',\
GetServiceDisplayNameW,'GetServiceDisplayNameW',\
GetServiceKeyNameA,'GetServiceKeyNameA',\
GetServiceKeyNameW,'GetServiceKeyNameW',\
GetSidLengthRequiredA,'GetSidLengthRequiredA',\
GetSidLengthRequiredW,'GetSidLengthRequiredW',\
GetSidSubAuthority,'GetSidSubAuthority',\
GetSidSubAuthorityCount,'GetSidSubAuthorityCount',\
GetTokenInformation,'GetTokenInformation',\
GetTrusteeNameA,'GetTrusteeNameA',\
GetTrusteeNameW,'GetTrusteeNameW',\
GetTrusteeTypeA,'GetTrusteeTypeA',\
GetTrusteeTypeW,'GetTrusteeTypeW',\
GetUserNameA,'GetUserNameA',\
GetUserNameW,'GetUserNameW',\
I_ScSetServiceBitsA,'I_ScSetServiceBitsA',\
I_ScSetServiceBitsW,'I_ScSetServiceBitsW',\
ImpersonateLoggedOnUser,'ImpersonateLoggedOnUser',\
ImpersonateNamedPipeClient,'ImpersonateNamedPipeClient',\
ImpersonateSelf,'ImpersonateSelf',\
InitializeAcl,'InitializeAcl',\
InitializeSecurityDescriptor,'InitializeSecurityDescriptor',\
InitializeSid,'InitializeSid',\
InitiateSystemShutdownA,'InitiateSystemShutdownA',\
InitiateSystemShutdownW,'InitiateSystemShutdownW',\
IsTextUnicode,'IsTextUnicode',\
IsTokenRestricted,'IsTokenRestricted',\
IsValidAcl,'IsValidAcl',\
IsValidSecurityDescriptor,'IsValidSecurityDescriptor',\
IsValidSid,'IsValidSid',\
LockServiceDatabase,'LockServiceDatabase',\
LogonUserA,'LogonUserA',\
LogonUserW,'LogonUserW',\
LookupAccountNameA,'LookupAccountNameA',\
LookupAccountNameW,'LookupAccountNameW',\
LookupAccountSidA,'LookupAccountSidA',\
LookupAccountSidW,'LookupAccountSidW',\
LookupPrivilegeDisplayNameA,'LookupPrivilegeDisplayNameA',\
LookupPrivilegeDisplayNameW,'LookupPrivilegeDisplayNameW',\
LookupPrivilegeNameA,'LookupPrivilegeNameA',\
LookupPrivilegeNameW,'LookupPrivilegeNameW',\
LookupPrivilegeValueA,'LookupPrivilegeValueA',\
LookupPrivilegeValueW,'LookupPrivilegeValueW',\
LookupSecurityDescriptorPartsA,'LookupSecurityDescriptorPartsA',\
LookupSecurityDescriptorPartsW,'LookupSecurityDescriptorPartsW',\
LsaAddAccountRights,'LsaAddAccountRights',\
LsaAddPrivilegesToAccount,'LsaAddPrivilegesToAccount',\
LsaClearAuditLog,'LsaClearAuditLog',\
LsaClose,'LsaClose',\
LsaCreateAccount,'LsaCreateAccount',\
LsaCreateSecret,'LsaCreateSecret',\
LsaCreateTrustedDomain,'LsaCreateTrustedDomain',\
LsaCreateTrustedDomainEx,'LsaCreateTrustedDomainEx',\
LsaDelete,'LsaDelete',\
LsaDeleteTrustedDomain,'LsaDeleteTrustedDomain',\
LsaEnumerateAccountRights,'LsaEnumerateAccountRights',\
LsaEnumerateAccounts,'LsaEnumerateAccounts',\
LsaEnumerateAccountsWithUserRight,'LsaEnumerateAccountsWithUserRight',\
LsaEnumeratePrivileges,'LsaEnumeratePrivileges',\
LsaEnumeratePrivilegesOfAccount,'LsaEnumeratePrivilegesOfAccount',\
LsaEnumerateTrustedDomains,'LsaEnumerateTrustedDomains',\
LsaEnumerateTrustedDomainsEx,'LsaEnumerateTrustedDomainsEx',\
LsaFreeMemory,'LsaFreeMemory',\
LsaGetQuotasForAccount,'LsaGetQuotasForAccount',\
LsaGetSystemAccessAccount,'LsaGetSystemAccessAccount',\
LsaGetUserName,'LsaGetUserName',\
LsaICLookupNames,'LsaICLookupNames',\
LsaICLookupSids,'LsaICLookupSids',\
LsaIGetTrustedDomainAuthInfoBlobs,'LsaIGetTrustedDomainAuthInfoBlobs',\
LsaISetTrustedDomainAuthInfoBlobs,'LsaISetTrustedDomainAuthInfoBlobs',\
LsaLookupNames,'LsaLookupNames',\
LsaLookupPrivilegeDisplayName,'LsaLookupPrivilegeDisplayName',\
LsaLookupPrivilegeName,'LsaLookupPrivilegeName',\
LsaLookupPrivilegeValue,'LsaLookupPrivilegeValue',\
LsaLookupSids,'LsaLookupSids',\
LsaNtStatusToWinError,'LsaNtStatusToWinError',\
LsaOpenAccount,'LsaOpenAccount',\
LsaOpenPolicy,'LsaOpenPolicy',\
LsaOpenSecret,'LsaOpenSecret',\
LsaOpenTrustedDomain,'LsaOpenTrustedDomain',\
LsaQueryDomainInformationPolicy,'LsaQueryDomainInformationPolicy',\
LsaQueryInfoTrustedDomain,'LsaQueryInfoTrustedDomain',\
LsaQueryInformationPolicy,'LsaQueryInformationPolicy',\
LsaQueryLocalInformationPolicy,'LsaQueryLocalInformationPolicy',\
LsaQuerySecret,'LsaQuerySecret',\
LsaQuerySecurityObject,'LsaQuerySecurityObject',\
LsaQueryTrustedDomainInfo,'LsaQueryTrustedDomainInfo',\
LsaQueryTrustedDomainInfoByName,'LsaQueryTrustedDomainInfoByName',\
LsaRemoveAccountRights,'LsaRemoveAccountRights',\
LsaRemovePrivilegesFromAccount,'LsaRemovePrivilegesFromAccount',\
LsaRetrievePrivateData,'LsaRetrievePrivateData',\
LsaSetDomainInformationPolicy,'LsaSetDomainInformationPolicy',\
LsaSetInformationPolicy,'LsaSetInformationPolicy',\
LsaSetInformationTrustedDomain,'LsaSetInformationTrustedDomain',\
LsaSetLocalInformationPolicy,'LsaSetLocalInformationPolicy',\
LsaSetQuotasForAccount,'LsaSetQuotasForAccount',\
LsaSetSecret,'LsaSetSecret',\
LsaSetSecurityObject,'LsaSetSecurityObject',\
LsaSetSystemAccessAccount,'LsaSetSystemAccessAccount',\
LsaSetTrustedDomainInfoByName,'LsaSetTrustedDomainInfoByName',\
LsaSetTrustedDomainInformation,'LsaSetTrustedDomainInformation',\
LsaStorePrivateData,'LsaStorePrivateData',\
MakeAbsoluteSD,'MakeAbsoluteSD',\
MakeSelfRelativeSD,'MakeSelfRelativeSD',\
MapGenericMask,'MapGenericMask',\
NotifyBootConfigStatus,'NotifyBootConfigStatus',\
NotifyChangeEventLog,'NotifyChangeEventLog',\
ObjectCloseAuditAlarmA,'ObjectCloseAuditAlarmA',\
ObjectCloseAuditAlarmW,'ObjectCloseAuditAlarmW',\
ObjectDeleteAuditAlarmA,'ObjectDeleteAuditAlarmA',\
ObjectDeleteAuditAlarmW,'ObjectDeleteAuditAlarmW',\
ObjectOpenAuditAlarmA,'ObjectOpenAuditAlarmA',\
ObjectOpenAuditAlarmW,'ObjectOpenAuditAlarmW',\
ObjectPrivilegeAuditAlarmA,'ObjectPrivilegeAuditAlarmA',\
ObjectPrivilegeAuditAlarmW,'ObjectPrivilegeAuditAlarmW',\
OpenBackupEventLogA,'OpenBackupEventLogA',\
OpenBackupEventLogW,'OpenBackupEventLogW',\
OpenEventLogA,'OpenEventLogA',\
OpenEventLogW,'OpenEventLogW',\
OpenProcessToken,'OpenProcessToken',\
OpenRawA,'OpenRawA',\
OpenRawW,'OpenRawW',\
OpenSCManagerA,'OpenSCManagerA',\
OpenSCManagerW,'OpenSCManagerW',\
OpenServiceA,'OpenServiceA',\
OpenServiceW,'OpenServiceW',\
OpenThreadToken,'OpenThreadToken',\
PrivilegeCheck,'PrivilegeCheck',\
PrivilegedServiceAuditAlarmA,'PrivilegedServiceAuditAlarmA',\
PrivilegedServiceAuditAlarmW,'PrivilegedServiceAuditAlarmW',\
QueryRecoveryAgentsA,'QueryRecoveryAgentsA',\
QueryRecoveryAgentsW,'QueryRecoveryAgentsW',\
QueryServiceConfig2A,'QueryServiceConfig2A',\
QueryServiceConfig2W,'QueryServiceConfig2W',\
QueryServiceConfigA,'QueryServiceConfigA',\
QueryServiceConfigW,'QueryServiceConfigW',\
QueryServiceLockStatusA,'QueryServiceLockStatusA',\
QueryServiceLockStatusW,'QueryServiceLockStatusW',\
QueryServiceObjectSecurity,'QueryServiceObjectSecurity',\
QueryServiceStatus,'QueryServiceStatus',\
QueryWindows31FilesMigration,'QueryWindows31FilesMigration',\
ReadEventLogA,'ReadEventLogA',\
ReadEventLogW,'ReadEventLogW',\
ReadRaw,'ReadRaw',\
RegCloseKey,'RegCloseKey',\
RegConnectRegistryA,'RegConnectRegistryA',\
RegConnectRegistryW,'RegConnectRegistryW',\
RegCreateKeyA,'RegCreateKeyA',\
RegCreateKeyW,'RegCreateKeyW',\
RegCreateKeyExA,'RegCreateKeyExA',\
RegCreateKeyExW,'RegCreateKeyExW',\
RegDeleteKeyA,'RegDeleteKeyA',\
RegDeleteKeyW,'RegDeleteKeyW',\
RegDeleteValueA,'RegDeleteValueA',\
RegDeleteValueW,'RegDeleteValueW',\
RegEnumKeyA,'RegEnumKeyA',\
RegEnumKeyW,'RegEnumKeyW',\
RegEnumKeyExA,'RegEnumKeyExA',\
RegEnumKeyExW,'RegEnumKeyExW',\
RegEnumValueA,'RegEnumValueA',\
RegEnumValueW,'RegEnumValueW',\
RegFlushKey,'RegFlushKey',\
RegGetKeySecurity,'RegGetKeySecurity',\
RegLoadKeyA,'RegLoadKeyA',\
RegLoadKeyW,'RegLoadKeyW',\
RegNotifyChangeKeyValue,'RegNotifyChangeKeyValue',\
RegOpenKeyA,'RegOpenKeyA',\
RegOpenKeyW,'RegOpenKeyW',\
RegOpenKeyExA,'RegOpenKeyExA',\
RegOpenKeyExW,'RegOpenKeyExW',\
RegOverridePredefKey,'RegOverridePredefKey',\
RegQueryInfoKeyA,'RegQueryInfoKeyA',\
RegQueryInfoKeyW,'RegQueryInfoKeyW',\
RegQueryMultipleValuesA,'RegQueryMultipleValuesA',\
RegQueryMultipleValuesW,'RegQueryMultipleValuesW',\
RegQueryValueA,'RegQueryValueA',\
RegQueryValueW,'RegQueryValueW',\
RegQueryValueExA,'RegQueryValueExA',\
RegQueryValueExW,'RegQueryValueExW',\
RegReplaceKeyA,'RegReplaceKeyA',\
RegReplaceKeyW,'RegReplaceKeyW',\
RegRestoreKeyA,'RegRestoreKeyA',\
RegRestoreKeyW,'RegRestoreKeyW',\
RegSaveKeyA,'RegSaveKeyA',\
RegSaveKeyW,'RegSaveKeyW',\
RegSetKeySecurity,'RegSetKeySecurity',\
RegSetValueA,'RegSetValueA',\
RegSetValueW,'RegSetValueW',\
RegSetValueExA,'RegSetValueExA',\
RegSetValueExW,'RegSetValueExW',\
RegUnLoadKeyA,'RegUnLoadKeyA',\
RegUnLoadKeyW,'RegUnLoadKeyW',\
RegisterEventSourceA,'RegisterEventSourceA',\
RegisterEventSourceW,'RegisterEventSourceW',\
RegisterServiceCtrlHandlerA,'RegisterServiceCtrlHandlerA',\
RegisterServiceCtrlHandlerW,'RegisterServiceCtrlHandlerW',\
ReportEventA,'ReportEventA',\
ReportEventW,'ReportEventW',\
RevertToSelf,'RevertToSelf',\
SetAclInformation,'SetAclInformation',\
SetEntriesInAccessListA,'SetEntriesInAccessListA',\
SetEntriesInAccessListW,'SetEntriesInAccessListW',\
SetEntriesInAclA,'SetEntriesInAclA',\
SetEntriesInAclW,'SetEntriesInAclW',\
SetEntriesInAuditListA,'SetEntriesInAuditListA',\
SetEntriesInAuditListW,'SetEntriesInAuditListW',\
SetFileSecurityA,'SetFileSecurityA',\
SetFileSecurityW,'SetFileSecurityW',\
SetKernelObjectSecurity,'SetKernelObjectSecurity',\
SetNamedSecurityInfoA,'SetNamedSecurityInfoA',\
SetNamedSecurityInfoW,'SetNamedSecurityInfoW',\
SetNamedSecurityInfoExA,'SetNamedSecurityInfoExA',\
SetNamedSecurityInfoExW,'SetNamedSecurityInfoExW',\
SetPrivateObjectSecurity,'SetPrivateObjectSecurity',\
SetPrivateObjectSecurityEx,'SetPrivateObjectSecurityEx',\
SetSecurityDescriptorControl,'SetSecurityDescriptorControl',\
SetSecurityDescriptorDacl,'SetSecurityDescriptorDacl',\
SetSecurityDescriptorGroup,'SetSecurityDescriptorGroup',\
SetSecurityDescriptorOwner,'SetSecurityDescriptorOwner',\
SetSecurityDescriptorSacl,'SetSecurityDescriptorSacl',\
SetSecurityInfo,'SetSecurityInfo',\
SetSecurityInfoExA,'SetSecurityInfoExA',\
SetSecurityInfoExW,'SetSecurityInfoExW',\
SetServiceBits,'SetServiceBits',\
SetServiceObjectSecurity,'SetServiceObjectSecurity',\
SetServiceStatus,'SetServiceStatus',\
SetThreadToken,'SetThreadToken',\
SetTokenInformation,'SetTokenInformation',\
StartServiceA,'StartServiceA',\
StartServiceW,'StartServiceW',\
StartServiceCtrlDispatcherA,'StartServiceCtrlDispatcherA',\
StartServiceCtrlDispatcherW,'StartServiceCtrlDispatcherW',\
SynchronizeWindows31FilesAndWindowsNTRegistry,'SynchronizeWindows31FilesAndWindowsNTRegistry',\
TrusteeAccessToObjectA,'TrusteeAccessToObjectA',\
TrusteeAccessToObjectW,'TrusteeAccessToObjectW',\
UnlockServiceDatabase,'UnlockServiceDatabase',\
WriteRaw,'WriteRaw'
api AbortSystemShutdown,\
AccessCheckAndAuditAlarm,\
AccessCheckByTypeAndAuditAlarm,\
AccessCheckByTypeResultListAndAuditAlarm,\
BackupEventLog,\
BuildExplicitAccessWithName,\
BuildImpersonateExplicitAccessWithName,\
BuildImpersonateTrustee,\
BuildSecurityDescriptor,\
BuildTrusteeWithName,\
BuildTrusteeWithSid,\
ChangeServiceConfig2,\
ChangeServiceConfig,\
ClearEventLog,\
ConvertAccessToSecurityDescriptor,\
ConvertSecurityDescriptorToAccess,\
ConvertSecurityDescriptorToAccessNamed,\
CreateProcessAsUser,\
CreateService,\
CryptAcquireContext,\
CryptEnumProviderTypes,\
CryptEnumProviders,\
CryptGetDefaultProvider,\
CryptSetProvider,\
CryptSetProviderEx,\
CryptSignHash,\
CryptVerifySignature,\
DecryptFile,\
ElfBackupEventLogFile,\
ElfClearEventLogFile,\
ElfOpenBackupEventLog,\
ElfOpenEventLog,\
ElfReadEventLog,\
ElfRegisterEventSource,\
ElfReportEvent,\
EncryptFile,\
EnumDependentServices,\
EnumServicesStatus,\
GetAccessPermissionsForObject,\
GetAuditedPermissionsFromAcl,\
GetCurrentHwProfile,\
GetEffectiveRightsFromAcl,\
GetExplicitEntriesFromAcl,\
GetFileSecurity,\
GetMultipleTrustee,\
GetMultipleTrusteeOperation,\
GetNamedSecurityInfo,\
GetNamedSecurityInfoEx,\
GetSecurityInfoEx,\
GetServiceDisplayName,\
GetServiceKeyName,\
GetSidLengthRequired,\
GetTrusteeName,\
GetTrusteeType,\
GetUserName,\
I_ScSetServiceBits,\
InitiateSystemShutdown,\
LogonUser,\
LookupAccountName,\
LookupAccountSid,\
LookupPrivilegeDisplayName,\
LookupPrivilegeName,\
LookupPrivilegeValue,\
LookupSecurityDescriptorParts,\
ObjectCloseAuditAlarm,\
ObjectDeleteAuditAlarm,\
ObjectOpenAuditAlarm,\
ObjectPrivilegeAuditAlarm,\
OpenBackupEventLog,\
OpenEventLog,\
OpenRaw,\
OpenSCManager,\
OpenService,\
PrivilegedServiceAuditAlarm,\
QueryRecoveryAgents,\
QueryServiceConfig2,\
QueryServiceConfig,\
QueryServiceLockStatus,\
ReadEventLog,\
RegConnectRegistry,\
RegCreateKey,\
RegCreateKeyEx,\
RegDeleteKey,\
RegDeleteValue,\
RegEnumKey,\
RegEnumKeyEx,\
RegEnumValue,\
RegLoadKey,\
RegOpenKey,\
RegOpenKeyEx,\
RegQueryInfoKey,\
RegQueryMultipleValues,\
RegQueryValue,\
RegQueryValueEx,\
RegReplaceKey,\
RegRestoreKey,\
RegSaveKey,\
RegSetValue,\
RegSetValueEx,\
RegUnLoadKey,\
RegisterEventSource,\
RegisterServiceCtrlHandler,\
ReportEvent,\
SetEntriesInAccessList,\
SetEntriesInAcl,\
SetEntriesInAuditList,\
SetFileSecurity,\
SetNamedSecurityInfo,\
SetNamedSecurityInfoEx,\
SetSecurityInfoEx,\
StartService,\
StartServiceCtrlDispatcher,\
TrusteeAccessToObject

View file

@ -0,0 +1,81 @@
; COMCTL32 API calls
import comctl32,\
CreateMappedBitmap,'CreateMappedBitmap',\
CreatePropertySheetPageA,'CreatePropertySheetPageA',\
CreatePropertySheetPageW,'CreatePropertySheetPageW',\
CreateStatusWindowA,'CreateStatusWindowA',\
CreateStatusWindowW,'CreateStatusWindowW',\
CreateToolbar,'CreateToolbar',\
CreateToolbarEx,'CreateToolbarEx',\
CreateUpDownControl,'CreateUpDownControl',\
DestroyPropertySheetPage,'DestroyPropertySheetPage',\
DrawInsert,'DrawInsert',\
DrawStatusTextA,'DrawStatusTextA',\
DrawStatusTextW,'DrawStatusTextW',\
FlatSB_EnableScrollBar,'FlatSB_EnableScrollBar',\
FlatSB_GetScrollInfo,'FlatSB_GetScrollInfo',\
FlatSB_GetScrollPos,'FlatSB_GetScrollPos',\
FlatSB_GetScrollProp,'FlatSB_GetScrollProp',\
FlatSB_GetScrollRange,'FlatSB_GetScrollRange',\
FlatSB_SetScrollInfo,'FlatSB_SetScrollInfo',\
FlatSB_SetScrollPos,'FlatSB_SetScrollPos',\
FlatSB_SetScrollProp,'FlatSB_SetScrollProp',\
FlatSB_SetScrollRange,'FlatSB_SetScrollRange',\
FlatSB_ShowScrollBar,'FlatSB_ShowScrollBar',\
GetEffectiveClientRect,'GetEffectiveClientRect',\
ImageList_Add,'ImageList_Add',\
ImageList_AddIcon,'ImageList_AddIcon',\
ImageList_AddMasked,'ImageList_AddMasked',\
ImageList_BeginDrag,'ImageList_BeginDrag',\
ImageList_Copy,'ImageList_Copy',\
ImageList_Create,'ImageList_Create',\
ImageList_Destroy,'ImageList_Destroy',\
ImageList_DragEnter,'ImageList_DragEnter',\
ImageList_DragLeave,'ImageList_DragLeave',\
ImageList_DragMove,'ImageList_DragMove',\
ImageList_DragShowNolock,'ImageList_DragShowNolock',\
ImageList_Draw,'ImageList_Draw',\
ImageList_DrawEx,'ImageList_DrawEx',\
ImageList_DrawIndirect,'ImageList_DrawIndirect',\
ImageList_Duplicate,'ImageList_Duplicate',\
ImageList_EndDrag,'ImageList_EndDrag',\
ImageList_GetBkColor,'ImageList_GetBkColor',\
ImageList_GetDragImage,'ImageList_GetDragImage',\
ImageList_GetIcon,'ImageList_GetIcon',\
ImageList_GetIconSize,'ImageList_GetIconSize',\
ImageList_GetImageCount,'ImageList_GetImageCount',\
ImageList_GetImageInfo,'ImageList_GetImageInfo',\
ImageList_GetImageRect,'ImageList_GetImageRect',\
ImageList_LoadImageA,'ImageList_LoadImageA',\
ImageList_LoadImageW,'ImageList_LoadImageW',\
ImageList_Merge,'ImageList_Merge',\
ImageList_Read,'ImageList_Read',\
ImageList_Remove,'ImageList_Remove',\
ImageList_Replace,'ImageList_Replace',\
ImageList_ReplaceIcon,'ImageList_ReplaceIcon',\
ImageList_SetBkColor,'ImageList_SetBkColor',\
ImageList_SetDragCursorImage,'ImageList_SetDragCursorImage',\
ImageList_SetFilter,'ImageList_SetFilter',\
ImageList_SetIconSize,'ImageList_SetIconSize',\
ImageList_SetImageCount,'ImageList_SetImageCount',\
ImageList_SetOverlayImage,'ImageList_SetOverlayImage',\
ImageList_Write,'ImageList_Write',\
InitCommonControls,'InitCommonControls',\
InitCommonControlsEx,'InitCommonControlsEx',\
InitializeFlatSB,'InitializeFlatSB',\
LBItemFromPt,'LBItemFromPt',\
MakeDragList,'MakeDragList',\
MenuHelp,'MenuHelp',\
PropertySheetA,'PropertySheetA',\
PropertySheetW,'PropertySheetW',\
ShowHideMenuCtl,'ShowHideMenuCtl',\
UninitializeFlatSB,'UninitializeFlatSB',\
_TrackMouseEvent,'_TrackMouseEvent'
api CreatePropertySheetPage,\
CreateStatusWindow,\
DrawStatusText,\
ImageList_LoadImage,\
PropertySheet

View file

@ -0,0 +1,38 @@
; COMDLG32 API calls
import comdlg32,\
ChooseColorA,'ChooseColorA',\
ChooseColorW,'ChooseColorW',\
ChooseFontA,'ChooseFontA',\
ChooseFontW,'ChooseFontW',\
CommDlgExtendedError,'CommDlgExtendedError',\
FindTextA,'FindTextA',\
FindTextW,'FindTextW',\
FormatCharDlgProc,'FormatCharDlgProc',\
GetFileTitleA,'GetFileTitleA',\
GetFileTitleW,'GetFileTitleW',\
GetOpenFileNameA,'GetOpenFileNameA',\
GetOpenFileNameW,'GetOpenFileNameW',\
GetSaveFileNameA,'GetSaveFileNameA',\
GetSaveFileNameW,'GetSaveFileNameW',\
LoadAlterBitmap,'LoadAlterBitmap',\
PageSetupDlgA,'PageSetupDlgA',\
PageSetupDlgW,'PageSetupDlgW',\
PrintDlgA,'PrintDlgA',\
PrintDlgW,'PrintDlgW',\
ReplaceTextA,'ReplaceTextA',\
ReplaceTextW,'ReplaceTextW',\
WantArrows,'WantArrows',\
dwLBSubclass,'dwLBSubclass',\
dwOKSubclass,'dwOKSubclass'
api ChooseColor,\
ChooseFont,\
FindText,\
GetFileTitle,\
GetOpenFileName,\
GetSaveFileName,\
PageSetupDlg,\
PrintDlg,\
ReplaceText

419
tools/INCLUDE/API/GDI32.INC Normal file
View file

@ -0,0 +1,419 @@
; GDI32 API calls
import gdi32,\
AbortDoc,'AbortDoc',\
AbortPath,'AbortPath',\
AddFontMemResourceEx,'AddFontMemResourceEx',\
AddFontResourceA,'AddFontResourceA',\
AddFontResourceW,'AddFontResourceW',\
AddFontResourceExA,'AddFontResourceExA',\
AddFontResourceExW,'AddFontResourceExW',\
AngleArc,'AngleArc',\
AnimatePalette,'AnimatePalette',\
Arc,'Arc',\
ArcTo,'ArcTo',\
BeginPath,'BeginPath',\
BitBlt,'BitBlt',\
CancelDC,'CancelDC',\
CheckColorsInGamut,'CheckColorsInGamut',\
ChoosePixelFormat,'ChoosePixelFormat',\
Chord,'Chord',\
CloseEnhMetaFile,'CloseEnhMetaFile',\
CloseFigure,'CloseFigure',\
CloseMetaFile,'CloseMetaFile',\
ColorCorrectPalette,'ColorCorrectPalette',\
ColorMatchToTarget,'ColorMatchToTarget',\
CombineRgn,'CombineRgn',\
CombineTransform,'CombineTransform',\
CopyEnhMetaFileA,'CopyEnhMetaFileA',\
CopyEnhMetaFileW,'CopyEnhMetaFileW',\
CopyMetaFileA,'CopyMetaFileA',\
CopyMetaFileW,'CopyMetaFileW',\
CreateBitmap,'CreateBitmap',\
CreateBitmapIndirect,'CreateBitmapIndirect',\
CreateBrushIndirect,'CreateBrushIndirect',\
CreateColorSpaceA,'CreateColorSpaceA',\
CreateColorSpaceW,'CreateColorSpaceW',\
CreateCompatibleBitmap,'CreateCompatibleBitmap',\
CreateCompatibleDC,'CreateCompatibleDC',\
CreateDCA,'CreateDCA',\
CreateDCW,'CreateDCW',\
CreateDIBPatternBrush,'CreateDIBPatternBrush',\
CreateDIBPatternBrushPt,'CreateDIBPatternBrushPt',\
CreateDIBSection,'CreateDIBSection',\
CreateDIBitmap,'CreateDIBitmap',\
CreateDiscardableBitmap,'CreateDiscardableBitmap',\
CreateEllipticRgn,'CreateEllipticRgn',\
CreateEllipticRgnIndirect,'CreateEllipticRgnIndirect',\
CreateEnhMetaFileA,'CreateEnhMetaFileA',\
CreateEnhMetaFileW,'CreateEnhMetaFileW',\
CreateFontA,'CreateFontA',\
CreateFontW,'CreateFontW',\
CreateFontIndirectA,'CreateFontIndirectA',\
CreateFontIndirectW,'CreateFontIndirectW',\
CreateFontIndirectExA,'CreateFontIndirectExA',\
CreateFontIndirectExW,'CreateFontIndirectExW',\
CreateHalftonePalette,'CreateHalftonePalette',\
CreateHatchBrush,'CreateHatchBrush',\
CreateICA,'CreateICA',\
CreateICW,'CreateICW',\
CreateMetaFileA,'CreateMetaFileA',\
CreateMetaFileW,'CreateMetaFileW',\
CreatePalette,'CreatePalette',\
CreatePatternBrush,'CreatePatternBrush',\
CreatePen,'CreatePen',\
CreatePenIndirect,'CreatePenIndirect',\
CreatePolyPolygonRgn,'CreatePolyPolygonRgn',\
CreatePolygonRgn,'CreatePolygonRgn',\
CreateRectRgn,'CreateRectRgn',\
CreateRectRgnIndirect,'CreateRectRgnIndirect',\
CreateRoundRectRgn,'CreateRoundRectRgn',\
CreateScalableFontResourceA,'CreateScalableFontResourceA',\
CreateScalableFontResourceW,'CreateScalableFontResourceW',\
CreateSolidBrush,'CreateSolidBrush',\
DPtoLP,'DPtoLP',\
DeleteColorSpace,'DeleteColorSpace',\
DeleteDC,'DeleteDC',\
DeleteEnhMetaFile,'DeleteEnhMetaFile',\
DeleteMetaFile,'DeleteMetaFile',\
DeleteObject,'DeleteObject',\
DescribePixelFormat,'DescribePixelFormat',\
DeviceCapabilitiesExA,'DeviceCapabilitiesExA',\
DeviceCapabilitiesExW,'DeviceCapabilitiesExW',\
DrawEscape,'DrawEscape',\
Ellipse,'Ellipse',\
EnableEUDC,'EnableEUDC',\
EndDoc,'EndDoc',\
EndPage,'EndPage',\
EndPath,'EndPath',\
EnumEnhMetaFile,'EnumEnhMetaFile',\
EnumFontFamiliesA,'EnumFontFamiliesA',\
EnumFontFamiliesW,'EnumFontFamiliesW',\
EnumFontFamiliesExA,'EnumFontFamiliesExA',\
EnumFontFamiliesExW,'EnumFontFamiliesExW',\
EnumFontsA,'EnumFontsA',\
EnumFontsW,'EnumFontsW',\
EnumICMProfilesA,'EnumICMProfilesA',\
EnumICMProfilesW,'EnumICMProfilesW',\
EnumMetaFile,'EnumMetaFile',\
EnumObjects,'EnumObjects',\
EqualRgn,'EqualRgn',\
Escape,'Escape',\
ExcludeClipRect,'ExcludeClipRect',\
ExtCreatePen,'ExtCreatePen',\
ExtCreateRegion,'ExtCreateRegion',\
ExtEscape,'ExtEscape',\
ExtFloodFill,'ExtFloodFill',\
ExtSelectClipRgn,'ExtSelectClipRgn',\
ExtTextOutA,'ExtTextOutA',\
ExtTextOutW,'ExtTextOutW',\
FillPath,'FillPath',\
FillRgn,'FillRgn',\
FixBrushOrgEx,'FixBrushOrgEx',\
FlattenPath,'FlattenPath',\
FloodFill,'FloodFill',\
FrameRgn,'FrameRgn',\
GdiComment,'GdiComment',\
GdiDeleteSpoolFileHandle,'GdiDeleteSpoolFileHandle',\
GdiEndDocEMF,'GdiEndDocEMF',\
GdiEndPageEMF,'GdiEndPageEMF',\
GdiFlush,'GdiFlush',\
GdiGetBatchLimit,'GdiGetBatchLimit',\
GdiGetDC,'GdiGetDC',\
GdiGetDevmodeForPage,'GdiGetDevmodeForPage',\
GdiGetPageCount,'GdiGetPageCount',\
GdiGetPageHandle,'GdiGetPageHandle',\
GdiGetSpoolFileHandle,'GdiGetSpoolFileHandle',\
GdiPlayDCScript,'GdiPlayDCScript',\
GdiPlayEMF,'GdiPlayEMF',\
GdiPlayJournal,'GdiPlayJournal',\
GdiPlayPageEMF,'GdiPlayPageEMF',\
GdiPlayPrivatePageEMF,'GdiPlayPrivatePageEMF',\
GdiPlayScript,'GdiPlayScript',\
GdiResetDCEMF,'GdiResetDCEMF',\
GdiSetBatchLimit,'GdiSetBatchLimit',\
GdiStartDocEMF,'GdiStartDocEMF',\
GdiStartPageEMF,'GdiStartPageEMF',\
GetArcDirection,'GetArcDirection',\
GetAspectRatioFilterEx,'GetAspectRatioFilterEx',\
GetBitmapBits,'GetBitmapBits',\
GetBitmapDimensionEx,'GetBitmapDimensionEx',\
GetBkColor,'GetBkColor',\
GetBkMode,'GetBkMode',\
GetBoundsRect,'GetBoundsRect',\
GetBrushOrgEx,'GetBrushOrgEx',\
GetCharABCWidthsA,'GetCharABCWidthsA',\
GetCharABCWidthsW,'GetCharABCWidthsW',\
GetCharABCWidthsFloatA,'GetCharABCWidthsFloatA',\
GetCharABCWidthsFloatW,'GetCharABCWidthsFloatW',\
GetCharABCWidthsI,'GetCharABCWidthsI',\
GetCharWidth32A,'GetCharWidth32A',\
GetCharWidth32W,'GetCharWidth32W',\
GetCharWidthA,'GetCharWidthA',\
GetCharWidthW,'GetCharWidthW',\
GetCharWidthFloatA,'GetCharWidthFloatA',\
GetCharWidthFloatW,'GetCharWidthFloatW',\
GetCharWidthI,'GetCharWidthI',\
GetCharacterPlacementA,'GetCharacterPlacementA',\
GetCharacterPlacementW,'GetCharacterPlacementW',\
GetClipBox,'GetClipBox',\
GetClipRgn,'GetClipRgn',\
GetColorAdjustment,'GetColorAdjustment',\
GetColorSpace,'GetColorSpace',\
GetCurrentObject,'GetCurrentObject',\
GetCurrentPositionEx,'GetCurrentPositionEx',\
GetDCBrushColor,'GetDCBrushColor',\
GetDCOrgEx,'GetDCOrgEx',\
GetDCPenColor,'GetDCPenColor',\
GetDIBColorTable,'GetDIBColorTable',\
GetDIBits,'GetDIBits',\
GetDeviceCaps,'GetDeviceCaps',\
GetDeviceGammaRamp,'GetDeviceGammaRamp',\
GetEnhMetaFileA,'GetEnhMetaFileA',\
GetEnhMetaFileW,'GetEnhMetaFileW',\
GetEnhMetaFileBits,'GetEnhMetaFileBits',\
GetEnhMetaFileDescriptionA,'GetEnhMetaFileDescriptionA',\
GetEnhMetaFileDescriptionW,'GetEnhMetaFileDescriptionW',\
GetEnhMetaFileHeader,'GetEnhMetaFileHeader',\
GetEnhMetaFilePaletteEntries,'GetEnhMetaFilePaletteEntries',\
GetEnhMetaFilePixelFormat,'GetEnhMetaFilePixelFormat',\
GetFontAssocStatus,'GetFontAssocStatus',\
GetFontData,'GetFontData',\
GetFontLanguageInfo,'GetFontLanguageInfo',\
GetFontUnicodeRanges,'GetFontUnicodeRanges',\
GetGlyphIndicesA,'GetGlyphIndicesA',\
GetGlyphIndicesW,'GetGlyphIndicesW',\
GetGlyphOutlineA,'GetGlyphOutlineA',\
GetGlyphOutlineW,'GetGlyphOutlineW',\
GetGraphicsMode,'GetGraphicsMode',\
GetICMProfileA,'GetICMProfileA',\
GetICMProfileW,'GetICMProfileW',\
GetKerningPairsA,'GetKerningPairsA',\
GetKerningPairsW,'GetKerningPairsW',\
GetLogColorSpaceA,'GetLogColorSpaceA',\
GetLogColorSpaceW,'GetLogColorSpaceW',\
GetMapMode,'GetMapMode',\
GetMetaFileA,'GetMetaFileA',\
GetMetaFileW,'GetMetaFileW',\
GetMetaFileBitsEx,'GetMetaFileBitsEx',\
GetMetaRgn,'GetMetaRgn',\
GetMiterLimit,'GetMiterLimit',\
GetNearestColor,'GetNearestColor',\
GetNearestPaletteIndex,'GetNearestPaletteIndex',\
GetObjectA,'GetObjectA',\
GetObjectW,'GetObjectW',\
GetObjectType,'GetObjectType',\
GetOutlineTextMetricsA,'GetOutlineTextMetricsA',\
GetOutlineTextMetricsW,'GetOutlineTextMetricsW',\
GetPaletteEntries,'GetPaletteEntries',\
GetPath,'GetPath',\
GetPixel,'GetPixel',\
GetPixelFormat,'GetPixelFormat',\
GetPolyFillMode,'GetPolyFillMode',\
GetROP2,'GetROP2',\
GetRandomRgn,'GetRandomRgn',\
GetRasterizerCaps,'GetRasterizerCaps',\
GetRegionData,'GetRegionData',\
GetRelAbs,'GetRelAbs',\
GetRgnBox,'GetRgnBox',\
GetStockObject,'GetStockObject',\
GetStretchBltMode,'GetStretchBltMode',\
GetSystemPaletteEntries,'GetSystemPaletteEntries',\
GetSystemPaletteUse,'GetSystemPaletteUse',\
GetTextAlign,'GetTextAlign',\
GetTextCharacterExtra,'GetTextCharacterExtra',\
GetTextCharset,'GetTextCharset',\
GetTextCharsetInfo,'GetTextCharsetInfo',\
GetTextColor,'GetTextColor',\
GetTextExtentExPointA,'GetTextExtentExPointA',\
GetTextExtentExPointW,'GetTextExtentExPointW',\
GetTextExtentExPointI,'GetTextExtentExPointI',\
GetTextExtentPoint32A,'GetTextExtentPoint32A',\
GetTextExtentPoint32W,'GetTextExtentPoint32W',\
GetTextExtentPointA,'GetTextExtentPointA',\
GetTextExtentPointW,'GetTextExtentPointW',\
GetTextExtentPointI,'GetTextExtentPointI',\
GetTextFaceA,'GetTextFaceA',\
GetTextFaceW,'GetTextFaceW',\
GetTextMetricsA,'GetTextMetricsA',\
GetTextMetricsW,'GetTextMetricsW',\
GetViewportExtEx,'GetViewportExtEx',\
GetViewportOrgEx,'GetViewportOrgEx',\
GetWinMetaFileBits,'GetWinMetaFileBits',\
GetWindowExtEx,'GetWindowExtEx',\
GetWindowOrgEx,'GetWindowOrgEx',\
GetWorldTransform,'GetWorldTransform',\
IntersectClipRect,'IntersectClipRect',\
InvertRgn,'InvertRgn',\
LPtoDP,'LPtoDP',\
LineDDA,'LineDDA',\
LineDDW,'LineDDW',\
LineTo,'LineTo',\
MaskBlt,'MaskBlt',\
ModifyWorldTransform,'ModifyWorldTransform',\
MoveToEx,'MoveToEx',\
OffsetClipRgn,'OffsetClipRgn',\
OffsetRgn,'OffsetRgn',\
OffsetViewportOrgEx,'OffsetViewportOrgEx',\
OffsetWindowOrgEx,'OffsetWindowOrgEx',\
PaintRgn,'PaintRgn',\
PatBlt,'PatBlt',\
PathToRegion,'PathToRegion',\
Pie,'Pie',\
PlayEnhMetaFile,'PlayEnhMetaFile',\
PlayEnhMetaFileRecord,'PlayEnhMetaFileRecord',\
PlayMetaFile,'PlayMetaFile',\
PlayMetaFileRecord,'PlayMetaFileRecord',\
PlgBlt,'PlgBlt',\
PolyBezier,'PolyBezier',\
PolyBezierTo,'PolyBezierTo',\
PolyDraw,'PolyDraw',\
PolyPatBlt,'PolyPatBlt',\
PolyPolygon,'PolyPolygon',\
PolyPolyline,'PolyPolyline',\
PolyTextOutA,'PolyTextOutA',\
PolyTextOutW,'PolyTextOutW',\
Polygon,'Polygon',\
Polyline,'Polyline',\
PolylineTo,'PolylineTo',\
PtInRegion,'PtInRegion',\
PtVisible,'PtVisible',\
RealizePalette,'RealizePalette',\
RectInRegion,'RectInRegion',\
RectVisible,'RectVisible',\
Rectangle,'Rectangle',\
RemoveFontMemResourceEx,'RemoveFontMemResourceEx',\
RemoveFontResourceA,'RemoveFontResourceA',\
RemoveFontResourceW,'RemoveFontResourceW',\
RemoveFontResourceExA,'RemoveFontResourceExA',\
RemoveFontResourceExW,'RemoveFontResourceExW',\
ResetDCA,'ResetDCA',\
ResetDCW,'ResetDCW',\
ResizePalette,'ResizePalette',\
RestoreDC,'RestoreDC',\
RoundRect,'RoundRect',\
SaveDC,'SaveDC',\
ScaleViewportExtEx,'ScaleViewportExtEx',\
ScaleWindowExtEx,'ScaleWindowExtEx',\
SelectBrushLocal,'SelectBrushLocal',\
SelectClipPath,'SelectClipPath',\
SelectClipRgn,'SelectClipRgn',\
SelectFontLocal,'SelectFontLocal',\
SelectObject,'SelectObject',\
SelectPalette,'SelectPalette',\
SetAbortProc,'SetAbortProc',\
SetArcDirection,'SetArcDirection',\
SetBitmapBits,'SetBitmapBits',\
SetBitmapDimensionEx,'SetBitmapDimensionEx',\
SetBkColor,'SetBkColor',\
SetBkMode,'SetBkMode',\
SetBoundsRect,'SetBoundsRect',\
SetBrushOrgEx,'SetBrushOrgEx',\
SetColorAdjustment,'SetColorAdjustment',\
SetColorSpace,'SetColorSpace',\
SetDCBrushColor,'SetDCBrushColor',\
SetDCPenColor,'SetDCPenColor',\
SetDIBColorTable,'SetDIBColorTable',\
SetDIBits,'SetDIBits',\
SetDIBitsToDevice,'SetDIBitsToDevice',\
SetDeviceGammaRamp,'SetDeviceGammaRamp',\
SetEnhMetaFileBits,'SetEnhMetaFileBits',\
SetFontEnumeration,'SetFontEnumeration',\
SetGraphicsMode,'SetGraphicsMode',\
SetICMMode,'SetICMMode',\
SetICMProfileA,'SetICMProfileA',\
SetICMProfileW,'SetICMProfileW',\
SetMagicColors,'SetMagicColors',\
SetMapMode,'SetMapMode',\
SetMapperFlags,'SetMapperFlags',\
SetMetaFileBitsEx,'SetMetaFileBitsEx',\
SetMetaRgn,'SetMetaRgn',\
SetMiterLimit,'SetMiterLimit',\
SetPaletteEntries,'SetPaletteEntries',\
SetPixel,'SetPixel',\
SetPixelFormat,'SetPixelFormat',\
SetPixelV,'SetPixelV',\
SetPolyFillMode,'SetPolyFillMode',\
SetROP2,'SetROP2',\
SetRectRgn,'SetRectRgn',\
SetRelAbs,'SetRelAbs',\
SetStretchBltMode,'SetStretchBltMode',\
SetSystemPaletteUse,'SetSystemPaletteUse',\
SetTextAlign,'SetTextAlign',\
SetTextCharacterExtra,'SetTextCharacterExtra',\
SetTextColor,'SetTextColor',\
SetTextJustification,'SetTextJustification',\
SetViewportExtEx,'SetViewportExtEx',\
SetViewportOrgEx,'SetViewportOrgEx',\
SetWinMetaFileBits,'SetWinMetaFileBits',\
SetWindowExtEx,'SetWindowExtEx',\
SetWindowOrgEx,'SetWindowOrgEx',\
SetWorldTransform,'SetWorldTransform',\
StartDocA,'StartDocA',\
StartDocW,'StartDocW',\
StartPage,'StartPage',\
StretchBlt,'StretchBlt',\
StretchDIBits,'StretchDIBits',\
StrokeAndFillPath,'StrokeAndFillPath',\
StrokePath,'StrokePath',\
SwapBuffers,'SwapBuffers',\
TextOutA,'TextOutA',\
TextOutW,'TextOutW',\
TranslateCharsetInfo,'TranslateCharsetInfo',\
UnrealizeObject,'UnrealizeObject',\
UpdateColors,'UpdateColors',\
UpdateICMRegKeyA,'UpdateICMRegKeyA',\
UpdateICMRegKeyW,'UpdateICMRegKeyW',\
WidenPath,'WidenPath',\
gdiPlaySpoolStream,'gdiPlaySpoolStream'
api AddFontResource,\
AddFontResourceEx,\
CopyEnhMetaFile,\
CopyMetaFile,\
CreateColorSpace,\
CreateDC,\
CreateEnhMetaFile,\
CreateFont,\
CreateFontIndirect,\
CreateFontIndirectEx,\
CreateIC,\
CreateMetaFile,\
CreateScalableFontResource,\
DeviceCapabilitiesEx,\
EnumFontFamilies,\
EnumFontFamiliesEx,\
EnumFonts,\
EnumICMProfiles,\
ExtTextOut,\
GetCharABCWidths,\
GetCharABCWidthsFloat,\
GetCharWidth32,\
GetCharWidth,\
GetCharWidthFloat,\
GetCharacterPlacement,\
GetEnhMetaFile,\
GetEnhMetaFileDescription,\
GetGlyphIndices,\
GetGlyphOutline,\
GetICMProfile,\
GetKerningPairs,\
GetLogColorSpace,\
GetMetaFile,\
GetObject,\
GetOutlineTextMetrics,\
GetTextExtentExPoint,\
GetTextExtentPoint32,\
GetTextExtentPoint,\
GetTextFace,\
GetTextMetrics,\
LineDD,\
PolyTextOut,\
RemoveFontResource,\
RemoveFontResourceEx,\
ResetDC,\
SetICMProfile,\
StartDoc,\
TextOut,\
UpdateICMRegKey

View file

@ -0,0 +1,881 @@
; KERNEL32 API calls
import kernel32,\
AddAtomA,'AddAtomA',\
AddAtomW,'AddAtomW',\
AddConsoleAliasA,'AddConsoleAliasA',\
AddConsoleAliasW,'AddConsoleAliasW',\
AllocConsole,'AllocConsole',\
AreFileApisANSI,'AreFileApisANSI',\
AssignProcessToJobObject,'AssignProcessToJobObject',\
BackupRead,'BackupRead',\
BackupSeek,'BackupSeek',\
BackupWrite,'BackupWrite',\
BaseAttachCompleteThunk,'BaseAttachCompleteThunk',\
Beep,'Beep',\
BeginUpdateResourceA,'BeginUpdateResourceA',\
BeginUpdateResourceW,'BeginUpdateResourceW',\
BuildCommDCBA,'BuildCommDCBA',\
BuildCommDCBW,'BuildCommDCBW',\
BuildCommDCBAndTimeoutsA,'BuildCommDCBAndTimeoutsA',\
BuildCommDCBAndTimeoutsW,'BuildCommDCBAndTimeoutsW',\
CallNamedPipeA,'CallNamedPipeA',\
CallNamedPipeW,'CallNamedPipeW',\
CancelIo,'CancelIo',\
CancelWaitableTimer,'CancelWaitableTimer',\
ClearCommBreak,'ClearCommBreak',\
ClearCommError,'ClearCommError',\
CloseConsoleHandle,'CloseConsoleHandle',\
CloseHandle,'CloseHandle',\
CloseProfileUserMapping,'CloseProfileUserMapping',\
CmdBatNotification,'CmdBatNotification',\
CommConfigDialogA,'CommConfigDialogA',\
CommConfigDialogW,'CommConfigDialogW',\
CompareFileTime,'CompareFileTime',\
CompareStringA,'CompareStringA',\
CompareStringW,'CompareStringW',\
ConnectNamedPipe,'ConnectNamedPipe',\
ConsoleMenuControl,'ConsoleMenuControl',\
ContinueDebugEvent,'ContinueDebugEvent',\
ConvertDefaultLocale,'ConvertDefaultLocale',\
ConvertThreadToFiber,'ConvertThreadToFiber',\
CopyFileA,'CopyFileA',\
CopyFileW,'CopyFileW',\
CopyFileExA,'CopyFileExA',\
CopyFileExW,'CopyFileExW',\
CreateConsoleScreenBuffer,'CreateConsoleScreenBuffer',\
CreateDirectoryA,'CreateDirectoryA',\
CreateDirectoryW,'CreateDirectoryW',\
CreateDirectoryExA,'CreateDirectoryExA',\
CreateDirectoryExW,'CreateDirectoryExW',\
CreateEventA,'CreateEventA',\
CreateEventW,'CreateEventW',\
CreateFiber,'CreateFiber',\
CreateFileA,'CreateFileA',\
CreateFileW,'CreateFileW',\
CreateFileMappingA,'CreateFileMappingA',\
CreateFileMappingW,'CreateFileMappingW',\
CreateHardLinkA,'CreateHardLinkA',\
CreateHardLinkW,'CreateHardLinkW',\
CreateIoCompletionPort,'CreateIoCompletionPort',\
CreateJobObjectA,'CreateJobObjectA',\
CreateJobObjectW,'CreateJobObjectW',\
CreateMailslotA,'CreateMailslotA',\
CreateMailslotW,'CreateMailslotW',\
CreateMutexA,'CreateMutexA',\
CreateMutexW,'CreateMutexW',\
CreateNamedPipeA,'CreateNamedPipeA',\
CreateNamedPipeW,'CreateNamedPipeW',\
CreatePipe,'CreatePipe',\
CreateProcessA,'CreateProcessA',\
CreateProcessW,'CreateProcessW',\
CreateRemoteThread,'CreateRemoteThread',\
CreateSemaphoreA,'CreateSemaphoreA',\
CreateSemaphoreW,'CreateSemaphoreW',\
CreateTapePartition,'CreateTapePartition',\
CreateThread,'CreateThread',\
CreateToolhelp32Snapshot,'CreateToolhelp32Snapshot',\
CreateVirtualBuffer,'CreateVirtualBuffer',\
CreateWaitableTimerA,'CreateWaitableTimerA',\
CreateWaitableTimerW,'CreateWaitableTimerW',\
DebugActiveProcess,'DebugActiveProcess',\
DebugBreak,'DebugBreak',\
DefineDosDeviceA,'DefineDosDeviceA',\
DefineDosDeviceW,'DefineDosDeviceW',\
DeleteAtom,'DeleteAtom',\
DeleteCriticalSection,'DeleteCriticalSection',\
DeleteFiber,'DeleteFiber',\
DeleteFileA,'DeleteFileA',\
DeleteFileW,'DeleteFileW',\
DeviceIoControl,'DeviceIoControl',\
DisableThreadLibraryCalls,'DisableThreadLibraryCalls',\
DisconnectNamedPipe,'DisconnectNamedPipe',\
DosDateTimeToFileTime,'DosDateTimeToFileTime',\
DuplicateConsoleHandle,'DuplicateConsoleHandle',\
DuplicateHandle,'DuplicateHandle',\
EndUpdateResourceA,'EndUpdateResourceA',\
EndUpdateResourceW,'EndUpdateResourceW',\
EnterCriticalSection,'EnterCriticalSection',\
EnumCalendarInfoA,'EnumCalendarInfoA',\
EnumCalendarInfoW,'EnumCalendarInfoW',\
EnumCalendarInfoExA,'EnumCalendarInfoExA',\
EnumCalendarInfoExW,'EnumCalendarInfoExW',\
EnumDateFormatsA,'EnumDateFormatsA',\
EnumDateFormatsW,'EnumDateFormatsW',\
EnumDateFormatsExA,'EnumDateFormatsExA',\
EnumDateFormatsExW,'EnumDateFormatsExW',\
EnumResourceLanguagesA,'EnumResourceLanguagesA',\
EnumResourceLanguagesW,'EnumResourceLanguagesW',\
EnumResourceNamesA,'EnumResourceNamesA',\
EnumResourceNamesW,'EnumResourceNamesW',\
EnumResourceTypesA,'EnumResourceTypesA',\
EnumResourceTypesW,'EnumResourceTypesW',\
EnumSystemCodePagesA,'EnumSystemCodePagesA',\
EnumSystemCodePagesW,'EnumSystemCodePagesW',\
EnumSystemLocalesA,'EnumSystemLocalesA',\
EnumSystemLocalesW,'EnumSystemLocalesW',\
EnumTimeFormatsA,'EnumTimeFormatsA',\
EnumTimeFormatsW,'EnumTimeFormatsW',\
EraseTape,'EraseTape',\
EscapeCommFunction,'EscapeCommFunction',\
ExitProcess,'ExitProcess',\
ExitThread,'ExitThread',\
ExitVDM,'ExitVDM',\
ExpandEnvironmentStringsA,'ExpandEnvironmentStringsA',\
ExpandEnvironmentStringsW,'ExpandEnvironmentStringsW',\
ExpungeConsoleCommandHistoryA,'ExpungeConsoleCommandHistoryA',\
ExpungeConsoleCommandHistoryW,'ExpungeConsoleCommandHistoryW',\
ExtendVirtualBuffer,'ExtendVirtualBuffer',\
FatalAppExitA,'FatalAppExitA',\
FatalAppExitW,'FatalAppExitW',\
FatalExit,'FatalExit',\
FileTimeToDosDateTime,'FileTimeToDosDateTime',\
FileTimeToLocalFileTime,'FileTimeToLocalFileTime',\
FileTimeToSystemTime,'FileTimeToSystemTime',\
FillConsoleOutputAttribute,'FillConsoleOutputAttribute',\
FillConsoleOutputCharacterA,'FillConsoleOutputCharacterA',\
FillConsoleOutputCharacterW,'FillConsoleOutputCharacterW',\
FindAtomA,'FindAtomA',\
FindAtomW,'FindAtomW',\
FindClose,'FindClose',\
FindCloseChangeNotification,'FindCloseChangeNotification',\
FindFirstChangeNotificationA,'FindFirstChangeNotificationA',\
FindFirstChangeNotificationW,'FindFirstChangeNotificationW',\
FindFirstFileA,'FindFirstFileA',\
FindFirstFileW,'FindFirstFileW',\
FindFirstFileExA,'FindFirstFileExA',\
FindFirstFileExW,'FindFirstFileExW',\
FindNextChangeNotification,'FindNextChangeNotification',\
FindNextFileA,'FindNextFileA',\
FindNextFileW,'FindNextFileW',\
FindResourceA,'FindResourceA',\
FindResourceW,'FindResourceW',\
FindResourceExA,'FindResourceExA',\
FindResourceExW,'FindResourceExW',\
FlushConsoleInputBuffer,'FlushConsoleInputBuffer',\
FlushFileBuffers,'FlushFileBuffers',\
FlushInstructionCache,'FlushInstructionCache',\
FlushViewOfFile,'FlushViewOfFile',\
FoldStringA,'FoldStringA',\
FoldStringW,'FoldStringW',\
FormatMessageA,'FormatMessageA',\
FormatMessageW,'FormatMessageW',\
FreeConsole,'FreeConsole',\
FreeEnvironmentStringsA,'FreeEnvironmentStringsA',\
FreeEnvironmentStringsW,'FreeEnvironmentStringsW',\
FreeLibrary,'FreeLibrary',\
FreeLibraryAndExitThread,'FreeLibraryAndExitThread',\
FreeResource,'FreeResource',\
FreeVirtualBuffer,'FreeVirtualBuffer',\
GenerateConsoleCtrlEvent,'GenerateConsoleCtrlEvent',\
GetACP,'GetACP',\
GetAtomNameA,'GetAtomNameA',\
GetAtomNameW,'GetAtomNameW',\
GetBinaryTypeA,'GetBinaryTypeA',\
GetBinaryTypeW,'GetBinaryTypeW',\
GetCPInfo,'GetCPInfo',\
GetCPInfoExA,'GetCPInfoExA',\
GetCPInfoExW,'GetCPInfoExW',\
GetCommConfig,'GetCommConfig',\
GetCommMask,'GetCommMask',\
GetCommModemStatus,'GetCommModemStatus',\
GetCommProperties,'GetCommProperties',\
GetCommState,'GetCommState',\
GetCommTimeouts,'GetCommTimeouts',\
GetCommandLineA,'GetCommandLineA',\
GetCommandLineW,'GetCommandLineW',\
GetCompressedFileSizeA,'GetCompressedFileSizeA',\
GetCompressedFileSizeW,'GetCompressedFileSizeW',\
GetComputerNameA,'GetComputerNameA',\
GetComputerNameW,'GetComputerNameW',\
GetConsoleAliasA,'GetConsoleAliasA',\
GetConsoleAliasW,'GetConsoleAliasW',\
GetConsoleAliasExesA,'GetConsoleAliasExesA',\
GetConsoleAliasExesW,'GetConsoleAliasExesW',\
GetConsoleAliasExesLengthA,'GetConsoleAliasExesLengthA',\
GetConsoleAliasExesLengthW,'GetConsoleAliasExesLengthW',\
GetConsoleAliasesA,'GetConsoleAliasesA',\
GetConsoleAliasesW,'GetConsoleAliasesW',\
GetConsoleAliasesLengthA,'GetConsoleAliasesLengthA',\
GetConsoleAliasesLengthW,'GetConsoleAliasesLengthW',\
GetConsoleCP,'GetConsoleCP',\
GetConsoleCommandHistoryA,'GetConsoleCommandHistoryA',\
GetConsoleCommandHistoryW,'GetConsoleCommandHistoryW',\
GetConsoleCommandHistoryLengthA,'GetConsoleCommandHistoryLengthA',\
GetConsoleCommandHistoryLengthW,'GetConsoleCommandHistoryLengthW',\
GetConsoleCursorInfo,'GetConsoleCursorInfo',\
GetConsoleDisplayMode,'GetConsoleDisplayMode',\
GetConsoleFontInfo,'GetConsoleFontInfo',\
GetConsoleFontSize,'GetConsoleFontSize',\
GetConsoleHardwareState,'GetConsoleHardwareState',\
GetConsoleInputExeNameA,'GetConsoleInputExeNameA',\
GetConsoleInputExeNameW,'GetConsoleInputExeNameW',\
GetConsoleInputWaitHandle,'GetConsoleInputWaitHandle',\
GetConsoleKeyboardLayoutNameA,'GetConsoleKeyboardLayoutNameA',\
GetConsoleKeyboardLayoutNameW,'GetConsoleKeyboardLayoutNameW',\
GetConsoleMode,'GetConsoleMode',\
GetConsoleOutputCP,'GetConsoleOutputCP',\
GetConsoleScreenBufferInfo,'GetConsoleScreenBufferInfo',\
GetConsoleTitleA,'GetConsoleTitleA',\
GetConsoleTitleW,'GetConsoleTitleW',\
GetConsoleWindow,'GetConsoleWindow',\
GetCurrencyFormatA,'GetCurrencyFormatA',\
GetCurrencyFormatW,'GetCurrencyFormatW',\
GetCurrentConsoleFont,'GetCurrentConsoleFont',\
GetCurrentDirectoryA,'GetCurrentDirectoryA',\
GetCurrentDirectoryW,'GetCurrentDirectoryW',\
GetCurrentProcess,'GetCurrentProcess',\
GetCurrentProcessId,'GetCurrentProcessId',\
GetCurrentThread,'GetCurrentThread',\
GetCurrentThreadId,'GetCurrentThreadId',\
GetDateFormatA,'GetDateFormatA',\
GetDateFormatW,'GetDateFormatW',\
GetDefaultCommConfigA,'GetDefaultCommConfigA',\
GetDefaultCommConfigW,'GetDefaultCommConfigW',\
GetDevicePowerState,'GetDevicePowerState',\
GetDiskFreeSpaceA,'GetDiskFreeSpaceA',\
GetDiskFreeSpaceW,'GetDiskFreeSpaceW',\
GetDiskFreeSpaceExA,'GetDiskFreeSpaceExA',\
GetDiskFreeSpaceExW,'GetDiskFreeSpaceExW',\
GetDriveTypeA,'GetDriveTypeA',\
GetDriveTypeW,'GetDriveTypeW',\
GetEnvironmentStringsA,'GetEnvironmentStringsA',\
GetEnvironmentStringsW,'GetEnvironmentStringsW',\
GetEnvironmentVariableA,'GetEnvironmentVariableA',\
GetEnvironmentVariableW,'GetEnvironmentVariableW',\
GetExitCodeProcess,'GetExitCodeProcess',\
GetExitCodeThread,'GetExitCodeThread',\
GetFileAttributesA,'GetFileAttributesA',\
GetFileAttributesW,'GetFileAttributesW',\
GetFileAttributesExA,'GetFileAttributesExA',\
GetFileAttributesExW,'GetFileAttributesExW',\
GetFileInformationByHandle,'GetFileInformationByHandle',\
GetFileSize,'GetFileSize',\
GetFileSizeEx,'GetFileSizeEx',\
GetFileTime,'GetFileTime',\
GetFileType,'GetFileType',\
GetFullPathNameA,'GetFullPathNameA',\
GetFullPathNameW,'GetFullPathNameW',\
GetHandleInformation,'GetHandleInformation',\
GetLargestConsoleWindowSize,'GetLargestConsoleWindowSize',\
GetLastError,'GetLastError',\
GetLocalTime,'GetLocalTime',\
GetLocaleInfoA,'GetLocaleInfoA',\
GetLocaleInfoW,'GetLocaleInfoW',\
GetLogicalDriveStringsA,'GetLogicalDriveStringsA',\
GetLogicalDriveStringsW,'GetLogicalDriveStringsW',\
GetLogicalDrives,'GetLogicalDrives',\
GetLongPathNameA,'GetLongPathNameA',\
GetLongPathNameW,'GetLongPathNameW',\
GetMailslotInfo,'GetMailslotInfo',\
GetModuleFileNameA,'GetModuleFileNameA',\
GetModuleFileNameW,'GetModuleFileNameW',\
GetModuleHandleA,'GetModuleHandleA',\
GetModuleHandleW,'GetModuleHandleW',\
GetNamedPipeHandleStateA,'GetNamedPipeHandleStateA',\
GetNamedPipeHandleStateW,'GetNamedPipeHandleStateW',\
GetNamedPipeInfo,'GetNamedPipeInfo',\
GetNextVDMCommand,'GetNextVDMCommand',\
GetNumberFormatA,'GetNumberFormatA',\
GetNumberFormatW,'GetNumberFormatW',\
GetNumberOfConsoleFonts,'GetNumberOfConsoleFonts',\
GetNumberOfConsoleInputEvents,'GetNumberOfConsoleInputEvents',\
GetNumberOfConsoleMouseButtons,'GetNumberOfConsoleMouseButtons',\
GetOEMCP,'GetOEMCP',\
GetOverlappedResult,'GetOverlappedResult',\
GetPriorityClass,'GetPriorityClass',\
GetPrivateProfileIntA,'GetPrivateProfileIntA',\
GetPrivateProfileIntW,'GetPrivateProfileIntW',\
GetPrivateProfileSectionA,'GetPrivateProfileSectionA',\
GetPrivateProfileSectionW,'GetPrivateProfileSectionW',\
GetPrivateProfileSectionNamesA,'GetPrivateProfileSectionNamesA',\
GetPrivateProfileSectionNamesW,'GetPrivateProfileSectionNamesW',\
GetPrivateProfileStringA,'GetPrivateProfileStringA',\
GetPrivateProfileStringW,'GetPrivateProfileStringW',\
GetPrivateProfileStructA,'GetPrivateProfileStructA',\
GetPrivateProfileStructW,'GetPrivateProfileStructW',\
GetProcAddress,'GetProcAddress',\
GetProcessAffinityMask,'GetProcessAffinityMask',\
GetProcessHeap,'GetProcessHeap',\
GetProcessHeaps,'GetProcessHeaps',\
GetProcessPriorityBoost,'GetProcessPriorityBoost',\
GetProcessShutdownParameters,'GetProcessShutdownParameters',\
GetProcessTimes,'GetProcessTimes',\
GetProcessVersion,'GetProcessVersion',\
GetProcessWorkingSetSize,'GetProcessWorkingSetSize',\
GetProfileIntA,'GetProfileIntA',\
GetProfileIntW,'GetProfileIntW',\
GetProfileSectionA,'GetProfileSectionA',\
GetProfileSectionW,'GetProfileSectionW',\
GetProfileStringA,'GetProfileStringA',\
GetProfileStringW,'GetProfileStringW',\
GetQueuedCompletionStatus,'GetQueuedCompletionStatus',\
GetShortPathNameA,'GetShortPathNameA',\
GetShortPathNameW,'GetShortPathNameW',\
GetStartupInfoA,'GetStartupInfoA',\
GetStartupInfoW,'GetStartupInfoW',\
GetStdHandle,'GetStdHandle',\
GetStringTypeA,'GetStringTypeA',\
GetStringTypeW,'GetStringTypeW',\
GetStringTypeExA,'GetStringTypeExA',\
GetStringTypeExW,'GetStringTypeExW',\
GetSystemDefaultLCID,'GetSystemDefaultLCID',\
GetSystemDefaultLangID,'GetSystemDefaultLangID',\
GetSystemDirectoryA,'GetSystemDirectoryA',\
GetSystemDirectoryW,'GetSystemDirectoryW',\
GetSystemInfo,'GetSystemInfo',\
GetSystemPowerStatus,'GetSystemPowerStatus',\
GetSystemTime,'GetSystemTime',\
GetSystemTimeAdjustment,'GetSystemTimeAdjustment',\
GetSystemTimeAsFileTime,'GetSystemTimeAsFileTime',\
GetTapeParameters,'GetTapeParameters',\
GetTapePosition,'GetTapePosition',\
GetTapeStatus,'GetTapeStatus',\
GetTempFileNameA,'GetTempFileNameA',\
GetTempFileNameW,'GetTempFileNameW',\
GetTempPathA,'GetTempPathA',\
GetTempPathW,'GetTempPathW',\
GetThreadContext,'GetThreadContext',\
GetThreadLocale,'GetThreadLocale',\
GetThreadPriority,'GetThreadPriority',\
GetThreadPriorityBoost,'GetThreadPriorityBoost',\
GetThreadSelectorEntry,'GetThreadSelectorEntry',\
GetThreadTimes,'GetThreadTimes',\
GetTickCount,'GetTickCount',\
GetTimeFormatA,'GetTimeFormatA',\
GetTimeFormatW,'GetTimeFormatW',\
GetTimeZoneInformation,'GetTimeZoneInformation',\
GetUserDefaultLCID,'GetUserDefaultLCID',\
GetUserDefaultLangID,'GetUserDefaultLangID',\
GetVDMCurrentDirectories,'GetVDMCurrentDirectories',\
GetVersion,'GetVersion',\
GetVersionExA,'GetVersionExA',\
GetVersionExW,'GetVersionExW',\
GetVolumeInformationA,'GetVolumeInformationA',\
GetVolumeInformationW,'GetVolumeInformationW',\
GetWindowsDirectoryA,'GetWindowsDirectoryA',\
GetWindowsDirectoryW,'GetWindowsDirectoryW',\
GlobalAddAtomA,'GlobalAddAtomA',\
GlobalAddAtomW,'GlobalAddAtomW',\
GlobalAlloc,'GlobalAlloc',\
GlobalCompact,'GlobalCompact',\
GlobalDeleteAtom,'GlobalDeleteAtom',\
GlobalFindAtomA,'GlobalFindAtomA',\
GlobalFindAtomW,'GlobalFindAtomW',\
GlobalFix,'GlobalFix',\
GlobalFlags,'GlobalFlags',\
GlobalFree,'GlobalFree',\
GlobalGetAtomNameA,'GlobalGetAtomNameA',\
GlobalGetAtomNameW,'GlobalGetAtomNameW',\
GlobalHandle,'GlobalHandle',\
GlobalLock,'GlobalLock',\
GlobalMemoryStatus,'GlobalMemoryStatus',\
GlobalMemoryStatusVlm,'GlobalMemoryStatusVlm',\
GlobalReAlloc,'GlobalReAlloc',\
GlobalSize,'GlobalSize',\
GlobalUnWire,'GlobalUnWire',\
GlobalUnfix,'GlobalUnfix',\
GlobalUnlock,'GlobalUnlock',\
GlobalWire,'GlobalWire',\
Heap32First,'Heap32First',\
Heap32ListFirst,'Heap32ListFirst',\
Heap32ListNext,'Heap32ListNext',\
Heap32Next,'Heap32Next',\
HeapAlloc,'HeapAlloc',\
HeapCompact,'HeapCompact',\
HeapCreate,'HeapCreate',\
HeapDestroy,'HeapDestroy',\
HeapExtend,'HeapExtend',\
HeapFree,'HeapFree',\
HeapLock,'HeapLock',\
HeapReAlloc,'HeapReAlloc',\
HeapSize,'HeapSize',\
HeapSummary,'HeapSummary',\
HeapUnlock,'HeapUnlock',\
HeapUsage,'HeapUsage',\
HeapValidate,'HeapValidate',\
HeapWalk,'HeapWalk',\
InitAtomTable,'InitAtomTable',\
InitializeCriticalSection,'InitializeCriticalSection',\
InitializeCriticalSectionAndSpinCount,'InitializeCriticalSectionAndSpinCount',\
InterlockedCompareExchange,'InterlockedCompareExchange',\
InterlockedDecrement,'InterlockedDecrement',\
InterlockedExchange,'InterlockedExchange',\
InterlockedExchangeAdd,'InterlockedExchangeAdd',\
InterlockedIncrement,'InterlockedIncrement',\
InvalidateConsoleDIBits,'InvalidateConsoleDIBits',\
IsBadCodePtr,'IsBadCodePtr',\
IsBadHugeReadPtr,'IsBadHugeReadPtr',\
IsBadHugeWritePtr,'IsBadHugeWritePtr',\
IsBadReadPtr,'IsBadReadPtr',\
IsBadStringPtrA,'IsBadStringPtrA',\
IsBadStringPtrW,'IsBadStringPtrW',\
IsBadWritePtr,'IsBadWritePtr',\
IsDBCSLeadByte,'IsDBCSLeadByte',\
IsDBCSLeadByteEx,'IsDBCSLeadByteEx',\
IsDebuggerPresent,'IsDebuggerPresent',\
IsProcessorFeaturePresent,'IsProcessorFeaturePresent',\
IsValidCodePage,'IsValidCodePage',\
IsValidLocale,'IsValidLocale',\
LCMapStringA,'LCMapStringA',\
LCMapStringW,'LCMapStringW',\
LeaveCriticalSection,'LeaveCriticalSection',\
LoadLibraryA,'LoadLibraryA',\
LoadLibraryW,'LoadLibraryW',\
LoadLibraryExA,'LoadLibraryExA',\
LoadLibraryExW,'LoadLibraryExW',\
LoadModule,'LoadModule',\
LoadResource,'LoadResource',\
LocalAlloc,'LocalAlloc',\
LocalCompact,'LocalCompact',\
LocalFileTimeToFileTime,'LocalFileTimeToFileTime',\
LocalFlags,'LocalFlags',\
LocalFree,'LocalFree',\
LocalHandle,'LocalHandle',\
LocalLock,'LocalLock',\
LocalReAlloc,'LocalReAlloc',\
LocalShrink,'LocalShrink',\
LocalSize,'LocalSize',\
LocalUnlock,'LocalUnlock',\
LockFile,'LockFile',\
LockFileEx,'LockFileEx',\
LockResource,'LockResource',\
MapViewOfFile,'MapViewOfFile',\
MapViewOfFileEx,'MapViewOfFileEx',\
MapViewOfFileVlm,'MapViewOfFileVlm',\
Module32First,'Module32First',\
Module32Next,'Module32Next',\
MoveFileA,'MoveFileA',\
MoveFileW,'MoveFileW',\
MoveFileExA,'MoveFileExA',\
MoveFileExW,'MoveFileExW',\
MoveFileWithProgressA,'MoveFileWithProgressA',\
MoveFileWithProgressW,'MoveFileWithProgressW',\
MulDiv,'MulDiv',\
MultiByteToWideChar,'MultiByteToWideChar',\
OpenEventA,'OpenEventA',\
OpenEventW,'OpenEventW',\
OpenFile,'OpenFile',\
OpenFileMappingA,'OpenFileMappingA',\
OpenFileMappingW,'OpenFileMappingW',\
OpenJobObjectA,'OpenJobObjectA',\
OpenJobObjectW,'OpenJobObjectW',\
OpenMutexA,'OpenMutexA',\
OpenMutexW,'OpenMutexW',\
OpenProcess,'OpenProcess',\
OpenProfileUserMapping,'OpenProfileUserMapping',\
OpenSemaphoreA,'OpenSemaphoreA',\
OpenSemaphoreW,'OpenSemaphoreW',\
OpenWaitableTimerA,'OpenWaitableTimerA',\
OpenWaitableTimerW,'OpenWaitableTimerW',\
OutputDebugStringA,'OutputDebugStringA',\
OutputDebugStringW,'OutputDebugStringW',\
PeekConsoleInputA,'PeekConsoleInputA',\
PeekConsoleInputW,'PeekConsoleInputW',\
PeekNamedPipe,'PeekNamedPipe',\
PostQueuedCompletionStatus,'PostQueuedCompletionStatus',\
PrepareTape,'PrepareTape',\
Process32First,'Process32First',\
Process32Next,'Process32Next',\
PulseEvent,'PulseEvent',\
PurgeComm,'PurgeComm',\
QueryDosDeviceA,'QueryDosDeviceA',\
QueryDosDeviceW,'QueryDosDeviceW',\
QueryInformationJobObject,'QueryInformationJobObject',\
QueryPerformanceCounter,'QueryPerformanceCounter',\
QueryPerformanceFrequency,'QueryPerformanceFrequency',\
QueryWin31IniFilesMappedToRegistry,'QueryWin31IniFilesMappedToRegistry',\
QueueUserAPC,'QueueUserAPC',\
RaiseException,'RaiseException',\
ReadConsoleA,'ReadConsoleA',\
ReadConsoleW,'ReadConsoleW',\
ReadConsoleInputA,'ReadConsoleInputA',\
ReadConsoleInputW,'ReadConsoleInputW',\
ReadConsoleInputExA,'ReadConsoleInputExA',\
ReadConsoleInputExW,'ReadConsoleInputExW',\
ReadConsoleOutputA,'ReadConsoleOutputA',\
ReadConsoleOutputW,'ReadConsoleOutputW',\
ReadConsoleOutputAttribute,'ReadConsoleOutputAttribute',\
ReadConsoleOutputCharacterA,'ReadConsoleOutputCharacterA',\
ReadConsoleOutputCharacterW,'ReadConsoleOutputCharacterW',\
ReadFile,'ReadFile',\
ReadFileEx,'ReadFileEx',\
ReadFileScatter,'ReadFileScatter',\
ReadFileVlm,'ReadFileVlm',\
ReadProcessMemory,'ReadProcessMemory',\
ReadProcessMemoryVlm,'ReadProcessMemoryVlm',\
RegisterConsoleVDM,'RegisterConsoleVDM',\
RegisterWaitForInputIdle,'RegisterWaitForInputIdle',\
RegisterWowBaseHandlers,'RegisterWowBaseHandlers',\
RegisterWowExec,'RegisterWowExec',\
ReleaseMutex,'ReleaseMutex',\
ReleaseSemaphore,'ReleaseSemaphore',\
RemoveDirectoryA,'RemoveDirectoryA',\
RemoveDirectoryW,'RemoveDirectoryW',\
RequestWakeupLatency,'RequestWakeupLatency',\
ResetEvent,'ResetEvent',\
ResumeThread,'ResumeThread',\
RtlFillMemory,'RtlFillMemory',\
RtlMoveMemory,'RtlMoveMemory',\
RtlUnwind,'RtlUnwind',\
RtlZeroMemory,'RtlZeroMemory',\
ScrollConsoleScreenBufferA,'ScrollConsoleScreenBufferA',\
ScrollConsoleScreenBufferW,'ScrollConsoleScreenBufferW',\
SearchPathA,'SearchPathA',\
SearchPathW,'SearchPathW',\
SetCommBreak,'SetCommBreak',\
SetCommConfig,'SetCommConfig',\
SetCommMask,'SetCommMask',\
SetCommState,'SetCommState',\
SetCommTimeouts,'SetCommTimeouts',\
SetComputerNameA,'SetComputerNameA',\
SetComputerNameW,'SetComputerNameW',\
SetConsoleActiveScreenBuffer,'SetConsoleActiveScreenBuffer',\
SetConsoleCP,'SetConsoleCP',\
SetConsoleCommandHistoryMode,'SetConsoleCommandHistoryMode',\
SetConsoleCtrlHandler,'SetConsoleCtrlHandler',\
SetConsoleCursor,'SetConsoleCursor',\
SetConsoleCursorInfo,'SetConsoleCursorInfo',\
SetConsoleCursorPosition,'SetConsoleCursorPosition',\
SetConsoleDisplayMode,'SetConsoleDisplayMode',\
SetConsoleFont,'SetConsoleFont',\
SetConsoleHardwareState,'SetConsoleHardwareState',\
SetConsoleIcon,'SetConsoleIcon',\
SetConsoleInputExeNameA,'SetConsoleInputExeNameA',\
SetConsoleInputExeNameW,'SetConsoleInputExeNameW',\
SetConsoleKeyShortcuts,'SetConsoleKeyShortcuts',\
SetConsoleMaximumWindowSize,'SetConsoleMaximumWindowSize',\
SetConsoleMenuClose,'SetConsoleMenuClose',\
SetConsoleMode,'SetConsoleMode',\
SetConsoleNumberOfCommandsA,'SetConsoleNumberOfCommandsA',\
SetConsoleNumberOfCommandsW,'SetConsoleNumberOfCommandsW',\
SetConsoleOutputCP,'SetConsoleOutputCP',\
SetConsolePalette,'SetConsolePalette',\
SetConsoleScreenBufferSize,'SetConsoleScreenBufferSize',\
SetConsoleTextAttribute,'SetConsoleTextAttribute',\
SetConsoleTitleA,'SetConsoleTitleA',\
SetConsoleTitleW,'SetConsoleTitleW',\
SetConsoleWindowInfo,'SetConsoleWindowInfo',\
SetCriticalSectionSpinCount,'SetCriticalSectionSpinCount',\
SetCurrentDirectoryA,'SetCurrentDirectoryA',\
SetCurrentDirectoryW,'SetCurrentDirectoryW',\
SetDefaultCommConfigA,'SetDefaultCommConfigA',\
SetDefaultCommConfigW,'SetDefaultCommConfigW',\
SetEndOfFile,'SetEndOfFile',\
SetEnvironmentVariableA,'SetEnvironmentVariableA',\
SetEnvironmentVariableW,'SetEnvironmentVariableW',\
SetErrorMode,'SetErrorMode',\
SetEvent,'SetEvent',\
SetFileApisToANSI,'SetFileApisToANSI',\
SetFileApisToOEM,'SetFileApisToOEM',\
SetFileAttributesA,'SetFileAttributesA',\
SetFileAttributesW,'SetFileAttributesW',\
SetFilePointer,'SetFilePointer',\
SetFilePointerEx,'SetFilePointerEx',\
SetFileTime,'SetFileTime',\
SetHandleCount,'SetHandleCount',\
SetHandleInformation,'SetHandleInformation',\
SetInformationJobObject,'SetInformationJobObject',\
SetLastConsoleEventActive,'SetLastConsoleEventActive',\
SetLastError,'SetLastError',\
SetLocalTime,'SetLocalTime',\
SetLocaleInfoA,'SetLocaleInfoA',\
SetLocaleInfoW,'SetLocaleInfoW',\
SetMailslotInfo,'SetMailslotInfo',\
SetNamedPipeHandleState,'SetNamedPipeHandleState',\
SetPriorityClass,'SetPriorityClass',\
SetProcessAffinityMask,'SetProcessAffinityMask',\
SetProcessPriorityBoost,'SetProcessPriorityBoost',\
SetProcessShutdownParameters,'SetProcessShutdownParameters',\
SetProcessWorkingSetSize,'SetProcessWorkingSetSize',\
SetStdHandle,'SetStdHandle',\
SetSystemPowerState,'SetSystemPowerState',\
SetSystemTime,'SetSystemTime',\
SetSystemTimeAdjustment,'SetSystemTimeAdjustment',\
SetTapeParameters,'SetTapeParameters',\
SetTapePosition,'SetTapePosition',\
SetThreadAffinityMask,'SetThreadAffinityMask',\
SetThreadContext,'SetThreadContext',\
SetThreadExecutionState,'SetThreadExecutionState',\
SetThreadIdealProcessor,'SetThreadIdealProcessor',\
SetThreadLocale,'SetThreadLocale',\
SetThreadPriority,'SetThreadPriority',\
SetThreadPriorityBoost,'SetThreadPriorityBoost',\
SetTimeZoneInformation,'SetTimeZoneInformation',\
SetUnhandledExceptionFilter,'SetUnhandledExceptionFilter',\
SetVDMCurrentDirectories,'SetVDMCurrentDirectories',\
SetVolumeLabelA,'SetVolumeLabelA',\
SetVolumeLabelW,'SetVolumeLabelW',\
SetWaitableTimer,'SetWaitableTimer',\
SetupComm,'SetupComm',\
ShowConsoleCursor,'ShowConsoleCursor',\
SignalObjectAndWait,'SignalObjectAndWait',\
SizeofResource,'SizeofResource',\
Sleep,'Sleep',\
SleepEx,'SleepEx',\
SuspendThread,'SuspendThread',\
SwitchToFiber,'SwitchToFiber',\
SwitchToThread,'SwitchToThread',\
SystemTimeToFileTime,'SystemTimeToFileTime',\
SystemTimeToTzSpecificLocalTime,'SystemTimeToTzSpecificLocalTime',\
TerminateJobObject,'TerminateJobObject',\
TerminateProcess,'TerminateProcess',\
TerminateThread,'TerminateThread',\
Thread32First,'Thread32First',\
Thread32Next,'Thread32Next',\
TlsAlloc,'TlsAlloc',\
TlsFree,'TlsFree',\
TlsGetValue,'TlsGetValue',\
TlsSetValue,'TlsSetValue',\
Toolhelp32ReadProcessMemory,'Toolhelp32ReadProcessMemory',\
TransactNamedPipe,'TransactNamedPipe',\
TransmitCommChar,'TransmitCommChar',\
TrimVirtualBuffer,'TrimVirtualBuffer',\
TryEnterCriticalSection,'TryEnterCriticalSection',\
UnhandledExceptionFilter,'UnhandledExceptionFilter',\
UnlockFile,'UnlockFile',\
UnlockFileEx,'UnlockFileEx',\
UnmapViewOfFile,'UnmapViewOfFile',\
UnmapViewOfFileVlm,'UnmapViewOfFileVlm',\
UpdateResourceA,'UpdateResourceA',\
UpdateResourceW,'UpdateResourceW',\
VDMConsoleOperation,'VDMConsoleOperation',\
VDMOperationStarted,'VDMOperationStarted',\
VerLanguageNameA,'VerLanguageNameA',\
VerLanguageNameW,'VerLanguageNameW',\
VerifyConsoleIoHandle,'VerifyConsoleIoHandle',\
VirtualAlloc,'VirtualAlloc',\
VirtualAllocEx,'VirtualAllocEx',\
VirtualAllocVlm,'VirtualAllocVlm',\
VirtualBufferExceptionHandler,'VirtualBufferExceptionHandler',\
VirtualFree,'VirtualFree',\
VirtualFreeEx,'VirtualFreeEx',\
VirtualFreeVlm,'VirtualFreeVlm',\
VirtualLock,'VirtualLock',\
VirtualProtect,'VirtualProtect',\
VirtualProtectEx,'VirtualProtectEx',\
VirtualProtectVlm,'VirtualProtectVlm',\
VirtualQuery,'VirtualQuery',\
VirtualQueryEx,'VirtualQueryEx',\
VirtualQueryVlm,'VirtualQueryVlm',\
VirtualUnlock,'VirtualUnlock',\
WaitCommEvent,'WaitCommEvent',\
WaitForDebugEvent,'WaitForDebugEvent',\
WaitForMultipleObjects,'WaitForMultipleObjects',\
WaitForMultipleObjectsEx,'WaitForMultipleObjectsEx',\
WaitForSingleObject,'WaitForSingleObject',\
WaitForSingleObjectEx,'WaitForSingleObjectEx',\
WaitNamedPipeA,'WaitNamedPipeA',\
WaitNamedPipeW,'WaitNamedPipeW',\
WideCharToMultiByte,'WideCharToMultiByte',\
WinExec,'WinExec',\
WriteConsoleA,'WriteConsoleA',\
WriteConsoleW,'WriteConsoleW',\
WriteConsoleInputA,'WriteConsoleInputA',\
WriteConsoleInputW,'WriteConsoleInputW',\
WriteConsoleInputVDMA,'WriteConsoleInputVDMA',\
WriteConsoleInputVDMW,'WriteConsoleInputVDMW',\
WriteConsoleOutputA,'WriteConsoleOutputA',\
WriteConsoleOutputW,'WriteConsoleOutputW',\
WriteConsoleOutputAttribute,'WriteConsoleOutputAttribute',\
WriteConsoleOutputCharacterA,'WriteConsoleOutputCharacterA',\
WriteConsoleOutputCharacterW,'WriteConsoleOutputCharacterW',\
WriteFile,'WriteFile',\
WriteFileEx,'WriteFileEx',\
WriteFileGather,'WriteFileGather',\
WriteFileVlm,'WriteFileVlm',\
WritePrivateProfileSectionA,'WritePrivateProfileSectionA',\
WritePrivateProfileSectionW,'WritePrivateProfileSectionW',\
WritePrivateProfileStringA,'WritePrivateProfileStringA',\
WritePrivateProfileStringW,'WritePrivateProfileStringW',\
WritePrivateProfileStructA,'WritePrivateProfileStructA',\
WritePrivateProfileStructW,'WritePrivateProfileStructW',\
WriteProcessMemory,'WriteProcessMemory',\
WriteProcessMemoryVlm,'WriteProcessMemoryVlm',\
WriteProfileSectionA,'WriteProfileSectionA',\
WriteProfileSectionW,'WriteProfileSectionW',\
WriteProfileStringA,'WriteProfileStringA',\
WriteProfileStringW,'WriteProfileStringW',\
WriteTapemark,'WriteTapemark',\
_hread,'_hread',\
_hwrite,'_hwrite',\
_lclose,'_lclose',\
_lcreat,'_lcreat',\
_llseek,'_llseek',\
_lopen,'_lopen',\
_lread,'_lread',\
_lwrite,'_lwrite',\
lstrcatA,'lstrcatA',\
lstrcatW,'lstrcatW',\
lstrcmpA,'lstrcmpA',\
lstrcmpW,'lstrcmpW',\
lstrcmpiA,'lstrcmpiA',\
lstrcmpiW,'lstrcmpiW',\
lstrcpyA,'lstrcpyA',\
lstrcpyW,'lstrcpyW',\
lstrcpynA,'lstrcpynA',\
lstrcpynW,'lstrcpynW',\
lstrlenA,'lstrlenA',\
lstrlenW,'lstrlenW'
api AddAtom,\
AddConsoleAlias,\
BeginUpdateResource,\
BuildCommDCB,\
BuildCommDCBAndTimeouts,\
CallNamedPipe,\
CommConfigDialog,\
CompareString,\
CopyFile,\
CopyFileEx,\
CreateDirectory,\
CreateDirectoryEx,\
CreateEvent,\
CreateFile,\
CreateFileMapping,\
CreateHardLink,\
CreateJobObject,\
CreateMailslot,\
CreateMutex,\
CreateNamedPipe,\
CreateProcess,\
CreateSemaphore,\
CreateWaitableTimer,\
DefineDosDevice,\
DeleteFile,\
EndUpdateResource,\
EnumCalendarInfo,\
EnumCalendarInfoEx,\
EnumDateFormats,\
EnumDateFormatsEx,\
EnumResourceLanguages,\
EnumResourceNames,\
EnumResourceTypes,\
EnumSystemCodePages,\
EnumSystemLocales,\
EnumTimeFormats,\
ExpandEnvironmentStrings,\
ExpungeConsoleCommandHistory,\
FatalAppExit,\
FillConsoleOutputCharacter,\
FindAtom,\
FindFirstChangeNotification,\
FindFirstFile,\
FindFirstFileEx,\
FindNextFile,\
FindResource,\
FindResourceEx,\
FoldString,\
FormatMessage,\
FreeEnvironmentStrings,\
GetAtomName,\
GetBinaryType,\
GetCPInfoEx,\
GetCommandLine,\
GetCompressedFileSize,\
GetComputerName,\
GetConsoleAlias,\
GetConsoleAliasExes,\
GetConsoleAliasExesLength,\
GetConsoleAliases,\
GetConsoleAliasesLength,\
GetConsoleCommandHistory,\
GetConsoleCommandHistoryLength,\
GetConsoleInputExeName,\
GetConsoleKeyboardLayoutName,\
GetConsoleTitle,\
GetCurrencyFormat,\
GetCurrentDirectory,\
GetDateFormat,\
GetDefaultCommConfig,\
GetDiskFreeSpace,\
GetDiskFreeSpaceEx,\
GetDriveType,\
GetEnvironmentStrings,\
GetEnvironmentVariable,\
GetFileAttributes,\
GetFileAttributesEx,\
GetFullPathName,\
GetLocaleInfo,\
GetLogicalDriveStrings,\
GetLongPathName,\
GetModuleFileName,\
GetModuleHandle,\
GetNamedPipeHandleState,\
GetNumberFormat,\
GetPrivateProfileInt,\
GetPrivateProfileSection,\
GetPrivateProfileSectionNames,\
GetPrivateProfileString,\
GetPrivateProfileStruct,\
GetProfileInt,\
GetProfileSection,\
GetProfileString,\
GetShortPathName,\
GetStartupInfo,\
GetStringType,\
GetStringTypeEx,\
GetSystemDirectory,\
GetTempFileName,\
GetTempPath,\
GetTimeFormat,\
GetVersionEx,\
GetVolumeInformation,\
GetWindowsDirectory,\
GlobalAddAtom,\
GlobalFindAtom,\
GlobalGetAtomName,\
IsBadStringPtr,\
LCMapString,\
LoadLibrary,\
LoadLibraryEx,\
MoveFile,\
MoveFileEx,\
MoveFileWithProgress,\
OpenEvent,\
OpenFileMapping,\
OpenJobObject,\
OpenMutex,\
OpenSemaphore,\
OpenWaitableTimer,\
OutputDebugString,\
PeekConsoleInput,\
QueryDosDevice,\
ReadConsole,\
ReadConsoleInput,\
ReadConsoleInputEx,\
ReadConsoleOutput,\
ReadConsoleOutputCharacter,\
RemoveDirectory,\
ScrollConsoleScreenBuffer,\
SearchPath,\
SetComputerName,\
SetConsoleInputExeName,\
SetConsoleNumberOfCommands,\
SetConsoleTitle,\
SetCurrentDirectory,\
SetDefaultCommConfig,\
SetEnvironmentVariable,\
SetFileAttributes,\
SetLocaleInfo,\
SetVolumeLabel,\
UpdateResource,\
VerLanguageName,\
WaitNamedPipe,\
WriteConsole,\
WriteConsoleInput,\
WriteConsoleInputVDM,\
WriteConsoleOutput,\
WriteConsoleOutputCharacter,\
WritePrivateProfileSection,\
WritePrivateProfileString,\
WritePrivateProfileStruct,\
WriteProfileSection,\
WriteProfileString,\
lstrcat,\
lstrcmp,\
lstrcmpi,\
lstrcpy,\
lstrcpyn,\
lstrlen

View file

@ -0,0 +1,167 @@
; SHELL32 API calls
import shell32,\
CheckEscapesA,'CheckEscapesA',\
CheckEscapesW,'CheckEscapesW',\
DoEnvironmentSubstA,'DoEnvironmentSubstA',\
DoEnvironmentSubstW,'DoEnvironmentSubstW',\
DragAcceptFiles,'DragAcceptFiles',\
DragFinish,'DragFinish',\
DragQueryFileA,'DragQueryFileA',\
DragQueryFileW,'DragQueryFileW',\
DragQueryPoint,'DragQueryPoint',\
DuplicateIcon,'DuplicateIcon',\
ExtractAssociatedIconA,'ExtractAssociatedIconA',\
ExtractAssociatedIconW,'ExtractAssociatedIconW',\
ExtractAssociatedIconExA,'ExtractAssociatedIconExA',\
ExtractAssociatedIconExW,'ExtractAssociatedIconExW',\
ExtractIconA,'ExtractIconA',\
ExtractIconW,'ExtractIconW',\
ExtractIconExA,'ExtractIconExA',\
ExtractIconExW,'ExtractIconExW',\
ExtractIconResInfoA,'ExtractIconResInfoA',\
ExtractIconResInfoW,'ExtractIconResInfoW',\
FindExeDlgProc,'FindExeDlgProc',\
FindExecutableA,'FindExecutableA',\
FindExecutableW,'FindExecutableW',\
FreeIconList,'FreeIconList',\
InternalExtractIconListA,'InternalExtractIconListA',\
InternalExtractIconListW,'InternalExtractIconListW',\
RealShellExecuteA,'RealShellExecuteA',\
RealShellExecuteW,'RealShellExecuteW',\
RealShellExecuteExA,'RealShellExecuteExA',\
RealShellExecuteExW,'RealShellExecuteExW',\
RegenerateUserEnvironment,'RegenerateUserEnvironment',\
SHAddToRecentDocs,'SHAddToRecentDocs',\
SHAppBarMessage,'SHAppBarMessage',\
SHBrowseForFolderA,'SHBrowseForFolderA',\
SHBrowseForFolderW,'SHBrowseForFolderW',\
SHChangeNotify,'SHChangeNotify',\
SHEmptyRecycleBinA,'SHEmptyRecycleBinA',\
SHEmptyRecycleBinW,'SHEmptyRecycleBinW',\
SHFileOperationA,'SHFileOperationA',\
SHFileOperationW,'SHFileOperationW',\
SHFormatDrive,'SHFormatDrive',\
SHFreeNameMappings,'SHFreeNameMappings',\
SHGetDataFromIDListA,'SHGetDataFromIDListA',\
SHGetDataFromIDListW,'SHGetDataFromIDListW',\
SHGetDesktopFolder,'SHGetDesktopFolder',\
SHGetDiskFreeSpaceA,'SHGetDiskFreeSpaceA',\
SHGetDiskFreeSpaceW,'SHGetDiskFreeSpaceW',\
SHGetFileInfoA,'SHGetFileInfoA',\
SHGetFileInfoW,'SHGetFileInfoW',\
SHGetInstanceExplorer,'SHGetInstanceExplorer',\
SHGetMalloc,'SHGetMalloc',\
SHGetNewLinkInfo,'SHGetNewLinkInfo',\
SHGetPathFromIDListA,'SHGetPathFromIDListA',\
SHGetPathFromIDListW,'SHGetPathFromIDListW',\
SHGetSettings,'SHGetSettings',\
SHGetSpecialFolderLocation,'SHGetSpecialFolderLocation',\
SHGetSpecialFolderPathA,'SHGetSpecialFolderPathA',\
SHGetSpecialFolderPathW,'SHGetSpecialFolderPathW',\
SHInvokePrinterCommandA,'SHInvokePrinterCommandA',\
SHInvokePrinterCommandW,'SHInvokePrinterCommandW',\
SHLoadInProc,'SHLoadInProc',\
SHQueryRecycleBinA,'SHQueryRecycleBinA',\
SHQueryRecycleBinW,'SHQueryRecycleBinW',\
SHUpdateRecycleBinIcon,'SHUpdateRecycleBinIcon',\
SheChangeDirA,'SheChangeDirA',\
SheChangeDirW,'SheChangeDirW',\
SheChangeDirExA,'SheChangeDirExA',\
SheChangeDirExW,'SheChangeDirExW',\
SheFullPathA,'SheFullPathA',\
SheFullPathW,'SheFullPathW',\
SheGetCurDrive,'SheGetCurDrive',\
SheGetDirA,'SheGetDirA',\
SheGetDirW,'SheGetDirW',\
SheRemoveQuotesA,'SheRemoveQuotesA',\
SheRemoveQuotesW,'SheRemoveQuotesW',\
SheSetCurDrive,'SheSetCurDrive',\
SheShortenPathA,'SheShortenPathA',\
SheShortenPathW,'SheShortenPathW',\
ShellAboutA,'ShellAboutA',\
ShellAboutW,'ShellAboutW',\
ShellExecuteA,'ShellExecuteA',\
ShellExecuteW,'ShellExecuteW',\
ShellExecuteExA,'ShellExecuteExA',\
ShellExecuteExW,'ShellExecuteExW',\
ShellHookProc,'ShellHookProc',\
Shell_NotifyIconA,'Shell_NotifyIconA',\
Shell_NotifyIconW,'Shell_NotifyIconW',\
StrChrA,'StrChrA',\
StrChrW,'StrChrW',\
StrChrIA,'StrChrIA',\
StrChrIW,'StrChrIW',\
StrCmpNA,'StrCmpNA',\
StrCmpNW,'StrCmpNW',\
StrCmpNIA,'StrCmpNIA',\
StrCmpNIW,'StrCmpNIW',\
StrCpyNA,'StrCpyNA',\
StrCpyNW,'StrCpyNW',\
StrNCmpA,'StrNCmpA',\
StrNCmpW,'StrNCmpW',\
StrNCmpIA,'StrNCmpIA',\
StrNCmpIW,'StrNCmpIW',\
StrNCpyA,'StrNCpyA',\
StrNCpyW,'StrNCpyW',\
StrRChrA,'StrRChrA',\
StrRChrW,'StrRChrW',\
StrRChrIA,'StrRChrIA',\
StrRChrIW,'StrRChrIW',\
StrRStrA,'StrRStrA',\
StrRStrW,'StrRStrW',\
StrRStrIA,'StrRStrIA',\
StrRStrIW,'StrRStrIW',\
StrStrA,'StrStrA',\
StrStrW,'StrStrW',\
StrStrIA,'StrStrIA',\
StrStrIW,'StrStrIW',\
WOWShellExecute,'WOWShellExecute'
api CheckEscapes,\
DoEnvironmentSubst,\
DragQueryFile,\
ExtractAssociatedIcon,\
ExtractAssociatedIconEx,\
ExtractIcon,\
ExtractIconEx,\
ExtractIconResInfo,\
FindExecutable,\
InternalExtractIconList,\
RealShellExecute,\
RealShellExecuteEx,\
SHBrowseForFolder,\
SHEmptyRecycleBin,\
SHFileOperation,\
SHGetDataFromIDList,\
SHGetDiskFreeSpace,\
SHGetFileInfo,\
SHGetPathFromIDList,\
SHGetSpecialFolderPath,\
SHInvokePrinterCommand,\
SHQueryRecycleBin,\
SheChangeDir,\
SheChangeDirEx,\
SheFullPath,\
SheGetDir,\
SheRemoveQuotes,\
SheShortenPath,\
ShellAbout,\
ShellExecute,\
ShellExecuteEx,\
Shell_NotifyIcon,\
StrChr,\
StrChrI,\
StrCmpN,\
StrCmpNI,\
StrCpyN,\
StrNCmp,\
StrNCmpI,\
StrNCpy,\
StrRChr,\
StrRChrI,\
StrRStr,\
StrRStrI,\
StrStr,\
StrStrI

View file

@ -0,0 +1,756 @@
; USER32 API calls
import user32,\
ActivateKeyboardLayout,'ActivateKeyboardLayout',\
AdjustWindowRect,'AdjustWindowRect',\
AdjustWindowRectEx,'AdjustWindowRectEx',\
AnimateWindow,'AnimateWindow',\
AnyPopup,'AnyPopup',\
AppendMenuA,'AppendMenuA',\
AppendMenuW,'AppendMenuW',\
ArrangeIconicWindows,'ArrangeIconicWindows',\
AttachThreadInput,'AttachThreadInput',\
BeginDeferWindowPos,'BeginDeferWindowPos',\
BeginPaint,'BeginPaint',\
BlockInput,'BlockInput',\
BringWindowToTop,'BringWindowToTop',\
BroadcastSystemMessageA,'BroadcastSystemMessageA',\
BroadcastSystemMessageW,'BroadcastSystemMessageW',\
CallMsgFilterA,'CallMsgFilterA',\
CallMsgFilterW,'CallMsgFilterW',\
CallNextHookEx,'CallNextHookEx',\
CallWindowProcA,'CallWindowProcA',\
CallWindowProcW,'CallWindowProcW',\
CascadeChildWindows,'CascadeChildWindows',\
CascadeWindows,'CascadeWindows',\
ChangeClipboardChain,'ChangeClipboardChain',\
ChangeDisplaySettingsA,'ChangeDisplaySettingsA',\
ChangeDisplaySettingsW,'ChangeDisplaySettingsW',\
ChangeDisplaySettingsExA,'ChangeDisplaySettingsExA',\
ChangeDisplaySettingsExW,'ChangeDisplaySettingsExW',\
ChangeMenuA,'ChangeMenuA',\
ChangeMenuW,'ChangeMenuW',\
CharLowerA,'CharLowerA',\
CharLowerW,'CharLowerW',\
CharLowerBuffA,'CharLowerBuffA',\
CharLowerBuffW,'CharLowerBuffW',\
CharNextA,'CharNextA',\
CharNextW,'CharNextW',\
CharNextExA,'CharNextExA',\
CharNextExW,'CharNextExW',\
CharPrevA,'CharPrevA',\
CharPrevW,'CharPrevW',\
CharPrevExA,'CharPrevExA',\
CharPrevExW,'CharPrevExW',\
CharToOemA,'CharToOemA',\
CharToOemW,'CharToOemW',\
CharToOemBuffA,'CharToOemBuffA',\
CharToOemBuffW,'CharToOemBuffW',\
CharUpperA,'CharUpperA',\
CharUpperW,'CharUpperW',\
CharUpperBuffA,'CharUpperBuffA',\
CharUpperBuffW,'CharUpperBuffW',\
CheckDlgButton,'CheckDlgButton',\
CheckMenuItem,'CheckMenuItem',\
CheckMenuRadioItem,'CheckMenuRadioItem',\
CheckRadioButton,'CheckRadioButton',\
ChildWindowFromPoint,'ChildWindowFromPoint',\
ChildWindowFromPointEx,'ChildWindowFromPointEx',\
ClientToScreen,'ClientToScreen',\
ClipCursor,'ClipCursor',\
CloseClipboard,'CloseClipboard',\
CloseDesktop,'CloseDesktop',\
CloseWindow,'CloseWindow',\
CloseWindowStation,'CloseWindowStation',\
CopyAcceleratorTableA,'CopyAcceleratorTableA',\
CopyAcceleratorTableW,'CopyAcceleratorTableW',\
CopyIcon,'CopyIcon',\
CopyImage,'CopyImage',\
CopyRect,'CopyRect',\
CountClipboardFormats,'CountClipboardFormats',\
CreateAcceleratorTableA,'CreateAcceleratorTableA',\
CreateAcceleratorTableW,'CreateAcceleratorTableW',\
CreateCaret,'CreateCaret',\
CreateCursor,'CreateCursor',\
CreateDesktopA,'CreateDesktopA',\
CreateDesktopW,'CreateDesktopW',\
CreateDialogIndirectParamA,'CreateDialogIndirectParamA',\
CreateDialogIndirectParamW,'CreateDialogIndirectParamW',\
CreateDialogParamA,'CreateDialogParamA',\
CreateDialogParamW,'CreateDialogParamW',\
CreateIcon,'CreateIcon',\
CreateIconFromResource,'CreateIconFromResource',\
CreateIconFromResourceEx,'CreateIconFromResourceEx',\
CreateIconIndirect,'CreateIconIndirect',\
CreateMDIWindowA,'CreateMDIWindowA',\
CreateMDIWindowW,'CreateMDIWindowW',\
CreateMenu,'CreateMenu',\
CreatePopupMenu,'CreatePopupMenu',\
CreateWindowExA,'CreateWindowExA',\
CreateWindowExW,'CreateWindowExW',\
CreateWindowStationA,'CreateWindowStationA',\
CreateWindowStationW,'CreateWindowStationW',\
DdeAbandonTransaction,'DdeAbandonTransaction',\
DdeAccessData,'DdeAccessData',\
DdeAddData,'DdeAddData',\
DdeClientTransaction,'DdeClientTransaction',\
DdeCmpStringHandles,'DdeCmpStringHandles',\
DdeConnect,'DdeConnect',\
DdeConnectList,'DdeConnectList',\
DdeCreateDataHandle,'DdeCreateDataHandle',\
DdeCreateStringHandleA,'DdeCreateStringHandleA',\
DdeCreateStringHandleW,'DdeCreateStringHandleW',\
DdeDisconnect,'DdeDisconnect',\
DdeDisconnectList,'DdeDisconnectList',\
DdeEnableCallback,'DdeEnableCallback',\
DdeFreeDataHandle,'DdeFreeDataHandle',\
DdeFreeStringHandle,'DdeFreeStringHandle',\
DdeGetData,'DdeGetData',\
DdeGetLastError,'DdeGetLastError',\
DdeGetQualityOfService,'DdeGetQualityOfService',\
DdeImpersonateClient,'DdeImpersonateClient',\
DdeInitializeA,'DdeInitializeA',\
DdeInitializeW,'DdeInitializeW',\
DdeKeepStringHandle,'DdeKeepStringHandle',\
DdeNameService,'DdeNameService',\
DdePostAdvise,'DdePostAdvise',\
DdeQueryConvInfo,'DdeQueryConvInfo',\
DdeQueryNextServer,'DdeQueryNextServer',\
DdeQueryStringA,'DdeQueryStringA',\
DdeQueryStringW,'DdeQueryStringW',\
DdeReconnect,'DdeReconnect',\
DdeSetQualityOfService,'DdeSetQualityOfService',\
DdeSetUserHandle,'DdeSetUserHandle',\
DdeUnaccessData,'DdeUnaccessData',\
DdeUninitialize,'DdeUninitialize',\
DefDlgProcA,'DefDlgProcA',\
DefDlgProcW,'DefDlgProcW',\
DefFrameProcA,'DefFrameProcA',\
DefFrameProcW,'DefFrameProcW',\
DefMDIChildProcA,'DefMDIChildProcA',\
DefMDIChildProcW,'DefMDIChildProcW',\
DefWindowProcA,'DefWindowProcA',\
DefWindowProcW,'DefWindowProcW',\
DeferWindowPos,'DeferWindowPos',\
DeleteMenu,'DeleteMenu',\
DestroyAcceleratorTable,'DestroyAcceleratorTable',\
DestroyCaret,'DestroyCaret',\
DestroyCursor,'DestroyCursor',\
DestroyIcon,'DestroyIcon',\
DestroyMenu,'DestroyMenu',\
DestroyWindow,'DestroyWindow',\
DialogBoxIndirectParamA,'DialogBoxIndirectParamA',\
DialogBoxIndirectParamW,'DialogBoxIndirectParamW',\
DialogBoxParamA,'DialogBoxParamA',\
DialogBoxParamW,'DialogBoxParamW',\
DispatchMessageA,'DispatchMessageA',\
DispatchMessageW,'DispatchMessageW',\
DlgDirListA,'DlgDirListA',\
DlgDirListW,'DlgDirListW',\
DlgDirListComboBoxA,'DlgDirListComboBoxA',\
DlgDirListComboBoxW,'DlgDirListComboBoxW',\
DlgDirSelectComboBoxExA,'DlgDirSelectComboBoxExA',\
DlgDirSelectComboBoxExW,'DlgDirSelectComboBoxExW',\
DlgDirSelectExA,'DlgDirSelectExA',\
DlgDirSelectExW,'DlgDirSelectExW',\
DragDetect,'DragDetect',\
DragObject,'DragObject',\
DrawAnimatedRects,'DrawAnimatedRects',\
DrawCaption,'DrawCaption',\
DrawEdge,'DrawEdge',\
DrawFocusRect,'DrawFocusRect',\
DrawFrame,'DrawFrame',\
DrawFrameControl,'DrawFrameControl',\
DrawIcon,'DrawIcon',\
DrawIconEx,'DrawIconEx',\
DrawMenuBar,'DrawMenuBar',\
DrawStateA,'DrawStateA',\
DrawStateW,'DrawStateW',\
DrawTextA,'DrawTextA',\
DrawTextW,'DrawTextW',\
DrawTextExA,'DrawTextExA',\
DrawTextExW,'DrawTextExW',\
EditWndProc,'EditWndProc',\
EmptyClipboard,'EmptyClipboard',\
EnableMenuItem,'EnableMenuItem',\
EnableScrollBar,'EnableScrollBar',\
EnableWindow,'EnableWindow',\
EndDeferWindowPos,'EndDeferWindowPos',\
EndDialog,'EndDialog',\
EndMenu,'EndMenu',\
EndPaint,'EndPaint',\
EnumChildWindows,'EnumChildWindows',\
EnumClipboardFormats,'EnumClipboardFormats',\
EnumDesktopWindows,'EnumDesktopWindows',\
EnumDesktopsA,'EnumDesktopsA',\
EnumDesktopsW,'EnumDesktopsW',\
EnumDisplayMonitors,'EnumDisplayMonitors',\
EnumDisplaySettingsA,'EnumDisplaySettingsA',\
EnumDisplaySettingsW,'EnumDisplaySettingsW',\
EnumDisplaySettingsExA,'EnumDisplaySettingsExA',\
EnumDisplaySettingsExW,'EnumDisplaySettingsExW',\
EnumPropsA,'EnumPropsA',\
EnumPropsW,'EnumPropsW',\
EnumPropsExA,'EnumPropsExA',\
EnumPropsExW,'EnumPropsExW',\
EnumThreadWindows,'EnumThreadWindows',\
EnumWindowStationsA,'EnumWindowStationsA',\
EnumWindowStationsW,'EnumWindowStationsW',\
EnumWindows,'EnumWindows',\
EqualRect,'EqualRect',\
ExcludeUpdateRgn,'ExcludeUpdateRgn',\
ExitWindowsEx,'ExitWindowsEx',\
FillRect,'FillRect',\
FindWindowA,'FindWindowA',\
FindWindowW,'FindWindowW',\
FindWindowExA,'FindWindowExA',\
FindWindowExW,'FindWindowExW',\
FlashWindow,'FlashWindow',\
FrameRect,'FrameRect',\
FreeDDElParam,'FreeDDElParam',\
GetActiveWindow,'GetActiveWindow',\
GetAltTabInfoA,'GetAltTabInfoA',\
GetAltTabInfoW,'GetAltTabInfoW',\
GetAncestor,'GetAncestor',\
GetAsyncKeyState,'GetAsyncKeyState',\
GetCapture,'GetCapture',\
GetCaretBlinkTime,'GetCaretBlinkTime',\
GetCaretPos,'GetCaretPos',\
GetClassInfoA,'GetClassInfoA',\
GetClassInfoW,'GetClassInfoW',\
GetClassInfoExA,'GetClassInfoExA',\
GetClassInfoExW,'GetClassInfoExW',\
GetClassLongA,'GetClassLongA',\
GetClassLongW,'GetClassLongW',\
GetClassNameA,'GetClassNameA',\
GetClassNameW,'GetClassNameW',\
GetClassWord,'GetClassWord',\
GetClientRect,'GetClientRect',\
GetClipCursor,'GetClipCursor',\
GetClipboardData,'GetClipboardData',\
GetClipboardFormatNameA,'GetClipboardFormatNameA',\
GetClipboardFormatNameW,'GetClipboardFormatNameW',\
GetClipboardSequenceNumberA,'GetClipboardSequenceNumberA',\
GetClipboardSequenceNumberW,'GetClipboardSequenceNumberW',\
GetClipboardViewer,'GetClipboardViewer',\
GetComboBoxInfo,'GetComboBoxInfo',\
GetCursor,'GetCursor',\
GetCursorInfo,'GetCursorInfo',\
GetCursorPos,'GetCursorPos',\
GetDC,'GetDC',\
GetDCEx,'GetDCEx',\
GetDesktopWindow,'GetDesktopWindow',\
GetDialogBaseUnits,'GetDialogBaseUnits',\
GetDlgCtrlID,'GetDlgCtrlID',\
GetDlgItem,'GetDlgItem',\
GetDlgItemInt,'GetDlgItemInt',\
GetDlgItemTextA,'GetDlgItemTextA',\
GetDlgItemTextW,'GetDlgItemTextW',\
GetDoubleClickTime,'GetDoubleClickTime',\
GetFocus,'GetFocus',\
GetForegroundWindow,'GetForegroundWindow',\
GetGUIThreadInfo,'GetGUIThreadInfo',\
GetGuiResources,'GetGuiResources',\
GetIconInfo,'GetIconInfo',\
GetInputDesktop,'GetInputDesktop',\
GetInputState,'GetInputState',\
GetKBCodePage,'GetKBCodePage',\
GetKeyNameTextA,'GetKeyNameTextA',\
GetKeyNameTextW,'GetKeyNameTextW',\
GetKeyState,'GetKeyState',\
GetKeyboardLayout,'GetKeyboardLayout',\
GetKeyboardLayoutList,'GetKeyboardLayoutList',\
GetKeyboardLayoutNameA,'GetKeyboardLayoutNameA',\
GetKeyboardLayoutNameW,'GetKeyboardLayoutNameW',\
GetKeyboardState,'GetKeyboardState',\
GetKeyboardType,'GetKeyboardType',\
GetLastActivePopup,'GetLastActivePopup',\
GetLastInputInfo,'GetLastInputInfo',\
GetLayeredWindowAttributes,'GetLayeredWindowAttributes',\
GetListBoxInfo,'GetListBoxInfo',\
GetMenu,'GetMenu',\
GetMenuBarInfo,'GetMenuBarInfo',\
GetMenuCheckMarkDimensions,'GetMenuCheckMarkDimensions',\
GetMenuContextHelpId,'GetMenuContextHelpId',\
GetMenuDefaultItem,'GetMenuDefaultItem',\
GetMenuInfo,'GetMenuInfo',\
GetMenuItemCount,'GetMenuItemCount',\
GetMenuItemID,'GetMenuItemID',\
GetMenuItemInfoA,'GetMenuItemInfoA',\
GetMenuItemInfoW,'GetMenuItemInfoW',\
GetMenuItemRect,'GetMenuItemRect',\
GetMenuState,'GetMenuState',\
GetMenuStringA,'GetMenuStringA',\
GetMenuStringW,'GetMenuStringW',\
GetMessageA,'GetMessageA',\
GetMessageW,'GetMessageW',\
GetMessageExtraInfo,'GetMessageExtraInfo',\
GetMessagePos,'GetMessagePos',\
GetMessageTime,'GetMessageTime',\
GetMonitorInfoA,'GetMonitorInfoA',\
GetMonitorInfoW,'GetMonitorInfoW',\
GetMouseMovePoints,'GetMouseMovePoints',\
GetNextDlgGroupItem,'GetNextDlgGroupItem',\
GetNextDlgTabItem,'GetNextDlgTabItem',\
GetOpenClipboardWindow,'GetOpenClipboardWindow',\
GetParent,'GetParent',\
GetPriorityClipboardFormat,'GetPriorityClipboardFormat',\
GetProcessWindowStation,'GetProcessWindowStation',\
GetPropA,'GetPropA',\
GetPropW,'GetPropW',\
GetQueueStatus,'GetQueueStatus',\
GetScrollBarInfo,'GetScrollBarInfo',\
GetScrollInfo,'GetScrollInfo',\
GetScrollPos,'GetScrollPos',\
GetScrollRange,'GetScrollRange',\
GetShellWindow,'GetShellWindow',\
GetSubMenu,'GetSubMenu',\
GetSysColor,'GetSysColor',\
GetSysColorBrush,'GetSysColorBrush',\
GetSystemMenu,'GetSystemMenu',\
GetSystemMetrics,'GetSystemMetrics',\
GetTabbedTextExtentA,'GetTabbedTextExtentA',\
GetTabbedTextExtentW,'GetTabbedTextExtentW',\
GetThreadDesktop,'GetThreadDesktop',\
GetTitleBarInfo,'GetTitleBarInfo',\
GetTopWindow,'GetTopWindow',\
GetUpdateRect,'GetUpdateRect',\
GetUpdateRgn,'GetUpdateRgn',\
GetUserObjectInformationA,'GetUserObjectInformationA',\
GetUserObjectInformationW,'GetUserObjectInformationW',\
GetUserObjectSecurity,'GetUserObjectSecurity',\
GetWindow,'GetWindow',\
GetWindowContextHelpId,'GetWindowContextHelpId',\
GetWindowDC,'GetWindowDC',\
GetWindowInfo,'GetWindowInfo',\
GetWindowLongA,'GetWindowLongA',\
GetWindowLongW,'GetWindowLongW',\
GetWindowLongPtrA,'GetWindowLongPtrA',\
GetWindowLongPtrW,'GetWindowLongPtrW',\
GetWindowModuleFileNameA,'GetWindowModuleFileNameA',\
GetWindowModuleFileNameW,'GetWindowModuleFileNameW',\
GetWindowPlacement,'GetWindowPlacement',\
GetWindowRect,'GetWindowRect',\
GetWindowRgn,'GetWindowRgn',\
GetWindowTextA,'GetWindowTextA',\
GetWindowTextW,'GetWindowTextW',\
GetWindowTextLengthA,'GetWindowTextLengthA',\
GetWindowTextLengthW,'GetWindowTextLengthW',\
GetWindowThreadProcessId,'GetWindowThreadProcessId',\
GetWindowWord,'GetWindowWord',\
GrayStringA,'GrayStringA',\
GrayStringW,'GrayStringW',\
HideCaret,'HideCaret',\
HiliteMenuItem,'HiliteMenuItem',\
IMPGetIMEA,'IMPGetIMEA',\
IMPGetIMEW,'IMPGetIMEW',\
IMPQueryIMEA,'IMPQueryIMEA',\
IMPQueryIMEW,'IMPQueryIMEW',\
IMPSetIMEA,'IMPSetIMEA',\
IMPSetIMEW,'IMPSetIMEW',\
ImpersonateDdeClientWindow,'ImpersonateDdeClientWindow',\
InSendMessage,'InSendMessage',\
InSendMessageEx,'InSendMessageEx',\
InflateRect,'InflateRect',\
InsertMenuA,'InsertMenuA',\
InsertMenuW,'InsertMenuW',\
InsertMenuItemA,'InsertMenuItemA',\
InsertMenuItemW,'InsertMenuItemW',\
IntersectRect,'IntersectRect',\
InvalidateRect,'InvalidateRect',\
InvalidateRgn,'InvalidateRgn',\
InvertRect,'InvertRect',\
IsCharAlphaA,'IsCharAlphaA',\
IsCharAlphaW,'IsCharAlphaW',\
IsCharAlphaNumericA,'IsCharAlphaNumericA',\
IsCharAlphaNumericW,'IsCharAlphaNumericW',\
IsCharLowerA,'IsCharLowerA',\
IsCharLowerW,'IsCharLowerW',\
IsCharUpperA,'IsCharUpperA',\
IsCharUpperW,'IsCharUpperW',\
IsChild,'IsChild',\
IsClipboardFormatAvailable,'IsClipboardFormatAvailable',\
IsDialogMessageA,'IsDialogMessageA',\
IsDialogMessageW,'IsDialogMessageW',\
IsDlgButtonChecked,'IsDlgButtonChecked',\
IsIconic,'IsIconic',\
IsMenu,'IsMenu',\
IsRectEmpty,'IsRectEmpty',\
IsWindow,'IsWindow',\
IsWindowEnabled,'IsWindowEnabled',\
IsWindowUnicode,'IsWindowUnicode',\
IsWindowVisible,'IsWindowVisible',\
IsZoomed,'IsZoomed',\
KillSystemTimer,'KillSystemTimer',\
KillTimer,'KillTimer',\
LoadAcceleratorsA,'LoadAcceleratorsA',\
LoadAcceleratorsW,'LoadAcceleratorsW',\
LoadBitmapA,'LoadBitmapA',\
LoadBitmapW,'LoadBitmapW',\
LoadCursorA,'LoadCursorA',\
LoadCursorW,'LoadCursorW',\
LoadCursorFromFileA,'LoadCursorFromFileA',\
LoadCursorFromFileW,'LoadCursorFromFileW',\
LoadIconA,'LoadIconA',\
LoadIconW,'LoadIconW',\
LoadImageA,'LoadImageA',\
LoadImageW,'LoadImageW',\
LoadKeyboardLayoutA,'LoadKeyboardLayoutA',\
LoadKeyboardLayoutW,'LoadKeyboardLayoutW',\
LoadMenuA,'LoadMenuA',\
LoadMenuW,'LoadMenuW',\
LoadMenuIndirectA,'LoadMenuIndirectA',\
LoadMenuIndirectW,'LoadMenuIndirectW',\
LoadStringA,'LoadStringA',\
LoadStringW,'LoadStringW',\
LockWindowUpdate,'LockWindowUpdate',\
LockWorkStation,'LockWorkStation',\
LookupIconIdFromDirectory,'LookupIconIdFromDirectory',\
LookupIconIdFromDirectoryEx,'LookupIconIdFromDirectoryEx',\
MapDialogRect,'MapDialogRect',\
MapVirtualKeyA,'MapVirtualKeyA',\
MapVirtualKeyW,'MapVirtualKeyW',\
MapVirtualKeyExA,'MapVirtualKeyExA',\
MapVirtualKeyExW,'MapVirtualKeyExW',\
MapWindowPoints,'MapWindowPoints',\
MenuItemFromPoint,'MenuItemFromPoint',\
MessageBeep,'MessageBeep',\
MessageBoxA,'MessageBoxA',\
MessageBoxW,'MessageBoxW',\
MessageBoxExA,'MessageBoxExA',\
MessageBoxExW,'MessageBoxExW',\
MessageBoxIndirectA,'MessageBoxIndirectA',\
MessageBoxIndirectW,'MessageBoxIndirectW',\
ModifyMenuA,'ModifyMenuA',\
ModifyMenuW,'ModifyMenuW',\
MonitorFromPoint,'MonitorFromPoint',\
MonitorFromRect,'MonitorFromRect',\
MonitorFromWindow,'MonitorFromWindow',\
MoveWindow,'MoveWindow',\
MsgWaitForMultipleObjects,'MsgWaitForMultipleObjects',\
MsgWaitForMultipleObjectsEx,'MsgWaitForMultipleObjectsEx',\
NotifyWinEvent,'NotifyWinEvent',\
OemKeyScan,'OemKeyScan',\
OemToCharA,'OemToCharA',\
OemToCharW,'OemToCharW',\
OemToCharBuffA,'OemToCharBuffA',\
OemToCharBuffW,'OemToCharBuffW',\
OffsetRect,'OffsetRect',\
OpenClipboard,'OpenClipboard',\
OpenDesktopA,'OpenDesktopA',\
OpenDesktopW,'OpenDesktopW',\
OpenIcon,'OpenIcon',\
OpenInputDesktop,'OpenInputDesktop',\
OpenWindowStationA,'OpenWindowStationA',\
OpenWindowStationW,'OpenWindowStationW',\
PackDDElParam,'PackDDElParam',\
PaintDesktop,'PaintDesktop',\
PeekMessageA,'PeekMessageA',\
PeekMessageW,'PeekMessageW',\
PostMessageA,'PostMessageA',\
PostMessageW,'PostMessageW',\
PostQuitMessage,'PostQuitMessage',\
PostThreadMessageA,'PostThreadMessageA',\
PostThreadMessageW,'PostThreadMessageW',\
PtInRect,'PtInRect',\
RealChildWindowFromPoint,'RealChildWindowFromPoint',\
RealGetWindowClassA,'RealGetWindowClassA',\
RealGetWindowClassW,'RealGetWindowClassW',\
RedrawWindow,'RedrawWindow',\
RegisterClassA,'RegisterClassA',\
RegisterClassW,'RegisterClassW',\
RegisterClassExA,'RegisterClassExA',\
RegisterClassExW,'RegisterClassExW',\
RegisterClipboardFormatA,'RegisterClipboardFormatA',\
RegisterClipboardFormatW,'RegisterClipboardFormatW',\
RegisterDeviceNotificationA,'RegisterDeviceNotificationA',\
RegisterDeviceNotificationW,'RegisterDeviceNotificationW',\
RegisterHotKey,'RegisterHotKey',\
RegisterWindowMessageA,'RegisterWindowMessageA',\
RegisterWindowMessageW,'RegisterWindowMessageW',\
ReleaseCapture,'ReleaseCapture',\
ReleaseDC,'ReleaseDC',\
RemoveMenu,'RemoveMenu',\
RemovePropA,'RemovePropA',\
RemovePropW,'RemovePropW',\
ReplyMessage,'ReplyMessage',\
ReuseDDElParam,'ReuseDDElParam',\
ScreenToClient,'ScreenToClient',\
ScrollChildren,'ScrollChildren',\
ScrollDC,'ScrollDC',\
ScrollWindow,'ScrollWindow',\
ScrollWindowEx,'ScrollWindowEx',\
SendDlgItemMessageA,'SendDlgItemMessageA',\
SendDlgItemMessageW,'SendDlgItemMessageW',\
SendIMEMessageExA,'SendIMEMessageExA',\
SendIMEMessageExW,'SendIMEMessageExW',\
SendInput,'SendInput',\
SendMessageA,'SendMessageA',\
SendMessageW,'SendMessageW',\
SendMessageCallbackA,'SendMessageCallbackA',\
SendMessageCallbackW,'SendMessageCallbackW',\
SendMessageTimeoutA,'SendMessageTimeoutA',\
SendMessageTimeoutW,'SendMessageTimeoutW',\
SendNotifyMessageA,'SendNotifyMessageA',\
SendNotifyMessageW,'SendNotifyMessageW',\
SetActiveWindow,'SetActiveWindow',\
SetCapture,'SetCapture',\
SetCaretBlinkTime,'SetCaretBlinkTime',\
SetCaretPos,'SetCaretPos',\
SetClassLongA,'SetClassLongA',\
SetClassLongW,'SetClassLongW',\
SetClassWord,'SetClassWord',\
SetClipboardData,'SetClipboardData',\
SetClipboardViewer,'SetClipboardViewer',\
SetCursor,'SetCursor',\
SetCursorPos,'SetCursorPos',\
SetDebugErrorLevel,'SetDebugErrorLevel',\
SetDeskWallpaper,'SetDeskWallpaper',\
SetDlgItemInt,'SetDlgItemInt',\
SetDlgItemTextA,'SetDlgItemTextA',\
SetDlgItemTextW,'SetDlgItemTextW',\
SetDoubleClickTime,'SetDoubleClickTime',\
SetFocus,'SetFocus',\
SetForegroundWindow,'SetForegroundWindow',\
SetKeyboardState,'SetKeyboardState',\
SetLastErrorEx,'SetLastErrorEx',\
SetLayeredWindowAttributes,'SetLayeredWindowAttributes',\
SetMenu,'SetMenu',\
SetMenuContextHelpId,'SetMenuContextHelpId',\
SetMenuDefaultItem,'SetMenuDefaultItem',\
SetMenuInfo,'SetMenuInfo',\
SetMenuItemBitmaps,'SetMenuItemBitmaps',\
SetMenuItemInfoA,'SetMenuItemInfoA',\
SetMenuItemInfoW,'SetMenuItemInfoW',\
SetMessageExtraInfo,'SetMessageExtraInfo',\
SetMessageQueue,'SetMessageQueue',\
SetParent,'SetParent',\
SetProcessWindowStation,'SetProcessWindowStation',\
SetPropA,'SetPropA',\
SetPropW,'SetPropW',\
SetRect,'SetRect',\
SetRectEmpty,'SetRectEmpty',\
SetScrollInfo,'SetScrollInfo',\
SetScrollPos,'SetScrollPos',\
SetScrollRange,'SetScrollRange',\
SetShellWindow,'SetShellWindow',\
SetSysColors,'SetSysColors',\
SetSystemCursor,'SetSystemCursor',\
SetSystemMenu,'SetSystemMenu',\
SetSystemTimer,'SetSystemTimer',\
SetThreadDesktop,'SetThreadDesktop',\
SetTimer,'SetTimer',\
SetUserObjectInformationA,'SetUserObjectInformationA',\
SetUserObjectInformationW,'SetUserObjectInformationW',\
SetUserObjectSecurity,'SetUserObjectSecurity',\
SetWinEventHook,'SetWinEventHook',\
SetWindowContextHelpId,'SetWindowContextHelpId',\
SetWindowLongA,'SetWindowLongA',\
SetWindowLongW,'SetWindowLongW',\
SetWindowPlacement,'SetWindowPlacement',\
SetWindowPos,'SetWindowPos',\
SetWindowRgn,'SetWindowRgn',\
SetWindowTextA,'SetWindowTextA',\
SetWindowTextW,'SetWindowTextW',\
SetWindowWord,'SetWindowWord',\
SetWindowsHookA,'SetWindowsHookA',\
SetWindowsHookW,'SetWindowsHookW',\
SetWindowsHookExA,'SetWindowsHookExA',\
SetWindowsHookExW,'SetWindowsHookExW',\
ShowCaret,'ShowCaret',\
ShowCursor,'ShowCursor',\
ShowOwnedPopups,'ShowOwnedPopups',\
ShowScrollBar,'ShowScrollBar',\
ShowWindow,'ShowWindow',\
ShowWindowAsync,'ShowWindowAsync',\
SubtractRect,'SubtractRect',\
SwapMouseButton,'SwapMouseButton',\
SwitchDesktop,'SwitchDesktop',\
SystemParametersInfoA,'SystemParametersInfoA',\
SystemParametersInfoW,'SystemParametersInfoW',\
TabbedTextOutA,'TabbedTextOutA',\
TabbedTextOutW,'TabbedTextOutW',\
TileChildWindows,'TileChildWindows',\
TileWindows,'TileWindows',\
ToAscii,'ToAscii',\
ToAsciiEx,'ToAsciiEx',\
ToUnicode,'ToUnicode',\
ToUnicodeEx,'ToUnicodeEx',\
TrackMouseEvent,'TrackMouseEvent',\
TrackPopupMenu,'TrackPopupMenu',\
TrackPopupMenuEx,'TrackPopupMenuEx',\
TranslateAcceleratorA,'TranslateAcceleratorA',\
TranslateAcceleratorW,'TranslateAcceleratorW',\
TranslateMDISysAccel,'TranslateMDISysAccel',\
TranslateMessage,'TranslateMessage',\
UnhookWinEvent,'UnhookWinEvent',\
UnhookWindowsHook,'UnhookWindowsHook',\
UnhookWindowsHookEx,'UnhookWindowsHookEx',\
UnionRect,'UnionRect',\
UnloadKeyboardLayout,'UnloadKeyboardLayout',\
UnpackDDElParam,'UnpackDDElParam',\
UnregisterClassA,'UnregisterClassA',\
UnregisterClassW,'UnregisterClassW',\
UnregisterDeviceNotification,'UnregisterDeviceNotification',\
UnregisterHotKey,'UnregisterHotKey',\
UpdateWindow,'UpdateWindow',\
UserHandleGrantAccess,'UserHandleGrantAccess',\
ValidateRect,'ValidateRect',\
ValidateRgn,'ValidateRgn',\
VkKeyScanA,'VkKeyScanA',\
VkKeyScanW,'VkKeyScanW',\
VkKeyScanExA,'VkKeyScanExA',\
VkKeyScanExW,'VkKeyScanExW',\
WINNLSEnableIME,'WINNLSEnableIME',\
WINNLSGetEnableStatus,'WINNLSGetEnableStatus',\
WINNLSGetIMEHotkey,'WINNLSGetIMEHotkey',\
WaitForInputIdle,'WaitForInputIdle',\
WaitMessage,'WaitMessage',\
WinHelpA,'WinHelpA',\
WinHelpW,'WinHelpW',\
WindowFromDC,'WindowFromDC',\
WindowFromPoint,'WindowFromPoint',\
keybd_event,'keybd_event',\
mouse_event,'mouse_event',\
wsprintfA,'wsprintfA',\
wsprintfW,'wsprintfW',\
wvsprintfA,'wvsprintfA',\
wvsprintfW,'wvsprintfW'
api AppendMenu,\
BroadcastSystemMessage,\
CallMsgFilter,\
CallWindowProc,\
ChangeDisplaySettings,\
ChangeDisplaySettingsEx,\
ChangeMenu,\
CharLower,\
CharLowerBuff,\
CharNext,\
CharNextEx,\
CharPrev,\
CharPrevEx,\
CharToOem,\
CharToOemBuff,\
CharUpper,\
CharUpperBuff,\
CopyAcceleratorTable,\
CreateAcceleratorTable,\
CreateDesktop,\
CreateDialogIndirectParam,\
CreateDialogParam,\
CreateMDIWindow,\
CreateWindowEx,\
CreateWindowStation,\
DdeCreateStringHandle,\
DdeInitialize,\
DdeQueryString,\
DefDlgProc,\
DefFrameProc,\
DefMDIChildProc,\
DefWindowProc,\
DialogBoxIndirectParam,\
DialogBoxParam,\
DispatchMessage,\
DlgDirList,\
DlgDirListComboBox,\
DlgDirSelectComboBoxEx,\
DlgDirSelectEx,\
DrawState,\
DrawText,\
DrawTextEx,\
EnumDesktops,\
EnumDisplaySettings,\
EnumDisplaySettingsEx,\
EnumProps,\
EnumPropsEx,\
EnumWindowStations,\
FindWindow,\
FindWindowEx,\
GetAltTabInfo,\
GetClassInfo,\
GetClassInfoEx,\
GetClassLong,\
GetClassName,\
GetClipboardFormatName,\
GetClipboardSequenceNumber,\
GetDlgItemText,\
GetKeyNameText,\
GetKeyboardLayoutName,\
GetMenuItemInfo,\
GetMenuString,\
GetMessage,\
GetMonitorInfo,\
GetProp,\
GetTabbedTextExtent,\
GetUserObjectInformation,\
GetWindowLong,\
GetWindowModuleFileName,\
GetWindowText,\
GetWindowTextLength,\
GrayString,\
IMPGetIME,\
IMPQueryIME,\
IMPSetIME,\
InsertMenu,\
InsertMenuItem,\
IsCharAlpha,\
IsCharAlphaNumeric,\
IsCharLower,\
IsCharUpper,\
IsDialogMessage,\
LoadAccelerators,\
LoadBitmap,\
LoadCursor,\
LoadCursorFromFile,\
LoadIcon,\
LoadImage,\
LoadKeyboardLayout,\
LoadMenu,\
LoadMenuIndirect,\
LoadString,\
MapVirtualKey,\
MapVirtualKeyEx,\
MessageBox,\
MessageBoxEx,\
MessageBoxIndirect,\
ModifyMenu,\
OemToChar,\
OemToCharBuff,\
OpenDesktop,\
OpenWindowStation,\
PeekMessage,\
PostMessage,\
PostThreadMessage,\
RealGetWindowClass,\
RegisterClass,\
RegisterClassEx,\
RegisterClipboardFormat,\
RegisterDeviceNotification,\
RegisterWindowMessage,\
RemoveProp,\
SendDlgItemMessage,\
SendIMEMessageEx,\
SendMessage,\
SendMessageCallback,\
SendMessageTimeout,\
SendNotifyMessage,\
SetClassLong,\
SetDlgItemText,\
SetMenuItemInfo,\
SetProp,\
SetUserObjectInformation,\
SetWindowLong,\
SetWindowText,\
SetWindowsHook,\
SetWindowsHookEx,\
SystemParametersInfo,\
TabbedTextOut,\
TranslateAccelerator,\
UnregisterClass,\
VkKeyScan,\
VkKeyScanEx,\
WinHelp,\
wsprintf,\
wvsprintf

View file

@ -0,0 +1,85 @@
; WSOCK32 API calls
import wsock32,\
AcceptEx,'AcceptEx',\
EnumProtocolsA,'EnumProtocolsA',\
EnumProtocolsW,'EnumProtocolsW',\
GetAcceptExSockaddrs,'GetAcceptExSockaddrs',\
GetAddressByNameA,'GetAddressByNameA',\
GetAddressByNameW,'GetAddressByNameW',\
GetNameByTypeA,'GetNameByTypeA',\
GetNameByTypeW,'GetNameByTypeW',\
GetServiceA,'GetServiceA',\
GetServiceW,'GetServiceW',\
GetTypeByNameA,'GetTypeByNameA',\
GetTypeByNameW,'GetTypeByNameW',\
MigrateWinsockConfiguration,'MigrateWinsockConfiguration',\
NPLoadNameSpaces,'NPLoadNameSpaces',\
SetServiceA,'SetServiceA',\
SetServiceW,'SetServiceW',\
TransmitFile,'TransmitFile',\
WEP,'WEP',\
WSAAsyncGetHostByAddr,'WSAAsyncGetHostByAddr',\
WSAAsyncGetHostByName,'WSAAsyncGetHostByName',\
WSAAsyncGetProtoByName,'WSAAsyncGetProtoByName',\
WSAAsyncGetProtoByNumber,'WSAAsyncGetProtoByNumber',\
WSAAsyncGetServByName,'WSAAsyncGetServByName',\
WSAAsyncGetServByPort,'WSAAsyncGetServByPort',\
WSAAsyncSelect,'WSAAsyncSelect',\
WSACancelAsyncRequest,'WSACancelAsyncRequest',\
WSACancelBlockingCall,'WSACancelBlockingCall',\
WSACleanup,'WSACleanup',\
WSAGetLastError,'WSAGetLastError',\
WSAIsBlocking,'WSAIsBlocking',\
WSARecvEx,'WSARecvEx',\
WSASetBlockingHook,'WSASetBlockingHook',\
WSASetLastError,'WSASetLastError',\
WSAStartup,'WSAStartup',\
WSAUnhookBlockingHook,'WSAUnhookBlockingHook',\
__WSAFDIsSet,'__WSAFDIsSet',\
accept,'accept',\
bind,'bind',\
closesocket,'closesocket',\
connect,'connect',\
dn_expand,'dn_expand',\
gethostbyaddr,'gethostbyaddr',\
gethostbyname,'gethostbyname',\
gethostname,'gethostname',\
getnetbyname,'getnetbyname',\
getpeername,'getpeername',\
getprotobyname,'getprotobyname',\
getprotobynumber,'getprotobynumber',\
getservbyname,'getservbyname',\
getservbyport,'getservbyport',\
getsockname,'getsockname',\
getsockopt,'getsockopt',\
htonl,'htonl',\
htons,'htons',\
inet_addr,'inet_addr',\
inet_network,'inet_network',\
inet_ntoa,'inet_ntoa',\
ioctlsocket,'ioctlsocket',\
listen,'listen',\
ntohl,'ntohl',\
ntohs,'ntohs',\
rcmd,'rcmd',\
recv,'recv',\
recvfrom,'recvfrom',\
rexec,'rexec',\
rresvport,'rresvport',\
s_perror,'s_perror',\
select,'select',\
send,'send',\
sendto,'sendto',\
sethostname,'sethostname',\
setsockopt,'setsockopt',\
shutdown,'shutdown',\
socket,'socket'
api EnumProtocols,\
GetAddressByName,\
GetNameByType,\
GetService,\
GetTypeByName,\
SetService

View file

@ -0,0 +1,77 @@
; UTF-8
macro du [arg]
{ local current,..input,char
if arg eqtype ''
virtual at 0
..input::
db arg
count = $
end virtual
current = 0
while current < count
load char byte from ..input:current
wide = char
current = current + 1
if char > 0C0h
if char < 0E0h
wide = char and 11111b
load char byte from ..input:current
wide = wide shl 6 + (char and 111111b)
current = current + 1
else if char < 0F0h
wide = char and 1111b
load char byte from ..input:current
wide = wide shl 6 + (char and 111111b)
load char byte from ..input:current+1
wide = wide shl 6 + (char and 111111b)
current = current + 2
else if char < 0F8h
wide = char and 111b
load char byte from ..input:current
wide = wide shl 6 + (char and 111111b)
load char byte from ..input:current+1
wide = wide shl 6 + (char and 111111b)
load char byte from ..input:current+2
wide = wide shl 6 + (char and 111111b)
current = current + 3
else if char < 0FCh
wide = char and 11b
load char byte from ..input:current
wide = wide shl 6 + (char and 111111b)
load char byte from ..input:current+1
wide = wide shl 6 + (char and 111111b)
load char byte from ..input:current+2
wide = wide shl 6 + (char and 111111b)
load char byte from ..input:current+3
wide = wide shl 6 + (char and 111111b)
current = current + 4
else
wide = char and 1
load char byte from ..input:current
wide = wide shl 6 + (char and 111111b)
load char byte from ..input:current+1
wide = wide shl 6 + (char and 111111b)
load char byte from ..input:current+2
wide = wide shl 6 + (char and 111111b)
load char byte from ..input:current+3
wide = wide shl 6 + (char and 111111b)
load char byte from ..input:current+4
wide = wide shl 6 + (char and 111111b)
current = current + 5
end if
end if
if wide < 10000h
dw wide
else
dw 0D7C0h + wide shr 10,0DC00h or (wide and 3FFh)
end if
end while
else
dw arg
end if }
struc du [args]
{ common label . word
du args }

View file

@ -0,0 +1,36 @@
; Windows 1250
rept 1 { local ..encoding
__encoding equ ..encoding }
virtual at 0
__encoding::
times 80h dw %-1
dw 20ACh,?,201Ah,?,201Eh,2026h,2020h,2021h,?,2030h,160h,2039h,15Ah,164h,17Dh,179h
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,2122h,161h,203Ah,15Bh,165h,17Eh,17Ah
dw 0A0h,2C7h,2D8h,141h,0A4h,104h,0A6h,0A7h,0A8h,0A9h,15Eh,0ABh,0ACh,0ADh,0AEh,17Bh
dw 0B0h,0B1h,2DBh,142h,0B4h,0B5h,0B6h,0B7h,0B8h,105h,15Fh,0BBh,13Dh,2DDh,13Eh,17Ch
dw 154h,0C1h,0C2h,102h,0C4h,139h,106h,0C7h,10Ch,0C9h,118h,0CBh,11Ah,0CDh,0CEh,10Eh
dw 110h,143h,147h,0D3h,0D4h,150h,0D6h,0D7h,158h,16Eh,0DAh,170h,0DCh,0DDh,162h,0DFh
dw 155h,0E1h,0E2h,103h,0E4h,13Ah,107h,0E7h,10Dh,0E9h,119h,0EBh,11Bh,0EDh,0EEh,10Fh
dw 111h,144h,148h,0F3h,0F4h,151h,0F6h,0F7h,159h,16Fh,0FAh,171h,0FCh,0FDh,163h,2D9h
end virtual
macro du [arg]
{ local offset,char
offset = $-$$
du arg
if arg eqtype ''
repeat ($-offset-$$)/2
load char byte from $$+offset+(%-1)*2
if char > 7Fh
load char word from __encoding:char*2
store word char at $$+offset+(%-1)*2
end if
end repeat
end if }
struc du [args]
{ common label . word
du args }

View file

@ -0,0 +1,33 @@
; Windows 1251
rept 1 { local ..encoding
__encoding equ ..encoding }
virtual at 0
__encoding::
times 80h dw %-1
dw 401h,403h,201Ah,453h,201Eh,2026h,2020h,2021h,20ACh,2030h,409h,2039h,40Ah,40Ch,40Bh,40Fh
dw 452h,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,2122h,459h,203Ah,45Ah,45Ch,45Bh,45Fh
dw 0A0h,40Eh,45Eh,408h,0A4h,490h,0A6h,0A7h,401h,0A9h,404h,0ABh,0ACh,0ADh,0AEh,407h
dw 0B0h,0B1h,406h,456h,491h,0B5h,0B6h,0B7h,451h,2116h,454h,0BBh,458h,405h,455h,457h
times 40h dw 410h+%-1
end virtual
macro du [arg]
{ local offset,char
offset = $-$$
du arg
if arg eqtype ''
repeat ($-offset-$$)/2
load char byte from $$+offset+(%-1)*2
if char > 7Fh
load char word from __encoding:char*2
store word char at $$+offset+(%-1)*2
end if
end repeat
end if }
struc du [args]
{ common label . word
du args }

View file

@ -0,0 +1,31 @@
; Windows 1252
rept 1 { local ..encoding
__encoding equ ..encoding }
virtual at 0
__encoding::
times 80h dw %-1
dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,160h,2039h,152h,?,17D,?
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,2DCh,2122h,161h,203Ah,153h,?,17Eh,178h
times 60h dw 0A0h+%-1
end virtual
macro du [arg]
{ local offset,char
offset = $-$$
du arg
if arg eqtype ''
repeat ($-offset-$$)/2
load char byte from $$+offset+(%-1)*2
if char > 7Fh
load char word from __encoding:char*2
store word char at $$+offset+(%-1)*2
end if
end repeat
end if }
struc du [args]
{ common label . word
du args }

View file

@ -0,0 +1,33 @@
; Windows 1253
rept 1 { local ..encoding
__encoding equ ..encoding }
virtual at 0
__encoding::
times 80h dw %-1
dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,?,2030h,?,2039h,?,?,?,?
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,2122h,?,203Ah,?,?,?,?
dw 0A0h,385h,386h,0A3h,0A4h,0A5h,0A6h,0A7h,0A8h,0A9h,?,0ABh,0ACh,0ADh,0AEh,2015h
dw 0B0h,0B1h,0B2h,0B3h,384h,0B5h,0B6h,0B7h,288h,389h,38Ah,0BBh,38Ch,0BDh,38Eh,38Fh
times 40h dw 390h+%-1
end virtual
macro du [arg]
{ local offset,char
offset = $-$$
du arg
if arg eqtype ''
repeat ($-offset-$$)/2
load char byte from $$+offset+(%-1)*2
if char > 7Fh
load char word from __encoding:char*2
store word char at $$+offset+(%-1)*2
end if
end repeat
end if }
struc du [args]
{ common label . word
du args }

View file

@ -0,0 +1,34 @@
; Windows 1254
rept 1 { local ..encoding
__encoding equ ..encoding }
virtual at 0
__encoding::
times 80h dw %-1
dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,160h,2039h,152h,?,?,?
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,2DCh,2122h,161h,203Ah,153h,?,?,178h
times 30h dw 0A0h+%-1
dw 11Eh,0D1h,0D2h,0D3h,0D4h,0D5h,0D6h,0D7h,0D8h,0D9h,0DAh,0DBh,0DCh,130h,15Eh,0DFh
times 10h dw 0E0h+%-1
dw 11Fh,0F1h,0F2h,0F3h,0F4h,0F5h,0F6h,0F7h,0F8h,0F9h,0FAh,0FBh,0FCh,131h,15Fh,0FFh
end virtual
macro du [arg]
{ local offset,char
offset = $-$$
du arg
if arg eqtype ''
repeat ($-offset-$$)/2
load char byte from $$+offset+(%-1)*2
if char > 7Fh
load char word from __encoding:char*2
store word char at $$+offset+(%-1)*2
end if
end repeat
end if }
struc du [args]
{ common label . word
du args }

View file

@ -0,0 +1,36 @@
; Windows 1255
rept 1 { local ..encoding
__encoding equ ..encoding }
virtual at 0
__encoding::
times 80h dw %-1
dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,?,2039h,?,?,?,?
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,2DCh,2122h,?,203Ah,?,?,?,?
dw 0A0h,0A1h,0A2h,0A3h,20AAh,0A5h,0A6h,0A7h,0A8h,0A9h,0D7h,0ABh,0ACh,0ADh,0AEh,0AFh
dw 0B0h,0B1h,0B2h,0B3h,0B4h,0B5h,0B6h,0B7h,0B8h,0B9h,0F7h,0BBh,0BCh,0BDh,0BEh,0BFh
dw 5B0h,5B1h,5B2h,5B3h,5B4h,5B5h,5B6h,5B7h,5B8h,5B9h,?,5BBh,5BCh,5BDh,5BEh,5BFh
dw 5C0h,5C1h,5C2h,5C3h,5F0h,5F1h,5F2h,5F3h,5F4h,?,?,?,?,?,?,?
dw 5D0h,5D1h,5D2h,5D3h,5D4h,5D5h,5D6h,5D7h,5D8h,5D9h,5DAh,5DBh,5DCh,5DDh,5DEh,5DFh
dw 5E0h,5E1h,5E2h,5E3h,5E4h,5E5h,5E6h,5E7h,5E8h,5E9h,5EAh,?,?,200Eh,200Fh,?
end virtual
macro du [arg]
{ local offset,char
offset = $-$$
du arg
if arg eqtype ''
repeat ($-offset-$$)/2
load char byte from $$+offset+(%-1)*2
if char > 7Fh
load char word from __encoding:char*2
store word char at $$+offset+(%-1)*2
end if
end repeat
end if }
struc du [args]
{ common label . word
du args }

View file

@ -0,0 +1,36 @@
; Windows 1256
rept 1 { local ..encoding
__encoding equ ..encoding }
virtual at 0
__encoding::
times 80h dw %-1
dw 20ACh,67Eh,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,679h,2039h,152h,686h,698h,688h
dw 6AFh,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,6A9h,2122h,691h,203Ah,153h,200Ch,200Dh,6BAh
dw 0A0h,60Ch,0A2h,0A3h,0A4h,0A5h,0A6h,0A7h,0A8h,0A9h,6BEh,0ABh,0ACh,0ADh,0AEh,0AFh
dw 0B0h,0B1h,0B2h,0B3h,0B4h,0B5h,0B6h,0B7h,0B8h,0B9h,0BAh,0BBh,0BCh,0BDh,0BEh,0BFh
dw 6C1h,621h,622h,623h,624h,625h,626h,627h,628h,629h,62Ah,62Bh,62Ch,62Dh,62Eh,62Fh
dw 630h,631h,632h,633h,634h,635h,636h,0D7h,637h,638h,639h,63Ah,640h,641h,642h,643h
dw 0E0h,644h,0E2h,645h,646h,647h,648h,0E7h,0E8h,0E9h,0EAh,0EBh,649h,64Ah,0EEh,0EFh
dw 64Bh,64Ch,64Dh,64Eh,0F4h,64Fh,650h,0F7h,651h,0F9h,652h,0FBh,0FCh,200Eh,200Fh,6D2h
end virtual
macro du [arg]
{ local offset,char
offset = $-$$
du arg
if arg eqtype ''
repeat ($-offset-$$)/2
load char byte from $$+offset+(%-1)*2
if char > 7Fh
load char word from __encoding:char*2
store word char at $$+offset+(%-1)*2
end if
end repeat
end if }
struc du [args]
{ common label . word
du args }

View file

@ -0,0 +1,36 @@
; Windows 1257
rept 1 { local ..encoding
__encoding equ ..encoding }
virtual at 0
__encoding::
times 80h dw %-1
dw 20ACh,?,201Ah,?,201Eh,2026h,2020h,2021h,?,2030h,?,2039h,?,0A8h,2C7h,0B8h
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,2122h,?,203Ah,?,0AFh,2DBh,?
dw 0A0h,?,0A2h,0A3h,0A4h,?,0A6h,0A7h,0D8h,0A9h,156h,0ABh,0ACh,0ADh,0AEh,0C6h
dw 0B0h,0B1h,0B2h,0B3h,0B4h,0B5h,0B6h,0B7h,0F8h,0B9h,157h,0BBh,0BCh,0BDh,0BEh,0E6h
dw 104h,12Eh,100h,106h,0C4h,0C5h,118h,112h,10Ch,0C9h,179h,116h,122h,136h,12Ah,13Bh
dw 160h,143h,145h,0D3h,14Ch,0D5h,0D6h,0D7h,172h,141h,15Ah,16Ah,0DCh,17Bh,17Dh,0DFh
dw 105h,12Fh,101h,107h,0E4h,0E5h,119h,113h,10Dh,0E9h,17Ah,117h,123h,137h,12Bh,13Ch
dw 161h,144h,146h,0F3h,14Dh,0F5h,0F6h,0F7h,173h,142h,15Bh,16Bh,0FCh,17Ch,17Eh,2D9h
end virtual
macro du [arg]
{ local offset,char
offset = $-$$
du arg
if arg eqtype ''
repeat ($-offset-$$)/2
load char byte from $$+offset+(%-1)*2
if char > 7Fh
load char word from __encoding:char*2
store word char at $$+offset+(%-1)*2
end if
end repeat
end if }
struc du [args]
{ common label . word
du args }

View file

@ -0,0 +1,36 @@
; Windows 1258
rept 1 { local ..encoding
__encoding equ ..encoding }
virtual at 0
__encoding::
times 80h dw %-1
dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,?,2039h,152h,?,?,?
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,2DCh,2122h,?,203Ah,153h,?,?,178h
dw 0A0h,0A1h,0A2h,0A3h,0A4h,0A5h,0A6h,0A7h,0A8h,0A9h,0AAh,0ABh,0ACh,0ADh,0AEh,0AFh
dw 0B0h,0B1h,0B2h,0B3h,0B4h,0B5h,0B6h,0B7h,0B8h,0B9h,0BAh,0BBh,0BCh,0BDh,0BEh,0BFh
dw 0C0h,0C1h,0C2h,102h,0C4h,0C5h,0C6h,0C7h,0C8h,0C9h,0CAh,0CBh,300h,0CDh,0CEh,0CFh
dw 110h,0D1h,309h,0D3h,0D4h,1A0h,0D6h,0D7h,0D8h,0D9h,0DAh,0DBh,0DCh,1AFh,303h,0DFh
dw 0E0h,0E1h,0E2h,103h,0E4h,0E5h,0E6h,0E7h,0E8h,0E9h,0EAh,0EBh,301h,0EDh,0EEh,0EFh
dw 111h,0F1h,323h,0F3h,0F4h,1A1h,0F6h,0F7h,0F8h,0F9h,0FAh,0FBh,0FCh,1B0h,20ABh,0FFh
end virtual
macro du [arg]
{ local offset,char
offset = $-$$
du arg
if arg eqtype ''
repeat ($-offset-$$)/2
load char byte from $$+offset+(%-1)*2
if char > 7Fh
load char word from __encoding:char*2
store word char at $$+offset+(%-1)*2
end if
end repeat
end if }
struc du [args]
{ common label . word
du args }

View file

@ -0,0 +1,31 @@
; Windows 874
rept 1 { local ..encoding
__encoding equ ..encoding }
virtual at 0
__encoding::
times 80h dw %-1
dw 20ACh,?,?,?,?,2026h,?,?,?,?,?,?,?,?,?,?
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,?,?,?,?,?,?,?
times 60h dw 0E00h+%-1
end virtual
macro du [arg]
{ local offset,char
offset = $-$$
du arg
if arg eqtype ''
repeat ($-offset-$$)/2
load char byte from $$+offset+(%-1)*2
if char > 7Fh
load char word from __encoding:char*2
store word char at $$+offset+(%-1)*2
end if
end repeat
end if }
struc du [args]
{ common label . word
du args }

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,333 @@
; COMDLG32.DLL structures and constants
struct OPENFILENAME
lStructSize dd ?
hwndOwner dd ?
hInstance dd ?
lpstrFilter dd ?
lpstrCustomFilter dd ?
nMaxCustFilter dd ?
nFilterIndex dd ?
lpstrFile dd ?
nMaxFile dd ?
lpstrFileTitle dd ?
nMaxFileTitle dd ?
lpstrInitialDir dd ?
lpstrTitle dd ?
Flags dd ?
nFileOffset dw ?
nFileExtension dw ?
lpstrDefExt dd ?
lCustData dd ?
lpfnHook dd ?
lpTemplateName dd ?
ends
struct CHOOSECOLOR
lStructSize dd ?
hwndOwner dd ?
hInstance dd ?
rgbResult dd ?
lpCustColors dd ?
Flags dd ?
lCustData dd ?
lpfnHook dd ?
lpTemplateName dd ?
ends
struct FINDREPLACE
lStructSize dd ?
hwndOwner dd ?
hInstance dd ?
Flags dd ?
lpstrFindWhat dd ?
lpstrReplaceWith dd ?
wFindWhatLen dw ?
wReplaceWithLen dw ?
lCustData dd ?
lpfnHook dd ?
lpTemplateName dd ?
ends
struct CHOOSEFONT
lStructSize dd ?
hwndOwner dd ?
hDC dd ?
lpLogFont dd ?
iPointSize dd ?
Flags dd ?
rgbColors dd ?
lCustData dd ?
lpfnHook dd ?
lpTemplateName dd ?
hInstance dd ?
lpszStyle dd ?
nFontType dw ?
wReserved dw ?
nSizeMin dd ?
nSizeMax dd ?
ends
struct PRINTDLG
lStructSize dd ?
hwndOwner dd ?
hDevMode dd ?
hDevNames dd ?
hDC dd ?
Flags dd ?
nFromPage dw ?
nToPage dw ?
nMinPage dw ?
nMaxPage dw ?
nCopies dw ?
hInstance dd ?
lCustData dd ?
lpfnPrintHook dd ?
lpfnSetupHook dd ?
lpPrintTemplateName dd ?
lpSetupTemplateName dd ?
hPrintTemplate dd ?
hSetupTemplate dd ?
ends
struct DEVNAMES
wDriverOffset dw ?
wDeviceOffset dw ?
wOutputOffset dw ?
wDefault dw ?
ends
struct PAGESETUPDLG
lStructSize dd ?
hwndOwner dd ?
hDevMode dd ?
hDevNames dd ?
Flags dd ?
ptPaperSize POINT
rtMinMargin RECT
rtMargin RECT
hInstance dd ?
lCustData dd ?
lpfnPageSetupHook dd ?
lpfnPagePaintHook dd ?
lpPageSetupTemplateName dd ?
hPageSetupTemplate dd ?
ends
; OPENFILENAME flags
OFN_READONLY = 000001h
OFN_OVERWRITEPROMPT = 000002h
OFN_HIDEREADONLY = 000004h
OFN_NOCHANGEDIR = 000008h
OFN_SHOWHELP = 000010h
OFN_ENABLEHOOK = 000020h
OFN_ENABLETEMPLATE = 000040h
OFN_ENABLETEMPLATEHANDLE = 000080h
OFN_NOVALIDATE = 000100h
OFN_ALLOWMULTISELECT = 000200h
OFN_EXTENSIONDIFFERENT = 000400h
OFN_PATHMUSTEXIST = 000800h
OFN_FILEMUSTEXIST = 001000h
OFN_CREATEPROMPT = 002000h
OFN_SHAREAWARE = 004000h
OFN_NOREADONLYRETURN = 008000h
OFN_NOTESTFILECREATE = 010000h
OFN_NONETWORKBUTTON = 020000h
OFN_NOLONGNAMES = 040000h
OFN_EXPLORER = 080000h
OFN_NODEREFERENCELINKS = 100000h
OFN_LONGNAMES = 200000h
; Common dialog notifications
CDN_FIRST = -601
CDN_LAST = -699
CDN_INITDONE = CDN_FIRST - 0
CDN_SELCHANGE = CDN_FIRST - 1
CDN_FOLDERCHANGE = CDN_FIRST - 2
CDN_SHAREVIOLATION = CDN_FIRST - 3
CDN_HELP = CDN_FIRST - 4
CDN_FILEOK = CDN_FIRST - 5
CDN_TYPECHANGE = CDN_FIRST - 6
; Common dialog messages
CDM_FIRST = WM_USER + 100
CDM_LAST = WM_USER + 200
CDM_GETSPEC = CDM_FIRST + 0
CDM_GETFILEPATH = CDM_FIRST + 1
CDM_GETFOLDERPATH = CDM_FIRST + 2
CDM_GETFOLDERIDLIST = CDM_FIRST + 3
CDM_SETCONTROLTEXT = CDM_FIRST + 4
CDM_HIDECONTROL = CDM_FIRST + 5
CDM_SETDEFEXT = CDM_FIRST + 6
; CHOOSECOLOR flags
CC_RGBINIT = 001h
CC_FULLOPEN = 002h
CC_PREVENTFULLOPEN = 004h
CC_SHOWHELP = 008h
CC_ENABLEHOOK = 010h
CC_ENABLETEMPLATE = 020h
CC_ENABLETEMPLATEHANDLE = 040h
CC_SOLIDCOLOR = 080h
CC_ANYCOLOR = 100h
; FINDREPLACE flags
FR_DOWN = 00001h
FR_WHOLEWORD = 00002h
FR_MATCHCASE = 00004h
FR_FINDNEXT = 00008h
FR_REPLACE = 00010h
FR_REPLACEALL = 00020h
FR_DIALOGTERM = 00040h
FR_SHOWHELP = 00080h
FR_ENABLEHOOK = 00100h
FR_ENABLETEMPLATE = 00200h
FR_NOUPDOWN = 00400h
FR_NOMATCHCASE = 00800h
FR_NOWHOLEWORD = 01000h
FR_ENABLETEMPLATEHANDLE = 02000h
FR_HIDEUPDOWN = 04000h
FR_HIDEMATCHCASE = 08000h
FR_HIDEWHOLEWORD = 10000h
; CHOOSEFONT flags
CF_SCREENFONTS = 0000001h
CF_PRINTERFONTS = 0000002h
CF_BOTH = CF_SCREENFONTS or CF_PRINTERFONTS
CF_SHOWHELP = 0000004h
CF_ENABLEHOOK = 0000008h
CF_ENABLETEMPLATE = 0000010h
CF_ENABLETEMPLATEHANDLE = 0000020h
CF_INITTOLOGFONTSTRUCT = 0000040h
CF_USESTYLE = 0000080h
CF_EFFECTS = 0000100h
CF_APPLY = 0000200h
CF_ANSIONLY = 0000400h
CF_SCRIPTSONLY = CF_ANSIONLY
CF_NOVECTORFONTS = 0000800h
CF_NOOEMFONTS = CF_NOVECTORFONTS
CF_NOSIMULATIONS = 0001000h
CF_LIMITSIZE = 0002000h
CF_FIXEDPITCHONLY = 0004000h
CF_WYSIWYG = 0008000h
CF_FORCEFONTEXIST = 0010000h
CF_SCALABLEONLY = 0020000h
CF_TTONLY = 0040000h
CF_NOFACESEL = 0080000h
CF_NOSTYLESEL = 0100000h
CF_NOSIZESEL = 0200000h
CF_SELECTSCRIPT = 0400000h
CF_NOSCRIPTSEL = 0800000h
CF_NOVERTFONTS = 1000000h
; ChooseFont messages
WM_CHOOSEFONT_GETLOGFONT = WM_USER + 1
WM_CHOOSEFONT_SETLOGFONT = WM_USER + 101
WM_CHOOSEFONT_SETFLAGS = WM_USER + 102
; PRINTDLG flags
PD_ALLPAGES = 000000h
PD_SELECTION = 000001h
PD_PAGENUMS = 000002h
PD_NOSELECTION = 000004h
PD_NOPAGENUMS = 000008h
PD_COLLATE = 000010h
PD_PRINTTOFILE = 000020h
PD_PRINTSETUP = 000040h
PD_NOWARNING = 000080h
PD_RETURNDC = 000100h
PD_RETURNIC = 000200h
PD_RETURNDEFAULT = 000400h
PD_SHOWHELP = 000800h
PD_ENABLEPRINTHOOK = 001000h
PD_ENABLESETUPHOOK = 002000h
PD_ENABLEPRINTTEMPLATE = 004000h
PD_ENABLESETUPTEMPLATE = 008000h
PD_ENABLEPRINTTEMPLATEHANDLE = 010000h
PD_ENABLESETUPTEMPLATEHANDLE = 020000h
PD_USEDEVMODECOPIES = 040000h
PD_USEDEVMODECOPIESANDCOLLATE = 040000h
PD_DISABLEPRINTTOFILE = 080000h
PD_HIDEPRINTTOFILE = 100000h
PD_NONETWORKBUTTON = 200000h
; PAGESETUPDLG flags
PSD_DEFAULTMINMARGINS = 000000h
PSD_INWININIINTLMEASURE = 000000h
PSD_MINMARGINS = 000001h
PSD_MARGINS = 000002h
PSD_INTHOUSANDTHSOFINCHES = 000004h
PSD_INHUNDREDTHSOFMILLIMETERS = 000008h
PSD_DISABLEMARGINS = 000010h
PSD_DISABLEPRINTER = 000020h
PSD_NOWARNING = 000080h
PSD_DISABLEORIENTATION = 000100h
PSD_RETURNDEFAULT = 000400h
PSD_DISABLEPAPER = 000200h
PSD_SHOWHELP = 000800h
PSD_ENABLEPAGESETUPHOOK = 002000h
PSD_ENABLEPAGESETUPTEMPLATE = 008000h
PSD_ENABLEPAGESETUPTEMPLATEHANDLE = 020000h
PSD_ENABLEPAGEPAINTHOOK = 040000h
PSD_DISABLEPAGEPAINTING = 080000h
PSD_NONETWORKBUTTON = 200000h
; PageSetupDlg messages
WM_PSD_PAGESETUPDLG = WM_USER
WM_PSD_FULLPAGERECT = WM_USER + 1
WM_PSD_MINMARGINRECT = WM_USER + 2
WM_PSD_MARGINRECT = WM_USER + 3
WM_PSD_GREEKTEXTRECT = WM_USER + 4
WM_PSD_ENVSTAMPRECT = WM_USER + 5
WM_PSD_YAFULLPAGERECT = WM_USER + 6
; Common dialog error codes
CDERR_DIALOGFAILURE = 0FFFFh
CDERR_GENERALCODES = 00000h
CDERR_STRUCTSIZE = 00001h
CDERR_INITIALIZATION = 00002h
CDERR_NOTEMPLATE = 00003h
CDERR_NOHINSTANCE = 00004h
CDERR_LOADSTRFAILURE = 00005h
CDERR_FINDRESFAILURE = 00006h
CDERR_LOADRESFAILURE = 00007h
CDERR_LOCKRESFAILURE = 00008h
CDERR_MEMALLOCFAILURE = 00009h
CDERR_MEMLOCKFAILURE = 0000Ah
CDERR_NOHOOK = 0000Bh
CDERR_REGISTERMSGFAIL = 0000Ch
PDERR_PRINTERCODES = 01000h
PDERR_SETUPFAILURE = 01001h
PDERR_PARSEFAILURE = 01002h
PDERR_RETDEFFAILURE = 01003h
PDERR_LOADDRVFAILURE = 01004h
PDERR_GETDEVMODEFAIL = 01005h
PDERR_INITFAILURE = 01006h
PDERR_NODEVICES = 01007h
PDERR_NODEFAULTPRN = 01008h
PDERR_DNDMMISMATCH = 01009h
PDERR_CREATEICFAILURE = 0100Ah
PDERR_PRINTERNOTFOUND = 0100Bh
PDERR_DEFAULTDIFFERENT = 0100Ch
CFERR_CHOOSEFONTCODES = 02000h
CFERR_NOFONTS = 02001h
CFERR_MAXLESSTHANMIN = 02002h
FNERR_FILENAMECODES = 03000h
FNERR_SUBCLASSFAILURE = 03001h
FNERR_INVALIDFILENAME = 03002h
FNERR_BUFFERTOOSMALL = 03003h
FRERR_FINDREPLACECODES = 04000h
FRERR_BUFFERLENGTHZERO = 04001h
CCERR_CHOOSECOLORCODES = 05000h

View file

@ -0,0 +1,334 @@
; COMDLG32.DLL structures and constants
struct OPENFILENAME
lStructSize dq ?
hwndOwner dq ?
hInstance dq ?
lpstrFilter dq ?
lpstrCustomFilter dq ?
nMaxCustFilter dd ?
nFilterIndex dd ?
lpstrFile dq ?
nMaxFile dd ?,?
lpstrFileTitle dq ?
nMaxFileTitle dd ?,?
lpstrInitialDir dq ?
lpstrTitle dq ?
Flags dd ?
nFileOffset dw ?
nFileExtension dw ?
lpstrDefExt dq ?
lCustData dq ?
lpfnHook dq ?
lpTemplateName dq ?
ends
struct CHOOSECOLOR
lStructSize dq ?
hwndOwner dq ?
hInstance dq ?
rgbResult dd ?,?
lpCustColors dq ?
Flags dd ?,?
lCustData dq ?
lpfnHook dq ?
lpTemplateName dq ?
ends
struct FINDREPLACE
lStructSize dq ?
hwndOwner dq ?
hInstance dq ?
Flags dd ?,?
lpstrFindWhat dq ?
lpstrReplaceWith dq ?
wFindWhatLen dw ?
wReplaceWithLen dw ?,?,?
lCustData dq ?
lpfnHook dq ?
lpTemplateName dq ?
ends
struct CHOOSEFONT
lStructSize dq ?
hwndOwner dq ?
hDC dq ?
lpLogFont dq ?
iPointSize dd ?
Flags dd ?
rgbColors dd ?,?
lCustData dq ?
lpfnHook dq ?
lpTemplateName dq ?
hInstance dq ?
lpszStyle dq ?
nFontType dw ?
wReserved dw ?
nSizeMin dd ?
nSizeMax dd ?
ends
struct PRINTDLG
lStructSize dq ?
hwndOwner dq ?
hDevMode dq ?
hDevNames dq ?
hDC dq ?
Flags dd ?
nFromPage dw ?
nToPage dw ?
nMinPage dw ?
nMaxPage dw ?
nCopies dw ?,?
hInstance dq ?
lCustData dq ?
lpfnPrintHook dq ?
lpfnSetupHook dq ?
lpPrintTemplateName dq ?
lpSetupTemplateName dq ?
hPrintTemplate dq ?
hSetupTemplate dq ?
ends
struct DEVNAMES
wDriverOffset dw ?
wDeviceOffset dw ?
wOutputOffset dw ?
wDefault dw ?
ends
struct PAGESETUPDLG
lStructSize dq ?
hwndOwner dq ?
hDevMode dq ?
hDevNames dq ?
Flags dd ?
ptPaperSize POINT
rtMinMargin RECT
rtMargin RECT
dd ?
hInstance dq ?
lCustData dq ?
lpfnPageSetupHook dq ?
lpfnPagePaintHook dq ?
lpPageSetupTemplateName dq ?
hPageSetupTemplate dq ?
ends
; OPENFILENAME flags
OFN_READONLY = 000001h
OFN_OVERWRITEPROMPT = 000002h
OFN_HIDEREADONLY = 000004h
OFN_NOCHANGEDIR = 000008h
OFN_SHOWHELP = 000010h
OFN_ENABLEHOOK = 000020h
OFN_ENABLETEMPLATE = 000040h
OFN_ENABLETEMPLATEHANDLE = 000080h
OFN_NOVALIDATE = 000100h
OFN_ALLOWMULTISELECT = 000200h
OFN_EXTENSIONDIFFERENT = 000400h
OFN_PATHMUSTEXIST = 000800h
OFN_FILEMUSTEXIST = 001000h
OFN_CREATEPROMPT = 002000h
OFN_SHAREAWARE = 004000h
OFN_NOREADONLYRETURN = 008000h
OFN_NOTESTFILECREATE = 010000h
OFN_NONETWORKBUTTON = 020000h
OFN_NOLONGNAMES = 040000h
OFN_EXPLORER = 080000h
OFN_NODEREFERENCELINKS = 100000h
OFN_LONGNAMES = 200000h
; Common dialog notifications
CDN_FIRST = -601
CDN_LAST = -699
CDN_INITDONE = CDN_FIRST - 0
CDN_SELCHANGE = CDN_FIRST - 1
CDN_FOLDERCHANGE = CDN_FIRST - 2
CDN_SHAREVIOLATION = CDN_FIRST - 3
CDN_HELP = CDN_FIRST - 4
CDN_FILEOK = CDN_FIRST - 5
CDN_TYPECHANGE = CDN_FIRST - 6
; Common dialog messages
CDM_FIRST = WM_USER + 100
CDM_LAST = WM_USER + 200
CDM_GETSPEC = CDM_FIRST + 0
CDM_GETFILEPATH = CDM_FIRST + 1
CDM_GETFOLDERPATH = CDM_FIRST + 2
CDM_GETFOLDERIDLIST = CDM_FIRST + 3
CDM_SETCONTROLTEXT = CDM_FIRST + 4
CDM_HIDECONTROL = CDM_FIRST + 5
CDM_SETDEFEXT = CDM_FIRST + 6
; CHOOSECOLOR flags
CC_RGBINIT = 001h
CC_FULLOPEN = 002h
CC_PREVENTFULLOPEN = 004h
CC_SHOWHELP = 008h
CC_ENABLEHOOK = 010h
CC_ENABLETEMPLATE = 020h
CC_ENABLETEMPLATEHANDLE = 040h
CC_SOLIDCOLOR = 080h
CC_ANYCOLOR = 100h
; FINDREPLACE flags
FR_DOWN = 00001h
FR_WHOLEWORD = 00002h
FR_MATCHCASE = 00004h
FR_FINDNEXT = 00008h
FR_REPLACE = 00010h
FR_REPLACEALL = 00020h
FR_DIALOGTERM = 00040h
FR_SHOWHELP = 00080h
FR_ENABLEHOOK = 00100h
FR_ENABLETEMPLATE = 00200h
FR_NOUPDOWN = 00400h
FR_NOMATCHCASE = 00800h
FR_NOWHOLEWORD = 01000h
FR_ENABLETEMPLATEHANDLE = 02000h
FR_HIDEUPDOWN = 04000h
FR_HIDEMATCHCASE = 08000h
FR_HIDEWHOLEWORD = 10000h
; CHOOSEFONT flags
CF_SCREENFONTS = 0000001h
CF_PRINTERFONTS = 0000002h
CF_BOTH = CF_SCREENFONTS or CF_PRINTERFONTS
CF_SHOWHELP = 0000004h
CF_ENABLEHOOK = 0000008h
CF_ENABLETEMPLATE = 0000010h
CF_ENABLETEMPLATEHANDLE = 0000020h
CF_INITTOLOGFONTSTRUCT = 0000040h
CF_USESTYLE = 0000080h
CF_EFFECTS = 0000100h
CF_APPLY = 0000200h
CF_ANSIONLY = 0000400h
CF_SCRIPTSONLY = CF_ANSIONLY
CF_NOVECTORFONTS = 0000800h
CF_NOOEMFONTS = CF_NOVECTORFONTS
CF_NOSIMULATIONS = 0001000h
CF_LIMITSIZE = 0002000h
CF_FIXEDPITCHONLY = 0004000h
CF_WYSIWYG = 0008000h
CF_FORCEFONTEXIST = 0010000h
CF_SCALABLEONLY = 0020000h
CF_TTONLY = 0040000h
CF_NOFACESEL = 0080000h
CF_NOSTYLESEL = 0100000h
CF_NOSIZESEL = 0200000h
CF_SELECTSCRIPT = 0400000h
CF_NOSCRIPTSEL = 0800000h
CF_NOVERTFONTS = 1000000h
; ChooseFont messages
WM_CHOOSEFONT_GETLOGFONT = WM_USER + 1
WM_CHOOSEFONT_SETLOGFONT = WM_USER + 101
WM_CHOOSEFONT_SETFLAGS = WM_USER + 102
; PRINTDLG flags
PD_ALLPAGES = 000000h
PD_SELECTION = 000001h
PD_PAGENUMS = 000002h
PD_NOSELECTION = 000004h
PD_NOPAGENUMS = 000008h
PD_COLLATE = 000010h
PD_PRINTTOFILE = 000020h
PD_PRINTSETUP = 000040h
PD_NOWARNING = 000080h
PD_RETURNDC = 000100h
PD_RETURNIC = 000200h
PD_RETURNDEFAULT = 000400h
PD_SHOWHELP = 000800h
PD_ENABLEPRINTHOOK = 001000h
PD_ENABLESETUPHOOK = 002000h
PD_ENABLEPRINTTEMPLATE = 004000h
PD_ENABLESETUPTEMPLATE = 008000h
PD_ENABLEPRINTTEMPLATEHANDLE = 010000h
PD_ENABLESETUPTEMPLATEHANDLE = 020000h
PD_USEDEVMODECOPIES = 040000h
PD_USEDEVMODECOPIESANDCOLLATE = 040000h
PD_DISABLEPRINTTOFILE = 080000h
PD_HIDEPRINTTOFILE = 100000h
PD_NONETWORKBUTTON = 200000h
; PAGESETUPDLG flags
PSD_DEFAULTMINMARGINS = 000000h
PSD_INWININIINTLMEASURE = 000000h
PSD_MINMARGINS = 000001h
PSD_MARGINS = 000002h
PSD_INTHOUSANDTHSOFINCHES = 000004h
PSD_INHUNDREDTHSOFMILLIMETERS = 000008h
PSD_DISABLEMARGINS = 000010h
PSD_DISABLEPRINTER = 000020h
PSD_NOWARNING = 000080h
PSD_DISABLEORIENTATION = 000100h
PSD_RETURNDEFAULT = 000400h
PSD_DISABLEPAPER = 000200h
PSD_SHOWHELP = 000800h
PSD_ENABLEPAGESETUPHOOK = 002000h
PSD_ENABLEPAGESETUPTEMPLATE = 008000h
PSD_ENABLEPAGESETUPTEMPLATEHANDLE = 020000h
PSD_ENABLEPAGEPAINTHOOK = 040000h
PSD_DISABLEPAGEPAINTING = 080000h
PSD_NONETWORKBUTTON = 200000h
; PageSetupDlg messages
WM_PSD_PAGESETUPDLG = WM_USER
WM_PSD_FULLPAGERECT = WM_USER + 1
WM_PSD_MINMARGINRECT = WM_USER + 2
WM_PSD_MARGINRECT = WM_USER + 3
WM_PSD_GREEKTEXTRECT = WM_USER + 4
WM_PSD_ENVSTAMPRECT = WM_USER + 5
WM_PSD_YAFULLPAGERECT = WM_USER + 6
; Common dialog error codes
CDERR_DIALOGFAILURE = 0FFFFh
CDERR_GENERALCODES = 00000h
CDERR_STRUCTSIZE = 00001h
CDERR_INITIALIZATION = 00002h
CDERR_NOTEMPLATE = 00003h
CDERR_NOHINSTANCE = 00004h
CDERR_LOADSTRFAILURE = 00005h
CDERR_FINDRESFAILURE = 00006h
CDERR_LOADRESFAILURE = 00007h
CDERR_LOCKRESFAILURE = 00008h
CDERR_MEMALLOCFAILURE = 00009h
CDERR_MEMLOCKFAILURE = 0000Ah
CDERR_NOHOOK = 0000Bh
CDERR_REGISTERMSGFAIL = 0000Ch
PDERR_PRINTERCODES = 01000h
PDERR_SETUPFAILURE = 01001h
PDERR_PARSEFAILURE = 01002h
PDERR_RETDEFFAILURE = 01003h
PDERR_LOADDRVFAILURE = 01004h
PDERR_GETDEVMODEFAIL = 01005h
PDERR_INITFAILURE = 01006h
PDERR_NODEVICES = 01007h
PDERR_NODEFAULTPRN = 01008h
PDERR_DNDMMISMATCH = 01009h
PDERR_CREATEICFAILURE = 0100Ah
PDERR_PRINTERNOTFOUND = 0100Bh
PDERR_DEFAULTDIFFERENT = 0100Ch
CFERR_CHOOSEFONTCODES = 02000h
CFERR_NOFONTS = 02001h
CFERR_MAXLESSTHANMIN = 02002h
FNERR_FILENAMECODES = 03000h
FNERR_SUBCLASSFAILURE = 03001h
FNERR_INVALIDFILENAME = 03002h
FNERR_BUFFERTOOSMALL = 03003h
FRERR_FINDREPLACECODES = 04000h
FRERR_BUFFERLENGTHZERO = 04001h
CCERR_CHOOSECOLORCODES = 05000h

View file

@ -0,0 +1,480 @@
; GDI32.DLL structures and constants
struct SIZE
cx dd ?
cy dd ?
ends
struct BITMAP
bmType dd ?
bmWidth dd ?
bmHeight dd ?
bmWidthBytes dd ?
bmPlanes dw ?
bmBitsPixel dw ?
bmBits dd ?
ends
struct BITMAPCOREHEADER
bcSize dd ?
bcWidth dw ?
bcHeight dw ?
bcPlanes dw ?
bcBitCount dw ?
ends
struct BITMAPINFOHEADER
biSize dd ?
biWidth dd ?
biHeight dd ?
biPlanes dw ?
biBitCount dw ?
biCompression dd ?
biSizeImage dd ?
biXPelsPerMeter dd ?
biYPelsPerMeter dd ?
biClrUsed dd ?
biClrImportant dd ?
ends
struct BITMAPFILEHEADER
bfType dw ?
bfSize dd ?
bfReserved1 dw ?
bfReserved2 dw ?
bfOffBits dd ?
ends
struct TEXTMETRIC
tmHeight dd ?
tmAscent dd ?
tmDescent dd ?
tmInternalLeading dd ?
tmExternalLeading dd ?
tmAveCharWidth dd ?
tmMaxCharWidth dd ?
tmWeight dd ?
tmOverhang dd ?
tmDigitizedAspectX dd ?
tmDigitizedAspectY dd ?
tmFirstChar TCHAR ?
tmLastChar TCHAR ?
tmDefaultChar TCHAR ?
tmBreakChar TCHAR ?
tmItalic db ?
tmUnderlined db ?
tmStruckOut db ?
tmPitchAndFamily db ?
tmCharSet db ?
ends
struct LOGBRUSH
lbStyle dd ?
lbColor dd ?
lbHatch dd ?
ends
struct LOGPEN
lopnStyle dd ?
lopnWidth POINT
lopnColor dd ?
ends
struct EXTLOGPEN
elpPenStyle dd ?
elpWidth dd ?
elpBrushStyle dd ?
elpColor dd ?
elpHatch dd ?
elpNumEntries dd ?
elpStyleEntry dd ?
ends
struct LOGFONT
lfHeight dd ?
lfWidth dd ?
lfEscapement dd ?
lfOrientation dd ?
lfWeight dd ?
lfItalic db ?
lfUnderline db ?
lfStrikeOut db ?
lfCharSet db ?
lfOutPrecision db ?
lfClipPrecision db ?
lfQuality db ?
lfPitchAndFamily db ?
lfFaceName TCHAR 32 dup (?)
ends
struct ENUMLOGFONT
elfLogFont LOGFONT
elfFullName TCHAR 64 dup (?)
elfStyle TCHAR 32 dup (?)
ends
struct ENUMLOGFONTEX
elfLogFont LOGFONT
elfFullName TCHAR 64 dup (?)
elfStyle TCHAR 32 dup (?)
elfScript TCHAR 32 dup (?)
ends
struct PIXELFORMATDESCRIPTOR
nSize dw ?
nVersion dw ?
dwFlags dd ?
iPixelType db ?
cColorBits db ?
cRedBits db ?
cRedShift db ?
cGreenBits db ?
cGreenShift db ?
cBlueBits db ?
cBlueShift db ?
cAlphaBits db ?
cAlphaShift db ?
cAccumBits db ?
cAccumRedBits db ?
cAccumGreenBits db ?
cAccumBlueBits db ?
cAccumAlphaBits db ?
cDepthBits db ?
cStencilBits db ?
cAuxBuffers db ?
iLayerType db ?
bReserved db ?
dwLayerMask dd ?
dwVisibleMask dd ?
dwDamageMask dd ?
ends
struct TRIVERTEX
x dd ?
y dd ?
Red dw ?
Green dw ?
Blue dw ?
Alpha dw ?
ends
; General constants
GDI_ERROR = 0FFFFFFFFh
HGDI_ERROR = 0FFFFFFFFh
; Binary raster operations
R2_BLACK = 1
R2_NOTMERGEPEN = 2
R2_MASKNOTPEN = 3
R2_NOTCOPYPEN = 4
R2_MASKPENNOT = 5
R2_NOT = 6
R2_XORPEN = 7
R2_NOTMASKPEN = 8
R2_MASKPEN = 9
R2_NOTXORPEN = 10
R2_NOP = 11
R2_MERGENOTPEN = 12
R2_COPYPEN = 13
R2_MERGEPENNOT = 14
R2_MERGEPEN = 15
R2_WHITE = 16
; Raster operations
SRCCOPY = 00CC0020h
SRCPAINT = 00EE0086h
SRCAND = 008800C6h
SRCINVERT = 00660046h
SRCERASE = 00440328h
NOTSRCCOPY = 00330008h
NOTSRCERASE = 001100A6h
MERGECOPY = 00C000CAh
MERGEPAINT = 00BB0226h
PATCOPY = 00F00021h
PATPAINT = 00FB0A09h
PATINVERT = 005A0049h
DSTINVERT = 00550009h
BLACKNESS = 00000042h
WHITENESS = 00FF0062h
; Region flags
ERROR = 0
NULLREGION = 1
SIMPLEREGION = 2
COMPLEXREGION = 3
; CombineRgn styles
RGN_AND = 1
RGN_OR = 2
RGN_XOR = 3
RGN_DIFF = 4
RGN_COPY = 5
; StretchBlt modes
BLACKONWHITE = 1
WHITEONBLACK = 2
COLORONCOLOR = 3
HALFTONE = 4
STRETCH_ANDSCANS = BLACKONWHITE
STRETCH_ORSCANS = WHITEONBLACK
STRETCH_DELETESCANS = COLORONCOLOR
STRETCH_HALFTONE = HALFTONE
; PolyFill modes
ALTERNATE = 1
WINDING = 2
; Background modes
TRANSPARENT = 1
OPAQUE = 2
; Point types
PT_CLOSEFIGURE = 1
PT_LINETO = 2
PT_BEZIERTO = 4
PT_MOVETO = 6
; Mapping modes
MM_TEXT = 1
MM_LOMETRIC = 2
MM_HIMETRIC = 3
MM_LOENGLISH = 4
MM_HIENGLISH = 5
MM_TWIPS = 6
MM_ISOTROPIC = 7
MM_ANISOTROPIC = 8
; Coordinate modes
ABSOLUTE = 1
RELATIVE = 2
; Stock logical objects
WHITE_BRUSH = 0
LTGRAY_BRUSH = 1
GRAY_BRUSH = 2
DKGRAY_BRUSH = 3
BLACK_BRUSH = 4
NULL_BRUSH = 5
HOLLOW_BRUSH = NULL_BRUSH
WHITE_PEN = 6
BLACK_PEN = 7
NULL_PEN = 8
OEM_FIXED_FONT = 10
ANSI_FIXED_FONT = 11
ANSI_VAR_FONT = 12
SYSTEM_FONT = 13
DEVICE_DEFAULT_FONT = 14
DEFAULT_PALETTE = 15
SYSTEM_FIXED_FONT = 16
DEFAULT_GUI_FONT = 17
; Brush styles
BS_SOLID = 0
BS_NULL = 1
BS_HOLLOW = BS_NULL
BS_HATCHED = 2
BS_PATTERN = 3
BS_INDEXED = 4
BS_DIBPATTERN = 5
BS_DIBPATTERNPT = 6
BS_PATTERN8X8 = 7
BS_DIBPATTERN8X8 = 8
BS_MONOPATTERN = 9
; Hatch styles
HS_HORIZONTAL = 0
HS_VERTICAL = 1
HS_FDIAGONAL = 2
HS_BDIAGONAL = 3
HS_CROSS = 4
HS_DIAGCROSS = 5
; Pen styles
PS_SOLID = 0
PS_DASH = 1
PS_DOT = 2
PS_DASHDOT = 3
PS_DASHDOTDOT = 4
PS_NULL = 5
PS_INSIDEFRAME = 6
PS_USERSTYLE = 7
PS_ALTERNATE = 8
PS_ENDCAP_ROUND = 0
PS_ENDCAP_SQUARE = 100h
PS_ENDCAP_FLAT = 200h
PS_JOIN_ROUND = 0
PS_JOIN_BEVEL = 1000h
PS_JOIN_MITER = 2000h
PS_COSMETIC = 0
PS_GEOMETRIC = 010000h
; Arc directions
AD_COUNTERCLOCKWISE = 1
AD_CLOCKWISE = 2
; Text alignment options
TA_NOUPDATECP = 0
TA_UPDATECP = 1
TA_LEFT = 0
TA_RIGHT = 2
TA_CENTER = 6
TA_TOP = 0
TA_BOTTOM = 8
TA_BASELINE = 24
TA_RTLREADING = 100h
VTA_BASELINE = TA_BASELINE
VTA_LEFT = TA_BOTTOM
VTA_RIGHT = TA_TOP
VTA_CENTER = TA_CENTER
VTA_BOTTOM = TA_RIGHT
VTA_TOP = TA_LEFT
; ExtTextOut options
ETO_OPAQUE = 0002h
ETO_CLIPPED = 0004h
ETO_GLYPH_INDEX = 0010h
ETO_RTLREADING = 0080h
ETO_IGNORELANGUAGE = 1000h
; Bitmap compression types
BI_RGB = 0
BI_RLE8 = 1
BI_RLE4 = 2
BI_BITFIELDS = 3
; tmPitchAndFamily flags
TMPF_FIXED_PITCH = 1
TMPF_VECTOR = 2
TMPF_TRUETYPE = 4
TMPF_DEVICE = 8
; Font output precision values
OUT_DEFAULT_PRECIS = 0
OUT_STRING_PRECIS = 1
OUT_CHARACTER_PRECIS = 2
OUT_STROKE_PRECIS = 3
OUT_TT_PRECIS = 4
OUT_DEVICE_PRECIS = 5
OUT_RASTER_PRECIS = 6
OUT_TT_ONLY_PRECIS = 7
OUT_OUTLINE_PRECIS = 8
OUT_SCREEN_OUTLINE_PRECIS = 9
; Font clipping precision values
CLIP_DEFAULT_PRECIS = 0
CLIP_CHARACTER_PRECIS = 1
CLIP_STROKE_PRECIS = 2
CLIP_LH_ANGLES = 10h
CLIP_TT_ALWAYS = 20h
CLIP_EMBEDDED = 80h
; Font output quality values
DEFAULT_QUALITY = 0
DRAFT_QUALITY = 1
PROOF_QUALITY = 2
NONANTIALIASED_QUALITY = 3
ANTIALIASED_QUALITY = 4
; Font pitch values
DEFAULT_PITCH = 0
FIXED_PITCH = 1
VARIABLE_PITCH = 2
MONO_FONT = 8
; Font families
FF_DONTCARE = 00h
FF_ROMAN = 10h
FF_SWISS = 20h
FF_MODERN = 30h
FF_SCRIPT = 40h
FF_DECORATIVE = 50h
; Font weights
FW_DONTCARE = 0
FW_THIN = 100
FW_EXTRALIGHT = 200
FW_LIGHT = 300
FW_NORMAL = 400
FW_MEDIUM = 500
FW_SEMIBOLD = 600
FW_BOLD = 700
FW_EXTRABOLD = 800
FW_HEAVY = 900
FW_ULTRALIGHT = FW_EXTRALIGHT
FW_REGULAR = FW_NORMAL
FW_DEMIBOLD = FW_SEMIBOLD
FW_ULTRABOLD = FW_EXTRABOLD
FW_BLACK = FW_HEAVY
; Character set values
ANSI_CHARSET = 0
DEFAULT_CHARSET = 1
SYMBOL_CHARSET = 2
SHIFTJIS_CHARSET = 128
HANGEUL_CHARSET = 129
GB2312_CHARSET = 134
CHINESEBIG5_CHARSET = 136
OEM_CHARSET = 255
JOHAB_CHARSET = 130
HEBREW_CHARSET = 177
ARABIC_CHARSET = 178
GREEK_CHARSET = 161
TURKISH_CHARSET = 162
VIETNAMESE_CHARSET = 163
THAI_CHARSET = 222
EASTEUROPE_CHARSET = 238
RUSSIAN_CHARSET = 204
MAC_CHARSET = 77
BALTIC_CHARSET = 186
; Pixel format constants
PFD_TYPE_RGBA = 0
PFD_TYPE_COLORINDEX = 1
PFD_MAIN_PLANE = 0
PFD_OVERLAY_PLANE = 1
PFD_UNDERLAY_PLANE = -1
PFD_DOUBLEBUFFER = 1
PFD_STEREO = 2
PFD_DRAW_TO_WINDOW = 4
PFD_DRAW_TO_BITMAP = 8
PFD_SUPPORT_GDI = 10h
PFD_SUPPORT_OPENGL = 20h
PFD_GENERIC_FORMAT = 40h
PFD_NEED_PALETTE = 80h
PFD_NEED_SYSTEM_PALETTE = 100h
PFD_SWAP_EXCHANGE = 200h
PFD_SWAP_COPY = 400h
PFD_SWAP_LAYER_BUFFERS = 800h
PFD_GENERIC_ACCELERATED = 1000h
PFD_DEPTH_DONTCARE = 20000000h
PFD_DOUBLEBUFFER_DONTCARE = 40000000h
PFD_STEREO_DONTCARE = 80000000h

View file

@ -0,0 +1,480 @@
; GDI32.DLL structures and constants
struct SIZE
cx dd ?
cy dd ?
ends
struct BITMAP
bmType dd ?
bmWidth dd ?
bmHeight dd ?
bmWidthBytes dd ?
bmPlanes dw ?
bmBitsPixel dw ?,?,?
bmBits dq ?
ends
struct BITMAPCOREHEADER
bcSize dd ?
bcWidth dw ?
bcHeight dw ?
bcPlanes dw ?
bcBitCount dw ?
ends
struct BITMAPINFOHEADER
biSize dd ?
biWidth dd ?
biHeight dd ?
biPlanes dw ?
biBitCount dw ?
biCompression dd ?
biSizeImage dd ?
biXPelsPerMeter dd ?
biYPelsPerMeter dd ?
biClrUsed dd ?
biClrImportant dd ?
ends
struct BITMAPFILEHEADER
bfType dw ?
bfSize dd ?
bfReserved1 dw ?
bfReserved2 dw ?
bfOffBits dd ?
ends
struct TEXTMETRIC
tmHeight dd ?
tmAscent dd ?
tmDescent dd ?
tmInternalLeading dd ?
tmExternalLeading dd ?
tmAveCharWidth dd ?
tmMaxCharWidth dd ?
tmWeight dd ?
tmOverhang dd ?
tmDigitizedAspectX dd ?
tmDigitizedAspectY dd ?
tmFirstChar TCHAR ?
tmLastChar TCHAR ?
tmDefaultChar TCHAR ?
tmBreakChar TCHAR ?
tmItalic db ?
tmUnderlined db ?
tmStruckOut db ?
tmPitchAndFamily db ?
tmCharSet db ?
ends
struct LOGBRUSH
lbStyle dd ?
lbColor dd ?
lbHatch dd ?
ends
struct LOGPEN
lopnStyle dd ?
lopnWidth POINT
lopnColor dd ?
ends
struct EXTLOGPEN
elpPenStyle dd ?
elpWidth dd ?
elpBrushStyle dd ?
elpColor dd ?
elpHatch dd ?
elpNumEntries dd ?
elpStyleEntry dd ?
ends
struct LOGFONT
lfHeight dd ?
lfWidth dd ?
lfEscapement dd ?
lfOrientation dd ?
lfWeight dd ?
lfItalic db ?
lfUnderline db ?
lfStrikeOut db ?
lfCharSet db ?
lfOutPrecision db ?
lfClipPrecision db ?
lfQuality db ?
lfPitchAndFamily db ?
lfFaceName TCHAR 32 dup (?)
ends
struct ENUMLOGFONT
elfLogFont LOGFONT
elfFullName TCHAR 64 dup (?)
elfStyle TCHAR 32 dup (?)
ends
struct ENUMLOGFONTEX
elfLogFont LOGFONT
elfFullName TCHAR 64 dup (?)
elfStyle TCHAR 32 dup (?)
elfScript TCHAR 32 dup (?)
ends
struct PIXELFORMATDESCRIPTOR
nSize dw ?
nVersion dw ?
dwFlags dd ?
iPixelType db ?
cColorBits db ?
cRedBits db ?
cRedShift db ?
cGreenBits db ?
cGreenShift db ?
cBlueBits db ?
cBlueShift db ?
cAlphaBits db ?
cAlphaShift db ?
cAccumBits db ?
cAccumRedBits db ?
cAccumGreenBits db ?
cAccumBlueBits db ?
cAccumAlphaBits db ?
cDepthBits db ?
cStencilBits db ?
cAuxBuffers db ?
iLayerType db ?
bReserved db ?
dwLayerMask dd ?
dwVisibleMask dd ?
dwDamageMask dd ?
ends
struct TRIVERTEX
x dd ?
y dd ?
Red dw ?
Green dw ?
Blue dw ?
Alpha dw ?
ends
; General constants
GDI_ERROR = 0FFFFFFFFh
HGDI_ERROR = 0FFFFFFFFh
; Binary raster operations
R2_BLACK = 1
R2_NOTMERGEPEN = 2
R2_MASKNOTPEN = 3
R2_NOTCOPYPEN = 4
R2_MASKPENNOT = 5
R2_NOT = 6
R2_XORPEN = 7
R2_NOTMASKPEN = 8
R2_MASKPEN = 9
R2_NOTXORPEN = 10
R2_NOP = 11
R2_MERGENOTPEN = 12
R2_COPYPEN = 13
R2_MERGEPENNOT = 14
R2_MERGEPEN = 15
R2_WHITE = 16
; Raster operations
SRCCOPY = 00CC0020h
SRCPAINT = 00EE0086h
SRCAND = 008800C6h
SRCINVERT = 00660046h
SRCERASE = 00440328h
NOTSRCCOPY = 00330008h
NOTSRCERASE = 001100A6h
MERGECOPY = 00C000CAh
MERGEPAINT = 00BB0226h
PATCOPY = 00F00021h
PATPAINT = 00FB0A09h
PATINVERT = 005A0049h
DSTINVERT = 00550009h
BLACKNESS = 00000042h
WHITENESS = 00FF0062h
; Region flags
ERROR = 0
NULLREGION = 1
SIMPLEREGION = 2
COMPLEXREGION = 3
; CombineRgn styles
RGN_AND = 1
RGN_OR = 2
RGN_XOR = 3
RGN_DIFF = 4
RGN_COPY = 5
; StretchBlt modes
BLACKONWHITE = 1
WHITEONBLACK = 2
COLORONCOLOR = 3
HALFTONE = 4
STRETCH_ANDSCANS = BLACKONWHITE
STRETCH_ORSCANS = WHITEONBLACK
STRETCH_DELETESCANS = COLORONCOLOR
STRETCH_HALFTONE = HALFTONE
; PolyFill modes
ALTERNATE = 1
WINDING = 2
; Background modes
TRANSPARENT = 1
OPAQUE = 2
; Point types
PT_CLOSEFIGURE = 1
PT_LINETO = 2
PT_BEZIERTO = 4
PT_MOVETO = 6
; Mapping modes
MM_TEXT = 1
MM_LOMETRIC = 2
MM_HIMETRIC = 3
MM_LOENGLISH = 4
MM_HIENGLISH = 5
MM_TWIPS = 6
MM_ISOTROPIC = 7
MM_ANISOTROPIC = 8
; Coordinate modes
ABSOLUTE = 1
RELATIVE = 2
; Stock logical objects
WHITE_BRUSH = 0
LTGRAY_BRUSH = 1
GRAY_BRUSH = 2
DKGRAY_BRUSH = 3
BLACK_BRUSH = 4
NULL_BRUSH = 5
HOLLOW_BRUSH = NULL_BRUSH
WHITE_PEN = 6
BLACK_PEN = 7
NULL_PEN = 8
OEM_FIXED_FONT = 10
ANSI_FIXED_FONT = 11
ANSI_VAR_FONT = 12
SYSTEM_FONT = 13
DEVICE_DEFAULT_FONT = 14
DEFAULT_PALETTE = 15
SYSTEM_FIXED_FONT = 16
DEFAULT_GUI_FONT = 17
; Brush styles
BS_SOLID = 0
BS_NULL = 1
BS_HOLLOW = BS_NULL
BS_HATCHED = 2
BS_PATTERN = 3
BS_INDEXED = 4
BS_DIBPATTERN = 5
BS_DIBPATTERNPT = 6
BS_PATTERN8X8 = 7
BS_DIBPATTERN8X8 = 8
BS_MONOPATTERN = 9
; Hatch styles
HS_HORIZONTAL = 0
HS_VERTICAL = 1
HS_FDIAGONAL = 2
HS_BDIAGONAL = 3
HS_CROSS = 4
HS_DIAGCROSS = 5
; Pen styles
PS_SOLID = 0
PS_DASH = 1
PS_DOT = 2
PS_DASHDOT = 3
PS_DASHDOTDOT = 4
PS_NULL = 5
PS_INSIDEFRAME = 6
PS_USERSTYLE = 7
PS_ALTERNATE = 8
PS_ENDCAP_ROUND = 0
PS_ENDCAP_SQUARE = 100h
PS_ENDCAP_FLAT = 200h
PS_JOIN_ROUND = 0
PS_JOIN_BEVEL = 1000h
PS_JOIN_MITER = 2000h
PS_COSMETIC = 0
PS_GEOMETRIC = 010000h
; Arc directions
AD_COUNTERCLOCKWISE = 1
AD_CLOCKWISE = 2
; Text alignment options
TA_NOUPDATECP = 0
TA_UPDATECP = 1
TA_LEFT = 0
TA_RIGHT = 2
TA_CENTER = 6
TA_TOP = 0
TA_BOTTOM = 8
TA_BASELINE = 24
TA_RTLREADING = 100h
VTA_BASELINE = TA_BASELINE
VTA_LEFT = TA_BOTTOM
VTA_RIGHT = TA_TOP
VTA_CENTER = TA_CENTER
VTA_BOTTOM = TA_RIGHT
VTA_TOP = TA_LEFT
; ExtTextOut options
ETO_OPAQUE = 0002h
ETO_CLIPPED = 0004h
ETO_GLYPH_INDEX = 0010h
ETO_RTLREADING = 0080h
ETO_IGNORELANGUAGE = 1000h
; Bitmap compression types
BI_RGB = 0
BI_RLE8 = 1
BI_RLE4 = 2
BI_BITFIELDS = 3
; tmPitchAndFamily flags
TMPF_FIXED_PITCH = 1
TMPF_VECTOR = 2
TMPF_TRUETYPE = 4
TMPF_DEVICE = 8
; Font output precision values
OUT_DEFAULT_PRECIS = 0
OUT_STRING_PRECIS = 1
OUT_CHARACTER_PRECIS = 2
OUT_STROKE_PRECIS = 3
OUT_TT_PRECIS = 4
OUT_DEVICE_PRECIS = 5
OUT_RASTER_PRECIS = 6
OUT_TT_ONLY_PRECIS = 7
OUT_OUTLINE_PRECIS = 8
OUT_SCREEN_OUTLINE_PRECIS = 9
; Font clipping precision values
CLIP_DEFAULT_PRECIS = 0
CLIP_CHARACTER_PRECIS = 1
CLIP_STROKE_PRECIS = 2
CLIP_LH_ANGLES = 10h
CLIP_TT_ALWAYS = 20h
CLIP_EMBEDDED = 80h
; Font output quality values
DEFAULT_QUALITY = 0
DRAFT_QUALITY = 1
PROOF_QUALITY = 2
NONANTIALIASED_QUALITY = 3
ANTIALIASED_QUALITY = 4
; Font pitch values
DEFAULT_PITCH = 0
FIXED_PITCH = 1
VARIABLE_PITCH = 2
MONO_FONT = 8
; Font families
FF_DONTCARE = 00h
FF_ROMAN = 10h
FF_SWISS = 20h
FF_MODERN = 30h
FF_SCRIPT = 40h
FF_DECORATIVE = 50h
; Font weights
FW_DONTCARE = 0
FW_THIN = 100
FW_EXTRALIGHT = 200
FW_LIGHT = 300
FW_NORMAL = 400
FW_MEDIUM = 500
FW_SEMIBOLD = 600
FW_BOLD = 700
FW_EXTRABOLD = 800
FW_HEAVY = 900
FW_ULTRALIGHT = FW_EXTRALIGHT
FW_REGULAR = FW_NORMAL
FW_DEMIBOLD = FW_SEMIBOLD
FW_ULTRABOLD = FW_EXTRABOLD
FW_BLACK = FW_HEAVY
; Character set values
ANSI_CHARSET = 0
DEFAULT_CHARSET = 1
SYMBOL_CHARSET = 2
SHIFTJIS_CHARSET = 128
HANGEUL_CHARSET = 129
GB2312_CHARSET = 134
CHINESEBIG5_CHARSET = 136
OEM_CHARSET = 255
JOHAB_CHARSET = 130
HEBREW_CHARSET = 177
ARABIC_CHARSET = 178
GREEK_CHARSET = 161
TURKISH_CHARSET = 162
VIETNAMESE_CHARSET = 163
THAI_CHARSET = 222
EASTEUROPE_CHARSET = 238
RUSSIAN_CHARSET = 204
MAC_CHARSET = 77
BALTIC_CHARSET = 186
; Pixel format constants
PFD_TYPE_RGBA = 0
PFD_TYPE_COLORINDEX = 1
PFD_MAIN_PLANE = 0
PFD_OVERLAY_PLANE = 1
PFD_UNDERLAY_PLANE = -1
PFD_DOUBLEBUFFER = 1
PFD_STEREO = 2
PFD_DRAW_TO_WINDOW = 4
PFD_DRAW_TO_BITMAP = 8
PFD_SUPPORT_GDI = 10h
PFD_SUPPORT_OPENGL = 20h
PFD_GENERIC_FORMAT = 40h
PFD_NEED_PALETTE = 80h
PFD_NEED_SYSTEM_PALETTE = 100h
PFD_SWAP_EXCHANGE = 200h
PFD_SWAP_COPY = 400h
PFD_SWAP_LAYER_BUFFERS = 800h
PFD_GENERIC_ACCELERATED = 1000h
PFD_DEPTH_DONTCARE = 20000000h
PFD_DOUBLEBUFFER_DONTCARE = 40000000h
PFD_STEREO_DONTCARE = 80000000h

View file

@ -0,0 +1,812 @@
; KERNEL32.DLL structures and constants
struct SYSTEM_INFO
wProcessorArchitecture dw ?
wReserved dw ?
dwPageSize dd ?
lpMinimumApplicationAddress dd ?
lpMaximumApplicationAddress dd ?
dwActiveProcessorMask dd ?
dwNumberOfProcessors dd ?
dwProcessorType dd ?
dwAllocationGranularity dd ?
wProcessorLevel dw ?
wProcessorRevision dw ?
ends
struct OSVERSIONINFO
dwOSVersionInfoSize dd ?
dwMajorVersion dd ?
dwMinorVersion dd ?
dwBuildNumber dd ?
dwPlatformId dd ?
szCSDVersion TCHAR 128 dup (?)
ends
struct OSVERSIONINFOA
dwOSVersionInfoSize dd ?
dwMajorVersion dd ?
dwMinorVersion dd ?
dwBuildNumber dd ?
dwPlatformId dd ?
szCSDVersion db 128 dup (?)
ends
struct OSVERSIONINFOW
dwOSVersionInfoSize dd ?
dwMajorVersion dd ?
dwMinorVersion dd ?
dwBuildNumber dd ?
dwPlatformId dd ?
szCSDVersion du 128 dup (?)
ends
struct MEMORYSTATUS
dwLength dd ?
dwMemoryLoad dd ?
dwTotalPhys dd ?
dwAvailPhys dd ?
dwTotalPageFile dd ?
dwAvailPageFile dd ?
dwTotalVirtual dd ?
dwAvailVirtual dd ?
ends
struct STARTUPINFO
cb dd ?
lpReserved dd ?
lpDesktop dd ?
lpTitle dd ?
dwX dd ?
dwY dd ?
dwXSize dd ?
dwYSize dd ?
dwXCountChars dd ?
dwYCountChars dd ?
dwFillAttribute dd ?
dwFlags dd ?
wShowWindow dw ?
cbReserved2 dw ?
lpReserved2 dd ?
hStdInput dd ?
hStdOutput dd ?
hStdError dd ?
ends
struct PROCESS_INFORMATION
hProcess dd ?
hThread dd ?
dwProcessId dd ?
dwThreadId dd ?
ends
struct FILETIME
dwLowDateTime dd ?
dwHighDateTime dd ?
ends
struct SYSTEMTIME
wYear dw ?
wMonth dw ?
wDayOfWeek dw ?
wDay dw ?
wHour dw ?
wMinute dw ?
wSecond dw ?
wMilliseconds dw ?
ends
struct BY_HANDLE_FILE_INFORMATION
dwFileAttributes dd ?
ftCreationTime FILETIME
ftLastAccessTime FILETIME
ftLastWriteTime FILETIME
dwVolumeSerialNumber dd ?
nFileSizeHigh dd ?
nFileSizeLow dd ?
nNumberOfLinks dd ?
nFileIndexHigh dd ?
nFileIndexLow dd ?
ends
struct WIN32_FIND_DATA
dwFileAttributes dd ?
ftCreationTime FILETIME
ftLastAccessTime FILETIME
ftLastWriteTime FILETIME
nFileSizeHigh dd ?
nFileSizeLow dd ?
dwReserved0 dd ?
dwReserved1 dd ?
cFileName TCHAR MAX_PATH dup (?)
cAlternateFileName TCHAR 14 dup (?)
ends
struct WIN32_FIND_DATAA
dwFileAttributes dd ?
ftCreationTime FILETIME
ftLastAccessTime FILETIME
ftLastWriteTime FILETIME
nFileSizeHigh dd ?
nFileSizeLow dd ?
dwReserved0 dd ?
dwReserved1 dd ?
cFileName db MAX_PATH dup (?)
cAlternateFileName db 14 dup (?)
ends
struct WIN32_FIND_DATAW
dwFileAttributes dd ?
ftCreationTime FILETIME
ftLastAccessTime FILETIME
ftLastWriteTime FILETIME
nFileSizeHigh dd ?
nFileSizeLow dd ?
dwReserved0 dd ?
dwReserved1 dd ?
cFileName du MAX_PATH dup (?)
cAlternateFileName du 14 dup (?)
ends
; General constants
NULL = 0
TRUE = 1
FALSE = 0
; Maximum path length in characters
MAX_PATH = 260
; Access rights
DELETE_RIGHT = 00010000h
READ_CONTROL = 00020000h
WRITE_DAC = 00040000h
WRITE_OWNER = 00080000h
SYNCHRONIZE = 00100000h
STANDARD_RIGHTS_READ = READ_CONTROL
STANDARD_RIGHTS_WRITE = READ_CONTROL
STANDARD_RIGHTS_EXECUTE = READ_CONTROL
STANDARD_RIGHTS_REQUIRED = 000F0000h
STANDARD_RIGHTS_ALL = 001F0000h
SPECIFIC_RIGHTS_ALL = 0000FFFFh
ACCESS_SYSTEM_SECURITY = 01000000h
MAXIMUM_ALLOWED = 02000000h
GENERIC_READ = 80000000h
GENERIC_WRITE = 40000000h
GENERIC_EXECUTE = 20000000h
GENERIC_ALL = 10000000h
PROCESS_TERMINATE = 00000001h
PROCESS_CREATE_THREAD = 00000002h
PROCESS_VM_OPERATION = 00000008h
PROCESS_VM_READ = 00000010h
PROCESS_VM_WRITE = 00000020h
PROCESS_DUP_HANDLE = 00000040h
PROCESS_CREATE_PROCESS = 00000080h
PROCESS_SET_QUOTA = 00000100h
PROCESS_SET_INFORMATION = 00000200h
PROCESS_QUERY_INFORMATION = 00000400h
PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 0FFFh
FILE_SHARE_READ = 00000001h
FILE_SHARE_WRITE = 00000002h
FILE_SHARE_DELETE = 00000004h
; CreateFile actions
CREATE_NEW = 1
CREATE_ALWAYS = 2
OPEN_EXISTING = 3
OPEN_ALWAYS = 4
TRUNCATE_EXISTING = 5
; OpenFile modes
OF_READ = 0000h
OF_WRITE = 0001h
OF_READWRITE = 0002h
OF_SHARE_COMPAT = 0000h
OF_SHARE_EXCLUSIVE = 0010h
OF_SHARE_DENY_WRITE = 0020h
OF_SHARE_DENY_READ = 0030h
OF_SHARE_DENY_NONE = 0040h
OF_PARSE = 0100h
OF_DELETE = 0200h
OF_VERIFY = 0400h
OF_CANCEL = 0800h
OF_CREATE = 1000h
OF_PROMPT = 2000h
OF_EXIST = 4000h
OF_REOPEN = 8000h
; SetFilePointer methods
FILE_BEGIN = 0
FILE_CURRENT = 1
FILE_END = 2
; File attributes
FILE_ATTRIBUTE_READONLY = 001h
FILE_ATTRIBUTE_HIDDEN = 002h
FILE_ATTRIBUTE_SYSTEM = 004h
FILE_ATTRIBUTE_DIRECTORY = 010h
FILE_ATTRIBUTE_ARCHIVE = 020h
FILE_ATTRIBUTE_NORMAL = 080h
FILE_ATTRIBUTE_TEMPORARY = 100h
FILE_ATTRIBUTE_COMPRESSED = 800h
; File flags
FILE_FLAG_WRITE_THROUGH = 80000000h
FILE_FLAG_OVERLAPPED = 40000000h
FILE_FLAG_NO_BUFFERING = 20000000h
FILE_FLAG_RANDOM_ACCESS = 10000000h
FILE_FLAG_SEQUENTIAL_SCAN = 08000000h
FILE_FLAG_DELETE_ON_CLOSE = 04000000h
FILE_FLAG_BACKUP_SEMANTICS = 02000000h
FILE_FLAG_POSIX_SEMANTICS = 01000000h
; Notify filters
FILE_NOTIFY_CHANGE_FILE_NAME = 001h
FILE_NOTIFY_CHANGE_DIR_NAME = 002h
FILE_NOTIFY_CHANGE_ATTRIBUTES = 004h
FILE_NOTIFY_CHANGE_SIZE = 008h
FILE_NOTIFY_CHANGE_LAST_WRITE = 010h
FILE_NOTIFY_CHANGE_SECURITY = 100h
; File types
FILE_TYPE_UNKNOWN = 0
FILE_TYPE_DISK = 1
FILE_TYPE_CHAR = 2
FILE_TYPE_PIPE = 3
FILE_TYPE_REMOTE = 8000h
; LockFileEx flags
LOCKFILE_FAIL_IMMEDIATELY = 1
LOCKFILE_EXCLUSIVE_LOCK = 2
; MoveFileEx flags
MOVEFILE_REPLACE_EXISTING = 1
MOVEFILE_COPY_ALLOWED = 2
MOVEFILE_DELAY_UNTIL_REBOOT = 4
MOVEFILE_WRITE_THROUGH = 8
; FindFirstFileEx flags
FIND_FIRST_EX_CASE_SENSITIVE = 1
; Device handles
INVALID_HANDLE_VALUE = -1
STD_INPUT_HANDLE = -10
STD_OUTPUT_HANDLE = -11
STD_ERROR_HANDLE = -12
; DuplicateHandle options
DUPLICATE_CLOSE_SOURCE = 1
DUPLICATE_SAME_ACCESS = 2
; File mapping acccess rights
SECTION_QUERY = 01h
SECTION_MAP_WRITE = 02h
SECTION_MAP_READ = 04h
SECTION_MAP_EXECUTE = 08h
SECTION_EXTEND_SIZE = 10h
SECTION_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SECTION_QUERY or SECTION_MAP_WRITE or SECTION_MAP_READ or SECTION_MAP_EXECUTE or SECTION_EXTEND_SIZE
FILE_MAP_COPY = SECTION_QUERY
FILE_MAP_WRITE = SECTION_MAP_WRITE
FILE_MAP_READ = SECTION_MAP_READ
FILE_MAP_ALL_ACCESS = SECTION_ALL_ACCESS
; File system flags
FILE_CASE_SENSITIVE_SEARCH = 0001h
FILE_CASE_PRESERVED_NAMES = 0002h
FILE_UNICODE_ON_DISK = 0004h
FILE_PERSISTENT_ACLS = 0008h
FILE_FILE_COMPRESSION = 0010h
FILE_VOLUME_IS_COMPRESSED = 8000h
FS_CASE_IS_PRESERVED = FILE_CASE_PRESERVED_NAMES
FS_CASE_SENSITIVE = FILE_CASE_SENSITIVE_SEARCH
FS_UNICODE_STORED_ON_DISK = FILE_UNICODE_ON_DISK
FS_PERSISTENT_ACLS = FILE_PERSISTENT_ACLS
; Drive types
DRIVE_UNKNOWN = 0
DRIVE_NO_ROOT_DIR = 1
DRIVE_REMOVABLE = 2
DRIVE_FIXED = 3
DRIVE_REMOTE = 4
DRIVE_CDROM = 5
DRIVE_RAMDISK = 6
; Pipe modes
PIPE_ACCESS_INBOUND = 1
PIPE_ACCESS_OUTBOUND = 2
PIPE_ACCESS_DUPLEX = 3
PIPE_CLIENT_END = 0
PIPE_SERVER_END = 1
PIPE_WAIT = 0
PIPE_NOWAIT = 1
PIPE_READMODE_BYTE = 0
PIPE_READMODE_MESSAGE = 2
PIPE_TYPE_BYTE = 0
PIPE_TYPE_MESSAGE = 4
PIPE_UNLIMITED_INSTANCES = 255
; Global memory flags
GMEM_FIXED = 0000h
GMEM_MOVEABLE = 0002h
GMEM_NOCOMPACT = 0010h
GMEM_NODISCARD = 0020h
GMEM_ZEROINIT = 0040h
GMEM_MODIFY = 0080h
GMEM_DISCARDABLE = 0100h
GMEM_NOT_BANKED = 1000h
GMEM_SHARE = 2000h
GMEM_DDESHARE = 2000h
GMEM_NOTIFY = 4000h
GMEM_LOWER = GMEM_NOT_BANKED
GMEM_VALID_FLAGS = 7F72h
GMEM_INVALID_HANDLE = 8000h
GMEM_DISCARDED = 4000h
GMEM_LOCKCOUNT = 0FFh
GHND = GMEM_MOVEABLE + GMEM_ZEROINIT
GPTR = GMEM_FIXED + GMEM_ZEROINIT
; Local memory flags
LMEM_FIXED = 0000h
LMEM_MOVEABLE = 0002h
LMEM_NOCOMPACT = 0010h
LMEM_NODISCARD = 0020h
LMEM_ZEROINIT = 0040h
LMEM_MODIFY = 0080h
LMEM_DISCARDABLE = 0F00h
LMEM_VALID_FLAGS = 0F72h
LMEM_INVALID_HANDLE = 8000h
LHND = LMEM_MOVEABLE + LMEM_ZEROINIT
LPTR = LMEM_FIXED + LMEM_ZEROINIT
LMEM_DISCARDED = 4000h
LMEM_LOCKCOUNT = 00FFh
; Page access flags
PAGE_NOACCESS = 001h
PAGE_READONLY = 002h
PAGE_READWRITE = 004h
PAGE_WRITECOPY = 008h
PAGE_EXECUTE = 010h
PAGE_EXECUTE_READ = 020h
PAGE_EXECUTE_READWRITE = 040h
PAGE_EXECUTE_WRITECOPY = 080h
PAGE_GUARD = 100h
PAGE_NOCACHE = 200h
; Memory allocation flags
MEM_COMMIT = 001000h
MEM_RESERVE = 002000h
MEM_DECOMMIT = 004000h
MEM_RELEASE = 008000h
MEM_FREE = 010000h
MEM_PRIVATE = 020000h
MEM_MAPPED = 040000h
MEM_RESET = 080000h
MEM_TOP_DOWN = 100000h
; Heap allocation flags
HEAP_NO_SERIALIZE = 1
HEAP_GENERATE_EXCEPTIONS = 4
HEAP_ZERO_MEMORY = 8
; Platform identifiers
VER_PLATFORM_WIN32s = 0
VER_PLATFORM_WIN32_WINDOWS = 1
VER_PLATFORM_WIN32_NT = 2
; GetBinaryType return values
SCS_32BIT_BINARY = 0
SCS_DOS_BINARY = 1
SCS_WOW_BINARY = 2
SCS_PIF_BINARY = 3
SCS_POSIX_BINARY = 4
SCS_OS216_BINARY = 5
; CreateProcess flags
DEBUG_PROCESS = 001h
DEBUG_ONLY_THIS_PROCESS = 002h
CREATE_SUSPENDED = 004h
DETACHED_PROCESS = 008h
CREATE_NEW_CONSOLE = 010h
NORMAL_PRIORITY_CLASS = 020h
IDLE_PRIORITY_CLASS = 040h
HIGH_PRIORITY_CLASS = 080h
REALTIME_PRIORITY_CLASS = 100h
CREATE_NEW_PROCESS_GROUP = 200h
CREATE_SEPARATE_WOW_VDM = 800h
; Thread priority values
THREAD_BASE_PRIORITY_MIN = -2
THREAD_BASE_PRIORITY_MAX = 2
THREAD_BASE_PRIORITY_LOWRT = 15
THREAD_BASE_PRIORITY_IDLE = -15
THREAD_PRIORITY_LOWEST = THREAD_BASE_PRIORITY_MIN
THREAD_PRIORITY_BELOW_NORMAL = THREAD_PRIORITY_LOWEST + 1
THREAD_PRIORITY_NORMAL = 0
THREAD_PRIORITY_HIGHEST = THREAD_BASE_PRIORITY_MAX
THREAD_PRIORITY_ABOVE_NORMAL = THREAD_PRIORITY_HIGHEST - 1
THREAD_PRIORITY_ERROR_RETURN = 7FFFFFFFh
THREAD_PRIORITY_TIME_CRITICAL = THREAD_BASE_PRIORITY_LOWRT
THREAD_PRIORITY_IDLE = THREAD_BASE_PRIORITY_IDLE
; Startup flags
STARTF_USESHOWWINDOW = 001h
STARTF_USESIZE = 002h
STARTF_USEPOSITION = 004h
STARTF_USECOUNTCHARS = 008h
STARTF_USEFILLATTRIBUTE = 010h
STARTF_RUNFULLSCREEN = 020h
STARTF_FORCEONFEEDBACK = 040h
STARTF_FORCEOFFFEEDBACK = 080h
STARTF_USESTDHANDLES = 100h
; Shutdown flags
SHUTDOWN_NORETRY = 1h
; LoadLibraryEx flags
DONT_RESOLVE_DLL_REFERENCES = 1
LOAD_LIBRARY_AS_DATAFILE = 2
LOAD_WITH_ALTERED_SEARCH_PATH = 8
; DLL entry-point calls
DLL_PROCESS_DETACH = 0
DLL_PROCESS_ATTACH = 1
DLL_THREAD_ATTACH = 2
DLL_THREAD_DETACH = 3
; Status codes
STATUS_WAIT_0 = 000000000h
STATUS_ABANDONED_WAIT_0 = 000000080h
STATUS_USER_APC = 0000000C0h
STATUS_TIMEOUT = 000000102h
STATUS_PENDING = 000000103h
STATUS_DATATYPE_MISALIGNMENT = 080000002h
STATUS_BREAKPOINT = 080000003h
STATUS_SINGLE_STEP = 080000004h
STATUS_ACCESS_VIOLATION = 0C0000005h
STATUS_IN_PAGE_ERROR = 0C0000006h
STATUS_NO_MEMORY = 0C0000017h
STATUS_ILLEGAL_INSTRUCTION = 0C000001Dh
STATUS_NONCONTINUABLE_EXCEPTION = 0C0000025h
STATUS_INVALID_DISPOSITION = 0C0000026h
STATUS_ARRAY_BOUNDS_EXCEEDED = 0C000008Ch
STATUS_FLOAT_DENORMAL_OPERAND = 0C000008Dh
STATUS_FLOAT_DIVIDE_BY_ZERO = 0C000008Eh
STATUS_FLOAT_INEXACT_RESULT = 0C000008Fh
STATUS_FLOAT_INVALID_OPERATION = 0C0000090h
STATUS_FLOAT_OVERFLOW = 0C0000091h
STATUS_FLOAT_STACK_CHECK = 0C0000092h
STATUS_FLOAT_UNDERFLOW = 0C0000093h
STATUS_INTEGER_DIVIDE_BY_ZERO = 0C0000094h
STATUS_INTEGER_OVERFLOW = 0C0000095h
STATUS_PRIVILEGED_INSTRUCTION = 0C0000096h
STATUS_STACK_OVERFLOW = 0C00000FDh
STATUS_CONTROL_C_EXIT = 0C000013Ah
WAIT_FAILED = -1
WAIT_OBJECT_0 = STATUS_WAIT_0
WAIT_ABANDONED = STATUS_ABANDONED_WAIT_0
WAIT_ABANDONED_0 = STATUS_ABANDONED_WAIT_0
WAIT_TIMEOUT = STATUS_TIMEOUT
WAIT_IO_COMPLETION = STATUS_USER_APC
STILL_ACTIVE = STATUS_PENDING
; Exception codes
EXCEPTION_CONTINUABLE = 0
EXCEPTION_NONCONTINUABLE = 1
EXCEPTION_ACCESS_VIOLATION = STATUS_ACCESS_VIOLATION
EXCEPTION_DATATYPE_MISALIGNMENT = STATUS_DATATYPE_MISALIGNMENT
EXCEPTION_BREAKPOINT = STATUS_BREAKPOINT
EXCEPTION_SINGLE_STEP = STATUS_SINGLE_STEP
EXCEPTION_ARRAY_BOUNDS_EXCEEDED = STATUS_ARRAY_BOUNDS_EXCEEDED
EXCEPTION_FLT_DENORMAL_OPERAND = STATUS_FLOAT_DENORMAL_OPERAND
EXCEPTION_FLT_DIVIDE_BY_ZERO = STATUS_FLOAT_DIVIDE_BY_ZERO
EXCEPTION_FLT_INEXACT_RESULT = STATUS_FLOAT_INEXACT_RESULT
EXCEPTION_FLT_INVALID_OPERATION = STATUS_FLOAT_INVALID_OPERATION
EXCEPTION_FLT_OVERFLOW = STATUS_FLOAT_OVERFLOW
EXCEPTION_FLT_STACK_CHECK = STATUS_FLOAT_STACK_CHECK
EXCEPTION_FLT_UNDERFLOW = STATUS_FLOAT_UNDERFLOW
EXCEPTION_INT_DIVIDE_BY_ZERO = STATUS_INTEGER_DIVIDE_BY_ZERO
EXCEPTION_INT_OVERFLOW = STATUS_INTEGER_OVERFLOW
EXCEPTION_ILLEGAL_INSTRUCTION = STATUS_ILLEGAL_INSTRUCTION
EXCEPTION_PRIV_INSTRUCTION = STATUS_PRIVILEGED_INSTRUCTION
EXCEPTION_IN_PAGE_ERROR = STATUS_IN_PAGE_ERROR
; Registry options
REG_OPTION_RESERVED = 0
REG_OPTION_NON_VOLATILE = 0
REG_OPTION_VOLATILE = 1
REG_OPTION_CREATE_LINK = 2
REG_OPTION_BACKUP_RESTORE = 4
REG_CREATED_NEW_KEY = 1
REG_OPENED_EXISTING_KEY = 2
REG_WHOLE_HIVE_VOLATILE = 1
REG_REFRESH_HIVE = 2
REG_NOTIFY_CHANGE_NAME = 1
REG_NOTIFY_CHANGE_ATTRIBUTES = 2
REG_NOTIFY_CHANGE_LAST_SET = 4
REG_NOTIFY_CHANGE_SECURITY = 8
REG_LEGAL_CHANGE_FILTER = REG_NOTIFY_CHANGE_NAME or REG_NOTIFY_CHANGE_ATTRIBUTES or REG_NOTIFY_CHANGE_LAST_SET or REG_NOTIFY_CHANGE_SECURITY
REG_LEGAL_OPTION = REG_OPTION_RESERVED or REG_OPTION_NON_VOLATILE or REG_OPTION_VOLATILE or REG_OPTION_CREATE_LINK or REG_OPTION_BACKUP_RESTORE
REG_NONE = 0
REG_SZ = 1
REG_EXPAND_SZ = 2
REG_BINARY = 3
REG_DWORD = 4
REG_DWORD_LITTLE_ENDIAN = 4
REG_DWORD_BIG_ENDIAN = 5
REG_LINK = 6
REG_MULTI_SZ = 7
REG_RESOURCE_LIST = 8
REG_FULL_RESOURCE_DESCRIPTOR = 9
REG_RESOURCE_REQUIREMENTS_LIST = 10
; Registry access modes
KEY_QUERY_VALUE = 1
KEY_SET_VALUE = 2
KEY_CREATE_SUB_KEY = 4
KEY_ENUMERATE_SUB_KEYS = 8
KEY_NOTIFY = 10h
KEY_CREATE_LINK = 20h
KEY_READ = STANDARD_RIGHTS_READ or KEY_QUERY_VALUE or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY and not SYNCHRONIZE
KEY_WRITE = STANDARD_RIGHTS_WRITE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY and not SYNCHRONIZE
KEY_EXECUTE = KEY_READ
KEY_ALL_ACCESS = STANDARD_RIGHTS_ALL or KEY_QUERY_VALUE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY or KEY_CREATE_LINK and not SYNCHRONIZE
; Predefined registry keys
HKEY_CLASSES_ROOT = 80000000h
HKEY_CURRENT_USER = 80000001h
HKEY_LOCAL_MACHINE = 80000002h
HKEY_USERS = 80000003h
HKEY_PERFORMANCE_DATA = 80000004h
HKEY_CURRENT_CONFIG = 80000005h
HKEY_DYN_DATA = 80000006h
; FormatMessage flags
FORMAT_MESSAGE_ALLOCATE_BUFFER = 0100h
FORMAT_MESSAGE_IGNORE_INSERTS = 0200h
FORMAT_MESSAGE_FROM_STRING = 0400h
FORMAT_MESSAGE_FROM_HMODULE = 0800h
FORMAT_MESSAGE_FROM_SYSTEM = 1000h
FORMAT_MESSAGE_ARGUMENT_ARRAY = 2000h
FORMAT_MESSAGE_MAX_WIDTH_MASK = 00FFh
; Language identifiers
LANG_NEUTRAL = 00h
LANG_BULGARIAN = 02h
LANG_CHINESE = 04h
LANG_CROATIAN = 1Ah
LANG_CZECH = 05h
LANG_DANISH = 06h
LANG_DUTCH = 13h
LANG_ENGLISH = 09h
LANG_FINNISH = 0Bh
LANG_FRENCH = 0Ch
LANG_GERMAN = 07h
LANG_GREEK = 08h
LANG_HUNGARIAN = 0Eh
LANG_ICELANDIC = 0Fh
LANG_ITALIAN = 10h
LANG_JAPANESE = 11h
LANG_KOREAN = 12h
LANG_NORWEGIAN = 14h
LANG_POLISH = 15h
LANG_PORTUGUESE = 16h
LANG_ROMANIAN = 18h
LANG_RUSSIAN = 19h
LANG_SLOVAK = 1Bh
LANG_SLOVENIAN = 24h
LANG_SPANISH = 0Ah
LANG_SWEDISH = 1Dh
LANG_THAI = 1Eh
LANG_TURKISH = 1Fh
; Sublanguage identifiers
SUBLANG_NEUTRAL = 00h shl 10
SUBLANG_DEFAULT = 01h shl 10
SUBLANG_SYS_DEFAULT = 02h shl 10
SUBLANG_CHINESE_TRADITIONAL = 01h shl 10
SUBLANG_CHINESE_SIMPLIFIED = 02h shl 10
SUBLANG_CHINESE_HONGKONG = 03h shl 10
SUBLANG_CHINESE_SINGAPORE = 04h shl 10
SUBLANG_DUTCH = 01h shl 10
SUBLANG_DUTCH_BELGIAN = 02h shl 10
SUBLANG_ENGLISH_US = 01h shl 10
SUBLANG_ENGLISH_UK = 02h shl 10
SUBLANG_ENGLISH_AUS = 03h shl 10
SUBLANG_ENGLISH_CAN = 04h shl 10
SUBLANG_ENGLISH_NZ = 05h shl 10
SUBLANG_ENGLISH_EIRE = 06h shl 10
SUBLANG_FRENCH = 01h shl 10
SUBLANG_FRENCH_BELGIAN = 02h shl 10
SUBLANG_FRENCH_CANADIAN = 03h shl 10
SUBLANG_FRENCH_SWISS = 04h shl 10
SUBLANG_GERMAN = 01h shl 10
SUBLANG_GERMAN_SWISS = 02h shl 10
SUBLANG_GERMAN_AUSTRIAN = 03h shl 10
SUBLANG_ITALIAN = 01h shl 10
SUBLANG_ITALIAN_SWISS = 02h shl 10
SUBLANG_NORWEGIAN_BOKMAL = 01h shl 10
SUBLANG_NORWEGIAN_NYNORSK = 02h shl 10
SUBLANG_PORTUGUESE = 02h shl 10
SUBLANG_PORTUGUESE_BRAZILIAN = 01h shl 10
SUBLANG_SPANISH = 01h shl 10
SUBLANG_SPANISH_MEXICAN = 02h shl 10
SUBLANG_SPANISH_MODERN = 03h shl 10
; Sorting identifiers
SORT_DEFAULT = 0 shl 16
SORT_JAPANESE_XJIS = 0 shl 16
SORT_JAPANESE_UNICODE = 1 shl 16
SORT_CHINESE_BIG5 = 0 shl 16
SORT_CHINESE_PRCP = 0 shl 16
SORT_CHINESE_UNICODE = 1 shl 16
SORT_CHINESE_PRC = 2 shl 16
SORT_CHINESE_BOPOMOFO = 3 shl 16
SORT_KOREAN_KSC = 0 shl 16
SORT_KOREAN_UNICODE = 1 shl 16
SORT_GERMAN_PHONE_BOOK = 1 shl 16
SORT_HUNGARIAN_DEFAULT = 0 shl 16
SORT_HUNGARIAN_TECHNICAL = 1 shl 16
; Code pages
CP_ACP = 0 ; default to ANSI code page
CP_OEMCP = 1 ; default to OEM code page
CP_MACCP = 2 ; default to MAC code page
CP_THREAD_ACP = 3 ; current thread's ANSI code page
CP_SYMBOL = 42 ; SYMBOL translations
CP_UTF7 = 65000 ; UTF-7 translation
CP_UTF8 = 65001 ; UTF-8 translation
; Resource types
RT_CURSOR = 1
RT_BITMAP = 2
RT_ICON = 3
RT_MENU = 4
RT_DIALOG = 5
RT_STRING = 6
RT_FONTDIR = 7
RT_FONT = 8
RT_ACCELERATOR = 9
RT_RCDATA = 10
RT_MESSAGETABLE = 11
RT_GROUP_CURSOR = 12
RT_GROUP_ICON = 14
RT_VERSION = 16
RT_DLGINCLUDE = 17
RT_PLUGPLAY = 19
RT_VXD = 20
RT_ANICURSOR = 21
RT_ANIICON = 22
RT_HTML = 23
RT_MANIFEST = 24
; Clipboard formats
CF_TEXT = 001h
CF_BITMAP = 002h
CF_METAFILEPICT = 003h
CF_SYLK = 004h
CF_DIF = 005h
CF_TIFF = 006h
CF_OEMTEXT = 007h
CF_DIB = 008h
CF_PALETTE = 009h
CF_PENDATA = 00Ah
CF_RIFF = 00Bh
CF_WAVE = 00Ch
CF_UNICODETEXT = 00Dh
CF_ENHMETAFILE = 00Eh
CF_HDROP = 00Fh
CF_LOCALE = 010h
CF_OWNERDISPLAY = 080h
CF_DSPTEXT = 081h
CF_DSPBITMAP = 082h
CF_DSPMETAFILEPICT = 083h
CF_DSPENHMETAFILE = 08Eh
CF_PRIVATEFIRST = 200h
CF_PRIVATELAST = 2FFh
CF_GDIOBJFIRST = 300h
CF_GDIOBJLAST = 3FFh
; OS types for version info
VOS_UNKNOWN = 00000000h
VOS_DOS = 00010000h
VOS_OS216 = 00020000h
VOS_OS232 = 00030000h
VOS_NT = 00040000h
VOS__BASE = 00000000h
VOS__WINDOWS16 = 00000001h
VOS__PM16 = 00000002h
VOS__PM32 = 00000003h
VOS__WINDOWS32 = 00000004h
VOS_DOS_WINDOWS16 = 00010001h
VOS_DOS_WINDOWS32 = 00010004h
VOS_OS216_PM16 = 00020002h
VOS_OS232_PM32 = 00030003h
VOS_NT_WINDOWS32 = 00040004h
; File types for version info
VFT_UNKNOWN = 00000000h
VFT_APP = 00000001h
VFT_DLL = 00000002h
VFT_DRV = 00000003h
VFT_FONT = 00000004h
VFT_VXD = 00000005h
VFT_STATIC_LIB = 00000007h
; File subtypes for version info
VFT2_UNKNOWN = 00000000h
VFT2_DRV_PRINTER = 00000001h
VFT2_DRV_KEYBOARD = 00000002h
VFT2_DRV_LANGUAGE = 00000003h
VFT2_DRV_DISPLAY = 00000004h
VFT2_DRV_MOUSE = 00000005h
VFT2_DRV_NETWORK = 00000006h
VFT2_DRV_SYSTEM = 00000007h
VFT2_DRV_INSTALLABLE = 00000008h
VFT2_DRV_SOUND = 00000009h
VFT2_DRV_COMM = 0000000Ah
VFT2_DRV_INPUTMETHOD = 0000000Bh
VFT2_DRV_VERSIONED_PRINTER = 0000000Ch
VFT2_FONT_RASTER = 00000001h
VFT2_FONT_VECTOR = 00000002h
VFT2_FONT_TRUETYPE = 00000003h
; Console control signals
CTRL_C_EVENT = 0
CTRL_BREAK_EVENT = 1
CTRL_CLOSE_EVENT = 2
CTRL_LOGOFF_EVENT = 5
CTRL_SHUTDOWN_EVENT = 6
; Standard file handles
STD_INPUT_HANDLE = 0FFFFFFF6h
STD_OUTPUT_HANDLE = 0FFFFFFF5h
STD_ERROR_HANDLE = 0FFFFFFF4h

View file

@ -0,0 +1,806 @@
; KERNEL32.DLL structures and constants
struct SYSTEM_INFO
wProcessorArchitecture dw ?
wReserved dw ?
dwPageSize dd ?
lpMinimumApplicationAddress dq ?
lpMaximumApplicationAddress dq ?
dwActiveProcessorMask dq ?
dwNumberOfProcessors dd ?
dwProcessorType dd ?
dwAllocationGranularity dd ?
wProcessorLevel dw ?
wProcessorRevision dw ?
ends
struct OSVERSIONINFO
dwOSVersionInfoSize dd ?
dwMajorVersion dd ?
dwMinorVersion dd ?
dwBuildNumber dd ?
dwPlatformId dd ?
szCSDVersion TCHAR 128 dup (?)
ends
struct OSVERSIONINFOA
dwOSVersionInfoSize dd ?
dwMajorVersion dd ?
dwMinorVersion dd ?
dwBuildNumber dd ?
dwPlatformId dd ?
szCSDVersion db 128 dup (?)
ends
struct OSVERSIONINFOW
dwOSVersionInfoSize dd ?
dwMajorVersion dd ?
dwMinorVersion dd ?
dwBuildNumber dd ?
dwPlatformId dd ?
szCSDVersion du 128 dup (?)
ends
struct MEMORYSTATUS
dwLength dd ?
dwMemoryLoad dd ?
dwTotalPhys dq ?
dwAvailPhys dq ?
dwTotalPageFile dq ?
dwAvailPageFile dq ?
dwTotalVirtual dq ?
dwAvailVirtual dq ?
ends
struct STARTUPINFO
cb dd ?,?
lpReserved dq ?
lpDesktop dq ?
lpTitle dq ?
dwX dd ?
dwY dd ?
dwXSize dd ?
dwYSize dd ?
dwXCountChars dd ?
dwYCountChars dd ?
dwFillAttribute dd ?
dwFlags dd ?
wShowWindow dw ?
cbReserved2 dw ?,?,?
lpReserved2 dq ?
hStdInput dq ?
hStdOutput dq ?
hStdError dq ?
ends
struct PROCESS_INFORMATION
hProcess dq ?
hThread dq ?
dwProcessId dd ?
dwThreadId dd ?
ends
struct FILETIME
dwLowDateTime dd ?
dwHighDateTime dd ?
ends
struct SYSTEMTIME
wYear dw ?
wMonth dw ?
wDayOfWeek dw ?
wDay dw ?
wHour dw ?
wMinute dw ?
wSecond dw ?
wMilliseconds dw ?
ends
struct BY_HANDLE_FILE_INFORMATION
dwFileAttributes dd ?
ftCreationTime FILETIME
ftLastAccessTime FILETIME
ftLastWriteTime FILETIME
dwVolumeSerialNumber dd ?
nFileSizeHigh dd ?
nFileSizeLow dd ?
nNumberOfLinks dd ?
nFileIndexHigh dd ?
nFileIndexLow dd ?
ends
struct WIN32_FIND_DATA
dwFileAttributes dd ?
ftCreationTime FILETIME
ftLastAccessTime FILETIME
ftLastWriteTime FILETIME
nFileSizeHigh dd ?
nFileSizeLow dd ?
dwReserved0 dd ?
dwReserved1 dd ?
cFileName TCHAR MAX_PATH dup (?)
cAlternateFileName TCHAR 14 dup (?)
ends
struct WIN32_FIND_DATAA
dwFileAttributes dd ?
ftCreationTime FILETIME
ftLastAccessTime FILETIME
ftLastWriteTime FILETIME
nFileSizeHigh dd ?
nFileSizeLow dd ?
dwReserved0 dd ?
dwReserved1 dd ?
cFileName db MAX_PATH dup (?)
cAlternateFileName db 14 dup (?)
ends
struct WIN32_FIND_DATAW
dwFileAttributes dd ?
ftCreationTime FILETIME
ftLastAccessTime FILETIME
ftLastWriteTime FILETIME
nFileSizeHigh dd ?
nFileSizeLow dd ?
dwReserved0 dd ?
dwReserved1 dd ?
cFileName du MAX_PATH dup (?)
cAlternateFileName du 14 dup (?)
ends
; General constants
NULL = 0
TRUE = 1
FALSE = 0
; Maximum path length in characters
MAX_PATH = 260
; Access rights
DELETE_RIGHT = 00010000h
READ_CONTROL = 00020000h
WRITE_DAC = 00040000h
WRITE_OWNER = 00080000h
SYNCHRONIZE = 00100000h
STANDARD_RIGHTS_READ = READ_CONTROL
STANDARD_RIGHTS_WRITE = READ_CONTROL
STANDARD_RIGHTS_EXECUTE = READ_CONTROL
STANDARD_RIGHTS_REQUIRED = 000F0000h
STANDARD_RIGHTS_ALL = 001F0000h
SPECIFIC_RIGHTS_ALL = 0000FFFFh
ACCESS_SYSTEM_SECURITY = 01000000h
MAXIMUM_ALLOWED = 02000000h
GENERIC_READ = 80000000h
GENERIC_WRITE = 40000000h
GENERIC_EXECUTE = 20000000h
GENERIC_ALL = 10000000h
PROCESS_TERMINATE = 00000001h
PROCESS_CREATE_THREAD = 00000002h
PROCESS_VM_OPERATION = 00000008h
PROCESS_VM_READ = 00000010h
PROCESS_VM_WRITE = 00000020h
PROCESS_DUP_HANDLE = 00000040h
PROCESS_CREATE_PROCESS = 00000080h
PROCESS_SET_QUOTA = 00000100h
PROCESS_SET_INFORMATION = 00000200h
PROCESS_QUERY_INFORMATION = 00000400h
PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 0FFFh
FILE_SHARE_READ = 00000001h
FILE_SHARE_WRITE = 00000002h
FILE_SHARE_DELETE = 00000004h
; CreateFile actions
CREATE_NEW = 1
CREATE_ALWAYS = 2
OPEN_EXISTING = 3
OPEN_ALWAYS = 4
TRUNCATE_EXISTING = 5
; OpenFile modes
OF_READ = 0000h
OF_WRITE = 0001h
OF_READWRITE = 0002h
OF_SHARE_COMPAT = 0000h
OF_SHARE_EXCLUSIVE = 0010h
OF_SHARE_DENY_WRITE = 0020h
OF_SHARE_DENY_READ = 0030h
OF_SHARE_DENY_NONE = 0040h
OF_PARSE = 0100h
OF_DELETE = 0200h
OF_VERIFY = 0400h
OF_CANCEL = 0800h
OF_CREATE = 1000h
OF_PROMPT = 2000h
OF_EXIST = 4000h
OF_REOPEN = 8000h
; SetFilePointer methods
FILE_BEGIN = 0
FILE_CURRENT = 1
FILE_END = 2
; File attributes
FILE_ATTRIBUTE_READONLY = 001h
FILE_ATTRIBUTE_HIDDEN = 002h
FILE_ATTRIBUTE_SYSTEM = 004h
FILE_ATTRIBUTE_DIRECTORY = 010h
FILE_ATTRIBUTE_ARCHIVE = 020h
FILE_ATTRIBUTE_NORMAL = 080h
FILE_ATTRIBUTE_TEMPORARY = 100h
FILE_ATTRIBUTE_COMPRESSED = 800h
; File flags
FILE_FLAG_WRITE_THROUGH = 80000000h
FILE_FLAG_OVERLAPPED = 40000000h
FILE_FLAG_NO_BUFFERING = 20000000h
FILE_FLAG_RANDOM_ACCESS = 10000000h
FILE_FLAG_SEQUENTIAL_SCAN = 08000000h
FILE_FLAG_DELETE_ON_CLOSE = 04000000h
FILE_FLAG_BACKUP_SEMANTICS = 02000000h
FILE_FLAG_POSIX_SEMANTICS = 01000000h
; Notify filters
FILE_NOTIFY_CHANGE_FILE_NAME = 001h
FILE_NOTIFY_CHANGE_DIR_NAME = 002h
FILE_NOTIFY_CHANGE_ATTRIBUTES = 004h
FILE_NOTIFY_CHANGE_SIZE = 008h
FILE_NOTIFY_CHANGE_LAST_WRITE = 010h
FILE_NOTIFY_CHANGE_SECURITY = 100h
; File types
FILE_TYPE_UNKNOWN = 0
FILE_TYPE_DISK = 1
FILE_TYPE_CHAR = 2
FILE_TYPE_PIPE = 3
FILE_TYPE_REMOTE = 8000h
; LockFileEx flags
LOCKFILE_FAIL_IMMEDIATELY = 1
LOCKFILE_EXCLUSIVE_LOCK = 2
; MoveFileEx flags
MOVEFILE_REPLACE_EXISTING = 1
MOVEFILE_COPY_ALLOWED = 2
MOVEFILE_DELAY_UNTIL_REBOOT = 4
MOVEFILE_WRITE_THROUGH = 8
; FindFirstFileEx flags
FIND_FIRST_EX_CASE_SENSITIVE = 1
; Device handles
INVALID_HANDLE_VALUE = -1
STD_INPUT_HANDLE = -10
STD_OUTPUT_HANDLE = -11
STD_ERROR_HANDLE = -12
; DuplicateHandle options
DUPLICATE_CLOSE_SOURCE = 1
DUPLICATE_SAME_ACCESS = 2
; File mapping acccess rights
SECTION_QUERY = 01h
SECTION_MAP_WRITE = 02h
SECTION_MAP_READ = 04h
SECTION_MAP_EXECUTE = 08h
SECTION_EXTEND_SIZE = 10h
SECTION_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SECTION_QUERY or SECTION_MAP_WRITE or SECTION_MAP_READ or SECTION_MAP_EXECUTE or SECTION_EXTEND_SIZE
FILE_MAP_COPY = SECTION_QUERY
FILE_MAP_WRITE = SECTION_MAP_WRITE
FILE_MAP_READ = SECTION_MAP_READ
FILE_MAP_ALL_ACCESS = SECTION_ALL_ACCESS
; File system flags
FILE_CASE_SENSITIVE_SEARCH = 0001h
FILE_CASE_PRESERVED_NAMES = 0002h
FILE_UNICODE_ON_DISK = 0004h
FILE_PERSISTENT_ACLS = 0008h
FILE_FILE_COMPRESSION = 0010h
FILE_VOLUME_IS_COMPRESSED = 8000h
FS_CASE_IS_PRESERVED = FILE_CASE_PRESERVED_NAMES
FS_CASE_SENSITIVE = FILE_CASE_SENSITIVE_SEARCH
FS_UNICODE_STORED_ON_DISK = FILE_UNICODE_ON_DISK
FS_PERSISTENT_ACLS = FILE_PERSISTENT_ACLS
; Drive types
DRIVE_UNKNOWN = 0
DRIVE_NO_ROOT_DIR = 1
DRIVE_REMOVABLE = 2
DRIVE_FIXED = 3
DRIVE_REMOTE = 4
DRIVE_CDROM = 5
DRIVE_RAMDISK = 6
; Pipe modes
PIPE_ACCESS_INBOUND = 1
PIPE_ACCESS_OUTBOUND = 2
PIPE_ACCESS_DUPLEX = 3
PIPE_CLIENT_END = 0
PIPE_SERVER_END = 1
PIPE_WAIT = 0
PIPE_NOWAIT = 1
PIPE_READMODE_BYTE = 0
PIPE_READMODE_MESSAGE = 2
PIPE_TYPE_BYTE = 0
PIPE_TYPE_MESSAGE = 4
PIPE_UNLIMITED_INSTANCES = 255
; Global memory flags
GMEM_FIXED = 0000h
GMEM_MOVEABLE = 0002h
GMEM_NOCOMPACT = 0010h
GMEM_NODISCARD = 0020h
GMEM_ZEROINIT = 0040h
GMEM_MODIFY = 0080h
GMEM_DISCARDABLE = 0100h
GMEM_NOT_BANKED = 1000h
GMEM_SHARE = 2000h
GMEM_DDESHARE = 2000h
GMEM_NOTIFY = 4000h
GMEM_LOWER = GMEM_NOT_BANKED
GMEM_VALID_FLAGS = 7F72h
GMEM_INVALID_HANDLE = 8000h
GMEM_DISCARDED = 4000h
GMEM_LOCKCOUNT = 0FFh
GHND = GMEM_MOVEABLE + GMEM_ZEROINIT
GPTR = GMEM_FIXED + GMEM_ZEROINIT
; Local memory flags
LMEM_FIXED = 0000h
LMEM_MOVEABLE = 0002h
LMEM_NOCOMPACT = 0010h
LMEM_NODISCARD = 0020h
LMEM_ZEROINIT = 0040h
LMEM_MODIFY = 0080h
LMEM_DISCARDABLE = 0F00h
LMEM_VALID_FLAGS = 0F72h
LMEM_INVALID_HANDLE = 8000h
LHND = LMEM_MOVEABLE + LMEM_ZEROINIT
LPTR = LMEM_FIXED + LMEM_ZEROINIT
LMEM_DISCARDED = 4000h
LMEM_LOCKCOUNT = 00FFh
; Page access flags
PAGE_NOACCESS = 001h
PAGE_READONLY = 002h
PAGE_READWRITE = 004h
PAGE_WRITECOPY = 008h
PAGE_EXECUTE = 010h
PAGE_EXECUTE_READ = 020h
PAGE_EXECUTE_READWRITE = 040h
PAGE_EXECUTE_WRITECOPY = 080h
PAGE_GUARD = 100h
PAGE_NOCACHE = 200h
; Memory allocation flags
MEM_COMMIT = 001000h
MEM_RESERVE = 002000h
MEM_DECOMMIT = 004000h
MEM_RELEASE = 008000h
MEM_FREE = 010000h
MEM_PRIVATE = 020000h
MEM_MAPPED = 040000h
MEM_RESET = 080000h
MEM_TOP_DOWN = 100000h
; Heap allocation flags
HEAP_NO_SERIALIZE = 1
HEAP_GENERATE_EXCEPTIONS = 4
HEAP_ZERO_MEMORY = 8
; Platform identifiers
VER_PLATFORM_WIN32s = 0
VER_PLATFORM_WIN32_WINDOWS = 1
VER_PLATFORM_WIN32_NT = 2
; GetBinaryType return values
SCS_32BIT_BINARY = 0
SCS_DOS_BINARY = 1
SCS_WOW_BINARY = 2
SCS_PIF_BINARY = 3
SCS_POSIX_BINARY = 4
SCS_OS216_BINARY = 5
; CreateProcess flags
DEBUG_PROCESS = 001h
DEBUG_ONLY_THIS_PROCESS = 002h
CREATE_SUSPENDED = 004h
DETACHED_PROCESS = 008h
CREATE_NEW_CONSOLE = 010h
NORMAL_PRIORITY_CLASS = 020h
IDLE_PRIORITY_CLASS = 040h
HIGH_PRIORITY_CLASS = 080h
REALTIME_PRIORITY_CLASS = 100h
CREATE_NEW_PROCESS_GROUP = 200h
CREATE_SEPARATE_WOW_VDM = 800h
; Thread priority values
THREAD_BASE_PRIORITY_MIN = -2
THREAD_BASE_PRIORITY_MAX = 2
THREAD_BASE_PRIORITY_LOWRT = 15
THREAD_BASE_PRIORITY_IDLE = -15
THREAD_PRIORITY_LOWEST = THREAD_BASE_PRIORITY_MIN
THREAD_PRIORITY_BELOW_NORMAL = THREAD_PRIORITY_LOWEST + 1
THREAD_PRIORITY_NORMAL = 0
THREAD_PRIORITY_HIGHEST = THREAD_BASE_PRIORITY_MAX
THREAD_PRIORITY_ABOVE_NORMAL = THREAD_PRIORITY_HIGHEST - 1
THREAD_PRIORITY_ERROR_RETURN = 7FFFFFFFh
THREAD_PRIORITY_TIME_CRITICAL = THREAD_BASE_PRIORITY_LOWRT
THREAD_PRIORITY_IDLE = THREAD_BASE_PRIORITY_IDLE
; Startup flags
STARTF_USESHOWWINDOW = 001h
STARTF_USESIZE = 002h
STARTF_USEPOSITION = 004h
STARTF_USECOUNTCHARS = 008h
STARTF_USEFILLATTRIBUTE = 010h
STARTF_RUNFULLSCREEN = 020h
STARTF_FORCEONFEEDBACK = 040h
STARTF_FORCEOFFFEEDBACK = 080h
STARTF_USESTDHANDLES = 100h
; Shutdown flags
SHUTDOWN_NORETRY = 1h
; LoadLibraryEx flags
DONT_RESOLVE_DLL_REFERENCES = 1
LOAD_LIBRARY_AS_DATAFILE = 2
LOAD_WITH_ALTERED_SEARCH_PATH = 8
; DLL entry-point calls
DLL_PROCESS_DETACH = 0
DLL_PROCESS_ATTACH = 1
DLL_THREAD_ATTACH = 2
DLL_THREAD_DETACH = 3
; Status codes
STATUS_WAIT_0 = 000000000h
STATUS_ABANDONED_WAIT_0 = 000000080h
STATUS_USER_APC = 0000000C0h
STATUS_TIMEOUT = 000000102h
STATUS_PENDING = 000000103h
STATUS_DATATYPE_MISALIGNMENT = 080000002h
STATUS_BREAKPOINT = 080000003h
STATUS_SINGLE_STEP = 080000004h
STATUS_ACCESS_VIOLATION = 0C0000005h
STATUS_IN_PAGE_ERROR = 0C0000006h
STATUS_NO_MEMORY = 0C0000017h
STATUS_ILLEGAL_INSTRUCTION = 0C000001Dh
STATUS_NONCONTINUABLE_EXCEPTION = 0C0000025h
STATUS_INVALID_DISPOSITION = 0C0000026h
STATUS_ARRAY_BOUNDS_EXCEEDED = 0C000008Ch
STATUS_FLOAT_DENORMAL_OPERAND = 0C000008Dh
STATUS_FLOAT_DIVIDE_BY_ZERO = 0C000008Eh
STATUS_FLOAT_INEXACT_RESULT = 0C000008Fh
STATUS_FLOAT_INVALID_OPERATION = 0C0000090h
STATUS_FLOAT_OVERFLOW = 0C0000091h
STATUS_FLOAT_STACK_CHECK = 0C0000092h
STATUS_FLOAT_UNDERFLOW = 0C0000093h
STATUS_INTEGER_DIVIDE_BY_ZERO = 0C0000094h
STATUS_INTEGER_OVERFLOW = 0C0000095h
STATUS_PRIVILEGED_INSTRUCTION = 0C0000096h
STATUS_STACK_OVERFLOW = 0C00000FDh
STATUS_CONTROL_C_EXIT = 0C000013Ah
WAIT_FAILED = -1
WAIT_OBJECT_0 = STATUS_WAIT_0
WAIT_ABANDONED = STATUS_ABANDONED_WAIT_0
WAIT_ABANDONED_0 = STATUS_ABANDONED_WAIT_0
WAIT_TIMEOUT = STATUS_TIMEOUT
WAIT_IO_COMPLETION = STATUS_USER_APC
STILL_ACTIVE = STATUS_PENDING
; Exception codes
EXCEPTION_CONTINUABLE = 0
EXCEPTION_NONCONTINUABLE = 1
EXCEPTION_ACCESS_VIOLATION = STATUS_ACCESS_VIOLATION
EXCEPTION_DATATYPE_MISALIGNMENT = STATUS_DATATYPE_MISALIGNMENT
EXCEPTION_BREAKPOINT = STATUS_BREAKPOINT
EXCEPTION_SINGLE_STEP = STATUS_SINGLE_STEP
EXCEPTION_ARRAY_BOUNDS_EXCEEDED = STATUS_ARRAY_BOUNDS_EXCEEDED
EXCEPTION_FLT_DENORMAL_OPERAND = STATUS_FLOAT_DENORMAL_OPERAND
EXCEPTION_FLT_DIVIDE_BY_ZERO = STATUS_FLOAT_DIVIDE_BY_ZERO
EXCEPTION_FLT_INEXACT_RESULT = STATUS_FLOAT_INEXACT_RESULT
EXCEPTION_FLT_INVALID_OPERATION = STATUS_FLOAT_INVALID_OPERATION
EXCEPTION_FLT_OVERFLOW = STATUS_FLOAT_OVERFLOW
EXCEPTION_FLT_STACK_CHECK = STATUS_FLOAT_STACK_CHECK
EXCEPTION_FLT_UNDERFLOW = STATUS_FLOAT_UNDERFLOW
EXCEPTION_INT_DIVIDE_BY_ZERO = STATUS_INTEGER_DIVIDE_BY_ZERO
EXCEPTION_INT_OVERFLOW = STATUS_INTEGER_OVERFLOW
EXCEPTION_ILLEGAL_INSTRUCTION = STATUS_ILLEGAL_INSTRUCTION
EXCEPTION_PRIV_INSTRUCTION = STATUS_PRIVILEGED_INSTRUCTION
EXCEPTION_IN_PAGE_ERROR = STATUS_IN_PAGE_ERROR
; Registry options
REG_OPTION_RESERVED = 0
REG_OPTION_NON_VOLATILE = 0
REG_OPTION_VOLATILE = 1
REG_OPTION_CREATE_LINK = 2
REG_OPTION_BACKUP_RESTORE = 4
REG_CREATED_NEW_KEY = 1
REG_OPENED_EXISTING_KEY = 2
REG_WHOLE_HIVE_VOLATILE = 1
REG_REFRESH_HIVE = 2
REG_NOTIFY_CHANGE_NAME = 1
REG_NOTIFY_CHANGE_ATTRIBUTES = 2
REG_NOTIFY_CHANGE_LAST_SET = 4
REG_NOTIFY_CHANGE_SECURITY = 8
REG_LEGAL_CHANGE_FILTER = REG_NOTIFY_CHANGE_NAME or REG_NOTIFY_CHANGE_ATTRIBUTES or REG_NOTIFY_CHANGE_LAST_SET or REG_NOTIFY_CHANGE_SECURITY
REG_LEGAL_OPTION = REG_OPTION_RESERVED or REG_OPTION_NON_VOLATILE or REG_OPTION_VOLATILE or REG_OPTION_CREATE_LINK or REG_OPTION_BACKUP_RESTORE
REG_NONE = 0
REG_SZ = 1
REG_EXPAND_SZ = 2
REG_BINARY = 3
REG_DWORD = 4
REG_DWORD_LITTLE_ENDIAN = 4
REG_DWORD_BIG_ENDIAN = 5
REG_LINK = 6
REG_MULTI_SZ = 7
REG_RESOURCE_LIST = 8
REG_FULL_RESOURCE_DESCRIPTOR = 9
REG_RESOURCE_REQUIREMENTS_LIST = 10
; Registry access modes
KEY_QUERY_VALUE = 1
KEY_SET_VALUE = 2
KEY_CREATE_SUB_KEY = 4
KEY_ENUMERATE_SUB_KEYS = 8
KEY_NOTIFY = 10h
KEY_CREATE_LINK = 20h
KEY_READ = STANDARD_RIGHTS_READ or KEY_QUERY_VALUE or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY and not SYNCHRONIZE
KEY_WRITE = STANDARD_RIGHTS_WRITE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY and not SYNCHRONIZE
KEY_EXECUTE = KEY_READ
KEY_ALL_ACCESS = STANDARD_RIGHTS_ALL or KEY_QUERY_VALUE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY or KEY_CREATE_LINK and not SYNCHRONIZE
; Predefined registry keys
HKEY_CLASSES_ROOT = 80000000h
HKEY_CURRENT_USER = 80000001h
HKEY_LOCAL_MACHINE = 80000002h
HKEY_USERS = 80000003h
HKEY_PERFORMANCE_DATA = 80000004h
HKEY_CURRENT_CONFIG = 80000005h
HKEY_DYN_DATA = 80000006h
; FormatMessage flags
FORMAT_MESSAGE_ALLOCATE_BUFFER = 0100h
FORMAT_MESSAGE_IGNORE_INSERTS = 0200h
FORMAT_MESSAGE_FROM_STRING = 0400h
FORMAT_MESSAGE_FROM_HMODULE = 0800h
FORMAT_MESSAGE_FROM_SYSTEM = 1000h
FORMAT_MESSAGE_ARGUMENT_ARRAY = 2000h
FORMAT_MESSAGE_MAX_WIDTH_MASK = 00FFh
; Language identifiers
LANG_NEUTRAL = 00h
LANG_BULGARIAN = 02h
LANG_CHINESE = 04h
LANG_CROATIAN = 1Ah
LANG_CZECH = 05h
LANG_DANISH = 06h
LANG_DUTCH = 13h
LANG_ENGLISH = 09h
LANG_FINNISH = 0Bh
LANG_FRENCH = 0Ch
LANG_GERMAN = 07h
LANG_GREEK = 08h
LANG_HUNGARIAN = 0Eh
LANG_ICELANDIC = 0Fh
LANG_ITALIAN = 10h
LANG_JAPANESE = 11h
LANG_KOREAN = 12h
LANG_NORWEGIAN = 14h
LANG_POLISH = 15h
LANG_PORTUGUESE = 16h
LANG_ROMANIAN = 18h
LANG_RUSSIAN = 19h
LANG_SLOVAK = 1Bh
LANG_SLOVENIAN = 24h
LANG_SPANISH = 0Ah
LANG_SWEDISH = 1Dh
LANG_THAI = 1Eh
LANG_TURKISH = 1Fh
; Sublanguage identifiers
SUBLANG_NEUTRAL = 00h shl 10
SUBLANG_DEFAULT = 01h shl 10
SUBLANG_SYS_DEFAULT = 02h shl 10
SUBLANG_CHINESE_TRADITIONAL = 01h shl 10
SUBLANG_CHINESE_SIMPLIFIED = 02h shl 10
SUBLANG_CHINESE_HONGKONG = 03h shl 10
SUBLANG_CHINESE_SINGAPORE = 04h shl 10
SUBLANG_DUTCH = 01h shl 10
SUBLANG_DUTCH_BELGIAN = 02h shl 10
SUBLANG_ENGLISH_US = 01h shl 10
SUBLANG_ENGLISH_UK = 02h shl 10
SUBLANG_ENGLISH_AUS = 03h shl 10
SUBLANG_ENGLISH_CAN = 04h shl 10
SUBLANG_ENGLISH_NZ = 05h shl 10
SUBLANG_ENGLISH_EIRE = 06h shl 10
SUBLANG_FRENCH = 01h shl 10
SUBLANG_FRENCH_BELGIAN = 02h shl 10
SUBLANG_FRENCH_CANADIAN = 03h shl 10
SUBLANG_FRENCH_SWISS = 04h shl 10
SUBLANG_GERMAN = 01h shl 10
SUBLANG_GERMAN_SWISS = 02h shl 10
SUBLANG_GERMAN_AUSTRIAN = 03h shl 10
SUBLANG_ITALIAN = 01h shl 10
SUBLANG_ITALIAN_SWISS = 02h shl 10
SUBLANG_NORWEGIAN_BOKMAL = 01h shl 10
SUBLANG_NORWEGIAN_NYNORSK = 02h shl 10
SUBLANG_PORTUGUESE = 02h shl 10
SUBLANG_PORTUGUESE_BRAZILIAN = 01h shl 10
SUBLANG_SPANISH = 01h shl 10
SUBLANG_SPANISH_MEXICAN = 02h shl 10
SUBLANG_SPANISH_MODERN = 03h shl 10
; Sorting identifiers
SORT_DEFAULT = 0 shl 16
SORT_JAPANESE_XJIS = 0 shl 16
SORT_JAPANESE_UNICODE = 1 shl 16
SORT_CHINESE_BIG5 = 0 shl 16
SORT_CHINESE_PRCP = 0 shl 16
SORT_CHINESE_UNICODE = 1 shl 16
SORT_CHINESE_PRC = 2 shl 16
SORT_CHINESE_BOPOMOFO = 3 shl 16
SORT_KOREAN_KSC = 0 shl 16
SORT_KOREAN_UNICODE = 1 shl 16
SORT_GERMAN_PHONE_BOOK = 1 shl 16
SORT_HUNGARIAN_DEFAULT = 0 shl 16
SORT_HUNGARIAN_TECHNICAL = 1 shl 16
; Code pages
CP_ACP = 0 ; default to ANSI code page
CP_OEMCP = 1 ; default to OEM code page
CP_MACCP = 2 ; default to MAC code page
CP_THREAD_ACP = 3 ; current thread's ANSI code page
CP_SYMBOL = 42 ; SYMBOL translations
CP_UTF7 = 65000 ; UTF-7 translation
CP_UTF8 = 65001 ; UTF-8 translation
; Resource types
RT_CURSOR = 1
RT_BITMAP = 2
RT_ICON = 3
RT_MENU = 4
RT_DIALOG = 5
RT_STRING = 6
RT_FONTDIR = 7
RT_FONT = 8
RT_ACCELERATOR = 9
RT_RCDATA = 10
RT_MESSAGETABLE = 11
RT_GROUP_CURSOR = 12
RT_GROUP_ICON = 14
RT_VERSION = 16
RT_DLGINCLUDE = 17
RT_PLUGPLAY = 19
RT_VXD = 20
RT_ANICURSOR = 21
RT_ANIICON = 22
RT_HTML = 23
RT_MANIFEST = 24
; Clipboard formats
CF_TEXT = 001h
CF_BITMAP = 002h
CF_METAFILEPICT = 003h
CF_SYLK = 004h
CF_DIF = 005h
CF_TIFF = 006h
CF_OEMTEXT = 007h
CF_DIB = 008h
CF_PALETTE = 009h
CF_PENDATA = 00Ah
CF_RIFF = 00Bh
CF_WAVE = 00Ch
CF_UNICODETEXT = 00Dh
CF_ENHMETAFILE = 00Eh
CF_HDROP = 00Fh
CF_LOCALE = 010h
CF_OWNERDISPLAY = 080h
CF_DSPTEXT = 081h
CF_DSPBITMAP = 082h
CF_DSPMETAFILEPICT = 083h
CF_DSPENHMETAFILE = 08Eh
CF_PRIVATEFIRST = 200h
CF_PRIVATELAST = 2FFh
CF_GDIOBJFIRST = 300h
CF_GDIOBJLAST = 3FFh
; OS types for version info
VOS_UNKNOWN = 00000000h
VOS_DOS = 00010000h
VOS_OS216 = 00020000h
VOS_OS232 = 00030000h
VOS_NT = 00040000h
VOS__BASE = 00000000h
VOS__WINDOWS16 = 00000001h
VOS__PM16 = 00000002h
VOS__PM32 = 00000003h
VOS__WINDOWS32 = 00000004h
VOS_DOS_WINDOWS16 = 00010001h
VOS_DOS_WINDOWS32 = 00010004h
VOS_OS216_PM16 = 00020002h
VOS_OS232_PM32 = 00030003h
VOS_NT_WINDOWS32 = 00040004h
; File types for version info
VFT_UNKNOWN = 00000000h
VFT_APP = 00000001h
VFT_DLL = 00000002h
VFT_DRV = 00000003h
VFT_FONT = 00000004h
VFT_VXD = 00000005h
VFT_STATIC_LIB = 00000007h
; File subtypes for version info
VFT2_UNKNOWN = 00000000h
VFT2_DRV_PRINTER = 00000001h
VFT2_DRV_KEYBOARD = 00000002h
VFT2_DRV_LANGUAGE = 00000003h
VFT2_DRV_DISPLAY = 00000004h
VFT2_DRV_MOUSE = 00000005h
VFT2_DRV_NETWORK = 00000006h
VFT2_DRV_SYSTEM = 00000007h
VFT2_DRV_INSTALLABLE = 00000008h
VFT2_DRV_SOUND = 00000009h
VFT2_DRV_COMM = 0000000Ah
VFT2_DRV_INPUTMETHOD = 0000000Bh
VFT2_DRV_VERSIONED_PRINTER = 0000000Ch
VFT2_FONT_RASTER = 00000001h
VFT2_FONT_VECTOR = 00000002h
VFT2_FONT_TRUETYPE = 00000003h
; Console control signals
CTRL_C_EVENT = 0
CTRL_BREAK_EVENT = 1
CTRL_CLOSE_EVENT = 2
CTRL_LOGOFF_EVENT = 5
CTRL_SHUTDOWN_EVENT = 6

View file

@ -0,0 +1,128 @@
; SHELL32.DLL structures and constants
struct NOTIFYICONDATA
cbSize dd ?
hWnd dd ?
uID dd ?
uFlags dd ?
uCallbackMessage dd ?
hIcon dd ?
szTip TCHAR 64 dup (?)
ends
struct NOTIFYICONDATAA
cbSize dd ?
hWnd dd ?
uID dd ?
uFlags dd ?
uCallbackMessage dd ?
hIcon dd ?
szTip db 64 dup (?)
ends
struct NOTIFYICONDATAW
cbSize dd ?
hWnd dd ?
uID dd ?
uFlags dd ?
uCallbackMessage dd ?
hIcon dd ?
szTip du 64 dup (?)
ends
struct BROWSEINFO
hwndOwner dd ?
pidlRoot dd ?
pszDisplayName dd ?
lpszTitle dd ?
ulFlags dd ?
lpfn dd ?
lParam dd ?
iImage dd ?
ends
; Taskbar icon messages
NIM_ADD = 0
NIM_MODIFY = 1
NIM_DELETE = 2
NIM_SETFOCUS = 3
NIM_SETVERSION = 4
; Taskbar icon flags
NIF_MESSAGE = 01h
NIF_ICON = 02h
NIF_TIP = 04h
NIF_STATE = 08h
NIF_INFO = 10h
NIF_GUID = 20h
; Constant Special Item ID List
CSIDL_DESKTOP = 0x0000
CSIDL_INTERNET = 0x0001
CSIDL_PROGRAMS = 0x0002
CSIDL_CONTROLS = 0x0003
CSIDL_PRINTERS = 0x0004
CSIDL_PERSONAL = 0x0005
CSIDL_FAVORITES = 0x0006
CSIDL_STARTUP = 0x0007
CSIDL_RECENT = 0x0008
CSIDL_SENDTO = 0x0009
CSIDL_BITBUCKET = 0x000A
CSIDL_STARTMENU = 0x000B
CSIDL_MYDOCUMENTS = 0x000C
CSIDL_MYMUSIC = 0x000D
CSIDL_MYVIDEO = 0x000E
CSIDL_DESKTOPDIRECTORY = 0x0010
CSIDL_DRIVES = 0x0011
CSIDL_NETWORK = 0x0012
CSIDL_NETHOOD = 0x0013
CSIDL_FONTS = 0x0014
CSIDL_TEMPLATES = 0x0015
CSIDL_COMMON_STARTMENU = 0x0016
CSIDL_COMMON_PROGRAMS = 0x0017
CSIDL_COMMON_STARTUP = 0x0018
CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019
CSIDL_APPDATA = 0x001A
CSIDL_PRINTHOOD = 0x001B
CSIDL_LOCAL_APPDATA = 0x001C
CSIDL_ALTSTARTUP = 0x001D
CSIDL_COMMON_ALTSTARTUP = 0x001E
CSIDL_COMMON_FAVORITES = 0x001F
CSIDL_INTERNET_CACHE = 0x0020
CSIDL_COOKIES = 0x0021
CSIDL_HISTORY = 0x0022
CSIDL_COMMON_APPDATA = 0x0023
CSIDL_WINDOWS = 0x0024
CSIDL_SYSTEM = 0x0025
CSIDL_PROGRAM_FILES = 0x0026
CSIDL_MYPICTURES = 0x0027
CSIDL_PROFILE = 0x0028
CSIDL_SYSTEMX86 = 0x0029
CSIDL_PROGRAM_FILESX86 = 0x002A
CSIDL_PROGRAM_FILES_COMMON = 0x002B
CSIDL_PROGRAM_FILES_COMMONX86 = 0x002C
CSIDL_COMMON_TEMPLATES = 0x002D
CSIDL_COMMON_DOCUMENTS = 0x002E
CSIDL_COMMON_ADMINTOOLS = 0x002F
CSIDL_ADMINTOOLS = 0x0030
CSIDL_CONNECTIONS = 0x0031
CSIDL_COMMON_MUSIC = 0x0035
CSIDL_COMMON_PICTURES = 0x0036
CSIDL_COMMON_VIDEO = 0x0037
CSIDL_RESOURCES = 0x0038
CSIDL_RESOURCES_LOCALIZED = 0x0039
CSIDL_COMMON_OEM_LINKS = 0x003A
CSIDL_CDBURN_AREA = 0x003B
CSIDL_COMPUTERSNEARME = 0x003D
CSIDL_PROFILES = 0x003E
CSIDL_FOLDER_MASK = 0x00FF
CSIDL_FLAG_PER_USER_INIT = 0x0800
CSIDL_FLAG_NO_ALIAS = 0x1000
CSIDL_FLAG_DONT_VERIFY = 0x4000
CSIDL_FLAG_CREATE = 0x8000
CSIDL_FLAG_MASK = 0xFF00

View file

@ -0,0 +1,127 @@
; SHELL32.DLL structures and constants
struct NOTIFYICONDATA
cbSize dd ?,?
hWnd dq ?
uID dd ?
uFlags dd ?
uCallbackMessage dd ?,?
hIcon dq ?
szTip TCHAR 64 dup (?)
ends
struct NOTIFYICONDATAA
cbSize dd ?,?
hWnd dq ?
uID dd ?
uFlags dd ?
uCallbackMessage dd ?,?
hIcon dq ?
szTip db 64 dup (?)
ends
struct NOTIFYICONDATAW
cbSize dd ?,?
hWnd dq ?
uID dd ?
uFlags dd ?
uCallbackMessage dd ?,?
hIcon dq ?
szTip du 64 dup (?)
ends
struct BROWSEINFO
hwndOwner dq ?
pidlRoot dq ?
pszDisplayName dq ?
lpszTitle dq ?
ulFlags dd ?,?
lpfn dq ?
lParam dq ?
iImage dq ?
ends
; Taskbar icon messages
NIM_ADD = 0
NIM_MODIFY = 1
NIM_DELETE = 2
NIM_SETFOCUS = 3
NIM_SETVERSION = 4
; Taskbar icon flags
NIF_MESSAGE = 01h
NIF_ICON = 02h
NIF_TIP = 04h
NIF_STATE = 08h
NIF_INFO = 10h
NIF_GUID = 20h
; Constant Special Item ID List
CSIDL_DESKTOP = 0x0000
CSIDL_INTERNET = 0x0001
CSIDL_PROGRAMS = 0x0002
CSIDL_CONTROLS = 0x0003
CSIDL_PRINTERS = 0x0004
CSIDL_PERSONAL = 0x0005
CSIDL_FAVORITES = 0x0006
CSIDL_STARTUP = 0x0007
CSIDL_RECENT = 0x0008
CSIDL_SENDTO = 0x0009
CSIDL_BITBUCKET = 0x000A
CSIDL_STARTMENU = 0x000B
CSIDL_MYDOCUMENTS = 0x000C
CSIDL_MYMUSIC = 0x000D
CSIDL_MYVIDEO = 0x000E
CSIDL_DESKTOPDIRECTORY = 0x0010
CSIDL_DRIVES = 0x0011
CSIDL_NETWORK = 0x0012
CSIDL_NETHOOD = 0x0013
CSIDL_FONTS = 0x0014
CSIDL_TEMPLATES = 0x0015
CSIDL_COMMON_STARTMENU = 0x0016
CSIDL_COMMON_PROGRAMS = 0x0017
CSIDL_COMMON_STARTUP = 0x0018
CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019
CSIDL_APPDATA = 0x001A
CSIDL_PRINTHOOD = 0x001B
CSIDL_LOCAL_APPDATA = 0x001C
CSIDL_ALTSTARTUP = 0x001D
CSIDL_COMMON_ALTSTARTUP = 0x001E
CSIDL_COMMON_FAVORITES = 0x001F
CSIDL_INTERNET_CACHE = 0x0020
CSIDL_COOKIES = 0x0021
CSIDL_HISTORY = 0x0022
CSIDL_COMMON_APPDATA = 0x0023
CSIDL_WINDOWS = 0x0024
CSIDL_SYSTEM = 0x0025
CSIDL_PROGRAM_FILES = 0x0026
CSIDL_MYPICTURES = 0x0027
CSIDL_PROFILE = 0x0028
CSIDL_SYSTEMX86 = 0x0029
CSIDL_PROGRAM_FILESX86 = 0x002A
CSIDL_PROGRAM_FILES_COMMON = 0x002B
CSIDL_PROGRAM_FILES_COMMONX86 = 0x002C
CSIDL_COMMON_TEMPLATES = 0x002D
CSIDL_COMMON_DOCUMENTS = 0x002E
CSIDL_COMMON_ADMINTOOLS = 0x002F
CSIDL_ADMINTOOLS = 0x0030
CSIDL_CONNECTIONS = 0x0031
CSIDL_COMMON_MUSIC = 0x0035
CSIDL_COMMON_PICTURES = 0x0036
CSIDL_COMMON_VIDEO = 0x0037
CSIDL_RESOURCES = 0x0038
CSIDL_RESOURCES_LOCALIZED = 0x0039
CSIDL_COMMON_OEM_LINKS = 0x003A
CSIDL_CDBURN_AREA = 0x003B
CSIDL_COMPUTERSNEARME = 0x003D
CSIDL_PROFILES = 0x003E
CSIDL_FOLDER_MASK = 0x00FF
CSIDL_FLAG_PER_USER_INIT = 0x0800
CSIDL_FLAG_NO_ALIAS = 0x1000
CSIDL_FLAG_DONT_VERIFY = 0x4000
CSIDL_FLAG_CREATE = 0x8000
CSIDL_FLAG_MASK = 0xFF00

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,124 @@
; WSOCK32.DLL structures and constants
struct WSADATA
wVersion dw ?
wHighVersion dw ?
szDescription db 256+1 dup (?)
szSystemStatus db 128+1 dup (?)
iMaxSockets dw ?
iMaxUdpDg dw ?
_padding_ db 2 dup (?)
lpVendorInfo dd ?
ends
struct hostent
h_name dd ?
h_aliases dd ?
h_addrtype dw ?
h_length dw ?
h_addr_list dd ?
ends
struct sockaddr_in
sin_family dw ?
sin_port dw ?
sin_addr dd ?
sin_zero db 8 dup (?)
ends
struct sockaddr
sa_family dw ?
sa_data db 14 dup (?)
ends
; Socket types
SOCK_STREAM = 1
SOCK_DGRAM = 2
SOCK_RAW = 3
SOCK_RDM = 4
SOCK_SEQPACKET = 5
; Address formats
AF_UNSPEC = 0
AF_UNIX = 1
AF_INET = 2
AF_IMPLINK = 3
AF_PUP = 4
AF_CHAOS = 5
AF_NS = 6
AF_IPX = 6
AF_ISO = 7
AF_OSI = AF_ISO
AF_ECMA = 8
AF_DATAKIT = 9
AF_CCITT = 10
AF_SNA = 11
AF_DECnet = 12
AF_DLI = 13
AF_LAT = 14
AF_HYLINK = 15
AF_APPLETALK = 16
AF_NETBIOS = 17
; Protocol formats
PF_UNSPEC = 0
PF_UNIX = 1
PF_INET = 2
PF_IMPLINK = 3
PF_PUP = 4
PF_CHAOS = 5
PF_NS = 6
PF_IPX = 6
PF_ISO = 7
PF_OSI = PF_ISO
PF_ECMA = 8
PF_DATAKIT = 9
PF_CCITT = 10
PF_SNA = 11
PF_DECnet = 12
PF_DLI = 13
PF_LAT = 14
PF_HYLINK = 15
PF_APPLETALK = 16
PF_NETBIOS = 17
; IP Ports
IPPORT_ECHO = 7
IPPORT_DISCARD = 9
IPPORT_SYSTAT = 11
IPPORT_DAYTIME = 13
IPPORT_NETSTAT = 15
IPPORT_FTP = 21
IPPORT_TELNET = 23
IPPORT_SMTP = 25
IPPORT_TIMESERVER = 37
IPPORT_NAMESERVER = 42
IPPORT_WHOIS = 43
IPPORT_MTP = 57
IPPORT_TFTP = 69
IPPORT_RJE = 77
IPPORT_FINGER = 79
IPPORT_TTYLINK = 87
IPPORT_SUPDUP = 95
IPPORT_EXECSERVER = 512
IPPORT_LOGINSERVER = 513
IPPORT_CMDSERVER = 514
IPPORT_EFSSERVER = 520
IPPORT_BIFFUDP = 512
IPPORT_WHOSERVER = 513
IPPORT_ROUTESERVER = 520
IPPORT_RESERVED = 1024
; Notifications
FD_READ = 01h
FD_WRITE = 02h
FD_OOB = 04h
FD_ACCEPT = 08h
FD_CONNECT = 10h
FD_CLOSE = 20h

View file

@ -0,0 +1,53 @@
; Macroinstructions for interfacing the COM (Component Object Model) classes
macro cominvk object,proc,[arg]
{ common
if ~ arg eq
reverse
pushd arg
common
end if
assert defined object#.com.object ; must be a COM object
mov eax,[object]
push eax
mov eax,[eax]
call [eax+object#.#proc] }
macro comcall handle,interface,proc,[arg]
{ common
if ~ arg eq
reverse
pushd arg
common
end if
assert defined interface#.com.interface ; must be a COM interface
if handle eqtype eax | handle eqtype 0
push handle
local ..handle
label ..handle at handle
mov eax,[..handle]
else
mov eax,handle
push eax
mov eax,[eax]
end if
call [eax+interface#.#proc] }
macro interface name,[proc]
{ common
struc name \{
match , @struct \\{ define field@struct .,name, \\}
match no, @struct \\{ . dd ?
virtual at 0
forward
.#proc dd ?
common
.\#\\.com.object = name#.com.interface
end virtual \\} \}
virtual at 0
forward
name#.#proc dd ?
common
name#.com.interface = $ shr 2
end virtual }

View file

@ -0,0 +1,39 @@
; Macroinstructions for interfacing the COM (Component Object Model) classes
macro cominvk object,proc,[arg]
{ common
assert defined object#.com.object ; must be a COM object
macro call dummy
\{ mov rax,[rcx]
call [rax+object#.#proc] \}
fastcall ,[object],arg
purge call }
macro comcall handle,interface,proc,[arg]
{ common
assert defined interface#.com.interface ; must be a COM interface
macro call dummy
\{ mov rax,[rcx]
call [rax+interface#.#proc] \}
fastcall ,handle,arg
purge call }
macro interface name,[proc]
{ common
struc name \{
match , @struct \\{ define field@struct .,name, \\}
match no, @struct \\{ . dq ?
virtual at 0
forward
.#proc dq ?
common
.\#\\.com.object = name#.com.interface
end virtual \\} \}
virtual at 0
forward
name#.#proc dq ?
common
name#.com.interface = $ shr 3
end virtual }

View file

@ -0,0 +1,66 @@
; Macroinstruction for making export section
macro export dllname,[label,string]
{ common
local module,addresses,names,ordinal,count
count = 0
forward
count = count+1
common
dd 0,0,0,RVA module,1
dd count,count,RVA addresses,RVA names,RVA ordinal
addresses:
forward
dd RVA label
common
names:
forward
local name
dd RVA name
common
ordinal: count = 0
forward
dw count
count = count+1
common
module db dllname,0
forward
name db string,0
common
local x,y,z,str1,str2,v1,v2
x = count shr 1
while x > 0
y = x
while y < count
z = y
while z-x >= 0
load v1 dword from names+z*4
str1=($-RVA $)+v1
load v2 dword from names+(z-x)*4
str2=($-RVA $)+v2
while v1 > 0
load v1 from str1+%-1
load v2 from str2+%-1
if v1 <> v2
break
end if
end while
if v1<v2
load v1 dword from names+z*4
load v2 dword from names+(z-x)*4
store dword v1 at names+(z-x)*4
store dword v2 at names+z*4
load v1 word from ordinal+z*2
load v2 word from ordinal+(z-x)*2
store word v1 at ordinal+(z-x)*2
store word v2 at ordinal+z*2
else
break
end if
z = z-x
end while
y = y+1
end while
x = x shr 1
end while }

507
tools/INCLUDE/MACRO/IF.INC Normal file
View file

@ -0,0 +1,507 @@
; Macroinstructions for HLL-style conditional operations
macro .if [arg]
{
common
__IF equ
local ..endif
__ENDIF equ ..endif
local ..else
__ELSE equ ..else
JNCOND __ELSE,arg
}
macro .else
{
jmp __ENDIF
__ELSE:
restore __IF
__IF equ ,
}
macro .elseif [arg]
{
common
jmp __ENDIF
__ELSE:
restore __ELSE
local ..else
__ELSE equ ..else
JNCOND __ELSE,arg
}
macro .endif
{
if __IF eq
__ELSE:
end if
__ENDIF:
restore __ELSE
restore __ENDIF
restore __IF
}
macro .while [arg]
{
common
local ..while
__WHILE equ ..while
local ..endw
__ENDW equ ..endw
__WHILE:
JNCOND __ENDW,arg
}
macro .endw
{
jmp __WHILE
__ENDW:
restore __ENDW
restore __WHILE
}
macro .repeat
{
local ..repeat
__REPEAT equ ..repeat
__REPEAT:
}
macro .until [arg]
{
common
JNCOND __REPEAT,arg
restore __REPEAT
}
jnne equ je
jnna equ ja
jnnb equ jb
jnng equ jg
jnnl equ jl
jnnae equ jae
jnnbe equ jbe
jnnge equ jge
jnnle equ jle
macro JNCOND label,v1,c,v2
{
match any,c
\{
cmp v1,v2
jn\#c label
\}
match ,c
\{
PARSECOND parsed@cond,v1
match cond,parsed@cond \\{ JNCONDEXPR label,cond \\}
\}
}
gt equ >
lt equ <
macro PARSECOND parsed,cond
{
define parsed
define neg@cond
define status@cond
define nest@cond
irps symb,cond
\{
define symb@cond symb
match >,symb
\\{
define symb@cond gt
\\}
match <,symb
\\{
define symb@cond lt
\\}
current@cond equ status@cond
match ,current@cond
\\{
match ~,symb
\\\{
neg@cond equ neg@cond ~
match ~~,neg@cond
\\\\{
define neg@cond
\\\\}
define symb@cond
\\\}
match (,symb
\\\{
parsed equ parsed neg@cond,<
define nest@cond +
define symb@cond
define neg@cond
\\\}
match any,symb@cond
\\\{
parsed equ parsed neg@cond,symb@cond
define status@cond +
\\\}
\\}
match status,current@cond
\\{
match &,symb
\\\{
parsed equ parsed,&,
define status@cond
define symb@cond
define neg@cond
\\\}
match |,symb
\\\{
parsed equ parsed,|,
define status@cond
define symb@cond
define neg@cond
\\\}
match (,symb
\\\{
define nest@cond (
\\\}
match ),symb
\\\{
match +,nest@cond
\\\\{
parsed equ parsed>
define symb@cond
\\\\}
restore nest@cond
\\\}
match any,symb@cond
\\\{
parsed equ parsed symb@cond
\\\}
\\}
\}
}
macro define_JNCONDEXPR
{
macro JNCONDEXPR elabel,[mod,cond,op]
\{
\common
\local ..t,..f
define t@cond ..t
define f@cond ..f
\forward
match ,op
\\{
match ,mod \\\{ JNCONDEL elabel,<cond> \\\}
match ~,mod \\\{ JCONDEL elabel,<cond> \\\}
\\}
match &:flabel:tlabel, op:f@cond:t@cond
\\{
match ,mod \\\{ JNCONDEL flabel,<cond> \\\}
match ~,mod \\\{ JCONDEL flabel,<cond> \\\}
tlabel:
\\local ..tnew
restore t@cond
define t@cond ..tnew
\\}
match |:flabel:tlabel, op:f@cond:t@cond
\\{
match ,mod \\\{ JCONDEL tlabel,<cond> \\\}
match ~,mod \\\{ JNCONDEL tlabel,<cond> \\\}
flabel:
\\local ..fnew
restore f@cond
define f@cond ..fnew
\\}
\common
label f@cond at elabel
t@cond:
restore t@cond
restore f@cond
\}
}
macro define_JCONDEXPR
{
macro JCONDEXPR elabel,[mod,cond,op]
\{
\common
\local ..t,..f
define t@cond ..t
define f@cond ..f
\forward
match ,op
\\{
match ,mod \\\{ JCONDEL elabel,<cond> \\\}
match ~,mod \\\{ JNCONDEL elabel,<cond> \\\}
\\}
match |:flabel:tlabel, op:f@cond:t@cond
\\{
match ,mod \\\{ JCONDEL flabel,<cond> \\\}
match ~,mod \\\{ JNCONDEL flabel,<cond> \\\}
tlabel:
\\local ..tnew
restore t@cond
define t@cond ..tnew
\\}
match &:flabel:tlabel, op:f@cond:t@cond
\\{
match ,mod \\\{ JNCONDEL tlabel,<cond> \\\}
match ~,mod \\\{ JCONDEL tlabel,<cond> \\\}
flabel:
\\local ..fnew
restore f@cond
define f@cond ..fnew
\\}
\common
label f@cond at elabel
t@cond:
restore t@cond
restore f@cond
\}
}
macro define_JNCONDEL
{
macro JNCONDEL label,cond
\{
\local COND
match car=,cdr,:cond
\\{
define_JNCONDEXPR
define_JCONDEXPR
define_JCONDEL
define_JNCONDEL
JNCONDEXPR label,cond
purge JNCONDEXPR,JCONDEXPR,JCONDEL,JNCONDEL
define COND
\\}
match c,cond ; replace gt and lt
\\{
match =COND =signed v1>==v2, COND c
\\\{
cmp v1,v2
jl label
define COND
\\\}
match =COND =signed v1<==v2, COND c
\\\{
cmp v1,v2
jg label
define COND
\\\}
match =COND v1>==v2, COND c
\\\{
cmp v1,v2
jb label
define COND
\\\}
match =COND v1<==v2, COND c
\\\{
cmp v1,v2
ja label
define COND
\\\}
match =COND v1==v2, COND c
\\\{
cmp v1,v2
jne label
define COND
\\\}
match =COND v1<>v2, COND c
\\\{
cmp v1,v2
je label
define COND
\\\}
match =COND =signed v1>v2, COND c
\\\{
cmp v1,v2
jle label
define COND
\\\}
match =COND =signed v1<v2, COND c
\\\{
cmp v1,v2
jge label
define COND
\\\}
match =COND v1>v2, COND c
\\\{
cmp v1,v2
jbe label
define COND
\\\}
match =COND v1<v2, COND c
\\\{
cmp v1,v2
jae label
define COND
\\\}
match =COND =ZERO?, COND c
\\\{
jnz label
define COND
\\\}
match =COND =CARRY?, COND c
\\\{
jnc label
define COND
\\\}
match =COND =OVERFLOW?, COND c
\\\{
jno label
define COND
\\\}
match =COND =SIGN?, COND c
\\\{
jns label
define COND
\\\}
match =COND =PARITY?, COND c
\\\{
jnp label
define COND
\\\}
match =COND v, COND c
\\\{
if v eqtype 0
if ~ v
jmp label
end if
else if v eqtype eax
test v,v
jz label
else
cmp v,0
je label
end if
\\\}
\\}
\}
}
macro define_JCONDEL
{
macro JCONDEL label,cond
\{
\local COND
match car=,cdr,:cond
\\{
define_JNCONDEXPR
define_JCONDEXPR
define_JCONDEL
define_JNCONDEL
JCONDEXPR label,cond
purge JNCONDEXPR,JCONDEXPR,JCONDEL,JNCONDEL
define COND
\\}
match c,cond ; replace gt and lt
\\{
match =COND =signed v1>==v2, COND c
\\\{
cmp v1,v2
jge label
define COND
\\\}
match =COND =signed v1<==v2, COND c
\\\{
cmp v1,v2
jle label
define COND
\\\}
match =COND v1>==v2, COND c
\\\{
cmp v1,v2
jae label
define COND
\\\}
match =COND v1<==v2, COND c
\\\{
cmp v1,v2
jbe label
define COND
\\\}
match =COND v1==v2, COND c
\\\{
cmp v1,v2
je label
define COND
\\\}
match =COND v1<>v2, COND c
\\\{
cmp v1,v2
jne label
define COND
\\\}
match =COND =signed v1>v2, COND c
\\\{
cmp v1,v2
jg label
define COND
\\\}
match =COND =signed v1<v2, COND c
\\\{
cmp v1,v2
jl label
define COND
\\\}
match =COND v1>v2, COND c
\\\{
cmp v1,v2
ja label
define COND
\\\}
match =COND v1<v2, COND c
\\\{
cmp v1,v2
jb label
define COND
\\\}
match =COND =ZERO?, COND c
\\\{
jz label
define COND
\\\}
match =COND =CARRY?, COND c
\\\{
jc label
define COND
\\\}
match =COND =OVERFLOW?, COND c
\\\{
jo label
define COND
\\\}
match =COND =SIGN?, COND c
\\\{
js label
define COND
\\\}
match =COND =PARITY?, COND c
\\\{
jp label
define COND
\\\}
match =COND v, COND c
\\\{
if v eqtype 0
if v
jmp label
end if
else if v eqtype eax
test v,v
jnz label
else
cmp v,0
jne label
end if
\\\}
\\}
\}
}
define_JNCONDEXPR
define_JCONDEXPR
define_JNCONDEL
define_JCONDEL

View file

@ -0,0 +1,68 @@
; Macroinstructions for making import section
macro library [name,string]
{ common
import.data:
forward
local _label
if defined name#.redundant
if ~ name#.redundant
dd RVA name#.lookup,0,0,RVA _label,RVA name#.address
end if
end if
name#.referred = 1
common
dd 0,0,0,0,0
forward
if defined name#.redundant
if ~ name#.redundant
_label db string,0
rb RVA $ and 1
end if
end if }
macro import name,[label,string]
{ common
rb (- rva $) and 3
if defined name#.referred
name#.lookup:
forward
if used label
if string eqtype ''
local _label
dd RVA _label
else
dd 80000000h + string
end if
end if
common
if $ > name#.lookup
name#.redundant = 0
dd 0
else
name#.redundant = 1
end if
name#.address:
forward
if used label
if string eqtype ''
label dd RVA _label
else
label dd 80000000h + string
end if
end if
common
if ~ name#.redundant
dd 0
end if
forward
if used label & string eqtype ''
_label dw 0
db string,0
rb RVA $ and 1
end if
common
end if }
macro api [name] {}

View file

@ -0,0 +1,68 @@
; Macroinstructions for making import section (64-bit)
macro library [name,string]
{ common
import.data:
forward
local _label
if defined name#.redundant
if ~ name#.redundant
dd RVA name#.lookup,0,0,RVA _label,RVA name#.address
end if
end if
name#.referred = 1
common
dd 0,0,0,0,0
forward
if defined name#.redundant
if ~ name#.redundant
_label db string,0
rb RVA $ and 1
end if
end if }
macro import name,[label,string]
{ common
rb (- rva $) and 7
if defined name#.referred
name#.lookup:
forward
if used label
if string eqtype ''
local _label
dq RVA _label
else
dq 8000000000000000h + string
end if
end if
common
if $ > name#.lookup
name#.redundant = 0
dq 0
else
name#.redundant = 1
end if
name#.address:
forward
if used label
if string eqtype ''
label dq RVA _label
else
label dq 8000000000000000h + string
end if
end if
common
if ~ name#.redundant
dq 0
end if
forward
if used label & string eqtype ''
_label dw 0
db string,0
rb RVA $ and 1
end if
common
end if }
macro api [name] {}

View file

@ -0,0 +1,66 @@
; Simulate MASM's syntax
struc struct
{ struct .
name@struct equ . }
struc ends
{ match =.,name@struct \{ ends \} }
struc proc [params]
{ common define@proc .,<params>
name@proc equ . }
struc endp
{ match =.,name@proc \{ endp \} }
macro option setting
{ match =prologue:macro, setting \{ prologue@proc equ macro \}
match =epilogue:macro, setting \{ epilogue@proc equ macro \} }
macro none procname,flag,parmbytes,localbytes,reglist { }
macro assume params
{
local expr
define expr params
match reg:struct, expr
\{
match assumed, reg\#@assumed \\{ irp name, assumed \\\{ restore name \\\} \\}
macro label . \\{ local def
define def .
match =reg =at label, def \\\{ define def \\\}
match name at,def \\\{ def@assumed reg,name,label at
define def \\\}
match name,def \\\{ def@assumed reg,.,: \\\} \\}
struc db [val] \\{ \common def@assumed reg,.,<db val> \\}
struc dw [val] \\{ \common def@assumed reg,.,<dw val> \\}
struc dp [val] \\{ \common def@assumed reg,.,<dp val> \\}
struc dd [val] \\{ \common def@assumed reg,.,<dd val> \\}
struc dt [val] \\{ \common def@assumed reg,.,<dt val> \\}
struc dq [val] \\{ \common def@assumed reg,.,<dq val> \\}
struc rb cnt \\{ def@assumed reg,.,rb cnt \\}
struc rw cnt \\{ def@assumed reg,.,rw cnt \\}
struc rp cnt \\{ def@assumed reg,.,rp cnt \\}
struc rd cnt \\{ def@assumed reg,.,rd cnt \\}
struc rt cnt \\{ def@assumed reg,.,rt cnt \\}
struc rq cnt \\{ def@assumed reg,.,rq cnt \\}
reg\#@assumed equ
virtual at reg
reg struct
end virtual
purge label
restruc db,dw,dp,dd,dt,dq
restruc rb,rw,rp,rd,rt,rq \} }
macro def@assumed reg,name,def
{ match vars, reg#@assumed \{ reg#@assumed equ reg#@assumed, \}
reg#@assumed equ reg#@assumed name
local ..label
name equ ..label
..label def }
struc label type { label . type }
struc none { label . }

View file

@ -0,0 +1,301 @@
; Macroinstructions for defining and calling procedures
macro stdcall proc,[arg] ; directly call STDCALL procedure
{ common
if ~ arg eq
reverse
pushd arg
common
end if
call proc }
macro invoke proc,[arg] ; indirectly call STDCALL procedure
{ common
if ~ arg eq
reverse
pushd arg
common
end if
call [proc] }
macro ccall proc,[arg] ; directly call CDECL procedure
{ common
size@ccall = 0
if ~ arg eq
reverse
pushd arg
size@ccall = size@ccall+4
common
end if
call proc
if size@ccall
add esp,size@ccall
end if }
macro cinvoke proc,[arg] ; indirectly call CDECL procedure
{ common
size@ccall = 0
if ~ arg eq
reverse
pushd arg
size@ccall = size@ccall+4
common
end if
call [proc]
if size@ccall
add esp,size@ccall
end if }
macro proc [args] ; define procedure
{ common
match name params, args>
\{ define@proc name,<params \} }
prologue@proc equ prologuedef
macro prologuedef procname,flag,parmbytes,localbytes,reglist
{ local loc
loc = (localbytes+3) and (not 3)
parmbase@proc equ ebp+8
localbase@proc equ ebp-loc
if parmbytes | localbytes
push ebp
mov ebp,esp
if localbytes
sub esp,loc
end if
end if
irps reg, reglist \{ push reg \} }
epilogue@proc equ epiloguedef
macro epiloguedef procname,flag,parmbytes,localbytes,reglist
{ irps reg, reglist \{ reverse pop reg \}
if parmbytes | localbytes
leave
end if
if flag and 10000b
retn
else
retn parmbytes
end if }
close@proc equ
macro define@proc name,statement
{ local params,flag,regs,parmbytes,localbytes,current
if used name
name:
match =stdcall args, statement \{ params equ args
flag = 11b \}
match =stdcall, statement \{ params equ
flag = 11b \}
match =c args, statement \{ params equ args
flag = 10001b \}
match =c, statement \{ params equ
flag = 10001b \}
match =params, params \{ params equ statement
flag = 0 \}
match =uses reglist=,args, params \{ regs equ reglist
params equ args \}
match =regs =uses reglist, regs params \{ regs equ reglist
params equ \}
match =regs, regs \{ regs equ \}
match prologue:reglist, prologue@proc:<regs> \{ prologue name,flag,parmbytes,localbytes,reglist \}
virtual at parmbase@proc
match =,args, params \{ defargs@proc args \}
match =args@proc args, args@proc params \{ defargs@proc args \}
parmbytes = $-(parmbase@proc)
end virtual
name # % = parmbytes/4
all@vars equ
current = 0
macro locals
\{ virtual at localbase@proc+current
macro label def \\{ match . type,def> \\\{ deflocal@proc .,label,<type \\\} \\}
struc db [val] \\{ \common deflocal@proc .,db,val \\}
struc du [val] \\{ \common deflocal@proc .,du,val \\}
struc dw [val] \\{ \common deflocal@proc .,dw,val \\}
struc dp [val] \\{ \common deflocal@proc .,dp,val \\}
struc dd [val] \\{ \common deflocal@proc .,dd,val \\}
struc dt [val] \\{ \common deflocal@proc .,dt,val \\}
struc dq [val] \\{ \common deflocal@proc .,dq,val \\}
struc rb cnt \\{ deflocal@proc .,rb cnt, \\}
struc rw cnt \\{ deflocal@proc .,rw cnt, \\}
struc rp cnt \\{ deflocal@proc .,rp cnt, \\}
struc rd cnt \\{ deflocal@proc .,rd cnt, \\}
struc rt cnt \\{ deflocal@proc .,rt cnt, \\}
struc rq cnt \\{ deflocal@proc .,rq cnt, \\} \}
macro endl
\{ purge label
restruc db,du,dw,dp,dd,dt,dq
restruc rb,rw,rp,rd,rt,rq
current = $-(localbase@proc)
end virtual \}
macro ret operand
\{ match any, operand \\{ retn operand \\}
match , operand \\{ match epilogue:reglist, epilogue@proc:<regs> \\\{ epilogue name,flag,parmbytes,localbytes,reglist \\\} \\} \}
macro finish@proc
\{ localbytes = current
match close:reglist, close@proc:<regs> \\{ close name,flag,parmbytes,localbytes,reglist \\}
end if \} }
macro defargs@proc [arg]
{ common
if ~ arg eq
forward
local ..arg,current@arg
match argname:type, arg
\{ current@arg equ argname
label ..arg type
argname equ ..arg
if qqword eq type
dd ?,?,?,?,?,?,?,?
else if dqword eq type
dd ?,?,?,?
else if tbyte eq type
dd ?,?,?
else if qword eq type | pword eq type
dd ?,?
else
dd ?
end if \}
match =current@arg,current@arg
\{ current@arg equ arg
arg equ ..arg
..arg dd ? \}
common
args@proc equ current@arg
forward
restore current@arg
common
end if }
macro deflocal@proc name,def,[val] { name def val }
macro deflocal@proc name,def,[val]
{ common
match vars, all@vars \{ all@vars equ all@vars, \}
all@vars equ all@vars name
forward
local ..var,..tmp
..var def val
match =?, val \{ ..tmp equ \}
match any =?, val \{ ..tmp equ \}
match any (=?), val \{ ..tmp equ \}
match =label, def \{ ..tmp equ \}
match tmp : value, ..tmp : val
\{ tmp: end virtual
initlocal@proc ..var,def value
virtual at tmp\}
common
match first rest, ..var, \{ name equ first \} }
struc label type { label . type }
macro initlocal@proc name,def
{ virtual at name
def
size@initlocal = $ - name
end virtual
position@initlocal = 0
while size@initlocal > position@initlocal
virtual at name
def
if size@initlocal - position@initlocal < 2
current@initlocal = 1
load byte@initlocal byte from name+position@initlocal
else if size@initlocal - position@initlocal < 4
current@initlocal = 2
load word@initlocal word from name+position@initlocal
else
current@initlocal = 4
load dword@initlocal dword from name+position@initlocal
end if
end virtual
if current@initlocal = 1
mov byte [name+position@initlocal],byte@initlocal
else if current@initlocal = 2
mov word [name+position@initlocal],word@initlocal
else
mov dword [name+position@initlocal],dword@initlocal
end if
position@initlocal = position@initlocal + current@initlocal
end while }
macro endp
{ purge ret,locals,endl
finish@proc
purge finish@proc
restore regs@proc
match all,args@proc \{ restore all \}
restore args@proc
match all,all@vars \{ restore all \} }
macro local [var]
{ common
locals
forward done@local equ
match varname[count]:vartype, var
\{ match =BYTE, vartype \\{ varname rb count
restore done@local \\}
match =WORD, vartype \\{ varname rw count
restore done@local \\}
match =DWORD, vartype \\{ varname rd count
restore done@local \\}
match =PWORD, vartype \\{ varname rp count
restore done@local \\}
match =QWORD, vartype \\{ varname rq count
restore done@local \\}
match =TBYTE, vartype \\{ varname rt count
restore done@local \\}
match =DQWORD, vartype \\{ label varname dqword
rq count*2
restore done@local \\}
match =QQWORD, vartype \\{ label varname qqword
rq count*4
restore done@local \\}
match =XWORD, vartype \\{ label varname xword
rq count*2
restore done@local \\}
match =YWORD, vartype \\{ label varname yword
rq count*4
restore done@local \\}
match , done@local \\{ virtual
varname vartype
end virtual
rb count*sizeof.\#vartype
restore done@local \\} \}
match :varname:vartype, done@local:var
\{ match =BYTE, vartype \\{ varname db ?
restore done@local \\}
match =WORD, vartype \\{ varname dw ?
restore done@local \\}
match =DWORD, vartype \\{ varname dd ?
restore done@local \\}
match =PWORD, vartype \\{ varname dp ?
restore done@local \\}
match =QWORD, vartype \\{ varname dq ?
restore done@local \\}
match =TBYTE, vartype \\{ varname dt ?
restore done@local \\}
match =DQWORD, vartype \\{ label varname dqword
dq ?,?
restore done@local \\}
match =QQWORD, vartype \\{ label varname qqword
dq ?,?,?,?
restore done@local \\}
match =XWORD, vartype \\{ label varname xword
dq ?,?
restore done@local \\}
match =YWORD, vartype \\{ label varname yword
dq ?,?,?,?
restore done@local \\}
match , done@local \\{ varname vartype
restore done@local \\} \}
match ,done@local
\{ var
restore done@local \}
common
endl }

View file

@ -0,0 +1,618 @@
; Macroinstructions for defining and calling procedures (x64 version)
macro invoke proc,[arg]
{ common fastcall [proc],arg }
macro fastcall proc,[arg]
{ common local stackspace,argscount,counter
if argscount < 4
stackspace = 4*8
else if argscount and 1
stackspace = (argscount+1)*8
else
stackspace = argscount*8
end if
counter = 0
if stackspace
if defined current@frame
if current@frame<stackspace
current@frame = stackspace
end if
else
if stackspace
sub rsp,stackspace
end if
end if
end if
forward
counter = counter + 1
define type@param
define definition@param arg
match =float value,definition@param
\{ define definition@param value
define type@param float \}
match =addr value,definition@param
\{ define definition@param value
define type@param addr \}
match any=,any,definition@param
\{ \local ..string,..continue
jmp ..continue
align sizeof.TCHAR
..string TCHAR definition@param,0
..continue:
define definition@param ..string
define type@param addr \}
match any,definition@param
\{ match \`any,any
\\{ \\local ..string,..continue
jmp ..continue
align sizeof.TCHAR
..string TCHAR definition@param,0
..continue:
define definition@param ..string
define type@param addr \\} \}
match param,definition@param
\{ local opcode,origin
size@param = 0
if param eqtype 0 | param eqtype 0f | type@param eq addr
size@param = 8
else if param eqtype byte 0 | param eqtype byte 0f
match prefix value,definition@param
\\{ if prefix eq qword
size@param = 8
else if prefix eq dword
size@param = 4
else if prefix eq word
size@param = 2
else if prefix eq byte
size@param = 1
end if \\}
else if ~ param in <xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8,xmm9,xmm10,xmm11,xmm12,xmm13,xmm14,xmm15>
virtual
origin = $
inc param
load opcode byte from origin
if opcode = 67h | ( opcode > 40h & opcode < 48h )
load opcode byte from origin+1
end if
if opcode and 0F8h = 48h
size@param = 8
else if opcode = 66h
size@param = 2
else if opcode = 0FFh
size@param = 4
else
size@param = 1
end if
end virtual
end if
if counter = 1
if type@param eq float
if ~ param eq xmm0
if size@param = 4
if param eqtype byte 0 | param eqtype byte 0f
mov eax,param
movd xmm0,eax
else
movd xmm0,param
end if
else
if param eqtype 0 | param eqtype 0f | param eqtype byte 0 | param eqtype byte 0f
mov rax,param
movq xmm0,rax
else
movq xmm0,param
end if
end if
end if
if vararg@fastcall & ~ param eq rcx
movq rcx,xmm0
end if
else if type@param eq addr
if ~ param eq rcx
lea rcx,[param]
end if
else if size@param = 8
if ~ param eq rcx
mov rcx,param
end if
else if size@param = 4
if ~ param eq ecx
mov ecx,param
end if
else if size@param = 2
if ~ param eq cx
mov cx,param
end if
else if size@param = 1
if ~ param eq cl
mov cl,param
end if
end if
else if counter = 2
if type@param eq float
if ~ param eq xmm1
if size@param = 4
if param eqtype byte 0 | param eqtype byte 0f
mov eax,param
movd xmm1,eax
else
movd xmm1,param
end if
else
if param eqtype 0 | param eqtype 0f | param eqtype byte 0 | param eqtype byte 0f
mov rax,param
movq xmm1,rax
else
movq xmm1,param
end if
end if
end if
if vararg@fastcall & ~ param eq rdx
movq rdx,xmm1
end if
else if type@param eq addr
if ~ param eq rdx
lea rdx,[param]
end if
else if size@param = 8
if ~ param eq rdx
mov rdx,param
end if
else if size@param = 4
if ~ param eq edx
mov edx,param
end if
else if size@param = 2
if ~ param eq dx
mov dx,param
end if
else if size@param = 1
if ~ param eq dl
mov dl,param
end if
end if
else if counter = 3
if type@param eq float
if ~ param eq xmm2
if size@param = 4
if param eqtype byte 0 | param eqtype byte 0f
mov eax,param
movd xmm2,eax
else
movd xmm2,param
end if
else
if param eqtype 0 | param eqtype 0f | param eqtype byte 0 | param eqtype byte 0f
mov rax,param
movq xmm2,rax
else
movq xmm2,param
end if
end if
end if
if vararg@fastcall & ~ param eq r8
movq r8,xmm2
end if
else if type@param eq addr
if ~ param eq r8
lea r8,[param]
end if
else if size@param = 8
if ~ param eq r8
mov r8,param
end if
else if size@param = 4
if ~ param eq r8d
mov r8d,param
end if
else if size@param = 2
if ~ param eq r8w
mov r8w,param
end if
else if size@param = 1
if ~ param eq r8b
mov r8b,param
end if
end if
else if counter = 4
if type@param eq float
if ~ param eq xmm3
if size@param = 4
if param eqtype byte 0 | param eqtype byte 0f
mov eax,param
movd xmm3,eax
else
movd xmm3,param
end if
else
if param eqtype 0 | param eqtype 0f | param eqtype byte 0 | param eqtype byte 0f
mov rax,param
movq xmm3,rax
else
movq xmm3,param
end if
end if
end if
if vararg@fastcall & ~ param eq r9
movq r9,xmm3
end if
else if type@param eq addr
if ~ param eq r9
lea r9,[param]
end if
else if size@param = 8
if ~ param eq r9
mov r9,param
end if
else if size@param = 4
if ~ param eq r9d
mov r9d,param
end if
else if size@param = 2
if ~ param eq r9w
mov r9w,param
end if
else if size@param = 1
if ~ param eq r9b
mov r9b,param
end if
end if
else
if type@param eq addr
lea rax,[param]
mov [rsp+(counter-1)*8],rax
else if param eqtype [0] | param eqtype byte [0]
if size@param = 8
mov rax,param
mov [rsp+(counter-1)*8],rax
else if size@param = 4
mov eax,param
mov [rsp+(counter-1)*8],eax
else if size@param = 2
mov ax,param
mov [rsp+(counter-1)*8],ax
else
mov al,param
mov [rsp+(counter-1)*8],al
end if
else if size@param = 8
virtual
origin = $
mov rax,param
load opcode byte from origin+1
end virtual
if opcode = 0B8h
mov rax,param
mov [rsp+(counter-1)*8],rax
else
mov qword [rsp+(counter-1)*8],param
end if
else if param in <xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8,xmm9,xmm10,xmm11,xmm12,xmm13,xmm14,xmm15>
movq [rsp+(counter-1)*8],param
else
mov [rsp+(counter-1)*8],param
end if
end if \}
common
argscount = counter
call proc
if stackspace & ~defined current@frame
add rsp,stackspace
end if }
macro proc [args]
{ common
match name params, args>
\{ define@proc name,<params \} }
prologue@proc equ prologuedef
macro prologuedef procname,flag,parmbytes,localbytes,reglist
{ local loc,fill,counter
loc = (localbytes+15) and (not 15)
parmbase@proc equ rbp+16
localbase@proc equ rbp-loc
push rbp
mov rbp,rsp
if loc+fill
sub rsp,loc+fill
end if
counter = 0
irps reg, reglist \{ push reg
counter = counter+1 \}
fill = 8*(counter and 1) }
epilogue@proc equ epiloguedef
macro epiloguedef procname,flag,parmbytes,localbytes,reglist
{ irps reg, reglist \{ reverse pop reg \}
leave
retn }
close@proc equ
macro define@proc name,statement
{ local params,flag,regs,parmbytes,localbytes,current
if used name
name:
match =stdcall args, statement \{ params equ args
flag = 11b \}
match =stdcall, statement \{ params equ
flag = 11b \}
match =c args, statement \{ params equ args
flag = 10001b \}
match =c, statement \{ params equ
flag = 10001b \}
match =params, params \{ params equ statement
flag = 10000b \}
match =uses reglist=,args, params \{ regs equ reglist
params equ args \}
match =regs =uses reglist, regs params \{ regs equ reglist
params equ \}
match =regs, regs \{ regs equ \}
match prologue:reglist, prologue@proc:<regs> \{ prologue name,flag,parmbytes,localbytes,reglist \}
virtual at parmbase@proc
match =,args, params \{ defargs@proc args \}
match =args@proc args, args@proc params \{ defargs@proc args \}
parmbytes = $-(parmbase@proc)
end virtual
name # % = parmbytes/8
all@vars equ
current = 0
macro locals
\{ virtual at localbase@proc+current
macro label def \\{ match . type,def> \\\{ deflocal@proc .,label,<type \\\} \\}
struc db [val] \\{ \common deflocal@proc .,db,val \\}
struc du [val] \\{ \common deflocal@proc .,du,val \\}
struc dw [val] \\{ \common deflocal@proc .,dw,val \\}
struc dp [val] \\{ \common deflocal@proc .,dp,val \\}
struc dd [val] \\{ \common deflocal@proc .,dd,val \\}
struc dt [val] \\{ \common deflocal@proc .,dt,val \\}
struc dq [val] \\{ \common deflocal@proc .,dq,val \\}
struc rb cnt \\{ deflocal@proc .,rb cnt, \\}
struc rw cnt \\{ deflocal@proc .,rw cnt, \\}
struc rp cnt \\{ deflocal@proc .,rp cnt, \\}
struc rd cnt \\{ deflocal@proc .,rd cnt, \\}
struc rt cnt \\{ deflocal@proc .,rt cnt, \\}
struc rq cnt \\{ deflocal@proc .,rq cnt, \\} \}
macro endl
\{ purge label
restruc db,du,dw,dp,dd,dt,dq
restruc rb,rw,rp,rd,rt,rq
current = $-(localbase@proc)
end virtual \}
macro ret operand
\{ match any, operand \\{ retn operand \\}
match , operand \\{ match epilogue:reglist, epilogue@proc:<regs> \\\{ epilogue name,flag,parmbytes,localbytes,reglist \\\} \\} \}
macro finish@proc
\{ localbytes = current
match close:reglist, close@proc:<regs> \\{ close name,flag,parmbytes,localbytes,reglist \\}
end if \} }
macro defargs@proc [arg]
{ common
if ~ arg eq
forward
local ..arg,current@arg
match argname:type, arg
\{ current@arg equ argname
label ..arg type
argname equ ..arg
if qqword eq type
dq ?,?,?,?
else if dqword eq type
dq ?,?
else if tbyte eq type
dq ?,?
else
dq ?
end if \}
match =current@arg,current@arg
\{ current@arg equ arg
arg equ ..arg
..arg dq ? \}
common
args@proc equ current@arg
forward
restore current@arg
common
end if }
macro deflocal@proc name,def,[val] { name def val }
macro deflocal@proc name,def,[val]
{ common
match vars, all@vars \{ all@vars equ all@vars, \}
all@vars equ all@vars name
forward
local ..var,..tmp
..var def val
match =?, val \{ ..tmp equ \}
match any =?, val \{ ..tmp equ \}
match any (=?), val \{ ..tmp equ \}
match =label, def \{ ..tmp equ \}
match tmp : value, ..tmp : val
\{ tmp: end virtual
initlocal@proc ..var,def value
virtual at tmp\}
common
match first rest, ..var, \{ name equ first \} }
struc label type { label . type }
macro initlocal@proc name,def
{ virtual at name
def
size@initlocal = $ - name
end virtual
position@initlocal = 0
while size@initlocal > position@initlocal
virtual at name
def
if size@initlocal - position@initlocal < 2
current@initlocal = 1
load byte@initlocal byte from name+position@initlocal
else if size@initlocal - position@initlocal < 4
current@initlocal = 2
load word@initlocal word from name+position@initlocal
else if size@initlocal - position@initlocal < 8
current@initlocal = 4
load dword@initlocal dword from name+position@initlocal
else
load qword@initlocal qword from name+position@initlocal
if ( qword@initlocal > 0 & qword@initlocal < 80000000h ) | ( qword@initlocal < 0 & qword@initlocal >= -80000000h )
current@initlocal = 8
else
current@initlocal = 4
dword@initlocal = qword@initlocal and 0FFFFFFFFh
end if
end if
end virtual
if current@initlocal = 1
mov byte [name+position@initlocal],byte@initlocal
else if current@initlocal = 2
mov word [name+position@initlocal],word@initlocal
else if current@initlocal = 4
mov dword [name+position@initlocal],dword@initlocal
else
mov qword [name+position@initlocal],qword@initlocal
end if
position@initlocal = position@initlocal + current@initlocal
end while }
macro endp
{ purge ret,locals,endl
finish@proc
purge finish@proc
restore regs@proc
match all,args@proc \{ restore all \}
restore args@proc
match all,all@vars \{ restore all \} }
macro local [var]
{ common
locals
forward done@local equ
match varname[count]:vartype, var
\{ match =BYTE, vartype \\{ varname rb count
restore done@local \\}
match =WORD, vartype \\{ varname rw count
restore done@local \\}
match =DWORD, vartype \\{ varname rd count
restore done@local \\}
match =PWORD, vartype \\{ varname rp count
restore done@local \\}
match =QWORD, vartype \\{ varname rq count
restore done@local \\}
match =TBYTE, vartype \\{ varname rt count
restore done@local \\}
match =DQWORD, vartype \\{ label varname dqword
rq count*2
restore done@local \\}
match =QQWORD, vartype \\{ label varname qqword
rq count*4
restore done@local \\}
match =XWORD, vartype \\{ label varname xword
rq count*2
restore done@local \\}
match =YWORD, vartype \\{ label varname yword
rq count*4
restore done@local \\}
match , done@local \\{ virtual
varname vartype
end virtual
rb count*sizeof.\#vartype
restore done@local \\} \}
match :varname:vartype, done@local:var
\{ match =BYTE, vartype \\{ varname db ?
restore done@local \\}
match =WORD, vartype \\{ varname dw ?
restore done@local \\}
match =DWORD, vartype \\{ varname dd ?
restore done@local \\}
match =PWORD, vartype \\{ varname dp ?
restore done@local \\}
match =QWORD, vartype \\{ varname dq ?
restore done@local \\}
match =TBYTE, vartype \\{ varname dt ?
restore done@local \\}
match =DQWORD, vartype \\{ label varname dqword
dq ?,?
restore done@local \\}
match =QQWORD, vartype \\{ label varname qqword
dq ?,?,?,?
restore done@local \\}
match =XWORD, vartype \\{ label varname xword
dq ?,?
restore done@local \\}
match =YWORD, vartype \\{ label varname yword
dq ?,?,?,?
restore done@local \\}
match , done@local \\{ varname vartype
restore done@local \\} \}
match ,done@local
\{ var
restore done@local \}
common
endl }
macro frame
{ local size,current
if size
sub rsp,size
end if
current = 0
current@frame equ current
size@frame equ size }
macro endf
{ size@frame = current@frame
if size@frame
add rsp,size@frame
end if
restore size@frame,current@frame }
macro static_rsp_prologue procname,flag,parmbytes,localbytes,reglist
{ local counter,loc,frame,current
counter = 0
irps reg, reglist \{ push reg
counter = counter+1 \}
loc = (localbytes+7) and (not 7)
if frame & (counter+loc shr 3+1) and 1
loc = loc + 8
end if
framebytes@proc equ frame+loc
if framebytes@proc
sub rsp,framebytes@proc
end if
localbase@proc equ rsp+frame
regsbase@proc equ rsp+frame+loc
parmbase@proc equ rsp+frame+loc+counter*8+8
current = 0
current@frame equ current
size@frame equ frame }
macro static_rsp_epilogue procname,flag,parmbytes,localbytes,reglist
{ if framebytes@proc
add rsp,framebytes@proc
end if
irps reg, reglist \{ reverse pop reg \}
retn }
macro static_rsp_close procname,flag,parmbytes,localbytes,reglist
{ size@frame = current@frame
restore size@frame,current@frame }
macro stdcall args& { fastcall args }
macro cinvoke proc,[arg]
{ common ccall [proc],arg }
macro ccall proc,[arg]
{ common vararg@fastcall = 1
fastcall proc,arg
vararg@fastcall = 0 }
vararg@fastcall = 0

View file

@ -0,0 +1,334 @@
; Macroinstructions for making resource section
macro directory [type,label]
{ common
local max,count
count = 0
max = 0
forward
count = count + 1
if type > max
max = type
end if
common
root@resource dd 0,%t,0,count shl 16
repeat max
forward
if % = type
dd type,80000000h+label-root@resource
end if
common
end repeat }
macro resource dir,[id,lang,label]
{ common
dir:
local min,max,count,current
forward
min = id
max = id
common
count = 0
forward
count = count + 1
if id < min
min = id
else if id > max
max = id
end if
common
dd 0,%t,0,count shl 16
repeat max-min+1
current = $
forward
if min+%-1 = id
if current = $
dd id,80000000h+label#.directory-root@resource
end if
end if
common
end repeat
repeat max-min+1
current = $
forward
if min+%-1 = id
if current = $
label#.directory dd 0,%t,0,10000h,lang,label-root@resource
count = 1
else
dd lang,label-root@resource
count = count + 1
end if
end if
label#.resid = id
common
local x,y,z,v1,v2
if count > 1
store word count at current+0Eh
x = count shr 1
while x > 0
y = x
while y < count
z = y
while z-x >= 0
load v1 dword from current+10h+z*8
load v2 dword from current+10h+(z-x)*8
if v1<v2
store dword v1 at current+10h+(z-x)*8
store dword v2 at current+10h+z*8
load v1 dword from current+10h+z*8+4
load v2 dword from current+10h+(z-x)*8+4
store dword v1 at current+10h+(z-x)*8+4
store dword v2 at current+10h+z*8+4
else
break
end if
z = z-x
end while
y = y+1
end while
x = x shr 1
end while
end if
end repeat }
macro bitmap label,bitmap_file
{ local data,size
label dd RVA data,size,0,0
data file bitmap_file:0Eh
size = $ - data
align 4 }
macro icon group,[label,icon_file]
{ common local count
count = 0
forward local data,size,position
label dd RVA data,size,0,0
virtual at 0
file icon_file:6,16
load size dword from 8
load position dword from 12
end virtual
data file icon_file:position,size
count = count+1
common local header
align 4
group dd RVA header,6+count*14,0,0
header dw 0,1,count
forward
file icon_file:6,12
dw label#.resid
common
align 4 }
macro cursor group,[label,cursor_file]
{ common local count
count = 0
forward local data,width,height,size,position
label dd RVA data,size+4,0,0
virtual at 0
file cursor_file:6,16
load width byte from 0
load height byte from 1
load size dword from 8
load position dword from 12
end virtual
data file cursor_file:10,4
file cursor_file:position,size
count = count+1
common local header
align 4
group dd RVA header,6+count*14,0,0
header dw 0,2,count
forward
dw width,height,1,0
dd size+4
dw label#.resid
common
align 4 }
macro menu label
{ local data,size
label dd RVA data,size,0,0
data dw 1,4,0,0
menu_size equ size = $ - data
menu_level = 1 }
macro menuitem string,id,resinfo,status,type
{ dd MFT_STRING or type+0,status+0,id
dw resinfo+0
du string,0
align 4
if ~ resinfo eq
if resinfo and MFR_END
menu_level = menu_level - 1
end if
if resinfo and MFR_POPUP
menu_level = menu_level + 1
dd 0
end if
end if
if menu_level = 0
menu_size
end if }
macro menuseparator resinfo
{ dd MFT_SEPARATOR,0,0
dw resinfo+0,0
if ~ resinfo eq
if resinfo and MFR_END
menu_level = menu_level - 1
end if
end if
if menu_level = 0
menu_size
end if }
macro dialog label,title,x,y,cx,cy,style,exstyle,menu,fontname,fontsize
{ local data,size,items
label dd RVA data,size,0,0
data dd style or DS_SETFONT,exstyle +0
dw items,x,y,cx,cy
if menu+0 <> 0
dw 0FFFFh
end if
du menu+0,0,title,0
if fontname eq
du 8,'MS Sans Serif',0
else
du fontsize+0,fontname,0
end if
align 4
dialog_size equ size = $ - data
dialog_items equ items = dialog_items_counter
dialog_items_counter = 0 }
macro dialogitem class,title,id,x,y,cx,cy,style,exstyle
{ dd style or WS_CHILD,exstyle +0
dw x,y,cx,cy,id
if class eq 'BUTTON'
dw 0FFFFh,80h
else if class eq 'EDIT'
dw 0FFFFh,81h
else if class eq 'STATIC'
dw 0FFFFh,82h
else if class eq 'LISTBOX'
dw 0FFFFh,83h
else if class eq 'SCROLLBAR'
dw 0FFFFh,84h
else if class eq 'COMBOBOX'
dw 0FFFFh,85h
else
du class,0
end if
if title eqtype 0
dw 0FFFFh,title
else
du title,0
end if
dw 0
align 4
dialog_items_counter = dialog_items_counter + 1 }
macro enddialog
{ dialog_items
dialog_size }
macro accelerator label,[fvirt,key,cmd]
{ common
local data,size
label dd RVA data,size,0,0
data:
accel_count = 0
forward
accel_count = accel_count + 1
common
size = accel_count * 8
forward
accel_count = accel_count - 1
if accel_count = 0
dw fvirt or 80h,key
else
dw fvirt,key
end if
dd cmd }
macro versioninfo label,fileos,filetype,filesubtype,lang,cp,[name,value]
{ common
local data,size,vivalue,visize
label dd RVA data,size,0,0
data dw size,visize,0
du 'VS_VERSION_INFO',0,0
vivalue dd 0FEEF04BDh,00010000h
local version,count,shift,char,filever,productver
filever = 0
productver = 0
forward
if name eq 'FileVersion' | name eq 'ProductVersion'
virtual at 0
db value
count = $
version = 0
shift = 16
repeat count
load char from %-1
if char='.'
if shift mod 32
shift = shift-16
else
shift = shift+32+16
end if
else
version = (version and not (0FFFFh shl shift)) or ((version shr shift and 0FFFFh)*10+char-'0') shl shift
end if
end repeat
end virtual
if name eq 'FileVersion'
filever = version
else if name eq 'ProductVersion'
productver = version
end if
end if
common
dq filever,productver
dd 0,0,fileos,filetype+0,filesubtype+0,0,0
visize = $ - vivalue
local sfi_data,sfi_size
sfi_data dd sfi_size
du 1,'StringFileInfo',0
local str_data,str_size
str_data dd str_size
du 1,'040904E4',0
forward
local vs_data,vs_size,value_data,value_size
align 4
vs_data dw vs_size,value_size/2
du 1,name,0
align 4
value_data du value,0
value_size = $ - value_data
vs_size = $ - vs_data
common
align 4
str_size = $ - str_data
sfi_size = $ - sfi_data
local vfi_data,vfi_size,var_data,var_size
vfi_data dd vfi_size
du 1,'VarFileInfo',0,0
var_data dw var_size,4
du 0,'Translation',0,0
dw lang,cp+0
var_size = $ - var_data
vfi_size = $ - vfi_data
size = $ - data }
macro resdata label
{ local data,size
label dd RVA data,size,0,0
data = $
ressize equ size = $ - data }
macro endres
{ ressize
align 4 }

View file

@ -0,0 +1,221 @@
; Macroinstructions for defining data structures
macro struct name
{ virtual at 0
define @struct
field@struct equ name
match child parent, name \{ restore field@struct
field@struct equ child,fields@\#parent \}
sub@struct equ
struc db [val] \{ \common define field@struct .,db,<val> \}
struc dw [val] \{ \common define field@struct .,dw,<val> \}
struc du [val] \{ \common define field@struct .,du,<val> \}
struc dd [val] \{ \common define field@struct .,dd,<val> \}
struc dp [val] \{ \common define field@struct .,dp,<val> \}
struc dq [val] \{ \common define field@struct .,dq,<val> \}
struc dt [val] \{ \common define field@struct .,dt,<val> \}
struc rb count \{ define field@struct .,db,count dup (?) \}
struc rw count \{ define field@struct .,dw,count dup (?) \}
struc rd count \{ define field@struct .,dd,count dup (?) \}
struc rp count \{ define field@struct .,dp,count dup (?) \}
struc rq count \{ define field@struct .,dq,count dup (?) \}
struc rt count \{ define field@struct .,dt,count dup (?) \}
macro db [val] \{ \common \local anonymous
define field@struct anonymous,db,<val> \}
macro dw [val] \{ \common \local anonymous
define field@struct anonymous,dw,<val> \}
macro du [val] \{ \common \local anonymous
define field@struct anonymous,du,<val> \}
macro dd [val] \{ \common \local anonymous
define field@struct anonymous,dd,<val> \}
macro dp [val] \{ \common \local anonymous
define field@struct anonymous,dp,<val> \}
macro dq [val] \{ \common \local anonymous
define field@struct anonymous,dq,<val> \}
macro dt [val] \{ \common \local anonymous
define field@struct anonymous,dt,<val> \}
macro rb count \{ \local anonymous
define field@struct anonymous,db,count dup (?) \}
macro rw count \{ \local anonymous
define field@struct anonymous,dw,count dup (?) \}
macro rd count \{ \local anonymous
define field@struct anonymous,dd,count dup (?) \}
macro rp count \{ \local anonymous
define field@struct anonymous,dp,count dup (?) \}
macro rq count \{ \local anonymous
define field@struct anonymous,dq,count dup (?) \}
macro rt count \{ \local anonymous
define field@struct anonymous,dt,count dup (?) \}
macro union \{ field@struct equ ,union,<
sub@struct equ union \}
macro struct \{ field@struct equ ,substruct,<
sub@struct equ substruct \} }
macro ends
{ match , sub@struct \{ restruc db,dw,du,dd,dp,dq,dt
restruc rb,rw,rd,rp,rq,rt
purge db,dw,du,dd,dp,dq,dt
purge rb,rw,rd,rp,rq,rt
purge union,struct
irpv fields,field@struct \\{ restore field@struct
\\common define fields@struct fields \\}
match name tail,fields@struct, \\{ if $
display 'Error: definition of ',\\`name,' contains illegal instructions.',0Dh,0Ah
err
end if \\}
match name=,fields,fields@struct \\{ restore @struct
make@struct name,fields
define fields@\\#name fields \\}
end virtual \}
match any, sub@struct \{ tmp@struct equ field@struct
restore field@struct
field@struct equ tmp@struct> \}
restore sub@struct }
macro make@struct name,[field,type,def]
{ common
local define
define equ name
forward
local sub
match , field \{ make@substruct type,name,sub def
define equ define,.,sub, \}
match any, field \{ define equ define,.#field,type,<def> \}
common
match fields, define \{ define@struct fields \} }
macro define@struct name,[field,type,def]
{ common
virtual
db `name
load initial@struct byte from 0
if initial@struct = '.'
display 'Error: name of structure should not begin with a dot.',0Dh,0Ah
err
end if
end virtual
local list
list equ
forward
if ~ field eq .
name#field type def
sizeof.#name#field = $ - name#field
else
label name#.#type
rb sizeof.#type
end if
local value
match any, list \{ list equ list, \}
list equ list <value>
common
sizeof.#name = $
restruc name
match values, list \{
struc name value \\{ \\local \\..base
match , @struct \\\{ define field@struct .,name,<values> \\\}
match no, @struct \\\{ label \\..base
forward
match , value \\\\{ field type def \\\\}
match any, value \\\\{ field type value
if ~ field eq .
rb sizeof.#name#field - ($-field)
end if \\\\}
common label . at \\..base \\\}
\\}
macro name value \\{
match , @struct \\\{ \\\local anonymous
define field@struct anonymous,name,<values> \\\}
match no, @struct \\\{
forward
match , value \\\\{ type def \\\\}
match any, value \\\\{ \\\\local ..field
..field = $
type value
if ~ field eq .
rb sizeof.#name#field - ($-..field)
end if \\\\}
common \\\} \\} \} }
macro enable@substruct
{ macro make@substruct substruct,parent,name,[field,type,def]
\{ \common
\local define
define equ parent,name
\forward
\local sub
match , field \\{ match any, type \\\{ enable@substruct
make@substruct type,parent,sub def
purge make@substruct
define equ define,.,sub, \\\} \\}
match any, field \\{ define equ define,.\#field,type,<def> \\}
\common
match fields, define \\{ define@\#substruct fields \\} \} }
enable@substruct
macro define@union parent,name,[field,type,def]
{ common
virtual at parent#.#name
forward
if ~ field eq .
virtual at parent#.#name
parent#field type def
sizeof.#parent#field = $ - parent#field
end virtual
if sizeof.#parent#field > $ - parent#.#name
rb sizeof.#parent#field - ($ - parent#.#name)
end if
else
virtual at parent#.#name
label parent#.#type
type def
end virtual
label name#.#type at parent#.#name
if sizeof.#type > $ - parent#.#name
rb sizeof.#type - ($ - parent#.#name)
end if
end if
common
sizeof.#name = $ - parent#.#name
end virtual
struc name [value] \{ \common
label .\#name
last@union equ
forward
match any, last@union \\{ virtual at .\#name
field type def
end virtual \\}
match , last@union \\{ match , value \\\{ field type def \\\}
match any, value \\\{ field type value \\\} \\}
last@union equ field
common rb sizeof.#name - ($ - .\#name) \}
macro name [value] \{ \common \local ..anonymous
..anonymous name value \} }
macro define@substruct parent,name,[field,type,def]
{ common
virtual at parent#.#name
forward
local value
if ~ field eq .
parent#field type def
sizeof.#parent#field = $ - parent#field
else
label parent#.#type
rb sizeof.#type
end if
common
sizeof.#name = $ - parent#.#name
end virtual
struc name value \{
label .\#name
forward
match , value \\{ field type def \\}
match any, value \\{ field type value
if ~ field eq .
rb sizeof.#parent#field - ($-field)
end if \\}
common \}
macro name value \{ \local ..anonymous
..anonymous name \} }

View file

View file

@ -0,0 +1,340 @@
; ADVAPI32 API calls parameters' count
AbortSystemShutdown% = 1
AccessCheck% = 8
AccessCheckAndAuditAlarm% = 11
AccessCheckByType% = 11
AccessCheckByTypeAndAuditAlarm% = 16
AccessCheckByTypeResultList% = 11
AccessCheckByTypeResultListAndAuditAlarm% = 16
AddAccessAllowedAce% = 4
AddAccessAllowedAceEx% = 5
AddAccessAllowedObjectAce% = 7
AddAccessDeniedAce% = 4
AddAccessDeniedAceEx% = 5
AddAccessDeniedObjectAce% = 7
AddAce% = 5
AddAuditAccessAce% = 6
AddAuditAccessAceEx% = 7
AddAuditAccessObjectAce% = 9
AdjustTokenGroups% = 6
AdjustTokenPrivileges% = 6
AllocateAndInitializeSid% = 11
AllocateLocallyUniqueId% = 1
AreAllAccessesGranted% = 2
AreAnyAccessesGranted% = 2
BackupEventLog% = 2
BuildExplicitAccessWithName% = 5
BuildImpersonateExplicitAccessWithName% = 6
BuildImpersonateTrustee% = 2
BuildSecurityDescriptor% = 9
BuildTrusteeWithName% = 2
BuildTrusteeWithSid% = 2
CancelOverlappedAccess% = 1
ChangeServiceConfig2% = 3
ChangeServiceConfig% = 11
ClearEventLog% = 2
CloseEventLog% = 1
CloseRaw% = 1
CloseServiceHandle% = 1
ControlService% = 3
ConvertAccessToSecurityDescriptor% = 5
ConvertSecurityDescriptorToAccess% = 7
ConvertSecurityDescriptorToAccessNamed% = 7
ConvertToAutoInheritPrivateObjectSecurity% = 6
CopySid% = 3
CreatePrivateObjectSecurity% = 6
CreatePrivateObjectSecurityEx% = 8
CreateProcessAsUser% = 11
CreateRestrictedToken% = 9
CreateService% = 13
CryptAcquireContext% = 5
CryptContextAddRef% = 3
CryptCreateHash% = 5
CryptDecrypt% = 6
CryptDeriveKey% = 5
CryptDestroyHash% = 1
CryptDestroyKey% = 1
CryptDuplicateHash% = 4
CryptDuplicateKey% = 4
CryptEncrypt% = 7
CryptEnumProviderTypes% = 6
CryptEnumProviders% = 6
CryptExportKey% = 6
CryptGenKey% = 4
CryptGenRandom% = 3
CryptGetDefaultProvider% = 5
CryptGetHashParam% = 5
CryptGetKeyParam% = 5
CryptGetProvParam% = 5
CryptGetUserKey% = 3
CryptHashData% = 4
CryptHashSessionKey% = 3
CryptImportKey% = 6
CryptReleaseContext% = 2
CryptSetHashParam% = 4
CryptSetKeyParam% = 4
CryptSetProvParam% = 4
CryptSetProvider% = 2
CryptSetProviderEx% = 4
CryptSignHash% = 6
CryptVerifySignature% = 6
DecryptFile% = 2
DeleteAce% = 2
DeleteService% = 1
DeregisterEventSource% = 1
DestroyPrivateObjectSecurity% = 1
DuplicateToken% = 3
DuplicateTokenEx% = 6
ElfBackupEventLogFile% = 2
ElfChangeNotify% = 2
ElfClearEventLogFile% = 2
ElfCloseEventLog% = 1
ElfDeregisterEventSource% = 1
ElfNumberOfRecords% = 2
ElfOldestRecord% = 2
ElfOpenBackupEventLog% = 3
ElfOpenEventLog% = 3
ElfReadEventLog% = 7
ElfRegisterEventSource% = 3
ElfReportEvent% = 12
EncryptFile% = 1
EnumDependentServices% = 6
EnumServicesStatus% = 8
EqualPrefixSid% = 2
EqualSid% = 2
FindFirstFreeAce% = 2
FreeSid% = 1
GetAccessPermissionsForObject% = 9
GetAce% = 3
GetAclInformation% = 4
GetAuditedPermissionsFromAcl% = 4
GetCurrentHwProfile% = 1
GetEffectiveRightsFromAcl% = 3
GetExplicitEntriesFromAcl% = 3
GetFileSecurity% = 5
GetKernelObjectSecurity% = 5
GetLengthSid% = 1
GetMultipleTrustee% = 1
GetMultipleTrusteeOperation% = 1
GetNamedSecurityInfo% = 8
GetNamedSecurityInfoEx% = 9
GetNumberOfEventLogRecords% = 2
GetOldestEventLogRecord% = 2
GetOverlappedAccessResults% = 4
GetPrivateObjectSecurity% = 5
GetSecurityDescriptorControl% = 3
GetSecurityDescriptorDacl% = 4
GetSecurityDescriptorGroup% = 3
GetSecurityDescriptorLength% = 1
GetSecurityDescriptorOwner% = 3
GetSecurityDescriptorSacl% = 4
GetSecurityInfo% = 8
GetSecurityInfoEx% = 9
GetServiceDisplayName% = 4
GetServiceKeyName% = 4
GetSidLengthRequired% = 1
GetSidSubAuthority% = 2
GetSidSubAuthorityCount% = 1
GetTokenInformation% = 5
GetTrusteeName% = 1
GetTrusteeType% = 1
GetUserName% = 2
I_ScSetServiceBits% = 5
ImpersonateLoggedOnUser% = 1
ImpersonateNamedPipeClient% = 1
ImpersonateSelf% = 1
InitializeAcl% = 3
InitializeSecurityDescriptor% = 2
InitializeSid% = 3
InitiateSystemShutdown% = 5
IsTextUnicode% = 3
IsTokenRestricted% = 1
IsValidAcl% = 1
IsValidSecurityDescriptor% = 1
IsValidSid% = 1
LockServiceDatabase% = 1
LogonUser% = 6
LookupAccountName% = 7
LookupAccountSid% = 7
LookupPrivilegeDisplayName% = 5
LookupPrivilegeName% = 4
LookupPrivilegeValue% = 3
LookupSecurityDescriptorParts% = 7
LsaAddAccountRights% = 4
LsaAddPrivilegesToAccount% = 2
LsaClearAuditLog% = 1
LsaClose% = 1
LsaCreateAccount% = 4
LsaCreateSecret% = 4
LsaCreateTrustedDomain% = 4
LsaCreateTrustedDomainEx% = 5
LsaDelete% = 1
LsaDeleteTrustedDomain% = 2
LsaEnumerateAccountRights% = 4
LsaEnumerateAccounts% = 5
LsaEnumerateAccountsWithUserRight% = 4
LsaEnumeratePrivileges% = 5
LsaEnumeratePrivilegesOfAccount% = 2
LsaEnumerateTrustedDomains% = 5
LsaEnumerateTrustedDomainsEx% = 6
LsaFreeMemory% = 1
LsaGetQuotasForAccount% = 2
LsaGetSystemAccessAccount% = 2
LsaGetUserName% = 2
LsaICLookupNames% = 7
LsaICLookupSids% = 7
LsaIGetTrustedDomainAuthInfoBlobs% = 4
LsaISetTrustedDomainAuthInfoBlobs% = 4
LsaLookupNames% = 5
LsaLookupPrivilegeDisplayName% = 4
LsaLookupPrivilegeName% = 3
LsaLookupPrivilegeValue% = 3
LsaLookupSids% = 5
LsaNtStatusToWinError% = 1
LsaOpenAccount% = 4
LsaOpenPolicy% = 4
LsaOpenSecret% = 4
LsaOpenTrustedDomain% = 4
LsaQueryDomainInformationPolicy% = 3
LsaQueryInfoTrustedDomain% = 3
LsaQueryInformationPolicy% = 3
LsaQueryLocalInformationPolicy% = 3
LsaQuerySecret% = 5
LsaQuerySecurityObject% = 3
LsaQueryTrustedDomainInfo% = 4
LsaQueryTrustedDomainInfoByName% = 4
LsaRemoveAccountRights% = 5
LsaRemovePrivilegesFromAccount% = 3
LsaRetrievePrivateData% = 3
LsaSetDomainInformationPolicy% = 3
LsaSetInformationPolicy% = 3
LsaSetInformationTrustedDomain% = 3
LsaSetLocalInformationPolicy% = 3
LsaSetQuotasForAccount% = 2
LsaSetSecret% = 3
LsaSetSecurityObject% = 3
LsaSetSystemAccessAccount% = 2
LsaSetTrustedDomainInfoByName% = 4
LsaSetTrustedDomainInformation% = 4
LsaStorePrivateData% = 3
MakeAbsoluteSD% = 11
MakeSelfRelativeSD% = 3
MapGenericMask% = 2
NotifyBootConfigStatus% = 1
NotifyChangeEventLog% = 2
ObjectCloseAuditAlarm% = 3
ObjectDeleteAuditAlarm% = 3
ObjectOpenAuditAlarm% = 12
ObjectPrivilegeAuditAlarm% = 6
OpenBackupEventLog% = 2
OpenEventLog% = 2
OpenProcessToken% = 3
OpenRaw% = 3
OpenSCManager% = 3
OpenService% = 3
OpenThreadToken% = 4
PrivilegeCheck% = 3
PrivilegedServiceAuditAlarm% = 5
QueryRecoveryAgents% = 3
QueryServiceConfig2% = 5
QueryServiceConfig% = 4
QueryServiceLockStatus% = 4
QueryServiceObjectSecurity% = 5
QueryServiceStatus% = 2
QueryWindows31FilesMigration% = 1
ReadEventLog% = 7
ReadRaw% = 3
RegCloseKey% = 1
RegConnectRegistry% = 3
RegCreateKey% = 3
RegCreateKeyEx% = 9
RegDeleteKey% = 2
RegDeleteValue% = 2
RegEnumKey% = 4
RegEnumKeyEx% = 8
RegEnumValue% = 8
RegFlushKey% = 1
RegGetKeySecurity% = 4
RegLoadKey% = 3
RegNotifyChangeKeyValue% = 5
RegOpenKey% = 3
RegOpenKeyEx% = 5
RegOverridePredefKey% = 2
RegQueryInfoKey% = 12
RegQueryMultipleValues% = 5
RegQueryValue% = 4
RegQueryValueEx% = 6
RegReplaceKey% = 4
RegRestoreKey% = 3
RegSaveKey% = 3
RegSetKeySecurity% = 3
RegSetValue% = 5
RegSetValueEx% = 6
RegUnLoadKey% = 2
RegisterEventSource% = 2
RegisterServiceCtrlHandler% = 2
ReportEvent% = 9
RevertToSelf% = 0
SetAclInformation% = 4
SetEntriesInAccessList% = 6
SetEntriesInAcl% = 4
SetEntriesInAuditList% = 6
SetFileSecurity% = 3
SetKernelObjectSecurity% = 3
SetNamedSecurityInfo% = 7
SetNamedSecurityInfoEx% = 9
SetPrivateObjectSecurity% = 5
SetPrivateObjectSecurityEx% = 6
SetSecurityDescriptorControl% = 3
SetSecurityDescriptorDacl% = 4
SetSecurityDescriptorGroup% = 3
SetSecurityDescriptorOwner% = 3
SetSecurityDescriptorSacl% = 4
SetSecurityInfo% = 7
SetSecurityInfoEx% = 9
SetServiceBits% = 4
SetServiceObjectSecurity% = 3
SetServiceStatus% = 2
SetThreadToken% = 2
SetTokenInformation% = 4
StartService% = 3
StartServiceCtrlDispatcher% = 1
SynchronizeWindows31FilesAndWindowsNTRegistry% = 4
SystemFunction001% = 3
SystemFunction002% = 3
SystemFunction003% = 2
SystemFunction004% = 3
SystemFunction005% = 3
SystemFunction006% = 2
SystemFunction007% = 2
SystemFunction008% = 3
SystemFunction009% = 3
SystemFunction010% = 3
SystemFunction011% = 3
SystemFunction012% = 3
SystemFunction013% = 3
SystemFunction014% = 3
SystemFunction015% = 3
SystemFunction016% = 3
SystemFunction017% = 3
SystemFunction018% = 3
SystemFunction019% = 3
SystemFunction020% = 3
SystemFunction021% = 3
SystemFunction022% = 3
SystemFunction023% = 3
SystemFunction024% = 3
SystemFunction025% = 3
SystemFunction026% = 3
SystemFunction027% = 3
SystemFunction028% = 2
SystemFunction029% = 2
SystemFunction030% = 2
SystemFunction031% = 2
SystemFunction032% = 2
SystemFunction033% = 2
TrusteeAccessToObject% = 6
UnlockServiceDatabase% = 1
WriteRaw% = 3

View file

@ -0,0 +1,69 @@
; COMCTL32 API calls parameters' count
CreateMappedBitmap% = 5
CreatePropertySheetPage% = 1
CreateStatusWindow% = 4
CreateToolbar% = 8
CreateToolbarEx% = 13
CreateUpDownControl% = 12
DestroyPropertySheetPage% = 1
DrawInsert% = 3
DrawStatusText% = 4
FlatSB_EnableScrollBar% = 3
FlatSB_GetScrollInfo% = 3
FlatSB_GetScrollPos% = 2
FlatSB_GetScrollProp% = 3
FlatSB_GetScrollRange% = 4
FlatSB_SetScrollInfo% = 4
FlatSB_SetScrollPos% = 4
FlatSB_SetScrollProp% = 4
FlatSB_SetScrollRange% = 5
FlatSB_ShowScrollBar% = 3
GetEffectiveClientRect% = 3
ImageList_Add% = 3
ImageList_AddIcon% = 2
ImageList_AddMasked% = 3
ImageList_BeginDrag% = 4
ImageList_Copy% = 5
ImageList_Create% = 5
ImageList_Destroy% = 1
ImageList_DragEnter% = 3
ImageList_DragLeave% = 1
ImageList_DragMove% = 2
ImageList_DragShowNolock% = 1
ImageList_Draw% = 6
ImageList_DrawEx% = 10
ImageList_DrawIndirect% = 1
ImageList_Duplicate% = 1
ImageList_EndDrag% = 0
ImageList_GetBkColor% = 1
ImageList_GetDragImage% = 2
ImageList_GetIcon% = 3
ImageList_GetIconSize% = 3
ImageList_GetImageCount% = 1
ImageList_GetImageInfo% = 3
ImageList_GetImageRect% = 3
ImageList_LoadImage% = 7
ImageList_Merge% = 6
ImageList_Read% = 1
ImageList_Remove% = 2
ImageList_Replace% = 4
ImageList_ReplaceIcon% = 3
ImageList_SetBkColor% = 2
ImageList_SetDragCursorImage% = 4
ImageList_SetFilter% = 3
ImageList_SetIconSize% = 3
ImageList_SetImageCount% = 2
ImageList_SetOverlayImage% = 3
ImageList_Write% = 2
InitCommonControls% = 0
InitCommonControlsEx% = 1
InitializeFlatSB% = 1
LBItemFromPt% = 4
MakeDragList% = 1
MenuHelp% = 7
PropertySheet% = 1
ShowHideMenuCtl% = 3
UninitializeFlatSB% = 1
_TrackMouseEvent% = 1

View file

@ -0,0 +1,18 @@
; COMDLG32 API calls parameters' count
ChooseColor% = 1
ChooseFont% = 1
CommDlgExtendedError% = 0
FindText% = 1
FormatCharDlgProc% = 4
GetFileTitle% = 3
GetOpenFileName% = 1
GetSaveFileName% = 1
LoadAlterBitmap% = 3
PageSetupDlg% = 1
PrintDlg% = 1
ReplaceText% = 1
WantArrows% = 4
dwLBSubclass% = 4
dwOKSubclass% = 4

View file

@ -0,0 +1,319 @@
; GDI32 API calls parameters' count
AbortDoc% = 1
AbortPath% = 1
AddFontMemResourceEx% = 4
AddFontResource% = 1
AddFontResourceEx% = 3
AngleArc% = 6
AnimatePalette% = 4
Arc% = 9
ArcTo% = 9
BeginPath% = 1
BitBlt% = 9
CancelDC% = 1
CheckColorsInGamut% = 4
ChoosePixelFormat% = 2
Chord% = 9
CloseEnhMetaFile% = 1
CloseFigure% = 1
CloseMetaFile% = 1
ColorCorrectPalette% = 4
ColorMatchToTarget% = 3
CombineRgn% = 4
CombineTransform% = 3
CopyEnhMetaFile% = 2
CopyMetaFile% = 2
CreateBitmap% = 5
CreateBitmapIndirect% = 1
CreateBrushIndirect% = 1
CreateColorSpace% = 1
CreateCompatibleBitmap% = 3
CreateCompatibleDC% = 1
CreateDC% = 4
CreateDIBPatternBrush% = 2
CreateDIBPatternBrushPt% = 2
CreateDIBSection% = 6
CreateDIBitmap% = 6
CreateDiscardableBitmap% = 3
CreateEllipticRgn% = 4
CreateEllipticRgnIndirect% = 1
CreateEnhMetaFile% = 4
CreateFont% = 14
CreateFontIndirect% = 1
CreateFontIndirectEx% = 1
CreateHalftonePalette% = 1
CreateHatchBrush% = 2
CreateIC% = 4
CreateMetaFile% = 1
CreatePalette% = 1
CreatePatternBrush% = 1
CreatePen% = 3
CreatePenIndirect% = 1
CreatePolyPolygonRgn% = 4
CreatePolygonRgn% = 3
CreateRectRgn% = 4
CreateRectRgnIndirect% = 1
CreateRoundRectRgn% = 6
CreateScalableFontResource% = 4
CreateSolidBrush% = 1
DPtoLP% = 3
DeleteColorSpace% = 1
DeleteDC% = 1
DeleteEnhMetaFile% = 1
DeleteMetaFile% = 1
DeleteObject% = 1
DescribePixelFormat% = 4
DeviceCapabilitiesEx% = 6
DrawEscape% = 4
Ellipse% = 5
EnableEUDC% = 1
EndDoc% = 1
EndPage% = 1
EndPath% = 1
EnumEnhMetaFile% = 5
EnumFontFamilies% = 4
EnumFontFamiliesEx% = 5
EnumFonts% = 4
EnumICMProfiles% = 3
EnumMetaFile% = 4
EnumObjects% = 4
EqualRgn% = 2
Escape% = 5
ExcludeClipRect% = 5
ExtCreatePen% = 5
ExtCreateRegion% = 3
ExtEscape% = 6
ExtFloodFill% = 5
ExtSelectClipRgn% = 3
ExtTextOut% = 8
FillPath% = 1
FillRgn% = 3
FixBrushOrgEx% = 4
FlattenPath% = 1
FloodFill% = 4
FrameRgn% = 5
GdiComment% = 3
GdiDeleteSpoolFileHandle% = 1
GdiEndDocEMF% = 1
GdiEndPageEMF% = 2
GdiFlush% = 0
GdiGetBatchLimit% = 0
GdiGetDC% = 1
GdiGetDevmodeForPage% = 4
GdiGetPageCount% = 1
GdiGetPageHandle% = 3
GdiGetSpoolFileHandle% = 3
GdiPlayDCScript% = 6
GdiPlayEMF% = 5
GdiPlayJournal% = 5
GdiPlayPageEMF% = 4
GdiPlayPrivatePageEMF% = 3
GdiPlayScript% = 7
GdiResetDCEMF% = 2
GdiSetBatchLimit% = 1
GdiStartDocEMF% = 2
GdiStartPageEMF% = 1
GetArcDirection% = 1
GetAspectRatioFilterEx% = 2
GetBitmapBits% = 3
GetBitmapDimensionEx% = 2
GetBkColor% = 1
GetBkMode% = 1
GetBoundsRect% = 3
GetBrushOrgEx% = 2
GetCharABCWidths% = 4
GetCharABCWidthsFloat% = 4
GetCharABCWidthsI% = 5
GetCharWidth32% = 4
GetCharWidth% = 4
GetCharWidthFloat% = 4
GetCharWidthI% = 5
GetCharacterPlacement% = 6
GetClipBox% = 2
GetClipRgn% = 2
GetColorAdjustment% = 2
GetColorSpace% = 1
GetCurrentObject% = 2
GetCurrentPositionEx% = 2
GetDCBrushColor% = 1
GetDCOrgEx% = 2
GetDCPenColor% = 1
GetDIBColorTable% = 4
GetDIBits% = 7
GetDeviceCaps% = 2
GetDeviceGammaRamp% = 2
GetEnhMetaFile% = 1
GetEnhMetaFileBits% = 3
GetEnhMetaFileDescription% = 3
GetEnhMetaFileHeader% = 3
GetEnhMetaFilePaletteEntries% = 3
GetEnhMetaFilePixelFormat% = 3
GetFontAssocStatus% = 1
GetFontData% = 5
GetFontLanguageInfo% = 1
GetFontUnicodeRanges% = 2
GetGlyphIndices% = 5
GetGlyphOutline% = 7
GetGraphicsMode% = 1
GetICMProfile% = 3
GetKerningPairs% = 3
GetLogColorSpace% = 3
GetMapMode% = 1
GetMetaFile% = 1
GetMetaFileBitsEx% = 3
GetMetaRgn% = 2
GetMiterLimit% = 2
GetNearestColor% = 2
GetNearestPaletteIndex% = 2
GetObject% = 3
GetObjectType% = 1
GetOutlineTextMetrics% = 3
GetPaletteEntries% = 4
GetPath% = 4
GetPixel% = 3
GetPixelFormat% = 1
GetPolyFillMode% = 1
GetROP2% = 1
GetRandomRgn% = 3
GetRasterizerCaps% = 2
GetRegionData% = 3
GetRelAbs% = 2
GetRgnBox% = 2
GetStockObject% = 1
GetStretchBltMode% = 1
GetSystemPaletteEntries% = 4
GetSystemPaletteUse% = 1
GetTextAlign% = 1
GetTextCharacterExtra% = 1
GetTextCharset% = 1
GetTextCharsetInfo% = 3
GetTextColor% = 1
GetTextExtentExPoint% = 7
GetTextExtentExPointI% = 7
GetTextExtentPoint32% = 4
GetTextExtentPoint% = 4
GetTextExtentPointI% = 4
GetTextFace% = 3
GetTextMetrics% = 2
GetViewportExtEx% = 2
GetViewportOrgEx% = 2
GetWinMetaFileBits% = 5
GetWindowExtEx% = 2
GetWindowOrgEx% = 2
GetWorldTransform% = 2
IntersectClipRect% = 5
InvertRgn% = 2
LPtoDP% = 3
LineDD% = 6
LineTo% = 3
MaskBlt% = 12
ModifyWorldTransform% = 3
MoveToEx% = 4
OffsetClipRgn% = 3
OffsetRgn% = 3
OffsetViewportOrgEx% = 4
OffsetWindowOrgEx% = 4
PaintRgn% = 2
PatBlt% = 6
PathToRegion% = 1
Pie% = 9
PlayEnhMetaFile% = 3
PlayEnhMetaFileRecord% = 4
PlayMetaFile% = 2
PlayMetaFileRecord% = 4
PlgBlt% = 10
PolyBezier% = 3
PolyBezierTo% = 3
PolyDraw% = 4
PolyPatBlt% = 5
PolyPolygon% = 4
PolyPolyline% = 4
PolyTextOut% = 3
Polygon% = 3
Polyline% = 3
PolylineTo% = 3
PtInRegion% = 3
PtVisible% = 3
RealizePalette% = 1
RectInRegion% = 2
RectVisible% = 2
Rectangle% = 5
RemoveFontMemResourceEx% = 1
RemoveFontResource% = 1
RemoveFontResourceEx% = 3
ResetDC% = 2
ResizePalette% = 2
RestoreDC% = 2
RoundRect% = 7
SaveDC% = 1
ScaleViewportExtEx% = 6
ScaleWindowExtEx% = 6
SelectBrushLocal% = 2
SelectClipPath% = 2
SelectClipRgn% = 2
SelectFontLocal% = 2
SelectObject% = 2
SelectPalette% = 3
SetAbortProc% = 2
SetArcDirection% = 2
SetBitmapBits% = 3
SetBitmapDimensionEx% = 4
SetBkColor% = 2
SetBkMode% = 2
SetBoundsRect% = 3
SetBrushOrgEx% = 4
SetColorAdjustment% = 2
SetColorSpace% = 2
SetDCBrushColor% = 2
SetDCPenColor% = 2
SetDIBColorTable% = 4
SetDIBits% = 7
SetDIBitsToDevice% = 12
SetDeviceGammaRamp% = 2
SetEnhMetaFileBits% = 2
SetFontEnumeration% = 1
SetGraphicsMode% = 2
SetICMMode% = 2
SetICMProfile% = 2
SetMagicColors% = 3
SetMapMode% = 2
SetMapperFlags% = 2
SetMetaFileBitsEx% = 2
SetMetaRgn% = 1
SetMiterLimit% = 3
SetPaletteEntries% = 4
SetPixel% = 4
SetPixelFormat% = 3
SetPixelV% = 4
SetPolyFillMode% = 2
SetROP2% = 2
SetRectRgn% = 5
SetRelAbs% = 2
SetStretchBltMode% = 2
SetSystemPaletteUse% = 2
SetTextAlign% = 2
SetTextCharacterExtra% = 2
SetTextColor% = 2
SetTextJustification% = 3
SetViewportExtEx% = 4
SetViewportOrgEx% = 4
SetWinMetaFileBits% = 4
SetWindowExtEx% = 4
SetWindowOrgEx% = 4
SetWorldTransform% = 2
StartDoc% = 2
StartPage% = 1
StretchBlt% = 11
StretchDIBits% = 13
StrokeAndFillPath% = 1
StrokePath% = 1
SwapBuffers% = 1
TextOut% = 5
TranslateCharsetInfo% = 3
UnrealizeObject% = 1
UpdateColors% = 1
UpdateICMRegKey% = 4
WidenPath% = 1
gdiPlaySpoolStream% = 6

View file

@ -0,0 +1,557 @@
; KERNEL32 API calls parameters' count
AddAtom% = 1
AddConsoleAlias% = 3
AllocConsole% = 0
AreFileApisANSI% = 0
AssignProcessToJobObject% = 2
BackupRead% = 7
BackupSeek% = 6
BackupWrite% = 7
BaseAttachCompleteThunk% = 0
Beep% = 2
BeginUpdateResource% = 2
BuildCommDCB% = 2
BuildCommDCBAndTimeouts% = 3
CallNamedPipe% = 7
CancelIo% = 1
CancelWaitableTimer% = 1
ClearCommBreak% = 1
ClearCommError% = 3
CloseConsoleHandle% = 1
CloseHandle% = 1
CloseProfileUserMapping% = 0
CmdBatNotification% = 1
CommConfigDialog% = 3
CompareFileTime% = 2
CompareString% = 6
ConnectNamedPipe% = 2
ConsoleMenuControl% = 3
ContinueDebugEvent% = 3
ConvertDefaultLocale% = 1
ConvertThreadToFiber% = 1
CopyFile% = 3
CopyFileEx% = 6
CreateConsoleScreenBuffer% = 5
CreateDirectory% = 2
CreateDirectoryEx% = 3
CreateEvent% = 4
CreateFiber% = 3
CreateFile% = 7
CreateFileMapping% = 6
CreateHardLink% = 3
CreateIoCompletionPort% = 4
CreateJobObject% = 2
CreateMailslot% = 4
CreateMutex% = 3
CreateNamedPipe% = 8
CreatePipe% = 4
CreateProcess% = 10
CreateRemoteThread% = 7
CreateSemaphore% = 4
CreateTapePartition% = 4
CreateThread% = 6
CreateToolhelp32Snapshot% = 2
CreateVirtualBuffer% = 3
CreateWaitableTimer% = 3
DebugActiveProcess% = 1
DebugBreak% = 0
DefineDosDevice% = 3
DeleteAtom% = 1
DeleteCriticalSection% = 1
DeleteFiber% = 1
DeleteFile% = 1
DeviceIoControl% = 8
DisableThreadLibraryCalls% = 1
DisconnectNamedPipe% = 1
DosDateTimeToFileTime% = 3
DuplicateConsoleHandle% = 4
DuplicateHandle% = 7
EndUpdateResource% = 2
EnterCriticalSection% = 1
EnumCalendarInfo% = 4
EnumCalendarInfoEx% = 4
EnumDateFormats% = 3
EnumDateFormatsEx% = 3
EnumResourceLanguages% = 5
EnumResourceNames% = 4
EnumResourceTypes% = 3
EnumSystemCodePages% = 2
EnumSystemLocales% = 2
EnumTimeFormats% = 3
EraseTape% = 3
EscapeCommFunction% = 2
ExitProcess% = 1
ExitThread% = 1
ExitVDM% = 2
ExpandEnvironmentStrings% = 3
ExpungeConsoleCommandHistory% = 1
ExtendVirtualBuffer% = 2
FatalAppExit% = 2
FatalExit% = 1
FileTimeToDosDateTime% = 3
FileTimeToLocalFileTime% = 2
FileTimeToSystemTime% = 2
FillConsoleOutputAttribute% = 5
FillConsoleOutputCharacter% = 5
FindAtom% = 1
FindClose% = 1
FindCloseChangeNotification% = 1
FindFirstChangeNotification% = 3
FindFirstFile% = 2
FindFirstFileEx% = 6
FindNextChangeNotification% = 1
FindNextFile% = 2
FindResource% = 3
FindResourceEx% = 4
FlushConsoleInputBuffer% = 1
FlushFileBuffers% = 1
FlushInstructionCache% = 3
FlushViewOfFile% = 2
FoldString% = 5
FormatMessage% = 7
FreeConsole% = 0
FreeEnvironmentStrings% = 1
FreeLibrary% = 1
FreeLibraryAndExitThread% = 2
FreeResource% = 1
FreeVirtualBuffer% = 1
GenerateConsoleCtrlEvent% = 2
GetACP% = 0
GetAtomName% = 3
GetBinaryType% = 2
GetCPInfo% = 2
GetCPInfoEx% = 3
GetCommConfig% = 3
GetCommMask% = 2
GetCommModemStatus% = 2
GetCommProperties% = 2
GetCommState% = 2
GetCommTimeouts% = 2
GetCommandLine% = 0
GetCompressedFileSize% = 2
GetComputerName% = 2
GetConsoleAlias% = 4
GetConsoleAliasExes% = 2
GetConsoleAliasExesLength% = 0
GetConsoleAliases% = 3
GetConsoleAliasesLength% = 1
GetConsoleCP% = 0
GetConsoleCommandHistory% = 3
GetConsoleCommandHistoryLength% = 1
GetConsoleCursorInfo% = 2
GetConsoleDisplayMode% = 1
GetConsoleFontInfo% = 4
GetConsoleFontSize% = 2
GetConsoleHardwareState% = 3
GetConsoleInputExeName% = 2
GetConsoleInputWaitHandle% = 0
GetConsoleKeyboardLayoutName% = 1
GetConsoleMode% = 2
GetConsoleOutputCP% = 0
GetConsoleScreenBufferInfo% = 2
GetConsoleTitle% = 2
GetConsoleWindow% = 0
GetCurrencyFormat% = 6
GetCurrentConsoleFont% = 3
GetCurrentDirectory% = 2
GetCurrentProcess% = 0
GetCurrentProcessId% = 0
GetCurrentThread% = 0
GetCurrentThreadId% = 0
GetDateFormat% = 6
GetDefaultCommConfig% = 3
GetDevicePowerState% = 1
GetDiskFreeSpace% = 5
GetDiskFreeSpaceEx% = 4
GetDriveType% = 1
GetEnvironmentStrings% = 0
GetEnvironmentVariable% = 3
GetExitCodeProcess% = 2
GetExitCodeThread% = 2
GetFileAttributes% = 1
GetFileAttributesEx% = 3
GetFileInformationByHandle% = 2
GetFileSize% = 2
GetFileTime% = 4
GetFileType% = 1
GetFullPathName% = 4
GetHandleInformation% = 2
GetLargestConsoleWindowSize% = 1
GetLastError% = 0
GetLocalTime% = 1
GetLocaleInfo% = 4
GetLogicalDriveStrings% = 2
GetLogicalDrives% = 0
GetLongPathName% = 3
GetMailslotInfo% = 5
GetModuleFileName% = 3
GetModuleHandle% = 1
GetNamedPipeHandleState% = 7
GetNamedPipeInfo% = 5
GetNextVDMCommand% = 1
GetNumberFormat% = 6
GetNumberOfConsoleFonts% = 0
GetNumberOfConsoleInputEvents% = 2
GetNumberOfConsoleMouseButtons% = 1
GetOEMCP% = 0
GetOverlappedResult% = 4
GetPriorityClass% = 1
GetPrivateProfileInt% = 4
GetPrivateProfileSection% = 4
GetPrivateProfileSectionNames% = 3
GetPrivateProfileString% = 6
GetPrivateProfileStruct% = 5
GetProcAddress% = 2
GetProcessAffinityMask% = 3
GetProcessHeap% = 0
GetProcessHeaps% = 2
GetProcessPriorityBoost% = 2
GetProcessShutdownParameters% = 2
GetProcessTimes% = 5
GetProcessVersion% = 1
GetProcessWorkingSetSize% = 3
GetProfileInt% = 3
GetProfileSection% = 3
GetProfileString% = 5
GetQueuedCompletionStatus% = 5
GetShortPathName% = 3
GetStartupInfo% = 1
GetStdHandle% = 1
GetStringType% = 5
GetStringTypeEx% = 5
GetSystemDefaultLCID% = 0
GetSystemDefaultLangID% = 0
GetSystemDirectory% = 2
GetSystemInfo% = 1
GetSystemPowerStatus% = 1
GetSystemTime% = 1
GetSystemTimeAdjustment% = 3
GetSystemTimeAsFileTime% = 1
GetTapeParameters% = 4
GetTapePosition% = 5
GetTapeStatus% = 1
GetTempFileName% = 4
GetTempPath% = 2
GetThreadContext% = 2
GetThreadLocale% = 0
GetThreadPriority% = 1
GetThreadPriorityBoost% = 2
GetThreadSelectorEntry% = 3
GetThreadTimes% = 5
GetTickCount% = 0
GetTimeFormat% = 6
GetTimeZoneInformation% = 1
GetUserDefaultLCID% = 0
GetUserDefaultLangID% = 0
GetVDMCurrentDirectories% = 2
GetVersion% = 0
GetVersionEx% = 1
GetVolumeInformation% = 8
GetWindowsDirectory% = 2
GlobalAddAtom% = 1
GlobalAlloc% = 2
GlobalCompact% = 1
GlobalDeleteAtom% = 1
GlobalFindAtom% = 1
GlobalFix% = 1
GlobalFlags% = 1
GlobalFree% = 1
GlobalGetAtomName% = 3
GlobalHandle% = 1
GlobalLock% = 1
GlobalMemoryStatus% = 1
GlobalMemoryStatusVlm% = 1
GlobalReAlloc% = 3
GlobalSize% = 1
GlobalUnWire% = 1
GlobalUnfix% = 1
GlobalUnlock% = 1
GlobalWire% = 1
Heap32First% = 3
Heap32ListFirst% = 2
Heap32ListNext% = 2
Heap32Next% = 1
HeapAlloc% = 3
HeapCompact% = 2
HeapCreate% = 3
HeapDestroy% = 1
HeapExtend% = 4
HeapFree% = 3
HeapLock% = 1
HeapReAlloc% = 4
HeapSize% = 3
HeapSummary% = 3
HeapUnlock% = 1
HeapUsage% = 5
HeapValidate% = 3
HeapWalk% = 2
InitAtomTable% = 1
InitializeCriticalSection% = 1
InitializeCriticalSectionAndSpinCount% = 2
InterlockedCompareExchange% = 3
InterlockedDecrement% = 1
InterlockedExchange% = 2
InterlockedExchangeAdd% = 2
InterlockedIncrement% = 1
InvalidateConsoleDIBits% = 2
IsBadCodePtr% = 1
IsBadHugeReadPtr% = 2
IsBadHugeWritePtr% = 2
IsBadReadPtr% = 2
IsBadStringPtr% = 2
IsBadWritePtr% = 2
IsDBCSLeadByte% = 1
IsDBCSLeadByteEx% = 2
IsDebuggerPresent% = 0
IsProcessorFeaturePresent% = 1
IsValidCodePage% = 1
IsValidLocale% = 2
LCMapString% = 6
LeaveCriticalSection% = 1
LoadLibrary% = 1
LoadLibraryEx% = 3
LoadModule% = 2
LoadResource% = 2
LocalAlloc% = 2
LocalCompact% = 1
LocalFileTimeToFileTime% = 2
LocalFlags% = 1
LocalFree% = 1
LocalHandle% = 1
LocalLock% = 1
LocalReAlloc% = 3
LocalShrink% = 2
LocalSize% = 1
LocalUnlock% = 1
LockFile% = 5
LockFileEx% = 6
LockResource% = 1
MapViewOfFile% = 5
MapViewOfFileEx% = 6
MapViewOfFileVlm% = 7
Module32First% = 2
Module32Next% = 2
MoveFile% = 2
MoveFileEx% = 3
MoveFileWithProgress% = 5
MulDiv% = 3
MultiByteToWideChar% = 6
OpenEvent% = 3
OpenFile% = 3
OpenFileMapping% = 3
OpenJobObject% = 3
OpenMutex% = 3
OpenProcess% = 3
OpenProfileUserMapping% = 0
OpenSemaphore% = 3
OpenWaitableTimer% = 3
OutputDebugString% = 1
PeekConsoleInput% = 4
PeekNamedPipe% = 6
PostQueuedCompletionStatus% = 4
PrepareTape% = 3
Process32First% = 2
Process32Next% = 2
PulseEvent% = 1
PurgeComm% = 2
QueryDosDevice% = 3
QueryInformationJobObject% = 5
QueryPerformanceCounter% = 1
QueryPerformanceFrequency% = 1
QueryWin31IniFilesMappedToRegistry% = 4
QueueUserAPC% = 3
RaiseException% = 4
ReadConsole% = 5
ReadConsoleInput% = 4
ReadConsoleInputEx% = 5
ReadConsoleOutput% = 5
ReadConsoleOutputAttribute% = 5
ReadConsoleOutputCharacter% = 5
ReadFile% = 5
ReadFileEx% = 5
ReadFileScatter% = 5
ReadFileVlm% = 5
ReadProcessMemory% = 5
ReadProcessMemoryVlm% = 5
RegisterConsoleVDM% = 11
RegisterWaitForInputIdle% = 1
RegisterWowBaseHandlers% = 1
RegisterWowExec% = 1
ReleaseMutex% = 1
ReleaseSemaphore% = 3
RemoveDirectory% = 1
RequestWakeupLatency% = 1
ResetEvent% = 1
ResumeThread% = 1
RtlFillMemory% = 3
RtlMoveMemory% = 3
RtlUnwind% = 4
RtlZeroMemory% = 2
ScrollConsoleScreenBuffer% = 5
SearchPath% = 6
SetCommBreak% = 1
SetCommConfig% = 3
SetCommMask% = 2
SetCommState% = 2
SetCommTimeouts% = 2
SetComputerName% = 1
SetConsoleActiveScreenBuffer% = 1
SetConsoleCP% = 1
SetConsoleCommandHistoryMode% = 1
SetConsoleCtrlHandler% = 2
SetConsoleCursor% = 2
SetConsoleCursorInfo% = 2
SetConsoleCursorPosition% = 2
SetConsoleDisplayMode% = 3
SetConsoleFont% = 2
SetConsoleHardwareState% = 3
SetConsoleIcon% = 1
SetConsoleInputExeName% = 1
SetConsoleKeyShortcuts% = 4
SetConsoleMaximumWindowSize% = 2
SetConsoleMenuClose% = 1
SetConsoleMode% = 2
SetConsoleNumberOfCommands% = 2
SetConsoleOutputCP% = 1
SetConsolePalette% = 3
SetConsoleScreenBufferSize% = 2
SetConsoleTextAttribute% = 2
SetConsoleTitle% = 1
SetConsoleWindowInfo% = 3
SetCriticalSectionSpinCount% = 2
SetCurrentDirectory% = 1
SetDefaultCommConfig% = 3
SetEndOfFile% = 1
SetEnvironmentVariable% = 2
SetErrorMode% = 1
SetEvent% = 1
SetFileApisToANSI% = 0
SetFileApisToOEM% = 0
SetFileAttributes% = 2
SetFilePointer% = 4
SetFileTime% = 4
SetHandleCount% = 1
SetHandleInformation% = 3
SetInformationJobObject% = 4
SetLastConsoleEventActive% = 0
SetLastError% = 1
SetLocalTime% = 1
SetLocaleInfo% = 3
SetMailslotInfo% = 2
SetNamedPipeHandleState% = 4
SetPriorityClass% = 2
SetProcessAffinityMask% = 2
SetProcessPriorityBoost% = 2
SetProcessShutdownParameters% = 2
SetProcessWorkingSetSize% = 3
SetStdHandle% = 2
SetSystemPowerState% = 2
SetSystemTime% = 1
SetSystemTimeAdjustment% = 2
SetTapeParameters% = 3
SetTapePosition% = 6
SetThreadAffinityMask% = 2
SetThreadContext% = 2
SetThreadExecutionState% = 1
SetThreadIdealProcessor% = 2
SetThreadLocale% = 1
SetThreadPriority% = 2
SetThreadPriorityBoost% = 2
SetTimeZoneInformation% = 1
SetUnhandledExceptionFilter% = 1
SetVDMCurrentDirectories% = 2
SetVolumeLabel% = 2
SetWaitableTimer% = 6
SetupComm% = 3
ShowConsoleCursor% = 2
SignalObjectAndWait% = 4
SizeofResource% = 2
Sleep% = 1
SleepEx% = 2
SuspendThread% = 1
SwitchToFiber% = 1
SwitchToThread% = 0
SystemTimeToFileTime% = 2
SystemTimeToTzSpecificLocalTime% = 3
TerminateJobObject% = 2
TerminateProcess% = 2
TerminateThread% = 2
Thread32First% = 2
Thread32Next% = 2
TlsAlloc% = 0
TlsFree% = 1
TlsGetValue% = 1
TlsSetValue% = 2
Toolhelp32ReadProcessMemory% = 5
TransactNamedPipe% = 7
TransmitCommChar% = 2
TrimVirtualBuffer% = 1
TryEnterCriticalSection% = 1
UnhandledExceptionFilter% = 1
UnlockFile% = 5
UnlockFileEx% = 5
UnmapViewOfFile% = 1
UnmapViewOfFileVlm% = 1
UpdateResource% = 6
VDMConsoleOperation% = 2
VDMOperationStarted% = 1
VerLanguageName% = 3
VerifyConsoleIoHandle% = 1
VirtualAlloc% = 4
VirtualAllocEx% = 5
VirtualAllocVlm% = 6
VirtualBufferExceptionHandler% = 3
VirtualFree% = 3
VirtualFreeEx% = 4
VirtualFreeVlm% = 5
VirtualLock% = 2
VirtualProtect% = 4
VirtualProtectEx% = 5
VirtualProtectVlm% = 6
VirtualQuery% = 3
VirtualQueryEx% = 4
VirtualQueryVlm% = 4
VirtualUnlock% = 2
WaitCommEvent% = 3
WaitForDebugEvent% = 2
WaitForMultipleObjects% = 4
WaitForMultipleObjectsEx% = 5
WaitForSingleObject% = 2
WaitForSingleObjectEx% = 3
WaitNamedPipe% = 2
WideCharToMultiByte% = 8
WinExec% = 2
WriteConsole% = 5
WriteConsoleInput% = 4
WriteConsoleInputVDM% = 4
WriteConsoleOutput% = 5
WriteConsoleOutputAttribute% = 5
WriteConsoleOutputCharacter% = 5
WriteFile% = 5
WriteFileEx% = 5
WriteFileGather% = 5
WriteFileVlm% = 5
WritePrivateProfileSection% = 3
WritePrivateProfileString% = 4
WritePrivateProfileStruct% = 5
WriteProcessMemory% = 5
WriteProcessMemoryVlm% = 5
WriteProfileSection% = 2
WriteProfileString% = 3
WriteTapemark% = 4
_hread% = 3
_hwrite% = 3
_lclose% = 1
_lcreat% = 2
_llseek% = 3
_lopen% = 2
_lread% = 3
_lwrite% = 3
lstrcat% = 2
lstrcmp% = 2
lstrcmpi% = 2
lstrcpy% = 2
lstrcpyn% = 3
lstrlen% = 1

View file

@ -0,0 +1,73 @@
; SHELL32 API calls parameters' count
CheckEscapes% = 2
DoEnvironmentSubst% = 2
DragAcceptFiles% = 2
DragFinish% = 1
DragQueryFile% = 4
DragQueryPoint% = 2
DuplicateIcon% = 2
ExtractAssociatedIcon% = 3
ExtractAssociatedIconEx% = 4
ExtractIcon% = 3
ExtractIconEx% = 5
ExtractIconResInfo% = 5
FindExeDlgProc% = 4
FindExecutable% = 3
FreeIconList% = 2
InternalExtractIconList% = 3
RealShellExecute% = 10
RealShellExecuteEx% = 11
RegenerateUserEnvironment% = 2
SHAddToRecentDocs% = 2
SHAppBarMessage% = 2
SHBrowseForFolder% = 1
SHChangeNotify% = 4
SHEmptyRecycleBin% = 3
SHFileOperation% = 1
SHFormatDrive% = 4
SHFreeNameMappings% = 1
SHGetDataFromIDList% = 5
SHGetDesktopFolder% = 1
SHGetDiskFreeSpace% = 4
SHGetFileInfo% = 5
SHGetInstanceExplorer% = 1
SHGetMalloc% = 1
SHGetNewLinkInfo% = 5
SHGetPathFromIDList% = 2
SHGetSettings% = 2
SHGetSpecialFolderLocation% = 3
SHGetSpecialFolderPath% = 4
SHInvokePrinterCommand% = 5
SHLoadInProc% = 1
SHQueryRecycleBin% = 2
SHUpdateRecycleBinIcon% = 0
SheChangeDir% = 1
SheChangeDirEx% = 1
SheFullPath% = 3
SheGetCurDrive% = 0
SheGetDir% = 2
SheRemoveQuotes% = 1
SheSetCurDrive% = 1
SheShortenPath% = 2
ShellAbout% = 4
ShellExecute% = 6
ShellExecuteEx% = 1
ShellHookProc% = 3
Shell_NotifyIcon% = 2
StrChr% = 2
StrChrI% = 2
StrCmpN% = 3
StrCmpNI% = 3
StrCpyN% = 3
StrNCmp% = 3
StrNCmpI% = 3
StrNCpy% = 3
StrRChr% = 3
StrRChrI% = 3
StrRStr% = 3
StrRStrI% = 3
StrStr% = 2
StrStrI% = 2
WOWShellExecute% = 7

View file

@ -0,0 +1,477 @@
; USER32 API calls parameters' count
ActivateKeyboardLayout% = 2
AdjustWindowRect% = 3
AdjustWindowRectEx% = 4
AnimateWindow% = 3
AnyPopup% = 0
AppendMenu% = 4
ArrangeIconicWindows% = 1
AttachThreadInput% = 3
BeginDeferWindowPos% = 1
BeginPaint% = 2
BlockInput% = 1
BringWindowToTop% = 1
BroadcastSystemMessage% = 5
CallMsgFilter% = 2
CallNextHookEx% = 4
CallWindowProc% = 5
CascadeChildWindows% = 2
CascadeWindows% = 5
ChangeClipboardChain% = 2
ChangeDisplaySettings% = 2
ChangeDisplaySettingsEx% = 5
ChangeMenu% = 5
CharLower% = 1
CharLowerBuff% = 2
CharNext% = 1
CharNextEx% = 3
CharPrev% = 2
CharPrevEx% = 4
CharToOem% = 2
CharToOemBuff% = 3
CharUpper% = 1
CharUpperBuff% = 2
CheckDlgButton% = 3
CheckMenuItem% = 3
CheckMenuRadioItem% = 5
CheckRadioButton% = 4
ChildWindowFromPoint% = 3
ChildWindowFromPointEx% = 4
ClientToScreen% = 2
ClipCursor% = 1
CloseClipboard% = 0
CloseDesktop% = 1
CloseWindow% = 1
CloseWindowStation% = 1
CopyAcceleratorTable% = 3
CopyIcon% = 1
CopyImage% = 5
CopyRect% = 2
CountClipboardFormats% = 0
CreateAcceleratorTable% = 2
CreateCaret% = 4
CreateCursor% = 7
CreateDesktop% = 6
CreateDialogIndirectParam% = 5
CreateDialogParam% = 5
CreateIcon% = 7
CreateIconFromResource% = 4
CreateIconFromResourceEx% = 7
CreateIconIndirect% = 1
CreateMDIWindow% = 10
CreateMenu% = 0
CreatePopupMenu% = 0
CreateWindowEx% = 12
CreateWindowStation% = 4
DdeAbandonTransaction% = 3
DdeAccessData% = 2
DdeAddData% = 4
DdeClientTransaction% = 8
DdeCmpStringHandles% = 2
DdeConnect% = 4
DdeConnectList% = 5
DdeCreateDataHandle% = 7
DdeCreateStringHandle% = 3
DdeDisconnect% = 1
DdeDisconnectList% = 1
DdeEnableCallback% = 3
DdeFreeDataHandle% = 1
DdeFreeStringHandle% = 2
DdeGetData% = 4
DdeGetLastError% = 1
DdeGetQualityOfService% = 3
DdeImpersonateClient% = 1
DdeInitialize% = 4
DdeKeepStringHandle% = 2
DdeNameService% = 4
DdePostAdvise% = 3
DdeQueryConvInfo% = 3
DdeQueryNextServer% = 2
DdeQueryString% = 5
DdeReconnect% = 1
DdeSetQualityOfService% = 3
DdeSetUserHandle% = 3
DdeUnaccessData% = 1
DdeUninitialize% = 1
DefDlgProc% = 4
DefFrameProc% = 5
DefMDIChildProc% = 4
DefWindowProc% = 4
DeferWindowPos% = 8
DeleteMenu% = 3
DestroyAcceleratorTable% = 1
DestroyCaret% = 0
DestroyCursor% = 1
DestroyIcon% = 1
DestroyMenu% = 1
DestroyWindow% = 1
DialogBoxIndirectParam% = 5
DialogBoxParam% = 5
DispatchMessage% = 1
DlgDirList% = 5
DlgDirListComboBox% = 5
DlgDirSelectComboBoxEx% = 4
DlgDirSelectEx% = 4
DragDetect% = 3
DragObject% = 5
DrawAnimatedRects% = 4
DrawCaption% = 4
DrawEdge% = 4
DrawFocusRect% = 2
DrawFrame% = 4
DrawFrameControl% = 4
DrawIcon% = 4
DrawIconEx% = 9
DrawMenuBar% = 1
DrawState% = 10
DrawText% = 5
DrawTextEx% = 6
EditWndProc% = 4
EmptyClipboard% = 0
EnableMenuItem% = 3
EnableScrollBar% = 3
EnableWindow% = 2
EndDeferWindowPos% = 1
EndDialog% = 2
EndMenu% = 0
EndPaint% = 2
EnumChildWindows% = 3
EnumClipboardFormats% = 1
EnumDesktopWindows% = 3
EnumDesktops% = 3
EnumDisplayMonitors% = 4
EnumDisplaySettings% = 3
EnumDisplaySettingsEx% = 4
EnumProps% = 2
EnumPropsEx% = 3
EnumThreadWindows% = 3
EnumWindowStations% = 2
EnumWindows% = 2
EqualRect% = 2
ExcludeUpdateRgn% = 2
ExitWindowsEx% = 2
FillRect% = 3
FindWindow% = 2
FindWindowEx% = 4
FlashWindow% = 2
FrameRect% = 3
FreeDDElParam% = 2
GetActiveWindow% = 0
GetAltTabInfo% = 5
GetAncestor% = 2
GetAsyncKeyState% = 1
GetCapture% = 0
GetCaretBlinkTime% = 0
GetCaretPos% = 1
GetClassInfo% = 3
GetClassInfoEx% = 3
GetClassLong% = 2
GetClassName% = 3
GetClassWord% = 2
GetClientRect% = 2
GetClipCursor% = 1
GetClipboardData% = 1
GetClipboardFormatName% = 3
GetClipboardSequenceNumber% = 0
GetClipboardViewer% = 0
GetComboBoxInfo% = 2
GetCursor% = 0
GetCursorInfo% = 1
GetCursorPos% = 1
GetDC% = 1
GetDCEx% = 3
GetDesktopWindow% = 0
GetDialogBaseUnits% = 0
GetDlgCtrlID% = 1
GetDlgItem% = 2
GetDlgItemInt% = 4
GetDlgItemText% = 4
GetDoubleClickTime% = 0
GetFocus% = 0
GetForegroundWindow% = 0
GetGUIThreadInfo% = 2
GetGuiResources% = 2
GetIconInfo% = 2
GetInputDesktop% = 0
GetInputState% = 0
GetKBCodePage% = 0
GetKeyNameText% = 3
GetKeyState% = 1
GetKeyboardLayout% = 1
GetKeyboardLayoutList% = 2
GetKeyboardLayoutName% = 1
GetKeyboardState% = 1
GetKeyboardType% = 1
GetLastActivePopup% = 1
GetLastInputInfo% = 1
GetListBoxInfo% = 1
GetMenu% = 1
GetMenuBarInfo% = 4
GetMenuCheckMarkDimensions% = 0
GetMenuContextHelpId% = 1
GetMenuDefaultItem% = 3
GetMenuInfo% = 2
GetMenuItemCount% = 1
GetMenuItemID% = 2
GetMenuItemInfo% = 4
GetMenuItemRect% = 4
GetMenuState% = 3
GetMenuString% = 5
GetMessage% = 4
GetMessageExtraInfo% = 0
GetMessagePos% = 0
GetMessageTime% = 0
GetMonitorInfo% = 2
GetMouseMovePoints% = 5
GetNextDlgGroupItem% = 3
GetNextDlgTabItem% = 3
GetOpenClipboardWindow% = 0
GetParent% = 1
GetPriorityClipboardFormat% = 2
GetProcessWindowStation% = 0
GetProp% = 2
GetQueueStatus% = 1
GetScrollBarInfo% = 3
GetScrollInfo% = 3
GetScrollPos% = 2
GetScrollRange% = 4
GetShellWindow% = 0
GetSubMenu% = 2
GetSysColor% = 1
GetSysColorBrush% = 1
GetSystemMenu% = 2
GetSystemMetrics% = 1
GetTabbedTextExtent% = 5
GetThreadDesktop% = 1
GetTitleBarInfo% = 2
GetTopWindow% = 1
GetUpdateRect% = 3
GetUpdateRgn% = 3
GetUserObjectInformation% = 5
GetUserObjectSecurity% = 5
GetWindow% = 2
GetWindowContextHelpId% = 1
GetWindowDC% = 1
GetWindowInfo% = 2
GetWindowLong% = 2
GetWindowModuleFileName% = 3
GetWindowPlacement% = 2
GetWindowRect% = 2
GetWindowRgn% = 2
GetWindowText% = 3
GetWindowTextLength% = 1
GetWindowThreadProcessId% = 2
GetWindowWord% = 2
GrayString% = 9
HideCaret% = 1
HiliteMenuItem% = 4
IMPGetIME% = 2
IMPQueryIME% = 1
IMPSetIME% = 2
ImpersonateDdeClientWindow% = 2
InSendMessage% = 0
InSendMessageEx% = 1
InflateRect% = 3
InsertMenu% = 5
InsertMenuItem% = 4
IntersectRect% = 3
InvalidateRect% = 3
InvalidateRgn% = 3
InvertRect% = 2
IsCharAlpha% = 1
IsCharAlphaNumeric% = 1
IsCharLower% = 1
IsCharUpper% = 1
IsChild% = 2
IsClipboardFormatAvailable% = 1
IsDialogMessage% = 2
IsDlgButtonChecked% = 2
IsIconic% = 1
IsMenu% = 1
IsRectEmpty% = 1
IsWindow% = 1
IsWindowEnabled% = 1
IsWindowUnicode% = 1
IsWindowVisible% = 1
IsZoomed% = 1
KillSystemTimer% = 2
KillTimer% = 2
LoadAccelerators% = 2
LoadBitmap% = 2
LoadCursor% = 2
LoadCursorFromFile% = 1
LoadIcon% = 2
LoadImage% = 6
LoadKeyboardLayout% = 2
LoadMenu% = 2
LoadMenuIndirect% = 1
LoadString% = 4
LockWindowUpdate% = 1
LockWorkStation% = 0
LookupIconIdFromDirectory% = 2
LookupIconIdFromDirectoryEx% = 5
MapDialogRect% = 2
MapVirtualKey% = 2
MapVirtualKeyEx% = 3
MapWindowPoints% = 4
MenuItemFromPoint% = 4
MessageBeep% = 1
MessageBox% = 4
MessageBoxEx% = 5
MessageBoxIndirect% = 1
ModifyMenu% = 5
MonitorFromPoint% = 3
MonitorFromRect% = 2
MonitorFromWindow% = 2
MoveWindow% = 6
MsgWaitForMultipleObjects% = 5
MsgWaitForMultipleObjectsEx% = 5
NotifyWinEvent% = 4
OemKeyScan% = 1
OemToChar% = 2
OemToCharBuff% = 3
OffsetRect% = 3
OpenClipboard% = 1
OpenDesktop% = 4
OpenIcon% = 1
OpenInputDesktop% = 3
OpenWindowStation% = 3
PackDDElParam% = 3
PaintDesktop% = 1
PeekMessage% = 5
PostMessage% = 4
PostQuitMessage% = 1
PostThreadMessage% = 4
PtInRect% = 3
RealChildWindowFromPoint% = 3
RealGetWindowClass% = 3
RedrawWindow% = 4
RegisterClass% = 1
RegisterClassEx% = 1
RegisterClipboardFormat% = 1
RegisterDeviceNotification% = 3
RegisterHotKey% = 4
RegisterWindowMessage% = 1
ReleaseCapture% = 0
ReleaseDC% = 2
RemoveMenu% = 3
RemoveProp% = 2
ReplyMessage% = 1
ReuseDDElParam% = 5
ScreenToClient% = 2
ScrollChildren% = 3
ScrollDC% = 7
ScrollWindow% = 5
ScrollWindowEx% = 8
SendDlgItemMessage% = 5
SendIMEMessageEx% = 2
SendInput% = 3
SendMessage% = 4
SendMessageCallback% = 6
SendMessageTimeout% = 7
SendNotifyMessage% = 4
SetActiveWindow% = 1
SetCapture% = 1
SetCaretBlinkTime% = 1
SetCaretPos% = 2
SetClassLong% = 3
SetClassWord% = 3
SetClipboardData% = 2
SetClipboardViewer% = 1
SetCursor% = 1
SetCursorPos% = 2
SetDebugErrorLevel% = 1
SetDeskWallpaper% = 1
SetDlgItemInt% = 4
SetDlgItemText% = 3
SetDoubleClickTime% = 1
SetFocus% = 1
SetForegroundWindow% = 1
SetKeyboardState% = 1
SetLastErrorEx% = 2
SetMenu% = 2
SetMenuContextHelpId% = 2
SetMenuDefaultItem% = 3
SetMenuInfo% = 2
SetMenuItemBitmaps% = 5
SetMenuItemInfo% = 4
SetMessageExtraInfo% = 1
SetMessageQueue% = 1
SetParent% = 2
SetProcessWindowStation% = 1
SetProp% = 3
SetRect% = 5
SetRectEmpty% = 1
SetScrollInfo% = 4
SetScrollPos% = 4
SetScrollRange% = 5
SetShellWindow% = 1
SetSysColors% = 3
SetSystemCursor% = 2
SetSystemMenu% = 2
SetSystemTimer% = 4
SetThreadDesktop% = 1
SetTimer% = 4
SetUserObjectInformation% = 4
SetUserObjectSecurity% = 3
SetWinEventHook% = 7
SetWindowContextHelpId% = 2
SetWindowLong% = 3
SetWindowPlacement% = 2
SetWindowPos% = 7
SetWindowRgn% = 3
SetWindowText% = 2
SetWindowWord% = 3
SetWindowsHook% = 2
SetWindowsHookEx% = 4
ShowCaret% = 1
ShowCursor% = 1
ShowOwnedPopups% = 2
ShowScrollBar% = 3
ShowWindow% = 2
ShowWindowAsync% = 2
SubtractRect% = 3
SwapMouseButton% = 1
SwitchDesktop% = 1
SystemParametersInfo% = 4
TabbedTextOut% = 8
TileChildWindows% = 2
TileWindows% = 5
ToAscii% = 5
ToAsciiEx% = 6
ToUnicode% = 6
ToUnicodeEx% = 7
TrackMouseEvent% = 1
TrackPopupMenu% = 7
TrackPopupMenuEx% = 6
TranslateAccelerator% = 3
TranslateMDISysAccel% = 2
TranslateMessage% = 1
UnhookWinEvent% = 1
UnhookWindowsHook% = 2
UnhookWindowsHookEx% = 1
UnionRect% = 3
UnloadKeyboardLayout% = 1
UnpackDDElParam% = 4
UnregisterClass% = 2
UnregisterDeviceNotification% = 1
UnregisterHotKey% = 2
UpdateWindow% = 1
UserHandleGrantAccess% = 2
ValidateRect% = 2
ValidateRgn% = 2
VkKeyScan% = 1
VkKeyScanEx% = 2
WINNLSEnableIME% = 2
WINNLSGetEnableStatus% = 1
WINNLSGetIMEHotkey% = 1
WaitForInputIdle% = 2
WaitMessage% = 0
WinHelp% = 4
WindowFromDC% = 1
WindowFromPoint% = 2
keybd_event% = 4
mouse_event% = 5
wvsprintf% = 3

View file

@ -0,0 +1,70 @@
; WSOCK32 API calls parameters' count
AcceptEx% = 8
EnumProtocols% = 3
GetAcceptExSockaddrs% = 8
GetAddressByName% = 10
GetNameByType% = 3
GetService% = 7
GetTypeByName% = 2
MigrateWinsockConfiguration% = 3
NPLoadNameSpaces% = 3
SetService% = 6
TransmitFile% = 7
WEP% = 0
WSAAsyncGetHostByAddr% = 7
WSAAsyncGetHostByName% = 5
WSAAsyncGetProtoByName% = 5
WSAAsyncGetProtoByNumber% = 5
WSAAsyncGetServByName% = 6
WSAAsyncGetServByPort% = 6
WSACancelAsyncRequest% = 4
WSACancelBlockingCall% = 0
WSACleanup% = 0
WSAGetLastError% = 0
WSAIsBlocking% = 0
WSARecvEx% = 4
WSASetBlockingHook% = 1
WSASetLastError% = 1
WSAStartup% = 2
WSAUnhookBlockingHook% = 0
__WSAFDIsSet% = 2
accept% = 3
bind% = 3
closesocket% = 1
connect% = 3
dn_expand% = 5
gethostbyaddr% = 3
gethostbyname% = 1
gethostname% = 2
getnetbyname% = 1
getpeername% = 3
getprotobyname% = 1
getprotobynumber% = 1
getservbyname% = 2
getservbyport% = 2
getsockname% = 3
getsockopt% = 5
htonl% = 1
htons% = 1
inet_addr% = 1
inet_network% = 1
inet_ntoa% = 1
ioctlsocket% = 3
listen% = 2
ntohl% = 1
ntohs% = 1
rcmd% = 6
recv% = 4
recvfrom% = 6
rexec% = 6
rresvport% = 1
s_perror% = 2
select% = 5
send% = 4
sendto% = 6
sethostname% = 2
setsockopt% = 5
shutdown% = 2
socket% = 3

25
tools/INCLUDE/WIN32A.INC Normal file
View file

@ -0,0 +1,25 @@
; Win32 programming headers (ASCII)
include 'macro/struct.inc'
include 'macro/proc32.inc'
include 'macro/com32.inc'
include 'macro/import32.inc'
include 'macro/export.inc'
include 'macro/resource.inc'
struc TCHAR [val] { common match any, val \{ . db val \}
match , val \{ . db ? \} }
sizeof.TCHAR = 1
include 'equates/kernel32.inc'
include 'equates/user32.inc'
include 'equates/gdi32.inc'
include 'equates/comctl32.inc'
include 'equates/comdlg32.inc'
include 'equates/shell32.inc'
include 'equates/wsock32.inc'
macro api [name] { if used name
label name dword at name#A
end if }

172
tools/INCLUDE/WIN32AX.INC Normal file
View file

@ -0,0 +1,172 @@
; Extended Win32 programming headers (ASCII)
include 'win32a.inc'
include 'macro/if.inc'
macro allow_nesting
{ macro pushd value
\{ match ,value \\{
pushx equ \\}
match =pushx =invoke proc,pushx value \\{
allow_nesting
invoke proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx =stdcall proc,pushx value \\{
allow_nesting
stdcall proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx =cinvoke proc,pushx value \\{
allow_nesting
cinvoke proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx =ccall proc,pushx value \\{
allow_nesting
ccall proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx,pushx \\{
pushd <value>
pushx equ \\}
restore pushx \}
macro invoke proc,[arg]
\{ \reverse pushd <arg>
\common call [proc] \}
macro stdcall proc,[arg]
\{ \reverse pushd <arg>
\common call proc \}
macro cinvoke proc,[arg]
\{ \common \local size
size = 0
if ~ arg eq
\reverse pushd <arg>
size = size+4
match =double any,arg \\{ size = size+4 \\}
\common end if
call [proc]
if size
add esp,size
end if \}
macro ccall proc,[arg]
\{ \common \local size
size = 0
if ~ arg eq
\reverse pushd <arg>
size = size+4
match =double any,arg \\{ size = size+4 \\}
\common end if
call proc
if size
add esp,size
end if \} }
macro pushd value
{ match first=,more, value \{ \local ..continue
call ..continue
db value,0
..continue:
pushd equ \}
match pushd =addr var,pushd value \{ \local ..opcode,..address
if +var relativeto 0 | +var relativeto $
push var
else
lea edx,[var]
push edx
end if
pushd equ \}
match pushd =double [var],pushd value \{
push dword [var+4]
push dword [var]
pushd equ \}
match pushd =double =ptr var,pushd value \{
push dword [var+4]
push dword [var]
pushd equ \}
match pushd =double num,pushd value \{ \local ..high,..low
virtual at 0
dq num
load ..low dword from 0
load ..high dword from 4
end virtual
push ..high
push ..low
pushd equ \}
match pushd,pushd \{ \local ..continue
if value eqtype ''
call ..continue
db value,0
..continue:
else
push value
end if
pushd equ \}
restore pushd }
allow_nesting
macro import lib,[functions]
{ common macro import_#lib \{ import lib,functions \} }
macro api [functions]
{ common macro all_api \{ all_api
api functions \} }
macro all_api {}
include 'api/kernel32.inc'
include 'api/user32.inc'
include 'api/gdi32.inc'
include 'api/advapi32.inc'
include 'api/comctl32.inc'
include 'api/comdlg32.inc'
include 'api/shell32.inc'
include 'api/wsock32.inc'
purge import,api
macro .data { section '.data' data readable writeable }
macro .code { section '.text' code readable executable }
macro .end label
{
entry label
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL',\
gdi32,'GDI32.DLL',\
advapi32,'ADVAPI32.DLL',\
comctl32,'COMCTL32.DLL',\
comdlg32,'COMDLG32.DLL',\
shell32,'SHELL32.DLL',\
wsock32,'WSOCK32.DLL'
import_kernel32
import_user32
import_gdi32
import_advapi32
import_comctl32
import_comdlg32
import_shell32
import_wsock32
all_api
}
virtual at 0
xchg eax,eax
detected_16bit = $-1
end virtual
if detected_16bit
format PE GUI 4.0
end if

199
tools/INCLUDE/WIN32AXP.INC Normal file
View file

@ -0,0 +1,199 @@
; Extended Win32 programming headers with parameters count checking (ASCII)
include 'win32a.inc'
include 'macro/if.inc'
macro allow_nesting
{ macro pushd value
\{ match ,value \\{
pushx equ \\}
match =pushx =invoke proc,pushx value \\{
allow_nesting
invoke proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx =stdcall proc,pushx value \\{
allow_nesting
stdcall proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx =cinvoke proc,pushx value \\{
allow_nesting
cinvoke proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx =ccall proc,pushx value \\{
allow_nesting
ccall proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx,pushx \\{
pushd <value>
pushx equ \\}
restore pushx \}
macro invoke proc,[arg]
\{ \common count@stdcall = 0
if ~ arg eq
\forward count@stdcall = count@stdcall+1
match =double value, arg \\{ count@stdcall = count@stdcall+1 \\}
\common end if
if proc eqtype 0 & defined proc \# % & count@stdcall <> proc \# %
display "Error: invalid count of parameters for ",\`proc,".",0Dh,0Ah
assert 0
end if
\reverse pushd <arg>
\common call [proc] \}
macro stdcall proc,[arg]
\{ \common count@stdcall = 0
if ~ arg eq
\forward count@stdcall = count@stdcall+1
match =double value, arg \\{ count@stdcall = count@stdcall+1 \\}
\common end if
if proc eqtype 0 & defined proc \# % & count@stdcall <> proc \# %
display "Error: invalid count of parameters for ",\`proc,".",0Dh,0Ah
assert 0
end if
\reverse pushd <arg>
\common call proc \}
macro cinvoke proc,[arg]
\{ \common \local size
size = 0
if ~ arg eq
\reverse pushd <arg>
size = size+4
match =double any,arg \\{ size = size+4 \\}
\common end if
call [proc]
if size
add esp,size
end if \}
macro ccall proc,[arg]
\{ \common \local size
size = 0
if ~ arg eq
\reverse pushd <arg>
size = size+4
match =double any,arg \\{ size = size+4 \\}
\common end if
call proc
if size
add esp,size
end if \} }
macro pushd value
{ match first=,more, value \{ \local ..continue
call ..continue
db value,0
..continue:
pushd equ \}
match pushd =addr var,pushd value \{ \local ..opcode,..address
if +var relativeto 0 | +var relativeto $
push var
else
lea edx,[var]
push edx
end if
pushd equ \}
match pushd =double [var],pushd value \{
push dword [var+4]
push dword [var]
pushd equ \}
match pushd =double =ptr var,pushd value \{
push dword [var+4]
push dword [var]
pushd equ \}
match pushd =double num,pushd value \{ \local ..high,..low
virtual at 0
dq num
load ..low dword from 0
load ..high dword from 4
end virtual
push ..high
push ..low
pushd equ \}
match pushd,pushd \{ \local ..continue
if value eqtype ''
call ..continue
db value,0
..continue:
else
push value
end if
pushd equ \}
restore pushd }
allow_nesting
include 'pcount/kernel32.inc'
include 'pcount/user32.inc'
include 'pcount/gdi32.inc'
include 'pcount/advapi32.inc'
include 'pcount/comctl32.inc'
include 'pcount/comdlg32.inc'
include 'pcount/shell32.inc'
include 'pcount/wsock32.inc'
macro import lib,[functions]
{ common macro import_#lib \{ import lib,functions \} }
macro api [functions]
{ common macro all_api \{ all_api
api functions \} }
macro all_api {}
include 'api/kernel32.inc'
include 'api/user32.inc'
include 'api/gdi32.inc'
include 'api/advapi32.inc'
include 'api/comctl32.inc'
include 'api/comdlg32.inc'
include 'api/shell32.inc'
include 'api/wsock32.inc'
purge import,api
macro .data { section '.data' data readable writeable }
macro .code { section '.text' code readable executable }
macro .end label
{
entry label
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL',\
gdi32,'GDI32.DLL',\
advapi32,'ADVAPI32.DLL',\
comctl32,'COMCTL32.DLL',\
comdlg32,'COMDLG32.DLL',\
shell32,'SHELL32.DLL',\
wsock32,'WSOCK32.DLL'
import_kernel32
import_user32
import_gdi32
import_advapi32
import_comctl32
import_comdlg32
import_shell32
import_wsock32
all_api
}
virtual at 0
xchg eax,eax
detected_16bit = $-1
end virtual
if detected_16bit
format PE GUI 4.0
end if

25
tools/INCLUDE/WIN32W.INC Normal file
View file

@ -0,0 +1,25 @@
; Win32 programming headers (WideChar)
include 'macro/struct.inc'
include 'macro/proc32.inc'
include 'macro/com32.inc'
include 'macro/import32.inc'
include 'macro/export.inc'
include 'macro/resource.inc'
struc TCHAR [val] { common match any, val \{ . du val \}
match , val \{ . du ? \} }
sizeof.TCHAR = 2
include 'equates/kernel32.inc'
include 'equates/user32.inc'
include 'equates/gdi32.inc'
include 'equates/comctl32.inc'
include 'equates/comdlg32.inc'
include 'equates/shell32.inc'
include 'equates/wsock32.inc'
macro api [name] { if used name
label name dword at name#W
end if }

188
tools/INCLUDE/WIN32WX.INC Normal file
View file

@ -0,0 +1,188 @@
; Extended Win32 programming headers (WideChar)
include 'win32w.inc'
include 'macro/if.inc'
macro allow_nesting
{ macro pushd value
\{ match ,value \\{
pushx equ \\}
match =pushx =invoke proc,pushx value \\{
allow_nesting
invoke proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx =stdcall proc,pushx value \\{
allow_nesting
stdcall proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx =cinvoke proc,pushx value \\{
allow_nesting
cinvoke proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx =ccall proc,pushx value \\{
allow_nesting
ccall proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx,pushx \\{
pushd <value>
pushx equ \\}
restore pushx \}
macro invoke proc,[arg]
\{ \reverse pushd <arg>
\common call [proc] \}
macro stdcall proc,[arg]
\{ \reverse pushd <arg>
\common call proc \}
macro cinvoke proc,[arg]
\{ \common \local size
size = 0
if ~ arg eq
\reverse pushd <arg>
size = size+4
match =double any,arg \\{ size = size+4 \\}
\common end if
call [proc]
if size
add esp,size
end if \}
macro ccall proc,[arg]
\{ \common \local size
size = 0
if ~ arg eq
\reverse pushd <arg>
size = size+4
match =double any,arg \\{ size = size+4 \\}
\common end if
call proc
if size
add esp,size
end if \} }
macro pushd value
{ match first=,more, value \{ \local ..alignment,..continue
if sizeof.TCHAR > 1
local ..alignment
virtual at $+5
align sizeof.TCHAR
..alignment = $-$$
end virtual
times ..alignment nop
end if
call ..continue
du value,0
..continue:
pushd equ \}
match pushd =addr var,pushd value \{ \local ..opcode,..address
if +var relativeto 0 | +var relativeto $
push var
else
lea edx,[var]
push edx
end if
pushd equ \}
match pushd =double [var],pushd value \{
push dword [var+4]
push dword [var]
pushd equ \}
match pushd =double =ptr var,pushd value \{
push dword [var+4]
push dword [var]
pushd equ \}
match pushd =double num,pushd value \{ \local ..high,..low
virtual at 0
dq num
load ..low dword from 0
load ..high dword from 4
end virtual
push ..high
push ..low
pushd equ \}
match pushd,pushd \{ \local ..continue
if value eqtype ''
if sizeof.TCHAR > 1
local ..alignment
virtual at $+5
align sizeof.TCHAR
..alignment = $-$$
end virtual
times ..alignment nop
end if
call ..continue
du value,0
..continue:
else
push value
end if
pushd equ \}
restore pushd }
allow_nesting
macro import lib,[functions]
{ common macro import_#lib \{ import lib,functions \} }
macro api [functions]
{ common macro all_api \{ all_api
api functions \} }
macro all_api {}
include 'api/kernel32.inc'
include 'api/user32.inc'
include 'api/gdi32.inc'
include 'api/advapi32.inc'
include 'api/comctl32.inc'
include 'api/comdlg32.inc'
include 'api/shell32.inc'
include 'api/wsock32.inc'
purge import,api
macro .data { section '.data' data readable writeable }
macro .code { section '.text' code readable executable }
macro .end label
{
entry label
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL',\
gdi32,'GDI32.DLL',\
advapi32,'ADVAPI32.DLL',\
comctl32,'COMCTL32.DLL',\
comdlg32,'COMDLG32.DLL',\
shell32,'SHELL32.DLL',\
wsock32,'WSOCK32.DLL'
import_kernel32
import_user32
import_gdi32
import_advapi32
import_comctl32
import_comdlg32
import_shell32
import_wsock32
all_api
}
virtual at 0
xchg eax,eax
detected_16bit = $-1
end virtual
if detected_16bit
format PE GUI 4.0
end if

201
tools/INCLUDE/WIN32WXP.INC Normal file
View file

@ -0,0 +1,201 @@
; Extended Win32 programming headers with parameters count checking (WideChar)
include 'win32w.inc'
include 'macro/if.inc'
macro allow_nesting
{ macro pushd value
\{ match ,value \\{
pushx equ \\}
match =pushx =invoke proc,pushx value \\{
allow_nesting
invoke proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx =stdcall proc,pushx value \\{
allow_nesting
stdcall proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx =cinvoke proc,pushx value \\{
allow_nesting
cinvoke proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx =ccall proc,pushx value \\{
allow_nesting
ccall proc
purge pushd,invoke,stdcall,cinvoke,ccall
push eax
pushx equ \\}
match =pushx,pushx \\{
pushd <value>
pushx equ \\}
restore pushx \}
macro invoke proc,[arg]
\{ \common count@stdcall = 0
if ~ arg eq
\forward count@stdcall = count@stdcall+1
match =double value, arg \\{ count@stdcall = count@stdcall+1 \\}
\common end if
if proc eqtype 0 & defined proc \# % & count@stdcall <> proc \# %
display "Error: invalid count of parameters for ",\`proc,".",0Dh,0Ah
assert 0
end if
\reverse pushd <arg>
\common call [proc] \}
macro stdcall proc,[arg]
\{ \common count@stdcall = 0
if ~ arg eq
\forward count@stdcall = count@stdcall+1
match =double value, arg \\{ count@stdcall = count@stdcall+1 \\}
\common end if
if proc eqtype 0 & defined proc \# % & count@stdcall <> proc \# %
display "Error: invalid count of parameters for ",\`proc,".",0Dh,0Ah
assert 0
end if
\reverse pushd <arg>
\common call proc \}
macro cinvoke proc,[arg]
\{ \common \local size
size = 0
if ~ arg eq
\reverse pushd <arg>
size = size+4
match =double any,arg \\{ size = size+4 \\}
\common end if
call [proc]
if size
add esp,size
end if \}
macro ccall proc,[arg]
\{ \common \local size
size = 0
if ~ arg eq
\reverse pushd <arg>
size = size+4
match =double any,arg \\{ size = size+4 \\}
\common end if
call proc
if size
add esp,size
end if \} }
macro pushd value
{ match first=,more, value \{ \local ..continue
times 1 - (rva $ and 1) nop
call ..continue
du value,0
..continue:
pushd equ \}
match pushd =addr var,pushd value \{ \local ..opcode,..address
if +var relativeto 0 | +var relativeto $
push var
else
lea edx,[var]
push edx
end if
pushd equ \}
match pushd =double [var],pushd value \{
push dword [var+4]
push dword [var]
pushd equ \}
match pushd =double =ptr var,pushd value \{
push dword [var+4]
push dword [var]
pushd equ \}
match pushd =double num,pushd value \{ \local ..high,..low
virtual at 0
dq num
load ..low dword from 0
load ..high dword from 4
end virtual
push ..high
push ..low
pushd equ \}
match pushd,pushd \{ \local ..continue
if value eqtype ''
times 1 - (rva $ and 1) nop
call ..continue
du value,0
..continue:
else
push value
end if
pushd equ \}
restore pushd }
allow_nesting
include 'pcount/kernel32.inc'
include 'pcount/user32.inc'
include 'pcount/gdi32.inc'
include 'pcount/advapi32.inc'
include 'pcount/comctl32.inc'
include 'pcount/comdlg32.inc'
include 'pcount/shell32.inc'
include 'pcount/wsock32.inc'
macro import lib,[functions]
{ common macro import_#lib \{ import lib,functions \} }
macro api [functions]
{ common macro all_api \{ all_api
api functions \} }
macro all_api {}
include 'api/kernel32.inc'
include 'api/user32.inc'
include 'api/gdi32.inc'
include 'api/advapi32.inc'
include 'api/comctl32.inc'
include 'api/comdlg32.inc'
include 'api/shell32.inc'
include 'api/wsock32.inc'
purge import,api
macro .data { section '.data' data readable writeable }
macro .code { section '.text' code readable executable }
macro .end label
{
entry label
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL',\
gdi32,'GDI32.DLL',\
advapi32,'ADVAPI32.DLL',\
comctl32,'COMCTL32.DLL',\
comdlg32,'COMDLG32.DLL',\
shell32,'SHELL32.DLL',\
wsock32,'WSOCK32.DLL'
import_kernel32
import_user32
import_gdi32
import_advapi32
import_comctl32
import_comdlg32
import_shell32
import_wsock32
all_api
}
virtual at 0
xchg eax,eax
detected_16bit = $-1
end virtual
if detected_16bit
format PE GUI 4.0
end if

25
tools/INCLUDE/WIN64A.INC Normal file
View file

@ -0,0 +1,25 @@
; Win64 programming headers (ASCII)
include 'macro/struct.inc'
include 'macro/proc64.inc'
include 'macro/com64.inc'
include 'macro/import64.inc'
include 'macro/export.inc'
include 'macro/resource.inc'
struc TCHAR [val] { common match any, val \{ . db val \}
match , val \{ . db ? \} }
sizeof.TCHAR = 1
include 'equates/kernel64.inc'
include 'equates/user64.inc'
include 'equates/gdi64.inc'
include 'equates/comctl64.inc'
include 'equates/comdlg64.inc'
include 'equates/shell64.inc'
macro api [name] { if used name
label name qword at name#A
end if }

205
tools/INCLUDE/WIN64AX.INC Normal file
View file

@ -0,0 +1,205 @@
; Extended Win64 programming headers (ASCII)
include 'win64a.inc'
include 'macro/if.inc'
macro allow_nesting
{ macro invoke proc,[arg]
\{ \common fastcall [proc],arg \}
macro fastcall proc,[arg]
\{ \common \local list,counter,flags,outer_frame,nested_frame,..close_nest
match =current@frame,current@frame \\{
frame
define outer_frame \\}
define counter
define list
flags = 0
\forward \local param,nested,isfloat,..next
match any,counter \\{ list equ list, \\}
counter equ counter+1
define param arg
define nested
isfloat = 0
match =invoke statement,param \\{
nested equ param
define param \\}
match =fastcall statement,param \\{
nested equ param
define param \\}
match =float =invoke statement,param \\{
define nested invoke statement
define param
isfloat = 1 \\}
match =float =fastcall statement,param \\{
define nested fastcall statement
define param
isfloat = 1 \\}
match statement,nested \\{
match =nested_frame,nested_frame \\\{
frame
define nested_frame \\\}
allow_nesting
statement
purge invoke_fastcall
if counter > 4
if isfloat
movq [rsp+size@frame+(counter-1)*8],xmm0
else
mov [rsp+size@frame+(counter-1)*8],rax
end if
else
flags = flags or 1 shl (counter-1)
if isfloat
flags = flags or 1 shl (4+counter-1)
end if
if ..close_nest > ..next
if float
movq [rsp+size@frame+(counter-1)*8],xmm0
else
mov [rsp+size@frame+(counter-1)*8],rax
end if
else
flags = flags or 1 shl (8+counter-1)
end if
end if
..next: \\}
list equ list <param>
\common ..close_nest:
match ,nested_frame \\{ endf \\}
if flags and 1
if flags and 1 shl 4
if ~ flags and 1 shl 8
movq xmm0,[rsp]
end if
else
if flags and 1 shl 8
mov rcx,rax
else
mov rcx,[rsp]
end if
end if
end if
if flags and 1 shl 1
if flags and 1 shl (4+1)
if flags and 1 shl (8+1)
movq xmm1,xmm0
else
movq xmm1,[rsp+8]
end if
else
if flags and 1 shl (8+1)
mov rdx,rax
else
mov rdx,[rsp+8]
end if
end if
end if
if flags and 1 shl 2
if flags and 1 shl (4+2)
if flags and 1 shl (8+2)
movq xmm2,xmm0
else
movq xmm2,[rsp+2*8]
end if
else
if flags and 1 shl (8+2)
mov r8,rax
else
mov r8,[rsp+2*8]
end if
end if
end if
if flags and 1 shl 3
if flags and 1 shl (4+3)
if flags and 1 shl (8+3)
movq xmm3,xmm0
else
movq xmm3,[rsp+3*8]
end if
else
if flags and 1 shl (8+3)
mov r9,rax
else
mov r9,[rsp+3*8]
end if
end if
end if
match args,list \\{ fastcall proc,args \\}
match ,list \\{ fastcall proc \\}
match ,outer_frame \\{ endf \\} \} }
allow_nesting
macro import lib,[functions]
{ common macro import_#lib \{ import lib,functions \} }
macro api [functions]
{ common macro all_api \{ all_api
api functions \} }
macro all_api {}
include 'api/kernel32.inc'
include 'api/user32.inc'
include 'api/gdi32.inc'
include 'api/advapi32.inc'
include 'api/comctl32.inc'
include 'api/comdlg32.inc'
include 'api/shell32.inc'
include 'api/wsock32.inc'
purge import,api
macro .data { section '.data' data readable writeable }
macro .code {
section '.text' code readable executable
entry $
sub rsp,8
local main,code
entry equ main
if main <> code
jmp main
end if
code: }
macro .end value
{
label entry at value
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL',\
gdi32,'GDI32.DLL',\
advapi32,'ADVAPI32.DLL',\
comctl32,'COMCTL32.DLL',\
comdlg32,'COMDLG32.DLL',\
shell32,'SHELL32.DLL',\
wsock32,'WSOCK32.DLL'
import_kernel32
import_user32
import_gdi32
import_advapi32
import_comctl32
import_comdlg32
import_shell32
import_wsock32
all_api
}
virtual at 0
inc ax
if $=1
detected_16bit = 1
else
detected_16bit = 0
end if
end virtual
if detected_16bit
format PE64 GUI 5.0
end if

221
tools/INCLUDE/WIN64AXP.INC Normal file
View file

@ -0,0 +1,221 @@
; Extended Win64 programming headers with parameters count checking (ASCII)
include 'win64a.inc'
include 'macro/if.inc'
macro allow_nesting
{ macro invoke proc,[arg]
\{ \common fastcall [proc],arg \}
macro fastcall proc,[arg]
\{ \common \local list,counter,flags,outer_frame,nested_frame,..close_nest
match =current@frame,current@frame \\{
frame
define outer_frame \\}
define counter
define list
flags = 0
\forward \local param,nested,isfloat,..next
match any,counter \\{ list equ list, \\}
counter equ counter+1
define param arg
define nested
isfloat = 0
match =invoke statement,param \\{
nested equ param
define param \\}
match =fastcall statement,param \\{
nested equ param
define param \\}
match =float =invoke statement,param \\{
define nested invoke statement
define param
isfloat = 1 \\}
match =float =fastcall statement,param \\{
define nested fastcall statement
define param
isfloat = 1 \\}
match statement,nested \\{
match =nested_frame,nested_frame \\\{
frame
define nested_frame \\\}
allow_nesting
statement
purge invoke_fastcall
if counter > 4
if isfloat
movq [rsp+size@frame+(counter-1)*8],xmm0
else
mov [rsp+size@frame+(counter-1)*8],rax
end if
else
flags = flags or 1 shl (counter-1)
if isfloat
flags = flags or 1 shl (4+counter-1)
end if
if ..close_nest > ..next
if float
movq [rsp+size@frame+(counter-1)*8],xmm0
else
mov [rsp+size@frame+(counter-1)*8],rax
end if
else
flags = flags or 1 shl (8+counter-1)
end if
end if
..next: \\}
match any,param \\{ list equ list <param> \\}
\common ..close_nest:
match ,nested_frame \\{ endf \\}
if flags and 1
if flags and 1 shl 4
if ~ flags and 1 shl 8
movq xmm0,[rsp]
end if
else
if flags and 1 shl 8
mov rcx,rax
else
mov rcx,[rsp]
end if
end if
end if
if flags and 1 shl 1
if flags and 1 shl (4+1)
if flags and 1 shl (8+1)
movq xmm1,xmm0
else
movq xmm1,[rsp+8]
end if
else
if flags and 1 shl (8+1)
mov rdx,rax
else
mov rdx,[rsp+8]
end if
end if
end if
if flags and 1 shl 2
if flags and 1 shl (4+2)
if flags and 1 shl (8+2)
movq xmm2,xmm0
else
movq xmm2,[rsp+2*8]
end if
else
if flags and 1 shl (8+2)
mov r8,rax
else
mov r8,[rsp+2*8]
end if
end if
end if
if flags and 1 shl 3
if flags and 1 shl (4+3)
if flags and 1 shl (8+3)
movq xmm3,xmm0
else
movq xmm3,[rsp+3*8]
end if
else
if flags and 1 shl (8+3)
mov r9,rax
else
mov r9,[rsp+3*8]
end if
end if
end if
match args,list \\{ fastcall proc,args \\}
match ,list \\{ fastcall proc
define counter 0 \\}
match ,outer_frame \\{ endf \\}
proc@paramcheck equ proc
match [name],proc \\{ define proc@paramcheck name \\}
match name,proc@paramcheck \\{ if name eqtype 0 & defined name \\# % & counter <> name \\# %
display "Error: invalid count of parameters for ",\\`name,".",0Dh,0Ah
assert 0
end if \\} \} }
allow_nesting
include 'pcount/kernel32.inc'
include 'pcount/user32.inc'
include 'pcount/gdi32.inc'
include 'pcount/advapi32.inc'
include 'pcount/comctl32.inc'
include 'pcount/comdlg32.inc'
include 'pcount/shell32.inc'
include 'pcount/wsock32.inc'
macro import lib,[functions]
{ common macro import_#lib \{ import lib,functions \} }
macro api [functions]
{ common macro all_api \{ all_api
api functions \} }
macro all_api {}
include 'api/kernel32.inc'
include 'api/user32.inc'
include 'api/gdi32.inc'
include 'api/advapi32.inc'
include 'api/comctl32.inc'
include 'api/comdlg32.inc'
include 'api/shell32.inc'
include 'api/wsock32.inc'
purge import,api
macro .data { section '.data' data readable writeable }
macro .code {
section '.text' code readable executable
entry $
sub rsp,8
local main,code
entry equ main
if main <> code
jmp main
end if
code: }
macro .end value
{
label entry at value
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL',\
gdi32,'GDI32.DLL',\
advapi32,'ADVAPI32.DLL',\
comctl32,'COMCTL32.DLL',\
comdlg32,'COMDLG32.DLL',\
shell32,'SHELL32.DLL',\
wsock32,'WSOCK32.DLL'
import_kernel32
import_user32
import_gdi32
import_advapi32
import_comctl32
import_comdlg32
import_shell32
import_wsock32
all_api
}
virtual at 0
inc ax
if $=1
detected_16bit = 1
else
detected_16bit = 0
end if
end virtual
if detected_16bit
format PE64 GUI 5.0
end if

24
tools/INCLUDE/WIN64W.INC Normal file
View file

@ -0,0 +1,24 @@
; Win64 programming headers (WideChar)
include 'macro/struct.inc'
include 'macro/proc64.inc'
include 'macro/com64.inc'
include 'macro/import64.inc'
include 'macro/export.inc'
include 'macro/resource.inc'
struc TCHAR [val] { common match any, val \{ . du val \}
match , val \{ . du ? \} }
sizeof.TCHAR = 2
include 'equates/kernel64.inc'
include 'equates/user64.inc'
include 'equates/gdi64.inc'
include 'equates/comctl64.inc'
include 'equates/comdlg64.inc'
include 'equates/shell64.inc'
macro api [name] { if used name
label name qword at name#W
end if }

204
tools/INCLUDE/WIN64WX.INC Normal file
View file

@ -0,0 +1,204 @@
; Extended Win64 programming headers (WideChar)
include 'win64w.inc'
include 'macro/if.inc'
macro allow_nesting
{ macro invoke proc,[arg]
\{ \common fastcall [proc],arg \}
macro fastcall proc,[arg]
\{ \common \local list,counter,flags,outer_frame,nested_frame,..close_nest
match =current@frame,current@frame \\{
frame
define outer_frame \\}
define counter
define list
flags = 0
\forward \local param,nested,isfloat,..next
match any,counter \\{ list equ list, \\}
counter equ counter+1
define param arg
define nested
isfloat = 0
match =invoke statement,param \\{
nested equ param
define param \\}
match =fastcall statement,param \\{
nested equ param
define param \\}
match =float =invoke statement,param \\{
define nested invoke statement
define param
isfloat = 1 \\}
match =float =fastcall statement,param \\{
define nested fastcall statement
define param
isfloat = 1 \\}
match statement,nested \\{
match =nested_frame,nested_frame \\\{
frame
define nested_frame \\\}
allow_nesting
statement
purge invoke_fastcall
if counter > 4
if isfloat
movq [rsp+size@frame+(counter-1)*8],xmm0
else
mov [rsp+size@frame+(counter-1)*8],rax
end if
else
flags = flags or 1 shl (counter-1)
if isfloat
flags = flags or 1 shl (4+counter-1)
end if
if ..close_nest > ..next
if float
movq [rsp+size@frame+(counter-1)*8],xmm0
else
mov [rsp+size@frame+(counter-1)*8],rax
end if
else
flags = flags or 1 shl (8+counter-1)
end if
end if
..next: \\}
list equ list <param>
\common ..close_nest:
match ,nested_frame \\{ endf \\}
if flags and 1
if flags and 1 shl 4
if ~ flags and 1 shl 8
movq xmm0,[rsp]
end if
else
if flags and 1 shl 8
mov rcx,rax
else
mov rcx,[rsp]
end if
end if
end if
if flags and 1 shl 1
if flags and 1 shl (4+1)
if flags and 1 shl (8+1)
movq xmm1,xmm0
else
movq xmm1,[rsp+8]
end if
else
if flags and 1 shl (8+1)
mov rdx,rax
else
mov rdx,[rsp+8]
end if
end if
end if
if flags and 1 shl 2
if flags and 1 shl (4+2)
if flags and 1 shl (8+2)
movq xmm2,xmm0
else
movq xmm2,[rsp+2*8]
end if
else
if flags and 1 shl (8+2)
mov r8,rax
else
mov r8,[rsp+2*8]
end if
end if
end if
if flags and 1 shl 3
if flags and 1 shl (4+3)
if flags and 1 shl (8+3)
movq xmm3,xmm0
else
movq xmm3,[rsp+3*8]
end if
else
if flags and 1 shl (8+3)
mov r9,rax
else
mov r9,[rsp+3*8]
end if
end if
end if
match args,list \\{ fastcall proc,args \\}
match ,list \\{ fastcall proc \\}
match ,outer_frame \\{ endf \\} \} }
allow_nesting
macro import lib,[functions]
{ common macro import_#lib \{ import lib,functions \} }
macro api [functions]
{ common macro all_api \{ all_api
api functions \} }
macro all_api {}
include 'api/kernel32.inc'
include 'api/user32.inc'
include 'api/gdi32.inc'
include 'api/advapi32.inc'
include 'api/comctl32.inc'
include 'api/comdlg32.inc'
include 'api/shell32.inc'
include 'api/wsock32.inc'
purge import,api
macro .data { section '.data' data readable writeable }
macro .code {
section '.text' code readable executable
entry $
sub rsp,8
local main,code
entry equ main
if main <> code
jmp main
end if
code: }
macro .end value
{
label entry at value
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL',\
gdi32,'GDI32.DLL',\
advapi32,'ADVAPI32.DLL',\
comctl32,'COMCTL32.DLL',\
comdlg32,'COMDLG32.DLL',\
shell32,'SHELL32.DLL',\
wsock32,'WSOCK32.DLL'
import_kernel32
import_user32
import_gdi32
import_advapi32
import_comctl32
import_comdlg32
import_shell32
import_wsock32
all_api
}
virtual at 0
inc ax
if $=1
detected_16bit = 1
else
detected_16bit = 0
end if
end virtual
if detected_16bit
format PE64 GUI 5.0
end if

221
tools/INCLUDE/WIN64WXP.INC Normal file
View file

@ -0,0 +1,221 @@
; Extended Win64 programming headers with parameters count checking (WideChar)
include 'win64w.inc'
include 'macro/if.inc'
macro allow_nesting
{ macro invoke proc,[arg]
\{ \common fastcall [proc],arg \}
macro fastcall proc,[arg]
\{ \common \local list,counter,flags,outer_frame,nested_frame,..close_nest
match =current@frame,current@frame \\{
frame
define outer_frame \\}
define counter
define list
flags = 0
\forward \local param,nested,isfloat,..next
match any,counter \\{ list equ list, \\}
counter equ counter+1
define param arg
define nested
isfloat = 0
match =invoke statement,param \\{
nested equ param
define param \\}
match =fastcall statement,param \\{
nested equ param
define param \\}
match =float =invoke statement,param \\{
define nested invoke statement
define param
isfloat = 1 \\}
match =float =fastcall statement,param \\{
define nested fastcall statement
define param
isfloat = 1 \\}
match statement,nested \\{
match =nested_frame,nested_frame \\\{
frame
define nested_frame \\\}
allow_nesting
statement
purge invoke_fastcall
if counter > 4
if isfloat
movq [rsp+size@frame+(counter-1)*8],xmm0
else
mov [rsp+size@frame+(counter-1)*8],rax
end if
else
flags = flags or 1 shl (counter-1)
if isfloat
flags = flags or 1 shl (4+counter-1)
end if
if ..close_nest > ..next
if float
movq [rsp+size@frame+(counter-1)*8],xmm0
else
mov [rsp+size@frame+(counter-1)*8],rax
end if
else
flags = flags or 1 shl (8+counter-1)
end if
end if
..next: \\}
match any,param \\{ list equ list <param> \\}
\common ..close_nest:
match ,nested_frame \\{ endf \\}
if flags and 1
if flags and 1 shl 4
if ~ flags and 1 shl 8
movq xmm0,[rsp]
end if
else
if flags and 1 shl 8
mov rcx,rax
else
mov rcx,[rsp]
end if
end if
end if
if flags and 1 shl 1
if flags and 1 shl (4+1)
if flags and 1 shl (8+1)
movq xmm1,xmm0
else
movq xmm1,[rsp+8]
end if
else
if flags and 1 shl (8+1)
mov rdx,rax
else
mov rdx,[rsp+8]
end if
end if
end if
if flags and 1 shl 2
if flags and 1 shl (4+2)
if flags and 1 shl (8+2)
movq xmm2,xmm0
else
movq xmm2,[rsp+2*8]
end if
else
if flags and 1 shl (8+2)
mov r8,rax
else
mov r8,[rsp+2*8]
end if
end if
end if
if flags and 1 shl 3
if flags and 1 shl (4+3)
if flags and 1 shl (8+3)
movq xmm3,xmm0
else
movq xmm3,[rsp+3*8]
end if
else
if flags and 1 shl (8+3)
mov r9,rax
else
mov r9,[rsp+3*8]
end if
end if
end if
match args,list \\{ fastcall proc,args \\}
match ,list \\{ fastcall proc
define counter 0 \\}
match ,outer_frame \\{ endf \\}
proc@paramcheck equ proc
match [name],proc \\{ define proc@paramcheck name \\}
match name,proc@paramcheck \\{ if name eqtype 0 & defined name \\# % & counter <> name \\# %
display "Error: invalid count of parameters for ",\\`name,".",0Dh,0Ah
assert 0
end if \\} \} }
allow_nesting
include 'pcount/kernel32.inc'
include 'pcount/user32.inc'
include 'pcount/gdi32.inc'
include 'pcount/advapi32.inc'
include 'pcount/comctl32.inc'
include 'pcount/comdlg32.inc'
include 'pcount/shell32.inc'
include 'pcount/wsock32.inc'
macro import lib,[functions]
{ common macro import_#lib \{ import lib,functions \} }
macro api [functions]
{ common macro all_api \{ all_api
api functions \} }
macro all_api {}
include 'api/kernel32.inc'
include 'api/user32.inc'
include 'api/gdi32.inc'
include 'api/advapi32.inc'
include 'api/comctl32.inc'
include 'api/comdlg32.inc'
include 'api/shell32.inc'
include 'api/wsock32.inc'
purge import,api
macro .data { section '.data' data readable writeable }
macro .code {
section '.text' code readable executable
entry $
sub rsp,8
local main,code
entry equ main
if main <> code
jmp main
end if
code: }
macro .end value
{
label entry at value
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL',\
gdi32,'GDI32.DLL',\
advapi32,'ADVAPI32.DLL',\
comctl32,'COMCTL32.DLL',\
comdlg32,'COMDLG32.DLL',\
shell32,'SHELL32.DLL',\
wsock32,'WSOCK32.DLL'
import_kernel32
import_user32
import_gdi32
import_advapi32
import_comctl32
import_comdlg32
import_shell32
import_wsock32
all_api
}
virtual at 0
inc ax
if $=1
detected_16bit = 1
else
detected_16bit = 0
end if
end virtual
if detected_16bit
format PE64 GUI 5.0
end if

BIN
tools/fasm.exe Normal file

Binary file not shown.