This file contains thin wrappers around Windows-specific APIs, with these specific goals in mind:

  • Convert “errno”-style error codes into Zig errors.
  • When null-terminated or UTF16LE byte buffers are required, provide APIs which accept slices as well as APIs which accept null-terminated UTF16LE byte buffers.

Types

Functions

fn CTL_CODE(deviceType: u16, function: u12, method: TransferType, access: u2) DWORD

https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/defining-i-o-co…

https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/defining-i-o-control-codes

fn CloseHandle(hObject: HANDLE) void

No documentation provided.

fn CreateEventEx(attributes: ?*SECURITY_ATTRIBUTES, name: []const u8, flags: DWORD, desired_access: DWORD) !HANDLE

No documentation provided.

fn CreateEventExW(attributes: ?*SECURITY_ATTRIBUTES, nameW: [*:0]const u16, flags: DWORD, desired_access: DWORD) !HANDLE

No documentation provided.

fn CreateIoCompletionPort(file_handle: HANDLE, existing_completion_port: ?HANDLE, completion_key: usize, concurrent_thread_count: DWORD) CreateIoCompletionPortError!HANDLE

No documentation provided.

fn CreatePipe(rd: *HANDLE, wr: *HANDLE, sattr: *const SECURITY_ATTRIBUTES) CreatePipeError!void

No documentation provided.

fn CreateProcessW(lpApplicationName: ?LPWSTR, lpCommandLine: LPWSTR, lpProcessAttributes: ?*SECURITY_ATTRIBUTES, lpThreadAttributes: ?*SECURITY_ATTRIBUTES, bInheritHandles: BOOL, dwCreationFlags: DWORD, lpEnvironment: ?*anyopaque, lpCurrentDirectory: ?LPWSTR, lpStartupInfo: *STARTUPINFOW, lpProcessInformation: *PROCESS_INFORMATION) CreateProcessError!void

No documentation provided.

fn CreateSymbolicLink(dir: ?HANDLE, sym_link_path: []const u16, target_path: []const u16, is_directory: bool) CreateSymbolicLinkError!void

Needs either:

  • SeCreateSymbolicLinkPrivilege privilege or
  • Developer mode…

Needs either:

  • SeCreateSymbolicLinkPrivilege privilege or
  • Developer mode on Windows 10 otherwise fails with error.AccessDenied. In which case sym_link_path may still be created on the file system but will lack reparse processing data applied to it.
fn DeleteFile(sub_path_w: []const u16, options: DeleteFileOptions) DeleteFileError!void

No documentation provided.

fn DeviceIoControl(h: HANDLE, ioControlCode: ULONG, in: ?[]const u8, out: ?[]u8) DeviceIoControlError!void

A Zig wrapper around NtDeviceIoControlFile and NtFsControlFile syscalls. It…

A Zig wrapper around NtDeviceIoControlFile and NtFsControlFile syscalls. It implements similar behavior to DeviceIoControl and is meant to serve as a direct substitute for that call. TODO work out if we need to expose other arguments to the underlying syscalls.

fn FindClose(hFindFile: HANDLE) void

No documentation provided.

fn FreeEnvironmentStringsW(penv: [*:0]u16) void

No documentation provided.

fn FreeLibrary(hModule: HMODULE) void

No documentation provided.

fn GetCurrentDirectory(buffer: []u8) GetCurrentDirectoryError![]u8

The result is a slice of buffer, indexed from 0.

fn GetEnvironmentStringsW() GetEnvironmentStringsError![*:0]u16

No documentation provided.

fn GetEnvironmentVariableW(lpName: LPWSTR, lpBuffer: [*]u16, nSize: DWORD) GetEnvironmentVariableError!DWORD

No documentation provided.

fn GetFileAttributes(filename: []const u8) GetFileAttributesError!DWORD

No documentation provided.

fn GetFileAttributesW(lpFileName: [*:0]const u16) GetFileAttributesError!DWORD

No documentation provided.

fn GetFileSizeEx(hFile: HANDLE) GetFileSizeError!u64

No documentation provided.

fn GetFinalPathNameByHandle(hFile: HANDLE, fmt: GetFinalPathNameByHandleFormat, out_buffer: []u16) GetFinalPathNameByHandleError![]u16

