Guide
Tiers
Which Windows functions may a program call? The ones in its tier and the tiers before it, 153 in all.
A program names its tier in CMakeLists.txt, and the build reads the finished program. A function outside the tier, an import by ordinal, a delay-loaded DLL, a bound import or thread-local storage fails the build.
Tier 0: Console
Files, memory, time, threads. 44 functions with the tiers before it.
| DLL | Functions |
|---|---|
kernel32.dll | AcquireSRWLockExclusive CloseHandle CreateDirectoryW CreateEventW CreateFileW CreateThread DeleteFileW ExitProcess FindClose FindFirstFileW FindNextFileW FlushFileBuffers GetCommandLineW GetConsoleMode GetEnvironmentVariableW GetFileAttributesW GetFileSizeEx GetLastError GetModuleFileNameW GetModuleHandleW GetProcAddress GetProcessHeap GetStdHandle GetSystemInfo GetSystemTimeAsFileTime HeapAlloc HeapFree HeapReAlloc LoadLibraryW MoveFileExW QueryPerformanceCounter QueryPerformanceFrequency ReadConsoleW ReadFile ReleaseSRWLockExclusive SetEndOfFile SetEvent SetFilePointerEx Sleep VirtualAlloc VirtualFree WaitForSingleObject WriteConsoleW WriteFile |
Tier 1: Window
One window, input, and one call that shows a bitmap. 78 functions with the tiers before it.
| DLL | Functions |
|---|---|
user32.dll | BeginPaint CreateWindowExW DefWindowProcW DestroyWindow DispatchMessageW EndPaint GetClientRect GetCursorPos GetDpiForWindow GetKeyState GetMessageW GetMonitorInfoW GetSystemMetrics GetWindowLongPtrW GetWindowRect InvalidateRect KillTimer LoadCursorW MonitorFromWindow PeekMessageW PostMessageW PostQuitMessage RegisterClassExW ReleaseCapture ScreenToClient SetCapture SetCursor SetTimer SetWindowLongPtrW SetWindowPos SetWindowTextW ShowWindow TranslateMessage |
gdi32.dll | SetDIBitsToDevice |
Tier 2: Documents
Clipboard, drag and drop, file watching, starting programs. 92 functions with the tiers before it.
| DLL | Functions |
|---|---|
user32.dll | CloseClipboard EmptyClipboard GetClipboardData OpenClipboard SetClipboardData |
kernel32.dll | CreateProcessW GlobalAlloc GlobalLock GlobalUnlock ReadDirectoryChangesW |
shell32.dll | DragAcceptFiles DragFinish DragQueryFileW ShellExecuteW |
Tier 3: Media
Sound out and in. 105 functions with the tiers before it.
| DLL | Functions |
|---|---|
winmm.dll | waveInAddBuffer waveInClose waveInOpen waveInPrepareHeader waveInReset waveInStart waveInUnprepareHeader waveOutClose waveOutOpen waveOutPrepareHeader waveOutReset waveOutUnprepareHeader waveOutWrite |
Tier 4: Network
Sockets, secure random numbers, protected passwords. 128 functions with the tiers before it.
| DLL | Functions |
|---|---|
ws2_32.dll | WSACleanup WSAGetLastError WSAStartup accept bind closesocket connect freeaddrinfo getaddrinfo ioctlsocket listen recv recvfrom select send sendto setsockopt shutdown socket |
bcrypt.dll | BCryptGenRandom |
crypt32.dll | CryptProtectData CryptUnprotectData |
kernel32.dll | LocalFree |
Tier 5: Desktop
Seeing and driving other windows, and devices. 153 functions with the tiers before it.
| DLL | Functions |
|---|---|
user32.dll | EnumDisplayMonitors EnumWindows GetDC GetForegroundWindow GetKeyboardLayout GetWindowTextW GetWindowThreadProcessId IsWindowVisible MapVirtualKeyExW PrintWindow RegisterHotKey ReleaseDC SendInput SetLayeredWindowAttributes SetWindowDisplayAffinity ToUnicodeEx UnregisterHotKey |
gdi32.dll | BitBlt CreateCompatibleDC CreateDIBSection DeleteDC DeleteObject SelectObject |
dwmapi.dll | DwmGetWindowAttribute |
kernel32.dll | DeviceIoControl |
abi/tiers.json, project.jsonPublished from dfbf2d3