OSSDKImpossible SDK

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.

DLLFunctions
kernel32.dllAcquireSRWLockExclusive 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.

DLLFunctions
user32.dllBeginPaint 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.dllSetDIBitsToDevice

Tier 2: Documents

Clipboard, drag and drop, file watching, starting programs. 92 functions with the tiers before it.

DLLFunctions
user32.dllCloseClipboard EmptyClipboard GetClipboardData OpenClipboard SetClipboardData
kernel32.dllCreateProcessW GlobalAlloc GlobalLock GlobalUnlock ReadDirectoryChangesW
shell32.dllDragAcceptFiles DragFinish DragQueryFileW ShellExecuteW

Tier 3: Media

Sound out and in. 105 functions with the tiers before it.

DLLFunctions
winmm.dllwaveInAddBuffer 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.

DLLFunctions
ws2_32.dllWSACleanup WSAGetLastError WSAStartup accept bind closesocket connect freeaddrinfo getaddrinfo ioctlsocket listen recv recvfrom select send sendto setsockopt shutdown socket
bcrypt.dllBCryptGenRandom
crypt32.dllCryptProtectData CryptUnprotectData
kernel32.dllLocalFree

Tier 5: Desktop

Seeing and driving other windows, and devices. 153 functions with the tiers before it.

DLLFunctions
user32.dllEnumDisplayMonitors EnumWindows GetDC GetForegroundWindow GetKeyboardLayout GetWindowTextW GetWindowThreadProcessId IsWindowVisible MapVirtualKeyExW PrintWindow RegisterHotKey ReleaseDC SendInput SetLayeredWindowAttributes SetWindowDisplayAffinity ToUnicodeEx UnregisterHotKey
gdi32.dllBitBlt CreateCompatibleDC CreateDIBSection DeleteDC DeleteObject SelectObject
dwmapi.dllDwmGetWindowAttribute
kernel32.dllDeviceIoControl
GeneratedMade from abi/tiers.json, project.jsonPublished from dfbf2d3