Returns canonical (normalized) path of handle. Use `GetFinalPathNameByHandleFor…

Returns canonical (normalized) path of handle. Use GetFinalPathNameByHandleFormat to specify whether the path is meant to include NT or DOS volume name (e.g., \Device\HarddiskVolume0\foo.txt versus C:\foo.txt). If DOS volume name format is selected, note that this function does not prepend \\?\ prefix to the resultant path.

fn GetModuleFileNameW(hModule: ?HMODULE, buf_ptr: [*]u16, buf_len: DWORD) GetModuleFileNameError![:0]u16

No documentation provided.

fn GetOverlappedResult(h: HANDLE, overlapped: *OVERLAPPED, wait: bool) !DWORD

No documentation provided.

fn GetQueuedCompletionStatus(completion_port: HANDLE, bytes_transferred_count: *DWORD, lpCompletionKey: *usize, lpOverlapped: *?*OVERLAPPED, dwMilliseconds: DWORD) GetQueuedCompletionStatusResult

No documentation provided.

fn GetQueuedCompletionStatusEx(completion_port: HANDLE, completion_port_entries: []OVERLAPPED_ENTRY, timeout_ms: ?DWORD, alertable: bool) GetQueuedCompletionStatusError!u32

No documentation provided.

fn GetStdHandle(handle_id: DWORD) GetStdHandleError!HANDLE

No documentation provided.

fn HeapDestroy(hHeap: HANDLE) void

No documentation provided.

fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: *anyopaque) void

No documentation provided.

fn InitOnceExecuteOnce(InitOnce: *INIT_ONCE, InitFn: INIT_ONCE_FN, Parameter: ?*anyopaque, Context: ?*anyopaque) void

No documentation provided.

fn IsProcessorFeaturePresent(feature: PF) bool

No documentation provided.

fn LoadLibraryW(lpLibFileName: [*:0]const u16) LoadLibraryError!HMODULE

No documentation provided.

fn LocalFree(hMem: HLOCAL) void

No documentation provided.

fn LockFile(FileHandle: HANDLE, Event: ?HANDLE, ApcRoutine: ?*IO_APC_ROUTINE, ApcContext: ?*anyopaque, IoStatusBlock: *IO_STATUS_BLOCK, ByteOffset: *const LARGE_INTEGER, Length: *const LARGE_INTEGER, Key: ?*ULONG, FailImmediately: BOOLEAN, ExclusiveLock: BOOLEAN) !void

No documentation provided.

fn MoveFileEx(old_path: []const u8, new_path: []const u8, flags: DWORD) MoveFileError!void

No documentation provided.

fn MoveFileExW(old_path: [*:0]const u16, new_path: [*:0]const u16, flags: DWORD) MoveFileError!void

No documentation provided.

fn OpenFile(sub_path_w: []const u16, options: OpenFileOptions) OpenError!HANDLE

No documentation provided.

fn PostQueuedCompletionStatus(completion_port: HANDLE, bytes_transferred_count: DWORD, completion_key: usize, lpOverlapped: ?*OVERLAPPED) PostQueuedCompletionStatusError!void

No documentation provided.

fn ProcessBaseAddress(handle: HANDLE) ProcessBaseAddressError!HMODULE

Returns the base address of the process loaded into memory.

fn QueryObjectName(handle: HANDLE, out_buffer: []u16) ![]u16

No documentation provided.

fn QueryPerformanceCounter() u64

No documentation provided.

fn QueryPerformanceFrequency() u64

No documentation provided.

fn ReadFile(in_hFile: HANDLE, buffer: []u8, offset: ?u64, io_mode: std.io.ModeOverride) ReadFileError!usize

If buffer’s length exceeds what a Windows DWORD integer can hold, it will be bro…

If buffer’s length exceeds what a Windows DWORD integer can hold, it will be broken into multiple non-atomic reads.

fn ReadLink(dir: ?HANDLE, sub_path_w: []const u16, out_buffer: []u8) ReadLinkError![]u8

No documentation provided.

fn ReadProcessMemory(handle: HANDLE, addr: ?LPVOID, buffer: []u8) ReadMemoryError![]u8

No documentation provided.

fn RtlGenRandom(output: []u8) RtlGenRandomError!void

Call RtlGenRandom() instead of CryptGetRandom() on Windows https://github.com/r…

Call RtlGenRandom() instead of CryptGetRandom() on Windows https://github.com/rust-lang-nursery/rand/issues/111 https://bugzilla.mozilla.org/show_bug.cgi?id=504270

fn SetConsoleCtrlHandler(handler_routine: ?HANDLER_ROUTINE, add: bool) !void

No documentation provided.

fn SetConsoleTextAttribute(hConsoleOutput: HANDLE, wAttributes: WORD) SetConsoleTextAttributeError!void

No documentation provided.

fn SetCurrentDirectory(path_name: []const u16) SetCurrentDirectoryError!void

No documentation provided.

fn SetFileCompletionNotificationModes(handle: HANDLE, flags: UCHAR) !void

No documentation provided.

fn SetFilePointerEx_BEGIN(handle: HANDLE, offset: u64) SetFilePointerError!void

The SetFilePointerEx function with the dwMoveMethod parameter set to `FILE_BEG…

The SetFilePointerEx function with the dwMoveMethod parameter set to FILE_BEGIN.

fn SetFilePointerEx_CURRENT(handle: HANDLE, offset: i64) SetFilePointerError!void

The SetFilePointerEx function with the dwMoveMethod parameter set to `FILE_CUR…

The SetFilePointerEx function with the dwMoveMethod parameter set to FILE_CURRENT.

fn SetFilePointerEx_CURRENT_get(handle: HANDLE) SetFilePointerError!u64

The SetFilePointerEx function with parameters to get the current offset.

fn SetFilePointerEx_END(handle: HANDLE, offset: i64) SetFilePointerError!void

The SetFilePointerEx function with the dwMoveMethod parameter set to `FILE_END…

The SetFilePointerEx function with the dwMoveMethod parameter set to FILE_END.

fn SetFileTime(hFile: HANDLE, lpCreationTime: ?*const FILETIME, lpLastAccessTime: ?*const FILETIME, lpLastWriteTime: ?*const FILETIME) SetFileTimeError!void

No documentation provided.

fn SetHandleInformation(h: HANDLE, mask: DWORD, flags: DWORD) SetHandleInformationError!void

No documentation provided.

fn TerminateProcess(hProcess: HANDLE, uExitCode: UINT) TerminateProcessError!void

No documentation provided.

fn UnlockFile(FileHandle: HANDLE, IoStatusBlock: *IO_STATUS_BLOCK, ByteOffset: *const LARGE_INTEGER, Length: *const LARGE_INTEGER, Key: ?*ULONG) !void

No documentation provided.

fn VirtualAlloc(addr: ?LPVOID, size: usize, alloc_type: DWORD, flProtect: DWORD) VirtualAllocError!LPVOID

No documentation provided.

fn VirtualFree(lpAddress: ?LPVOID, dwSize: usize, dwFreeType: DWORD) void

No documentation provided.

fn VirtualProtect(lpAddress: ?LPVOID, dwSize: SIZE_T, flNewProtect: DWORD, lpflOldProtect: *DWORD) VirtualProtectError!void

No documentation provided.

fn VirtualProtectEx(handle: HANDLE, addr: ?LPVOID, size: SIZE_T, new_prot: DWORD) VirtualProtectError!DWORD

No documentation provided.

fn VirtualQuery(lpAddress: ?LPVOID, lpBuffer: PMEMORY_BASIC_INFORMATION, dwLength: SIZE_T) VirtualQueryError!SIZE_T

No documentation provided.

fn WSACleanup() !void

No documentation provided.

fn WSAIoctl(s: ws2_32.SOCKET, dwIoControlCode: DWORD, inBuffer: ?[]const u8, outBuffer: []u8, overlapped: ?*OVERLAPPED, completionRoutine: ?ws2_32.LPWSAOVERLAPPED_COMPLETION_ROUTINE) !DWORD

