Files
bluflame/hgplus/obliterator/inc/windows.inc
2026-04-18 22:31:51 +02:00

336 lines
8.6 KiB
PHP

; windows.inc - las/mercury
; ntdll
extern _LdrShutdownProcess@0
; kernel32
extern _GetTickCount@0
extern _ExitProcess@4
extern _Sleep@4
extern _OpenFile@12
extern __lread@12
extern _K32EnumProcessModules@16
extern _GetCurrentProcess@0
extern _OutputDebugStringA@4
extern _GetStdHandle@4
extern _WriteFile@20
extern _CreateThread@24
; user32
extern _ChangeDisplaySettingsA@8
extern _CreateWindowExA@48
extern _GetAsyncKeyState@4
extern _GetDC@4
extern _ShowCursor@4
extern _SetCursor@4
extern _SetCursorPos@8
extern _PeekMessageA@20
extern _PeekMessageW@20
extern _TranslateMessage@4
extern _DispatchMessageA@4
extern _MessageBoxA@16
; gdi32
extern _ChoosePixelFormat@8
extern _SetPixelFormat@12
extern _SwapBuffers@4
; winmm
extern _waveOutOpen@24
extern _waveOutPrepareHeader@12
extern _waveOutWrite@12
extern _waveOutGetPosition@12
%define ATOM_DIALOG 0x8002
%define ATOM_BUTTON 0xC017
%define ATOM_EDIT 0xC018
%define ATOM_STATIC 0xC019
%define ATOM_LISTBOX 0xC01A
%define ATOM_SCROLLBAR 0xC01B
%define ATOM_COMBOBOX 0xC01C
struc WAVEFORMATEX
.wFormatTag resw 1
.nChannels resw 1
.nSamplesPerSec resd 1
.nAvgBytesPerSec resd 1
.nBlockAlign resw 1
.wBitsPerSample resw 1
.cbSize resw 1
endstruc
struc WAVEHDR
.lpData resd 1
.dwBufferLength resd 1
.dwBytesRecorded resd 1
.dwUser resd 1
.dwFlags resd 1
.dwLoops resd 1
.lpNext resd 1
.reserved resd 1
endstruc
struc MMTIME
.wType resd 1
.data resd 1
.padding resd 1
endstruc
%define TIME_MS 1
%define TIME_SAMPLES 2
%define TIME_BYTES 4
%define TIME_SMPTE 8
%define TIME_MIDI 16
%define TIME_TICKS 32
%define WAVE_MAPPER -1
%define WAVE_FORMAT_PCM 1
%define WAVE_FORMAT_IEEE_FLOAT 3
%define WHDR_DONE 0x00000001
%define WHDR_PREPARED 0x00000002
%define WHDR_BEGINLOOP 0x00000004
%define WHDR_ENDLOOP 0x00000008
%define WHDR_INQUEUE 0x00000010
%define WAVERR_BASE (0x20)
%define WAVERR_BADFORMAT (WAVERR_BASE+0)
%define WAVERR_STILLPLAYING (WAVERR_BASE+1)
%define WAVERR_UNPREPARED (WAVERR_BASE+2)
%define WAVERR_SYNC (WAVERR_BASE+3)
%define WAVERR_LASTERROR (WAVERR_BASE+3)
struc CONTEXT
.ContextFlags resd 1
._dr0 resd 1
._dr1 resd 1
._dr2 resd 1
._dr3 resd 1
._dr6 resd 1
._dr7 resd 1
.FloatSave resb 32+80
._gs resd 1
._fs resd 1
._es resd 1
._ds resd 1
._edi resd 1
._esi resd 1
._ebx resd 1
._edx resd 1
._ecx resd 1
._eax resd 1
._ebp resd 1
._eip resd 1
._cs resd 1
._eflags resd 1
._esp resd 1
._ss resd 1
.ExtendedRegisters resb 512
endstruc
struc EXCEPTION_POINTERS
.pExceptionRecord resd 1
.pContextRecord resd 1
endstruc
struc MSG
.hwnd: resd 1
.msg: resd 1
.wParam: resd 1
.lParam: resd 1
.time: resd 1
.pt: resd 2
endstruc
%define OF_READ 0x00000000
%define DM_BITSPERPEL 0x00040000
%define DM_PELSWIDTH 0x00080000
%define DM_PELSHEIGHT 0x00100000
%define CDS_FULLSCREEN 0x00000004
%define PFD_SUPPORT_OPENGL 0x00000020
%define PFD_DOUBLEBUFFER 0x00000001
%define PFD_DRAW_TO_WINDOW 0x00000004
%define PFD_MAIN_PLANE 0x00000000
%define PFD_TYPE_RGBA 0x00000000
%define WM_QUIT 0x0012
%define WM_KEYDOWN 0x0100
%define WM_CHAR 0x0102
%define PM_NOREMOVE 0x0000
%define PM_REMOVE 0x0001
%define PM_NOYIELD 0x0002
%define VK_ESCAPE 0x1b
%define VK_R 0x52
%define STD_OUTPUT_HANDLE -11
%define STD_ERROR_HANDLE -12
%define WS_OVERLAPPED 0x00000000
%define WS_POPUP 0x80000000
%define WS_CHILD 0x40000000
%define WS_MINIMIZE 0x20000000
%define WS_VISIBLE 0x10000000
%define WS_DISABLED 0x08000000
%define WS_CLIPSIBLINGS 0x04000000
%define WS_CLIPCHILDREN 0x02000000
%define WS_MAXIMIZE 0x01000000
%define WS_CAPTION 0x00C00000
%define WS_BORDER 0x00800000
%define WS_DLGFRAME 0x00400000
%define WS_VSCROLL 0x00200000
%define WS_HSCROLL 0x00100000
%define WS_SYSMENU 0x00080000
%define WS_THICKFRAME 0x00040000
%define WS_GROUP 0x00020000
%define WS_TABSTOP 0x00010000
%define WS_MINIMIZEBOX 0x00020000
%define WS_MAXIMIZEBOX 0x00010000
%define WS_TILED WS_OVERLAPPED
%define WS_ICONIC WS_MINIMIZE
%define WS_SIZEBOX WS_THICKFRAME
%define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW
%define WS_EX_DLGMODALFRAME 0x00000001
%define WS_EX_NOPARENTNOTIFY 0x00000004
%define WS_EX_TOPMOST 0x00000008
%define WS_EX_ACCEPTFILES 0x00000010
%define WS_EX_TRANSPARENT 0x00000020
%define WS_EX_MDICHILD 0x00000040
%define WS_EX_TOOLWINDOW 0x00000080
%define WS_EX_WINDOWEDGE 0x00000100
%define WS_EX_CLIENTEDGE 0x00000200
%define WS_EX_CONTEXTHELP 0x00000400
%define OUT_DEFAULT_PRECIS 0
%define OUT_STRING_PRECIS 1
%define OUT_CHARACTER_PRECIS 2
%define OUT_STROKE_PRECIS 3
%define OUT_TT_PRECIS 4
%define OUT_DEVICE_PRECIS 5
%define OUT_RASTER_PRECIS 6
%define OUT_TT_ONLY_PRECIS 7
%define OUT_OUTLINE_PRECIS 8
%define OUT_SCREEN_OUTLINE_PRECIS 9
%define OUT_PS_ONLY_PRECIS 10
%define MB_OK 0x00000000
%define MB_OKCANCEL 0x00000001
%define MB_ABORTRETRYIGNORE 0x00000002
%define MB_YESNOCANCEL 0x00000003
%define MB_YESNO 0x00000004
%define MB_RETRYCANCEL 0x00000005
%define MB_CANCELTRYCONTINUE 0x00000006
%define MB_ICONHAND 0x00000010
%define MB_ICONQUESTION 0x00000020
%define MB_ICONEXCLAMATION 0x00000030
%define MB_ICONASTERISK 0x00000040
%define MB_USERICON 0x00000080
%define MB_ICONWARNING MB_ICONEXCLAMATION
%define MB_ICONERROR MB_ICONHAND
%define MB_ICONINFORMATION MB_ICONASTERISK
%define MB_ICONSTOP MB_ICONHAND
%define DT_TOP 0x00000000
%define DT_LEFT 0x00000000
%define DT_CENTER 0x00000001
%define DT_RIGHT 0x00000002
%define DT_VCENTER 0x00000004
%define DT_BOTTOM 0x00000008
%define DT_WORDBREAK 0x00000010
%define DT_SINGLELINE 0x00000020
%define DT_EXPANDTABS 0x00000040
%define DT_TABSTOP 0x00000080
%define DT_NOCLIP 0x00000100
%define DT_EXTERNALLEADING 0x00000200
%define DT_CALCRECT 0x00000400
%define DT_NOPREFIX 0x00000800
%define DT_INTERNAL 0x00001000
%define DT_EDITCONTROL 0x00002000
%define DT_PATH_ELLIPSIS 0x00004000
%define DT_END_ELLIPSIS 0x00008000
%define DT_MODIFYSTRING 0x00010000
%define DT_RTLREADING 0x00020000
%define DT_WORD_ELLIPSIS 0x00040000
%define DT_NOFULLWIDTHCHARBREAK 0x00080000
%define DT_HIDEPREFIX 0x00100000
%define DT_PREFIXONLY 0x00200000
%define OPEN_EXISTING 3
%define FILE_SHARE_READ 1
%define FW_DONTCARE 0
%define FW_THIN 100
%define FW_EXTRALIGHT 200
%define FW_LIGHT 300
%define FW_NORMAL 400
%define FW_MEDIUM 500
%define FW_SEMIBOLD 600
%define FW_BOLD 700
%define FW_EXTRABOLD 800
%define FW_HEAVY 900
%define CLIP_DEFAULT_PRECIS 0
%define CLIP_CHARACTER_PRECIS 1
%define CLIP_STROKE_PRECIS 2
%define CLIP_MASK 15
%define CLIP_LH_ANGLES (1 << 4)
%define CLIP_TT_ALWAYS (2 << 4)
%define CLIP_EMBEDDED (8 << 4)
%define DEFAULT_QUALITY 0
%define DRAFT_QUALITY 1
%define PROOF_QUALITY 2
%define NONANTIALIASED_QUALITY 3
%define ANTIALIASED_QUALITY 4
%define DEFAULT_PITCH 0
%define FIXED_PITCH 1
%define VARIABLE_PITCH 2
%define MONO_FONT 8;
%define ANSI_CHARSET 0
%define DEFAULT_CHARSET 1
%define SYMBOL_CHARSET 2
%define SHIFTJIS_CHARSET 0x80
%define HANGEUL_CHARSET 129
%define GB2312_CHARSET 134
%define CHINESEBIG5_CHARSET 136
%define OEM_CHARSET 255
%define JOHAB_CHARSET 130
%define HEBREW_CHARSET 177
%define ARABIC_CHARSET 178
%define GREEK_CHARSET 161
%define TURKISH_CHARSET 162
%define VIETNAMESE_CHARSET 163
%define THAI_CHARSET 222
%define EASTEUROPE_CHARSET 238
%define RUSSIAN_CHARSET 204
%define MAC_CHARSET 77
%define BALTIC_CHARSET 186
%define FS_LATIN1 1
%define FS_LATIN2 2
%define FS_CYRILLIC 4
%define FS_GREEK 8
%define FS_TURKISH 0x10
%define FS_HEBREW 0x20
%define FS_ARABIC 0x40
%define FS_BALTIC 0x80
%define FS_VIETNAMESE 0x00000100
%define FS_THAI 0x10000
%define FS_JISJAPAN 0x20000
%define FS_CHINESESIMP 0x40000
%define FS_WANSUNG 0x80000
%define FS_CHINESETRAD 0x100000
%define FS_JOHAB 0x200000
%define FS_SYMBOL 0x80000000
%define FF_DONTCARE (0 << 4)
%define FF_ROMAN (1 << 4)
%define FF_SWISS (2 << 4)
%define FF_MODERN (3 << 4)
%define FF_SCRIPT (4 << 4)
%define FF_DECORATIVE (5 << 4)