No documentation provided.

fn WSASocketW(af: i32, socket_type: i32, protocol: i32, protocolInfo: ?*ws2_32.WSAPROTOCOL_INFOW, g: ws2_32.GROUP, dwFlags: DWORD) !ws2_32.SOCKET

Microsoft requires WSAStartup to be called to initialize, or else WSASocketW wi…

Microsoft requires WSAStartup to be called to initialize, or else WSASocketW will return WSANOTINITIALISED. Since this is a standard library, we do not have the luxury of putting initialization code anywhere, because we would not want to pay the cost of calling WSAStartup if there ended up being no networking. Also, if Zig code is used as a library, Zig is not in charge of the start code, and we couldn’t put in any initialization code even if we wanted to. The documentation for WSAStartup mentions that there must be a matching WSACleanup call. It is not possible for the Zig Standard Library to honor this for the same reason - there is nowhere to put deinitialization code. So, API users of the zig std lib have two options:

  • (recommended) The simple, cross-platform way: just call WSASocketW and don’t worry about it. Zig will call WSAStartup() in a thread-safe manner and never deinitialize networking. This is ideal for an application which has the capability to do networking.
  • The getting-your-hands-dirty way: call WSAStartup() before doing networking, so that the error handling code for WSANOTINITIALISED never gets run, which then allows the application or library to call WSACleanup(). This could make sense for a library, which has init and deinit functions for the whole library’s lifetime.
fn WSAStartup(majorVersion: u8, minorVersion: u8) !ws2_32.WSADATA

No documentation provided.

fn WaitForMultipleObjectsEx(handles: []const HANDLE, waitAll: bool, milliseconds: DWORD, alertable: bool) !u32

No documentation provided.

fn WaitForSingleObject(handle: HANDLE, milliseconds: DWORD) WaitForSingleObjectError!void

No documentation provided.

fn WaitForSingleObjectEx(handle: HANDLE, milliseconds: DWORD, alertable: bool) WaitForSingleObjectError!void

No documentation provided.

fn WriteFile(handle: HANDLE, bytes: []const u8, offset: ?u64, io_mode: std.io.ModeOverride) WriteFileError!usize

No documentation provided.

fn WriteProcessMemory(handle: HANDLE, addr: ?LPVOID, buffer: []const u8) WriteMemoryError!usize

No documentation provided.

fn accept(s: ws2_32.SOCKET, name: ?*ws2_32.sockaddr, namelen: ?*ws2_32.socklen_t) ws2_32.SOCKET

No documentation provided.

fn bind(s: ws2_32.SOCKET, name: *const ws2_32.sockaddr, namelen: ws2_32.socklen_t) i32

No documentation provided.

fn cStrToPrefixedFileW(s: [*:0]const u8) !PathSpace

Same as sliceToPrefixedFileW but accepts a pointer to a null-terminated path.

fn callWSAStartup() !void

No documentation provided.

fn closesocket(s: ws2_32.SOCKET) !void

No documentation provided.

fn eqlIgnoreCaseUtf8(a: []const u8, b: []const u8) bool

Compares two UTF-8 strings using the equivalent functionality of `RtlEqualUnico…

Compares two UTF-8 strings using the equivalent functionality of RtlEqualUnicodeString (with case insensitive comparison enabled). This function can be called on any target. Assumes a and b are valid UTF-8.

fn eqlIgnoreCaseWTF16(a: []const u16, b: []const u16) bool

Compares two WTF16 strings using the equivalent functionality of `RtlEqualUnico…

Compares two WTF16 strings using the equivalent functionality of RtlEqualUnicodeString (with case insensitive comparison enabled). This function can be called on any target.

fn fileTimeToNanoSeconds(ft: FILETIME) i128

No documentation provided.

fn fromSysTime(hns: i64) i128

A file time is a 64-bit value that represents the number of 100-nanosecond inte…

A file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC). This function returns the number of nanoseconds since the canonical epoch, which is the POSIX one (Jan 01, 1970 AD).

fn getNamespacePrefix(comptime T: type, path: []const T) NamespacePrefix

No documentation provided.

fn getUnprefixedPathType(comptime T: type, path: []const T) UnprefixedPathType

Get the path type of a path that is known to not have any namespace prefixes (`…

Get the path type of a path that is known to not have any namespace prefixes (\\?\, \\.\, \??\).

fn getpeername(s: ws2_32.SOCKET, name: *ws2_32.sockaddr, namelen: *ws2_32.socklen_t) i32

No documentation provided.

fn getsockname(s: ws2_32.SOCKET, name: *ws2_32.sockaddr, namelen: *ws2_32.socklen_t) i32

No documentation provided.

fn listen(s: ws2_32.SOCKET, backlog: u31) i32

No documentation provided.

fn loadWinsockExtensionFunction(comptime T: type, sock: ws2_32.SOCKET, guid: GUID) !T

Loads a Winsock extension function in runtime specified by a GUID.

fn nanoSecondsToFileTime(ns: i128) FILETIME

Converts a number of nanoseconds since the POSIX epoch to a Windows FILETIME.

fn normalizePath(comptime T: type, path: []T) RemoveDotDirsError!usize

Normalizes a Windows path with the following steps: 1) convert all forward …

Normalizes a Windows path with the following steps: 1) convert all forward slashes to back slashes 2) collapse duplicate back slashes 3) remove ‘.’ and ‘..’ directory parts Returns the length of the new path.

fn peb() *PEB

No documentation provided.

fn poll(fds: [*]ws2_32.pollfd, n: c_ulong, timeout: i32) i32

No documentation provided.

fn recvfrom(s: ws2_32.SOCKET, buf: [*]u8, len: usize, flags: u32, from: ?*ws2_32.sockaddr, from_len: ?*ws2_32.socklen_t) i32

No documentation provided.

fn removeDotDirsSanitized(comptime T: type, path: []T) RemoveDotDirsError!usize

Removes ‘.’ and ‘..’ path components from a “sanitized relative path”. A “sanit…

Removes ‘.’ and ‘..’ path components from a “sanitized relative path”. A “sanitized path” is one where: 1) all forward slashes have been replaced with back slashes 2) all repeating back slashes have been collapsed 3) the path is a relative one (does not start with a back slash)

fn sendmsg(s: ws2_32.SOCKET, msg: *const ws2_32.WSAMSG, flags: u32) i32

No documentation provided.

fn sendto(s: ws2_32.SOCKET, buf: [*]const u8, len: usize, flags: u32, to: ?*const ws2_32.sockaddr, to_len: ws2_32.socklen_t) i32

No documentation provided.

fn sliceToPrefixedFileW(path: []const u8) !PathSpace

Same as wToPrefixedFileW but accepts a UTF-8 encoded path.

fn teb() *TEB

No documentation provided.

fn toSysTime(ns: i128) i64

No documentation provided.

fn unexpectedError(err: Win32Error) std.os.UnexpectedError

Call this when you made a windows DLL call or something that does SetLastError …

Call this when you made a windows DLL call or something that does SetLastError and you get an unexpected error.

fn unexpectedStatus(status: NTSTATUS) std.os.UnexpectedError

Call this when you made a windows NtDll call and you get an unexpected status.

fn wToPrefixedFileW(path: [:0]const u16) !PathSpace

Converts the path to WTF16, null-terminated. If the path contains any namespa…

Converts the path to WTF16, null-terminated. If the path contains any namespace prefix, or is anything but a relative path (rooted, drive relative, etc) the result will have the NT-style prefix \??\.

Similar to RtlDosPathNameToNtPathName_U with a few differences:

  • Does not allocate on the heap.
  • Relative paths are kept as relative unless they contain too many .. components, in which case they are treated as drive-relative and resolved against the CWD.
  • Special case device names like COM1, NUL, etc are not handled specially (TODO)
  • . and space are not stripped from the end of relative paths (potential TODO)

Values

CONDITION_VARIABLE_INIT
CONDITION_VARIABLE
CREATE_ALWAYS
comptime_int
CREATE_EVENT_INITIAL_SET
comptime_int
CREATE_EVENT_MANUAL_RESET
comptime_int
CREATE_NEW
comptime_int
CREATE_UNICODE_ENVIRONMENT
comptime_int
CTRL_BREAK_EVENT
DWORD
CTRL_CLOSE_EVENT
DWORD
CTRL_C_EVENT
DWORD
CTRL_LOGOFF_EVENT
DWORD
CTRL_SHUTDOWN_EVENT
DWORD
DELETE
comptime_int
DUPLICATE_SAME_ACCESS
comptime_int
ENABLE_VIRTUAL_TERMINAL_PROCESSING
comptime_int
EVENT_ALL_ACCESS
comptime_int
EVENT_MODIFY_STATE
comptime_int
EXCEPTION_ACCESS_VIOLATION
comptime_int
EXCEPTION_CONTINUE_SEARCH
comptime_int
EXCEPTION_DATATYPE_MISALIGNMENT
comptime_int
EXCEPTION_ILLEGAL_INSTRUCTION
comptime_int
EXCEPTION_STACK_OVERFLOW
comptime_int
E_ABORT
c_long
E_ACCESSDENIED
c_long
E_FAIL
c_long
E_HANDLE
c_long
E_INVALIDARG
c_long
E_NOINTERFACE
c_long
E_NOTIMPL
c_long
E_OUTOFMEMORY
c_long
E_POINTER
c_long
E_UNEXPECTED
c_long
FALSE
comptime_int
FILE_ACTION_ADDED
comptime_int
FILE_ACTION_MODIFIED
comptime_int
FILE_ACTION_REMOVED
comptime_int
FILE_ACTION_RENAMED_NEW_NAME
comptime_int
FILE_ACTION_RENAMED_OLD_NAME
comptime_int
FILE_ADD_FILE
comptime_int
FILE_ADD_SUBDIRECTORY
comptime_int
FILE_ANY_ACCESS
comptime_int
FILE_APPEND_DATA
comptime_int
FILE_ATTRIBUTE_ARCHIVE
comptime_int
FILE_ATTRIBUTE_COMPRESSED
comptime_int
FILE_ATTRIBUTE_DEVICE
comptime_int
FILE_ATTRIBUTE_DIRECTORY
comptime_int
FILE_ATTRIBUTE_ENCRYPTED
comptime_int
FILE_ATTRIBUTE_HIDDEN
comptime_int
FILE_ATTRIBUTE_INTEGRITY_STREAM
comptime_int
FILE_ATTRIBUTE_NORMAL
comptime_int
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
comptime_int
FILE_ATTRIBUTE_NO_SCRUB_DATA
comptime_int
FILE_ATTRIBUTE_OFFLINE
comptime_int
FILE_ATTRIBUTE_READONLY
comptime_int
FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS
comptime_int
FILE_ATTRIBUTE_RECALL_ON_OPEN
comptime_int
FILE_ATTRIBUTE_REPARSE_POINT
comptime_int
FILE_ATTRIBUTE_SPARSE_FILE
comptime_int
FILE_ATTRIBUTE_SYSTEM
comptime_int
FILE_ATTRIBUTE_TEMPORARY
comptime_int
FILE_ATTRIBUTE_VIRTUAL
comptime_int
FILE_BEGIN
comptime_int
FILE_COMPLETE_IF_OPLOCKED
comptime_int
FILE_CREATE
comptime_int
FILE_CREATE_PIPE_INSTANCE
comptime_int
FILE_CREATE_TREE_CONNECTION
comptime_int
FILE_CURRENT
comptime_int
FILE_DELETE_CHILD
comptime_int
FILE_DELETE_ON_CLOSE
comptime_int
FILE_DEVICE_8042_PORT
DEVICE_TYPE
FILE_DEVICE_ACPI
DEVICE_TYPE
FILE_DEVICE_BATTERY
DEVICE_TYPE
FILE_DEVICE_BEEP
DEVICE_TYPE
FILE_DEVICE_BIOMETRIC
DEVICE_TYPE
FILE_DEVICE_BLUETOOTH
DEVICE_TYPE
FILE_DEVICE_BUS_EXTENDER
DEVICE_TYPE
FILE_DEVICE_CD_ROM
DEVICE_TYPE
FILE_DEVICE_CD_ROM_FILE_SYSTEM
DEVICE_TYPE
FILE_DEVICE_CHANGER
DEVICE_TYPE
FILE_DEVICE_CONSOLE
DEVICE_TYPE
FILE_DEVICE_CONTROLLER
DEVICE_TYPE
FILE_DEVICE_CRYPT_PROVIDER
DEVICE_TYPE
FILE_DEVICE_DATALINK
DEVICE_TYPE
FILE_DEVICE_DEVAPI
DEVICE_TYPE
FILE_DEVICE_DFS
DEVICE_TYPE
FILE_DEVICE_DFS_FILE_SYSTEM
DEVICE_TYPE
FILE_DEVICE_DFS_VOLUME
DEVICE_TYPE
FILE_DEVICE_DISK
DEVICE_TYPE
FILE_DEVICE_DISK_FILE_SYSTEM
DEVICE_TYPE
FILE_DEVICE_DVD
DEVICE_TYPE
FILE_DEVICE_EHSTOR
DEVICE_TYPE
FILE_DEVICE_FILE_SYSTEM
DEVICE_TYPE
FILE_DEVICE_FIPS
DEVICE_TYPE
FILE_DEVICE_FULLSCREEN_VIDEO
DEVICE_TYPE
FILE_DEVICE_GPIO
DEVICE_TYPE
FILE_DEVICE_HOLOGRAPHIC
DEVICE_TYPE
FILE_DEVICE_INFINIBAND
DEVICE_TYPE
FILE_DEVICE_INPORT_PORT
DEVICE_TYPE
FILE_DEVICE_KEYBOARD
DEVICE_TYPE
FILE_DEVICE_KS
DEVICE_TYPE
FILE_DEVICE_KSEC
DEVICE_TYPE
FILE_DEVICE_MAILSLOT
DEVICE_TYPE
FILE_DEVICE_MASS_STORAGE
DEVICE_TYPE
FILE_DEVICE_MIDI_IN
DEVICE_TYPE
FILE_DEVICE_MIDI_OUT
DEVICE_TYPE
FILE_DEVICE_MODEM
DEVICE_TYPE
FILE_DEVICE_MOUSE
DEVICE_TYPE
FILE_DEVICE_MT_COMPOSITE
DEVICE_TYPE
FILE_DEVICE_MT_TRANSPORT
DEVICE_TYPE
FILE_DEVICE_MULTI_UNC_PROVIDER
DEVICE_TYPE
FILE_DEVICE_NAMED_PIPE
DEVICE_TYPE
FILE_DEVICE_NETWORK
DEVICE_TYPE
FILE_DEVICE_NETWORK_BROWSER
DEVICE_TYPE
FILE_DEVICE_NETWORK_FILE_SYSTEM
DEVICE_TYPE
FILE_DEVICE_NETWORK_REDIRECTOR
DEVICE_TYPE
FILE_DEVICE_NFP
DEVICE_TYPE
FILE_DEVICE_NULL
DEVICE_TYPE
FILE_DEVICE_NVDIMM
DEVICE_TYPE
FILE_DEVICE_PARALLEL_PORT
DEVICE_TYPE
FILE_DEVICE_PERSISTENT_MEMORY
DEVICE_TYPE
FILE_DEVICE_PHYSICAL_NETCARD
DEVICE_TYPE
FILE_DEVICE_PMI
DEVICE_TYPE
FILE_DEVICE_POINT_OF_SERVICE
DEVICE_TYPE
FILE_DEVICE_PRINTER
DEVICE_TYPE
FILE_DEVICE_SCANNER
DEVICE_TYPE
FILE_DEVICE_SCREEN
DEVICE_TYPE
FILE_DEVICE_SDFXHCI
DEVICE_TYPE
FILE_DEVICE_SERENUM
DEVICE_TYPE
FILE_DEVICE_SERIAL_MOUSE_PORT
DEVICE_TYPE
FILE_DEVICE_SERIAL_PORT
DEVICE_TYPE
FILE_DEVICE_SMARTCARD
DEVICE_TYPE
FILE_DEVICE_SMB
DEVICE_TYPE
FILE_DEVICE_SOUND
DEVICE_TYPE
FILE_DEVICE_STORAGE_REPLICATION
DEVICE_TYPE
FILE_DEVICE_STREAMS
DEVICE_TYPE
FILE_DEVICE_SYSENV
DEVICE_TYPE
FILE_DEVICE_TAPE
DEVICE_TYPE
FILE_DEVICE_TAPE_FILE_SYSTEM
DEVICE_TYPE
FILE_DEVICE_TERMSRV
DEVICE_TYPE
FILE_DEVICE_TRANSPORT
DEVICE_TYPE
FILE_DEVICE_TRUST_ENV
DEVICE_TYPE
FILE_DEVICE_UCM
DEVICE_TYPE
FILE_DEVICE_UCMTCPCI
DEVICE_TYPE
FILE_DEVICE_UNKNOWN
DEVICE_TYPE
FILE_DEVICE_USBEX
DEVICE_TYPE
FILE_DEVICE_VDM
DEVICE_TYPE
FILE_DEVICE_VIDEO
DEVICE_TYPE
FILE_DEVICE_VIRTUAL_BLOCK
DEVICE_TYPE
FILE_DEVICE_VIRTUAL_DISK
DEVICE_TYPE
FILE_DEVICE_VMBUS
DEVICE_TYPE
FILE_DEVICE_WAVE_IN
DEVICE_TYPE
FILE_DEVICE_WAVE_OUT
DEVICE_TYPE
FILE_DEVICE_WPD
DEVICE_TYPE
FILE_DIRECTORY_FILE
comptime_int
FILE_END
comptime_int
FILE_EXECUTE
comptime_int
FILE_FLAG_BACKUP_SEMANTICS
comptime_int
FILE_FLAG_DELETE_ON_CLOSE
comptime_int
FILE_FLAG_NO_BUFFERING
comptime_int
FILE_FLAG_OPEN_NO_RECALL
comptime_int
FILE_FLAG_OPEN_REPARSE_POINT
comptime_int
FILE_FLAG_OVERLAPPED
comptime_int
FILE_FLAG_POSIX_SEMANTICS
comptime_int
FILE_FLAG_RANDOM_ACCESS
comptime_int
FILE_FLAG_SEQUENTIAL_SCAN
comptime_int
FILE_FLAG_SESSION_AWARE
comptime_int
FILE_FLAG_WRITE_THROUGH
comptime_int
FILE_LIST_DIRECTORY
comptime_int
FILE_MAXIMUM_DISPOSITION
comptime_int
FILE_NAME_NORMALIZED
comptime_int

Return the normalized drive name. This is the default.

FILE_NAME_OPENED
comptime_int

Return the opened file name (not normalized).

FILE_NON_DIRECTORY_FILE
comptime_int
FILE_NOTIFY_CHANGE_ATTRIBUTES
comptime_int
FILE_NOTIFY_CHANGE_CREATION
comptime_int
FILE_NOTIFY_CHANGE_DIR_NAME
comptime_int
FILE_NOTIFY_CHANGE_FILE_NAME
comptime_int
FILE_NOTIFY_CHANGE_LAST_ACCESS
comptime_int
FILE_NOTIFY_CHANGE_LAST_WRITE
comptime_int
FILE_NOTIFY_CHANGE_SECURITY
comptime_int
FILE_NOTIFY_CHANGE_SIZE
comptime_int
FILE_NO_COMPRESSION
comptime_int
FILE_NO_EA_KNOWLEDGE
comptime_int
FILE_NO_INTERMEDIATE_BUFFERING
comptime_int
FILE_OPEN
comptime_int
FILE_OPEN_BY_FILE_ID
comptime_int
FILE_OPEN_FOR_BACKUP_INTENT
comptime_int
FILE_OPEN_FOR_FREE_SPACE_QUERY
comptime_int
FILE_OPEN_FOR_RECOVERY
comptime_int
FILE_OPEN_IF
comptime_int
FILE_OPEN_OFFLINE_FILE
comptime_int
FILE_OPEN_REPARSE_POINT
comptime_int
FILE_OVERWRITE
comptime_int
FILE_OVERWRITE_IF
comptime_int
FILE_RANDOM_ACCESS
comptime_int
FILE_READ_ACCESS
comptime_int
FILE_READ_ATTRIBUTES
comptime_int
FILE_READ_DATA
comptime_int
FILE_READ_EA
comptime_int
FILE_RESERVE_OPFILTER
comptime_int
FILE_SEQUENTIAL_ONLY
comptime_int
FILE_SHARE_DELETE
comptime_int
FILE_SHARE_READ
comptime_int
FILE_SHARE_WRITE
comptime_int
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS
comptime_int
FILE_SKIP_SET_EVENT_ON_HANDLE
comptime_int
FILE_SUPERSEDE
comptime_int
FILE_SYNCHRONOUS_IO_ALERT
comptime_int
FILE_SYNCHRONOUS_IO_NONALERT
comptime_int
FILE_TRAVERSE
comptime_int
FILE_WRITE_ACCESS
comptime_int
FILE_WRITE_ATTRIBUTES
comptime_int
FILE_WRITE_DATA
comptime_int
FILE_WRITE_EA
comptime_int
FILE_WRITE_THROUGH
comptime_int
FOLDERID_LocalAppData
undefined
FOREGROUND_BLUE
comptime_int
FOREGROUND_GREEN
comptime_int
FOREGROUND_INTENSITY
comptime_int
FOREGROUND_RED
comptime_int
FORMAT_MESSAGE_ALLOCATE_BUFFER
comptime_int
FORMAT_MESSAGE_ARGUMENT_ARRAY
comptime_int
FORMAT_MESSAGE_FROM_HMODULE
comptime_int
FORMAT_MESSAGE_FROM_STRING
comptime_int
FORMAT_MESSAGE_FROM_SYSTEM
comptime_int
FORMAT_MESSAGE_IGNORE_INSERTS
comptime_int
FORMAT_MESSAGE_MAX_WIDTH_MASK
comptime_int
FSCTL_GET_REPARSE_POINT
DWORD
FSCTL_SET_REPARSE_POINT
DWORD
FileAlignmentInfo
comptime_int
FileAllocationInfo
comptime_int
FileAttributeTagInfo
comptime_int
FileBasicInfo
comptime_int
FileCompressionInfo
comptime_int
FileDispositionInfo
comptime_int
FileEndOfFileInfo
comptime_int
FileFullDirectoryInfo
comptime_int
FileFullDirectoryRestartInfo
comptime_int
FileIdBothDirectoryInfo
comptime_int
FileIdBothDirectoryRestartInfo
comptime_int
FileIdExtdDirectoryInfo
comptime_int
FileIdExtdDirectoryRestartInfo
comptime_int
FileIdInfo
comptime_int
FileIoPriorityHintInfo
comptime_int
FileNameInfo
comptime_int
FileRemoteProtocolInfo
comptime_int
FileRenameInfo
comptime_int
FileStandardInfo
comptime_int
FileStorageInfo
comptime_int
FileStreamInfo
comptime_int
GENERIC_ALL
comptime_int
GENERIC_EXECUTE
comptime_int
GENERIC_READ
comptime_int
GENERIC_WRITE
comptime_int
GetQueuedCompletionStatusError
type
HANDLE_FLAG_INHERIT
comptime_int
HANDLE_FLAG_PROTECT_FROM_CLOSE
comptime_int
HEAP_CREATE_ENABLE_EXECUTE
comptime_int
HEAP_GENERATE_EXCEPTIONS
comptime_int
HEAP_NO_SERIALIZE
comptime_int
HEAP_REALLOC_IN_PLACE_ONLY
comptime_int
HKEY_LOCAL_MACHINE
HKEY
INFINITE
comptime_int
INIT_ONCE_STATIC_INIT
RTL_RUN_ONCE
INVALID_FILE_ATTRIBUTES
DWORD
INVALID_HANDLE_VALUE
HANDLE
IOCTL_MOUNTMGR_QUERY_POINTS
ULONG
IO_REPARSE_TAG_MOUNT_POINT
ULONG
IO_REPARSE_TAG_SYMLINK
ULONG
KEY_ALL_ACCESS
comptime_int

Combines the STANDARD_RIGHTS_REQUIRED, KEY_QUERY_VALUE, KEY_SET_VALUE, KEY_CREAT…

KEY_CREATE_LINK
comptime_int

Reserved for system use.

KEY_CREATE_SUB_KEY
comptime_int

Required to create a subkey of a registry key.

KEY_ENUMERATE_SUB_KEYS
comptime_int

Required to enumerate the subkeys of a registry key.

KEY_EXECUTE
comptime_int

Equivalent to KEY_READ.

KEY_NOTIFY
comptime_int

Required to request change notifications for a registry key or for subkeys of a …

KEY_QUERY_VALUE
comptime_int

Required to query the values of a registry key.

KEY_READ
comptime_int

Combines the STANDARD_RIGHTS_READ, KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS, and …

KEY_SET_VALUE
comptime_int

Required to create, delete, or set a registry value.

KEY_WOW64_32KEY
comptime_int

Indicates that an application on 64-bit Windows should operate on the 32-bit reg…

KEY_WOW64_64KEY
comptime_int

Indicates that an application on 64-bit Windows should operate on the 64-bit reg…

KEY_WRITE
comptime_int

Combines the STANDARD_RIGHTS_WRITE, KEY_SET_VALUE, and KEY_CREATE_SUB_KEY access…

KF_FLAG_ALIAS_ONLY
comptime_int
KF_FLAG_CREATE
comptime_int
KF_FLAG_DEFAULT
comptime_int
KF_FLAG_DEFAULT_PATH
comptime_int
KF_FLAG_DONT_UNEXPAND
comptime_int
KF_FLAG_DONT_VERIFY
comptime_int
KF_FLAG_INIT
comptime_int
KF_FLAG_NOT_PARENT_RELATIVE
comptime_int
KF_FLAG_NO_ALIAS
comptime_int
KF_FLAG_NO_APPCONTAINER_REDIRECTION
comptime_int
KF_FLAG_SIMPLE_IDLIST
comptime_int
LockFileError
type
MAXIMUM_ALLOWED
comptime_int
MAXIMUM_REPARSE_DATA_BUFFER_SIZE
ULONG
MAXIMUM_WAIT_OBJECTS
comptime_int
MAXIMUM_XSTATE_FEATURES
comptime_int
MAX_MODULE_NAME32
comptime_int
MAX_PATH
comptime_int
MAX_WOW64_SHARED_ENTRIES
comptime_int
MEM_COALESCE_PLACEHOLDERS
comptime_int
MEM_COMMIT
comptime_int
MEM_DECOMMIT
comptime_int
MEM_FREE
comptime_int
MEM_IMAGE
comptime_int
MEM_LARGE_PAGES
comptime_int
MEM_MAPPED
comptime_int
MEM_PHYSICAL
comptime_int
MEM_PRIVATE
comptime_int
MEM_RELEASE
comptime_int
MEM_RESERVE
comptime_int
MEM_RESERVE_PLACEHOLDERS
comptime_int
MEM_RESET
comptime_int
MEM_RESET_UNDO
comptime_int
MEM_TOP_DOWN
comptime_int
MEM_WRITE_WATCH
comptime_int
MOVEFILE_COPY_ALLOWED
comptime_int
MOVEFILE_CREATE_HARDLINK
comptime_int
MOVEFILE_DELAY_UNTIL_REBOOT
comptime_int
MOVEFILE_FAIL_IF_NOT_TRACKABLE
comptime_int
MOVEFILE_REPLACE_EXISTING
comptime_int
MOVEFILE_WRITE_THROUGH
comptime_int
NAME_MAX
comptime_int

[Each file name component can be] up to the value returned in the lpMaximum…

OBJ_CASE_INSENSITIVE
comptime_int
OBJ_EXCLUSIVE
comptime_int
OBJ_INHERIT
comptime_int
OBJ_KERNEL_HANDLE
comptime_int
OBJ_OPENIF
comptime_int
OBJ_OPENLINK
comptime_int
OBJ_PERMANENT
comptime_int
OBJ_VALID_ATTRIBUTES
comptime_int
OPEN_ALWAYS
comptime_int
OPEN_EXISTING
comptime_int
PAGE_EXECUTE
comptime_int
PAGE_EXECUTE_READ
comptime_int
PAGE_EXECUTE_READWRITE
comptime_int
PAGE_EXECUTE_WRITECOPY
comptime_int
PAGE_GUARD
comptime_int
PAGE_NOACCESS
comptime_int
PAGE_NOCACHE
comptime_int
PAGE_READONLY
comptime_int
PAGE_READWRITE
comptime_int
PAGE_TARGETS_INVALID
comptime_int
PAGE_TARGETS_NO_UPDATE
comptime_int
PAGE_WRITECOMBINE
comptime_int
PAGE_WRITECOPY
comptime_int
PATH_MAX_WIDE
comptime_int

The maximum path of 32,767 characters is approximate, because the “\?" pr…

PIPE_ACCESS_DUPLEX
comptime_int
PIPE_ACCESS_INBOUND
comptime_int
PIPE_ACCESS_OUTBOUND
comptime_int
PIPE_NOWAIT
comptime_int
PIPE_READMODE_BYTE
comptime_int
PIPE_READMODE_MESSAGE
comptime_int
PIPE_TYPE_BYTE
comptime_int
PIPE_TYPE_MESSAGE
comptime_int
PIPE_WAIT
comptime_int
PROCESSOR_FEATURE_MAX
comptime_int
PROV_RSA_FULL
comptime_int
ProcessBaseAddressError
type
READ_CONTROL
comptime_int
REG_OPTION_OPEN_LINK
DWORD

Open symbolic link.

RTL_QUERY_REGISTRY_DELETE
comptime_int

Used to delete value keys after they are queried.

RTL_QUERY_REGISTRY_DIRECT
comptime_int

QueryRoutine field ignored. EntryContext field points to location to store valu…

RTL_QUERY_REGISTRY_NOEXPAND
comptime_int

Used to suppress the expansion of REG_MULTI_SZ into multiple callouts or to pre…

RTL_QUERY_REGISTRY_NOVALUE
comptime_int

Used to mark a table entry that has no value name, just wants a call out, not a…

RTL_QUERY_REGISTRY_REQUIRED
comptime_int

Fail if no match found for this table entry.

RTL_QUERY_REGISTRY_SUBKEY
comptime_int

Name is a subkey and remainder of table or until next subkey are value names fo…

RTL_QUERY_REGISTRY_TOPKEY
comptime_int

Reset current key to original key for this and all following table entries.

RTL_QUERY_REGISTRY_TYPECHECK
comptime_int

Use this flag with the RTL_QUERY_REGISTRY_DIRECT flag to verify that the REG_XXX…

RTL_REGISTRY_ABSOLUTE
comptime_int

Path is a full path

RTL_REGISTRY_CONTROL
comptime_int

\Registry\Machine\System\CurrentControlSet\Control

RTL_REGISTRY_DEVICEMAP
comptime_int

\Registry\Machine\Hardware\DeviceMap

RTL_REGISTRY_HANDLE
comptime_int

Low order bits are registry handle

RTL_REGISTRY_MAXIMUM
comptime_int
RTL_REGISTRY_OPTIONAL
comptime_int

Indicates the key node is optional

RTL_REGISTRY_SERVICES
comptime_int

\Registry\Machine\System\CurrentControlSet\Services

RTL_REGISTRY_USER
comptime_int

\Registry\User\CurrentUser

RTL_REGISTRY_WINDOWS_NT
comptime_int

\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion

RTL_RUN_ONCE_INIT
RTL_RUN_ONCE
SECTION_ALL_ACCESS
type
SECTION_EXTEND_SIZE
comptime_int
SECTION_MAP_EXECUTE
comptime_int
SECTION_MAP_READ
comptime_int
SECTION_MAP_WRITE
comptime_int
SECTION_QUERY
comptime_int
SEC_64K_PAGES
comptime_int
SEC_COMMIT
comptime_int
SEC_FILE
comptime_int
SEC_IMAGE
comptime_int
SEC_IMAGE_NO_EXECUTE
type
SEC_LARGE_PAGES
comptime_int
SEC_NOCACHE
comptime_int
SEC_PROTECTED_IMAGE
comptime_int
SEC_RESERVE
comptime_int
SEC_WRITECOMBINE
comptime_int
SRWLOCK_INIT
SRWLOCK
STANDARD_RIGHTS_EXECUTE
comptime_int
STANDARD_RIGHTS_READ
comptime_int
STANDARD_RIGHTS_REQUIRED
type
STANDARD_RIGHTS_WRITE
comptime_int
STARTF_FORCEOFFFEEDBACK
comptime_int
STARTF_FORCEONFEEDBACK
comptime_int
STARTF_PREVENTPINNING
comptime_int
STARTF_RUNFULLSCREEN
comptime_int
STARTF_TITLEISAPPID
comptime_int
STARTF_TITLEISLINKNAME
comptime_int
STARTF_UNTRUSTEDSOURCE
comptime_int
STARTF_USECOUNTCHARS
comptime_int
STARTF_USEFILLATTRIBUTE
comptime_int
STARTF_USEHOTKEY
comptime_int
STARTF_USEPOSITION
comptime_int
STARTF_USESHOWWINDOW
comptime_int
STARTF_USESIZE
comptime_int
STARTF_USESTDHANDLES
comptime_int
STD_ERROR_HANDLE
type

The standard error device. Initially, this is the active console screen buffer, …

STD_INPUT_HANDLE
type

The standard input device. Initially, this is the console input buffer, CONIN$.

STD_OUTPUT_HANDLE
type

The standard output device. Initially, this is the active console screen buffer,…

SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE
DWORD
SYMBOLIC_LINK_FLAG_DIRECTORY
DWORD
SYMLINK_FLAG_RELATIVE
ULONG
SYNCHRONIZE
comptime_int
S_FALSE
comptime_int
S_OK
comptime_int
SharedUserData
*const KUSER_SHARED_DATA

Read-only user-mode address for the shared data. https://www.geoffchappell.com/…

TH32CS_INHERIT
comptime_int
TH32CS_SNAPALL
type
TH32CS_SNAPHEAPLIST
comptime_int
TH32CS_SNAPMODULE
comptime_int
TH32CS_SNAPMODULE32
comptime_int
TH32CS_SNAPPROCESS
comptime_int
TH32CS_SNAPTHREAD
comptime_int
TLS_OUT_OF_INDEXES
comptime_int
TRUE
comptime_int
TRUNCATE_EXISTING
comptime_int
UNWIND_HISTORY_TABLE_SIZE
comptime_int
UNW_FLAG_CHAININFO
comptime_int
UNW_FLAG_EHANDLER
comptime_int
UNW_FLAG_NHANDLER
comptime_int
UNW_FLAG_UHANDLER
comptime_int
UnlockFileError
type
VOLUME_NAME_DOS
comptime_int

Return the path with the drive letter. This is the default.

VOLUME_NAME_GUID
comptime_int

Return the path with a volume GUID path instead of the drive name.

VOLUME_NAME_NONE
comptime_int

Return the path with no drive information.

VOLUME_NAME_NT
comptime_int

Return the path with the volume device path.

WAIT_ABANDONED
comptime_int
WAIT_ABANDONED_0
type
WAIT_FAILED
comptime_int
WAIT_OBJECT_0
comptime_int
WAIT_TIMEOUT
comptime_int
WINAPI
std.builtin.CallingConvention
WRITE_DAC
comptime_int
WRITE_OWNER
comptime_int
self_process_handle
HANDLE