kernel32 topic

Windows Kernel APIs

The Win32 base APIs, such as memory management, input/output (I/O) operations, process and thread creation, and synchronization functions.

Functions

ActivateActCtx(HANDLE? hActCtx, Pointer<IntPtr> lpCookie) Win32Result<bool> kernel32
Activates the specified activation context.
AddDllDirectory(PCWSTR newDirectory) Win32Result<Pointer<NativeType>> kernel32
Adds a directory to the process DLL search path.
AddRefActCtx(HANDLE hActCtx) → void kernel32
Increments the reference count of the specified activation context.
AllocConsole() Win32Result<bool> kernel32
Allocates a new console for the calling process.
AreFileApisANSI() bool kernel32
Determines whether the file I/O functions are using the ANSI or OEM character set code page.
AssignProcessToJobObject(HANDLE hJob, HANDLE hProcess) Win32Result<bool> kernel32
Assigns a process to an existing job object.
AttachConsole(int dwProcessId) Win32Result<bool> kernel32
Attaches the calling process to the console of the specified process.
Beep(int dwFreq, int dwDuration) Win32Result<bool> kernel32
Generates simple tones on the speaker.
BeginUpdateResource(PCWSTR pFileName, bool bDeleteExistingResources) Win32Result<HANDLE> kernel32
Retrieves a handle that can be used by the UpdateResource function to add, delete, or replace resources in a binary module.
BuildCommDCB(PCWSTR lpDef, Pointer<DCB> lpDCB) Win32Result<bool> kernel32
Fills a specified DCB structure with values specified in a device-control string.
BuildCommDCBAndTimeouts(PCWSTR lpDef, Pointer<DCB> lpDCB, Pointer<COMMTIMEOUTS> lpCommTimeouts) Win32Result<bool> kernel32
Translates a device-definition string into appropriate device-control block codes and places them into a device control block.
CallNamedPipe(PCWSTR lpNamedPipeName, Pointer<NativeType>? lpInBuffer, int nInBufferSize, Pointer<NativeType>? lpOutBuffer, int nOutBufferSize, Pointer<Uint32> lpBytesRead, int nTimeOut) bool kernel32
Connects to a message-type pipe (and waits if an instance of the pipe is not available), writes to and reads from the pipe, and then closes the pipe.
CancelIo(HANDLE hFile) Win32Result<bool> kernel32
Cancels all pending input and output (I/O) operations that are issued by the calling thread for the specified file.
CancelIoEx(HANDLE hFile, Pointer<OVERLAPPED>? lpOverlapped) Win32Result<bool> kernel32
Marks any outstanding I/O operations for the specified file handle.
CancelSynchronousIo(HANDLE hThread) Win32Result<bool> kernel32
Marks pending synchronous I/O operations that are issued by the specified thread as canceled.
CheckRemoteDebuggerPresent(HANDLE hProcess, Pointer<Int32> pbDebuggerPresent) Win32Result<bool> kernel32
Determines whether the specified process is being debugged.
ClearCommBreak(HANDLE hFile) Win32Result<bool> kernel32
Restores character transmission for a specified communications device and places the transmission line in a nonbreak state.
ClearCommError(HANDLE hFile, Pointer<Uint32>? lpErrors, Pointer<COMSTAT>? lpStat) Win32Result<bool> kernel32
Retrieves information about a communications error and reports the current status of a communications device.
CloseHandle(HANDLE hObject) Win32Result<bool> kernel32
Closes an open object handle.
ClosePseudoConsole(HPCON hPC) → void kernel32
Closes a pseudoconsole from the given handle.
CommConfigDialog(PCWSTR lpszName, HWND? hWnd, Pointer<COMMCONFIG> lpCC) Win32Result<bool> kernel32
Displays a driver-supplied configuration dialog box.
CompareObjectHandles(HANDLE hFirstObjectHandle, HANDLE hSecondObjectHandle) bool kernel32
Compares two object handles to determine if they refer to the same underlying kernel object.
ConnectNamedPipe(HANDLE hNamedPipe, Pointer<OVERLAPPED>? lpOverlapped) Win32Result<bool> kernel32
Enables a named pipe server process to wait for a client process to connect to an instance of a named pipe.
ContinueDebugEvent(int dwProcessId, int dwThreadId, NTSTATUS dwContinueStatus) Win32Result<bool> kernel32
Enables a debugger to continue a thread that previously reported a debugging event.
CopyFile(PCWSTR lpExistingFileName, PCWSTR lpNewFileName, bool bFailIfExists) Win32Result<bool> kernel32
Copies an existing file to a new file.
CopyFileEx(PCWSTR lpExistingFileName, PCWSTR lpNewFileName, Pointer<NativeFunction<LPPROGRESS_ROUTINE>>? lpProgressRoutine, Pointer<NativeType>? lpData, Pointer<Int32>? pbCancel, COPYFILE_FLAGS dwCopyFlags) Win32Result<bool> kernel32
Copies an existing file to a new file, notifying the application of its progress through a callback function.
CreateActCtx(Pointer<ACTCTX> pActCtx) Win32Result<HANDLE> kernel32
Creates an activation context.
CreateConsoleScreenBuffer(int dwDesiredAccess, int dwShareMode, Pointer<SECURITY_ATTRIBUTES>? lpSecurityAttributes, int dwFlags) Win32Result<HANDLE> kernel32
Creates a screen buffer for the Windows Console.
CreateDirectory(PCWSTR lpPathName, Pointer<SECURITY_ATTRIBUTES>? lpSecurityAttributes) Win32Result<bool> kernel32
Creates a new directory.
CreateEvent(Pointer<SECURITY_ATTRIBUTES>? lpEventAttributes, bool bManualReset, bool bInitialState, PCWSTR? lpName) Win32Result<HANDLE> kernel32
Creates or opens a named or unnamed event object.
CreateEventEx(Pointer<SECURITY_ATTRIBUTES>? lpEventAttributes, PCWSTR? lpName, CREATE_EVENT dwFlags, int dwDesiredAccess) Win32Result<HANDLE> kernel32
Creates or opens a named or unnamed event object and returns a handle to the object.
CreateFile(PCWSTR lpFileName, int dwDesiredAccess, FILE_SHARE_MODE dwShareMode, Pointer<SECURITY_ATTRIBUTES>? lpSecurityAttributes, FILE_CREATION_DISPOSITION dwCreationDisposition, FILE_FLAGS_AND_ATTRIBUTES dwFlagsAndAttributes, HANDLE? hTemplateFile) Win32Result<HANDLE> kernel32
Creates or opens a file or I/O device.
CreateFile2(PCWSTR lpFileName, int dwDesiredAccess, FILE_SHARE_MODE dwShareMode, FILE_CREATION_DISPOSITION dwCreationDisposition, Pointer<CREATEFILE2_EXTENDED_PARAMETERS>? pCreateExParams) Win32Result<HANDLE> kernel32
Creates or opens a file or I/O device.
CreateIoCompletionPort(HANDLE fileHandle, HANDLE? existingCompletionPort, int completionKey, int numberOfConcurrentThreads) Win32Result<HANDLE> kernel32
Creates an input/output (I/O) completion port and associates it with a specified file handle, or creates an I/O completion port that is not yet associated with a file handle, allowing association at a later time.
CreateJobObject(Pointer<SECURITY_ATTRIBUTES>? lpJobAttributes, PCWSTR? lpName) Win32Result<HANDLE> kernel32
Creates or opens a job object.
CreateNamedPipe(PCWSTR lpName, FILE_FLAGS_AND_ATTRIBUTES dwOpenMode, NAMED_PIPE_MODE dwPipeMode, int nMaxInstances, int nOutBufferSize, int nInBufferSize, int nDefaultTimeOut, Pointer<SECURITY_ATTRIBUTES>? lpSecurityAttributes) HANDLE kernel32
Creates an instance of a named pipe and returns a handle for subsequent pipe operations.
CreatePipe(Pointer<Pointer<NativeType>> hReadPipe, Pointer<Pointer<NativeType>> hWritePipe, Pointer<SECURITY_ATTRIBUTES>? lpPipeAttributes, int nSize) Win32Result<bool> kernel32
Creates an anonymous pipe, and returns handles to the read and write ends of the pipe.
CreateProcess(PCWSTR? lpApplicationName, PWSTR? lpCommandLine, Pointer<SECURITY_ATTRIBUTES>? lpProcessAttributes, Pointer<SECURITY_ATTRIBUTES>? lpThreadAttributes, bool bInheritHandles, PROCESS_CREATION_FLAGS dwCreationFlags, Pointer<NativeType>? lpEnvironment, PCWSTR? lpCurrentDirectory, Pointer<STARTUPINFO> lpStartupInfo, Pointer<PROCESS_INFORMATION> lpProcessInformation) Win32Result<bool> kernel32
Creates a new process and its primary thread.
CreatePseudoConsole(COORD size, HANDLE hInput, HANDLE hOutput, int dwFlags) HPCON kernel32
Allocates a new pseudoconsole for the calling process.
CreateRemoteThread(HANDLE hProcess, Pointer<SECURITY_ATTRIBUTES>? lpThreadAttributes, int dwStackSize, Pointer<NativeFunction<LPTHREAD_START_ROUTINE>> lpStartAddress, Pointer<NativeType>? lpParameter, int dwCreationFlags, Pointer<Uint32>? lpThreadId) Win32Result<HANDLE> kernel32
Creates a thread that runs in the virtual address space of another process.
CreateRemoteThreadEx(HANDLE hProcess, Pointer<SECURITY_ATTRIBUTES>? lpThreadAttributes, int dwStackSize, Pointer<NativeFunction<LPTHREAD_START_ROUTINE>> lpStartAddress, Pointer<NativeType>? lpParameter, int dwCreationFlags, LPPROC_THREAD_ATTRIBUTE_LIST? lpAttributeList, Pointer<Uint32>? lpThreadId) Win32Result<HANDLE> kernel32
Creates a thread that runs in the virtual address space of another process and optionally specifies extended attributes such as processor group affinity.
Creates a symbolic link.
CreateThread(Pointer<SECURITY_ATTRIBUTES>? lpThreadAttributes, int dwStackSize, Pointer<NativeFunction<LPTHREAD_START_ROUTINE>> lpStartAddress, Pointer<NativeType>? lpParameter, THREAD_CREATION_FLAGS dwCreationFlags, Pointer<Uint32>? lpThreadId) Win32Result<HANDLE> kernel32
Creates a thread to execute within the virtual address space of the calling process.
DeactivateActCtx(int dwFlags, int ulCookie) Win32Result<bool> kernel32
Deactivates the activation context corresponding to the specified cookie.
DebugBreak() → void kernel32
Causes a breakpoint exception to occur in the current process.
DebugBreakProcess(HANDLE process) Win32Result<bool> kernel32
Causes a breakpoint exception to occur in the specified process.
DebugSetProcessKillOnExit(bool killOnExit) Win32Result<bool> kernel32
Sets the action to be performed when the calling thread exits.
DefineDosDevice(DEFINE_DOS_DEVICE_FLAGS dwFlags, PCWSTR lpDeviceName, PCWSTR? lpTargetPath) Win32Result<bool> kernel32
Defines, redefines, or deletes MS-DOS device names.
DeleteFile(PCWSTR lpFileName) Win32Result<bool> kernel32
Deletes an existing file.
DeleteProcThreadAttributeList(LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList) → void kernel32
Deletes the specified list of attributes for process and thread creation.
DeleteVolumeMountPoint(PCWSTR lpszVolumeMountPoint) Win32Result<bool> kernel32
Deletes a drive letter or mounted folder.
DeviceIoControl(HANDLE hDevice, int dwIoControlCode, Pointer<NativeType>? lpInBuffer, int nInBufferSize, Pointer<NativeType>? lpOutBuffer, int nOutBufferSize, Pointer<Uint32>? lpBytesReturned, Pointer<OVERLAPPED>? lpOverlapped) Win32Result<bool> kernel32
Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.
DisableThreadLibraryCalls(HMODULE hLibModule) Win32Result<bool> kernel32
Disables the DLL_THREAD_ATTACH and DLL_THREAD_DETACH notifications for the specified dynamic-link library (DLL).
DisconnectNamedPipe(HANDLE hNamedPipe) Win32Result<bool> kernel32
Disconnects the server end of a named pipe instance from a client process.
DnsHostnameToComputerName(PCWSTR hostname, PWSTR? computerName, Pointer<Uint32> nSize) Win32Result<bool> kernel32
Converts a DNS-style host name to a NetBIOS-style computer name.
DosDateTimeToFileTime(int wFatDate, int wFatTime, Pointer<FILETIME> lpFileTime) Win32Result<bool> kernel32
Converts MS-DOS date and time values to a file time.
DuplicateHandle(HANDLE hSourceProcessHandle, HANDLE hSourceHandle, HANDLE hTargetProcessHandle, Pointer<Pointer<NativeType>> lpTargetHandle, int dwDesiredAccess, bool bInheritHandle, DUPLICATE_HANDLE_OPTIONS dwOptions) Win32Result<bool> kernel32
Duplicates an object handle.
EndUpdateResource(HANDLE hUpdate, bool fDiscard) Win32Result<bool> kernel32
Commits or discards changes made prior to a call to UpdateResource.
EnumResourceNames(HMODULE? hModule, PCWSTR lpType, Pointer<NativeFunction<ENUMRESNAMEPROC>> lpEnumFunc, int lParam) bool kernel32
Enumerates resources of a specified type within a binary module.
EnumResourceTypes(HMODULE? hModule, Pointer<NativeFunction<ENUMRESTYPEPROC>> lpEnumFunc, int lParam) Win32Result<bool> kernel32
Enumerates resource types within a binary module.
EnumSystemFirmwareTables(FIRMWARE_TABLE_PROVIDER firmwareTableProviderSignature, Pointer<Uint8>? pFirmwareTableEnumBuffer, int bufferSize) Win32Result<int> kernel32
Enumerates all system firmware tables of the specified type.
EscapeCommFunction(HANDLE hFile, ESCAPE_COMM_FUNCTION dwFunc) Win32Result<bool> kernel32
Directs the specified communications device to perform an extended function.
ExitProcess(int uExitCode) → void kernel32
Ends the calling process and all its threads.
ExitThread(int dwExitCode) → void kernel32
Ends the calling thread.
FileTimeToDosDateTime(Pointer<FILETIME> lpFileTime, Pointer<Uint16> lpFatDate, Pointer<Uint16> lpFatTime) Win32Result<bool> kernel32
Converts a file time to MS-DOS date and time values.
FileTimeToSystemTime(Pointer<FILETIME> lpFileTime, Pointer<SYSTEMTIME> lpSystemTime) Win32Result<bool> kernel32
Converts a file time to system time format.
FillConsoleOutputAttribute(HANDLE hConsoleOutput, int wAttribute, int nLength, COORD dwWriteCoord, Pointer<Uint32> lpNumberOfAttrsWritten) Win32Result<bool> kernel32
Sets the character attributes for a specified number of character cells, beginning at the specified coordinates in a screen buffer.
FillConsoleOutputCharacter(HANDLE hConsoleOutput, int cCharacter, int nLength, COORD dwWriteCoord, Pointer<Uint32> lpNumberOfCharsWritten) Win32Result<bool> kernel32
Writes a character to the console screen buffer a specified number of times, beginning at the specified coordinates.
FillMemory(Pointer<NativeType> destination, int length, int fill) → void kernel32
Fills a block of memory with a specified value.
FindClose(HANDLE hFindFile) Win32Result<bool> kernel32
Closes a file search handle opened by the FindFirstFile, FindFirstFileEx, FindFirstFileNameW, FindFirstFileNameTransactedW, FindFirstFileTransacted, FindFirstStreamTransactedW, or FindFirstStreamW functions.
FindCloseChangeNotification(HANDLE hChangeHandle) Win32Result<bool> kernel32
Stops change notification handle monitoring.
FindFirstChangeNotification(PCWSTR lpPathName, bool bWatchSubtree, FILE_NOTIFY_CHANGE dwNotifyFilter) Win32Result<HANDLE> kernel32
Creates a change notification handle and sets up initial change notification filter conditions.
FindFirstFile(PCWSTR lpFileName, Pointer<WIN32_FIND_DATA> lpFindFileData) Win32Result<HANDLE> kernel32
Searches a directory for a file or subdirectory with a name that matches a specific name (or partial name if wildcards are used).
FindFirstFileEx(PCWSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, Pointer<NativeType> lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, FIND_FIRST_EX_FLAGS dwAdditionalFlags) Win32Result<HANDLE> kernel32
Searches a directory for a file or subdirectory with a name and attributes that match those specified.
FindFirstFileName(PCWSTR lpFileName, int dwFlags, Pointer<Uint32> stringLength, PWSTR linkName) Win32Result<HANDLE> kernel32
Creates an enumeration of all the hard links to the specified file.
FindFirstStream(PCWSTR lpFileName, STREAM_INFO_LEVELS infoLevel, Pointer<NativeType> lpFindStreamData) Win32Result<HANDLE> kernel32
Enumerates the first stream with a ::$DATA stream type in the specified file or directory.
FindFirstVolume(PWSTR lpszVolumeName, int cchBufferLength) Win32Result<HANDLE> kernel32
Retrieves the name of a volume on a computer.
FindNextChangeNotification(HANDLE hChangeHandle) Win32Result<bool> kernel32
Requests that the operating system signal a change notification handle the next time it detects an appropriate change.
FindNextFile(HANDLE hFindFile, Pointer<WIN32_FIND_DATA> lpFindFileData) Win32Result<bool> kernel32
Continues a file search from a previous call to the FindFirstFile, FindFirstFileEx, or FindFirstFileTransacted functions.
FindNextFileName(HANDLE hFindStream, Pointer<Uint32> stringLength, PWSTR linkName) Win32Result<bool> kernel32
Continues enumerating the hard links to a file using the handle returned by a successful call to the FindFirstFileNameW function.
FindNextStream(HANDLE hFindStream, Pointer<NativeType> lpFindStreamData) Win32Result<bool> kernel32
Continues a stream search started by a previous call to the FindFirstStreamW function.
FindNextVolume(HANDLE hFindVolume, PWSTR lpszVolumeName, int cchBufferLength) Win32Result<bool> kernel32
Continues a volume search started by a call to the FindFirstVolume function.
FindPackagesByPackageFamily(PCWSTR packageFamilyName, int packageFilters, Pointer<Uint32> count, Pointer<Pointer<Utf16>>? packageFullNames, Pointer<Uint32> bufferLength, PWSTR? buffer, Pointer<Uint32>? packageProperties) WIN32_ERROR kernel32
Finds the packages with the specified family name for the current user.
FindResource(HMODULE? hModule, PCWSTR lpName, PCWSTR lpType) HRSRC kernel32
Determines the location of a resource with the specified type and name in the specified module.
FindResourceEx(HMODULE? hModule, PCWSTR lpType, PCWSTR lpName, int wLanguage) HRSRC kernel32
Determines the location of the resource with the specified type, name, and language in the specified module.
FindStringOrdinal(int dwFindStringOrdinalFlags, PCWSTR lpStringSource, int cchSource, PCWSTR lpStringValue, int cchValue, bool bIgnoreCase) Win32Result<int> kernel32
Locates a Unicode string (wide characters) in another Unicode string for a non-linguistic comparison.
FindVolumeClose(HANDLE hFindVolume) Win32Result<bool> kernel32
Closes the specified volume search handle.
FlushConsoleInputBuffer(HANDLE hConsoleInput) Win32Result<bool> kernel32
Flushes the console input buffer.
FlushFileBuffers(HANDLE hFile) Win32Result<bool> kernel32
Flushes the buffers of a specified file and causes all buffered data to be written to a file.
FormatMessage(FORMAT_MESSAGE_OPTIONS dwFlags, Pointer<NativeType>? lpSource, int dwMessageId, int dwLanguageId, PWSTR lpBuffer, int nSize, Pointer<Pointer<Int8>>? arguments) Win32Result<int> kernel32
Formats a message string.
FreeConsole() Win32Result<bool> kernel32
Detaches the calling process from its console.
FreeLibrary(HMODULE hLibModule) Win32Result<bool> kernel32
Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count.
FreeLibraryAndExitThread(HMODULE hLibModule, int dwExitCode) → void kernel32
Decrements the reference count of a loaded dynamic-link library (DLL) by one, then calls ExitThread to terminate the calling thread.
FreeMemoryJobObject(Pointer<NativeType> buffer) → void kernel32
Frees memory that a function related to job objects allocated.
GetActiveProcessorCount(int groupNumber) Win32Result<int> kernel32
Returns the number of active processors in a processor group or in the system.
GetActiveProcessorGroupCount() int kernel32
Returns the number of active processor groups in the system.
GetBinaryType(PCWSTR lpApplicationName, Pointer<Uint32> lpBinaryType) Win32Result<bool> kernel32
Determines whether a file is an executable (.exe) file, and if so, which subsystem runs the executable file.
GetCommandLine() PCWSTR kernel32
Retrieves the command-line string for the current process.
GetCommConfig(HANDLE hCommDev, Pointer<COMMCONFIG>? lpCC, Pointer<Uint32> lpdwSize) Win32Result<bool> kernel32
Retrieves the current configuration of a communications device.
GetCommMask(HANDLE hFile, Pointer<Uint32> lpEvtMask) Win32Result<bool> kernel32
Retrieves the value of the event mask for a specified communications device.
GetCommModemStatus(HANDLE hFile, Pointer<Uint32> lpModemStat) Win32Result<bool> kernel32
Retrieves the modem control-register values.
GetCommProperties(HANDLE hFile, Pointer<COMMPROP> lpCommProp) Win32Result<bool> kernel32
Retrieves information about the communications properties for a specified communications device.
GetCommState(HANDLE hFile, Pointer<DCB> lpDCB) Win32Result<bool> kernel32
Retrieves the current control settings for a specified communications device.
GetCommTimeouts(HANDLE hFile, Pointer<COMMTIMEOUTS> lpCommTimeouts) Win32Result<bool> kernel32
Retrieves the time-out parameters for all read and write operations on a specified communications device.
GetCompressedFileSize(PCWSTR lpFileName, Pointer<Uint32>? lpFileSizeHigh) Win32Result<int> kernel32
Retrieves the actual number of bytes of disk storage used to store a specified file.
GetComputerName(PWSTR? lpBuffer, Pointer<Uint32> nSize) Win32Result<bool> kernel32
Retrieves the NetBIOS name of the local computer.
GetComputerNameEx(COMPUTER_NAME_FORMAT nameType, PWSTR? lpBuffer, Pointer<Uint32> nSize) Win32Result<bool> kernel32
Retrieves a NetBIOS or DNS name associated with the local computer.
GetConsoleCP() Win32Result<int> kernel32
Retrieves the input code page used by the console associated with the calling process.
GetConsoleCursorInfo(HANDLE hConsoleOutput, Pointer<CONSOLE_CURSOR_INFO> lpConsoleCursorInfo) Win32Result<bool> kernel32
Retrieves information about the size and visibility of the cursor for the specified console screen buffer.
GetConsoleMode(HANDLE hConsoleHandle, Pointer<Uint32> lpMode) Win32Result<bool> kernel32
Retrieves the current input mode of a console's input buffer or the current output mode of a console screen buffer.
GetConsoleOutputCP() Win32Result<int> kernel32
Retrieves the output code page used by the console associated with the calling process.
GetConsoleScreenBufferInfo(HANDLE hConsoleOutput, Pointer<CONSOLE_SCREEN_BUFFER_INFO> lpConsoleScreenBufferInfo) Win32Result<bool> kernel32
Retrieves information about the specified console screen buffer.
GetConsoleSelectionInfo(Pointer<CONSOLE_SELECTION_INFO> lpConsoleSelectionInfo) Win32Result<bool> kernel32
Retrieves information about the current console selection.
GetConsoleTitle(PWSTR lpConsoleTitle, int nSize) Win32Result<int> kernel32
Retrieves the title and size of the title for the current console window.
GetConsoleWindow() HWND kernel32
Retrieves the window handle used by the console associated with the calling process.
GetCurrentActCtx(Pointer<Pointer<NativeType>> lphActCtx) Win32Result<bool> kernel32
Returns the handle to the active activation context of the calling thread.
GetCurrentDirectory(int nBufferLength, PWSTR? lpBuffer) int kernel32
Retrieves the current directory for the current process.
GetCurrentPackageFullName(Pointer<Uint32> packageFullNameLength, PWSTR? packageFullName) WIN32_ERROR kernel32
Gets the package full name for the calling process.
GetCurrentProcess() HANDLE kernel32
Retrieves a pseudo handle for the current process.
GetCurrentProcessId() int kernel32
Retrieves the process identifier of the calling process.
GetCurrentProcessorNumber() int kernel32
Retrieves the number of the processor the current thread was running on during the call to this function.
GetCurrentThread() HANDLE kernel32
Retrieves a pseudo handle for the calling thread.
GetCurrentThreadId() int kernel32
Retrieves the thread identifier of the calling thread.
GetDefaultCommConfig(PCWSTR lpszName, Pointer<COMMCONFIG> lpCC, Pointer<Uint32> lpdwSize) Win32Result<bool> kernel32
Retrieves the default configuration for the specified communications device.
GetDiskFreeSpace(PCWSTR? lpRootPathName, Pointer<Uint32>? lpSectorsPerCluster, Pointer<Uint32>? lpBytesPerSector, Pointer<Uint32>? lpNumberOfFreeClusters, Pointer<Uint32>? lpTotalNumberOfClusters) Win32Result<bool> kernel32
Retrieves information about the specified disk, including the amount of free space on the disk.
GetDiskFreeSpaceEx(PCWSTR? lpDirectoryName, Pointer<Uint64>? lpFreeBytesAvailableToCaller, Pointer<Uint64>? lpTotalNumberOfBytes, Pointer<Uint64>? lpTotalNumberOfFreeBytes) Win32Result<bool> kernel32
Retrieves information about the amount of space that is available on a disk volume, which is the total amount of space, the total amount of free space, and the total amount of free space available to the user that is associated with the calling thread.
GetDllDirectory(int nBufferLength, PWSTR? lpBuffer) Win32Result<int> kernel32
Retrieves the application-specific portion of the search path used to locate DLLs for the application.
GetDriveType(PCWSTR? lpRootPathName) int kernel32
Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.
GetEnvironmentVariable(PCWSTR? lpName, PWSTR? lpBuffer, int nSize) Win32Result<int> kernel32
Retrieves the contents of the specified variable from the environment block of the calling process.
GetExitCodeProcess(HANDLE hProcess, Pointer<Uint32> lpExitCode) Win32Result<bool> kernel32
Retrieves the termination status of the specified process.
GetFileAttributes(PCWSTR lpFileName) Win32Result<int> kernel32
Retrieves file system attributes for a specified file or directory.
GetFileAttributesEx(PCWSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, Pointer<NativeType> lpFileInformation) Win32Result<bool> kernel32
Retrieves attributes for a specified file or directory.
GetFileInformationByHandle(HANDLE hFile, Pointer<BY_HANDLE_FILE_INFORMATION> lpFileInformation) Win32Result<bool> kernel32
Retrieves file information for the specified file.
GetFileSize(HANDLE hFile, Pointer<Uint32>? lpFileSizeHigh) Win32Result<int> kernel32
Retrieves the size of the specified file, in bytes.
GetFileSizeEx(HANDLE hFile, Pointer<Int64> lpFileSize) Win32Result<bool> kernel32
Retrieves the size of the specified file.
GetFileType(HANDLE hFile) Win32Result<FILE_TYPE> kernel32
Retrieves the file type of the specified file.
GetFinalPathNameByHandle(HANDLE hFile, PWSTR lpszFilePath, int cchFilePath, GETFINALPATHNAMEBYHANDLE_FLAGS dwFlags) Win32Result<int> kernel32
Retrieves the final path for the specified file.
GetFullPathName(PCWSTR lpFileName, int nBufferLength, PWSTR? lpBuffer, Pointer<Pointer<Utf16>>? lpFilePart) Win32Result<int> kernel32
Retrieves the full path and file name of the specified file.
GetHandleInformation(HANDLE hObject, Pointer<Uint32> lpdwFlags) Win32Result<bool> kernel32
Retrieves certain properties of an object handle.
GetLargestConsoleWindowSize(HANDLE hConsoleOutput) Win32Result<COORD> kernel32
Retrieves the size of the largest possible console window, based on the current font and the size of the display.
GetLastError() WIN32_ERROR kernel32
Retrieves the calling thread's last-error code value.
GetLocaleInfoEx(PCWSTR? lpLocaleName, int lCType, PWSTR? lpLCData, int cchData) Win32Result<int> kernel32
Retrieves information about a locale specified by name.
GetLocalTime(Pointer<SYSTEMTIME> lpSystemTime) → void kernel32
Retrieves the current local date and time.
GetLogicalDrives() Win32Result<int> kernel32
Retrieves a bitmask representing the currently available disk drives.
GetLogicalDriveStrings(int nBufferLength, PWSTR? lpBuffer) Win32Result<int> kernel32
Fills a buffer with strings that specify valid drives in the system.
GetLogicalProcessorInformation(Pointer<SYSTEM_LOGICAL_PROCESSOR_INFORMATION>? buffer, Pointer<Uint32> returnedLength) Win32Result<bool> kernel32
Retrieves information about logical processors and related hardware.
GetLongPathName(PCWSTR lpszShortPath, PWSTR? lpszLongPath, int cchBuffer) Win32Result<int> kernel32
Converts the specified path to its long form.
GetMachineTypeAttributes(int machine) MACHINE_ATTRIBUTES kernel32
Queries if the specified architecture is supported on the current system, either natively or by any form of compatibility or emulation layer.
GetMaximumProcessorCount(int groupNumber) Win32Result<int> kernel32
Returns the maximum number of logical processors that a processor group or the system can have.
GetMaximumProcessorGroupCount() int kernel32
Returns the maximum number of processor groups that the system can have.
GetModuleFileName(HMODULE? hModule, PWSTR lpFilename, int nSize) Win32Result<int> kernel32
Retrieves the fully qualified path for the file that contains the specified module.
GetModuleHandle(PCWSTR? lpModuleName) Win32Result<HMODULE> kernel32
Retrieves a module handle for the specified module.
GetModuleHandleEx(int dwFlags, PCWSTR? lpModuleName, Pointer<Pointer<NativeType>> phModule) Win32Result<bool> kernel32
Retrieves a module handle for the specified module and increments the module's reference count unless GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT is specified.
GetNamedPipeClientComputerName(HANDLE pipe, PWSTR clientComputerName, int clientComputerNameLength) bool kernel32
Retrieves the client computer name for the specified named pipe.
GetNamedPipeClientProcessId(HANDLE pipe, Pointer<Uint32> clientProcessId) Win32Result<bool> kernel32
Retrieves the client process identifier for the specified named pipe.
GetNamedPipeClientSessionId(HANDLE pipe, Pointer<Uint32> clientSessionId) Win32Result<bool> kernel32
Retrieves the client session identifier for the specified named pipe.
GetNamedPipeHandleState(HANDLE hNamedPipe, Pointer<Uint32>? lpState, Pointer<Uint32>? lpCurInstances, Pointer<Uint32>? lpMaxCollectionCount, Pointer<Uint32>? lpCollectDataTimeout, PWSTR? lpUserName, int nMaxUserNameSize) bool kernel32
Retrieves information about a specified named pipe.
GetNamedPipeInfo(HANDLE hNamedPipe, Pointer<Uint32>? lpFlags, Pointer<Uint32>? lpOutBufferSize, Pointer<Uint32>? lpInBufferSize, Pointer<Uint32>? lpMaxInstances) Win32Result<bool> kernel32
Retrieves information about the specified named pipe.
GetNativeSystemInfo(Pointer<SYSTEM_INFO> lpSystemInfo) → void kernel32
Retrieves information about the current system to an application running under WOW64.
GetNumberOfConsoleInputEvents(HANDLE hConsoleInput, Pointer<Uint32> lpNumberOfEvents) Win32Result<bool> kernel32
Retrieves the number of unread input records in the console's input buffer.
GetOverlappedResult(HANDLE hFile, Pointer<OVERLAPPED> lpOverlapped, Pointer<Uint32> lpNumberOfBytesTransferred, bool bWait) Win32Result<bool> kernel32
Retrieves the results of an overlapped operation on the specified file, named pipe, or communications device.
GetOverlappedResultEx(HANDLE hFile, Pointer<OVERLAPPED> lpOverlapped, Pointer<Uint32> lpNumberOfBytesTransferred, int dwMilliseconds, bool bAlertable) Win32Result<bool> kernel32
Retrieves the results of an overlapped operation on the specified file, named pipe, or communications device within the specified time-out interval.
GetPhysicallyInstalledSystemMemory(Pointer<Uint64> totalMemoryInKilobytes) Win32Result<bool> kernel32
Retrieves the amount of RAM that is physically installed on the computer.
GetProcAddress(HMODULE hModule, PCSTR lpProcName) Win32Result<FARPROC> kernel32
Retrieves the address of an exported function or variable from the specified dynamic-link library (DLL).
GetProcessHeap() Win32Result<HANDLE> kernel32
Retrieves a handle to the default heap of the calling process.
GetProcessHeaps(int numberOfHeaps, Pointer<Pointer<NativeType>> processHeaps) Win32Result<int> kernel32
Returns the number of active heaps and retrieves handles to all of the active heaps for the calling process.
GetProcessId(HANDLE process) Win32Result<int> kernel32
Retrieves the process identifier of the specified process.
GetProcessShutdownParameters(Pointer<Uint32> lpdwLevel, Pointer<Uint32> lpdwFlags) Win32Result<bool> kernel32
Retrieves the shutdown parameters for the currently calling process.
GetProcessTimes(HANDLE hProcess, Pointer<FILETIME> lpCreationTime, Pointer<FILETIME> lpExitTime, Pointer<FILETIME> lpKernelTime, Pointer<FILETIME> lpUserTime) Win32Result<bool> kernel32
Retrieves timing information for the specified process.
GetProcessVersion(int processId) Win32Result<int> kernel32
Retrieves the major and minor version numbers of the system on which the specified process expects to run.
GetProcessWorkingSetSize(HANDLE hProcess, Pointer<IntPtr> lpMinimumWorkingSetSize, Pointer<IntPtr> lpMaximumWorkingSetSize) Win32Result<bool> kernel32
Retrieves the minimum and maximum working set sizes of the specified process.
GetProductInfo(int dwOSMajorVersion, int dwOSMinorVersion, int dwSpMajorVersion, int dwSpMinorVersion, Pointer<Uint32> pdwReturnedProductType) bool kernel32
Retrieves the product type for the operating system on the local computer, and maps the type to the product types supported by the specified operating system.
GetQueuedCompletionStatus(HANDLE completionPort, Pointer<Uint32> lpNumberOfBytesTransferred, Pointer<IntPtr> lpCompletionKey, Pointer<Pointer<OVERLAPPED>> lpOverlapped, int dwMilliseconds) Win32Result<bool> kernel32
Attempts to dequeue an I/O completion packet from the specified I/O completion port.
GetQueuedCompletionStatusEx(HANDLE completionPort, Pointer<OVERLAPPED_ENTRY> lpCompletionPortEntries, int ulCount, Pointer<Uint32> ulNumEntriesRemoved, int dwMilliseconds, bool fAlertable) Win32Result<bool> kernel32
Retrieves multiple completion port entries simultaneously.
GetShortPathName(PCWSTR lpszLongPath, PWSTR? lpszShortPath, int cchBuffer) Win32Result<int> kernel32
Retrieves the short path form of the specified path.
GetStartupInfo(Pointer<STARTUPINFO> lpStartupInfo) → void kernel32
Retrieves the contents of the STARTUPINFO structure that was specified when the calling process was created.
GetStdHandle(STD_HANDLE nStdHandle) Win32Result<HANDLE> kernel32
Retrieves a handle to the specified standard device (standard input, standard output, or standard error).
GetSystemDefaultLangID() int kernel32
Returns the language identifier for the system locale.
GetSystemDefaultLocaleName(PWSTR lpLocaleName, int cchLocaleName) Win32Result<int> kernel32
Retrieves the system default locale name.
GetSystemDirectory(PWSTR? lpBuffer, int uSize) Win32Result<int> kernel32
Retrieves the path of the system directory.
GetSystemInfo(Pointer<SYSTEM_INFO> lpSystemInfo) → void kernel32
Retrieves information about the current system.
GetSystemPowerStatus(Pointer<SYSTEM_POWER_STATUS> lpSystemPowerStatus) Win32Result<bool> kernel32
Retrieves the power status of the system.
GetSystemTime(Pointer<SYSTEMTIME> lpSystemTime) → void kernel32
Retrieves the current system date and time in Coordinated Universal Time (UTC) format.
GetSystemTimeAdjustment(Pointer<Uint32> lpTimeAdjustment, Pointer<Uint32> lpTimeIncrement, Pointer<Int32> lpTimeAdjustmentDisabled) Win32Result<bool> kernel32
Determines whether the system is applying periodic time adjustments to its time-of-day clock, and obtains the value and period of any such adjustments.
GetSystemTimes(Pointer<FILETIME>? lpIdleTime, Pointer<FILETIME>? lpKernelTime, Pointer<FILETIME>? lpUserTime) Win32Result<bool> kernel32
Retrieves system timing information.
GetTempFileName(PCWSTR lpPathName, PCWSTR lpPrefixString, int uUnique, PWSTR lpTempFileName) Win32Result<int> kernel32
Creates a name for a temporary file.
GetTempPath(int nBufferLength, PWSTR? lpBuffer) Win32Result<int> kernel32
Retrieves the path of the directory designated for temporary files.
GetTempPath2(int bufferLength, PWSTR? buffer) int kernel32
Retrieves the path of the directory designated for temporary files, based on the privileges of the calling process.
GetThreadId(HANDLE thread) Win32Result<int> kernel32
Retrieves the thread identifier of the specified thread.
GetThreadLocale() int kernel32
Returns the locale identifier of the current locale for the calling thread.
GetThreadTimes(HANDLE hThread, Pointer<FILETIME> lpCreationTime, Pointer<FILETIME> lpExitTime, Pointer<FILETIME> lpKernelTime, Pointer<FILETIME> lpUserTime) Win32Result<bool> kernel32
Retrieves timing information for the specified thread.
GetThreadUILanguage() int kernel32
Returns the language identifier of the first user interface language for the current thread.
GetTickCount() int kernel32
Retrieves the number of milliseconds that have elapsed since the system was started, up to 49.7 days.
GetUserDefaultLangID() int kernel32
Returns the language identifier of the Region Format setting for the current user.
GetUserDefaultLCID() int kernel32
Returns the locale identifier for the user default locale.
GetUserDefaultLocaleName(PWSTR lpLocaleName, int cchLocaleName) Win32Result<int> kernel32
Retrieves the user default locale name.
GetVolumeInformation(PCWSTR? lpRootPathName, PWSTR? lpVolumeNameBuffer, int nVolumeNameSize, Pointer<Uint32>? lpVolumeSerialNumber, Pointer<Uint32>? lpMaximumComponentLength, Pointer<Uint32>? lpFileSystemFlags, PWSTR? lpFileSystemNameBuffer, int nFileSystemNameSize) Win32Result<bool> kernel32
Retrieves information about the file system and volume associated with the specified root directory.
GetVolumeInformationByHandle(HANDLE hFile, PWSTR? lpVolumeNameBuffer, int nVolumeNameSize, Pointer<Uint32>? lpVolumeSerialNumber, Pointer<Uint32>? lpMaximumComponentLength, Pointer<Uint32>? lpFileSystemFlags, PWSTR? lpFileSystemNameBuffer, int nFileSystemNameSize) Win32Result<bool> kernel32
Retrieves information about the file system and volume associated with the specified file.
GetVolumeNameForVolumeMountPoint(PCWSTR lpszVolumeMountPoint, PWSTR lpszVolumeName, int cchBufferLength) Win32Result<bool> kernel32
Retrieves a volume GUID path for the volume that is associated with the specified volume mount point ( drive letter, volume GUID path, or mounted folder).
GetVolumePathName(PCWSTR lpszFileName, PWSTR lpszVolumePathName, int cchBufferLength) Win32Result<bool> kernel32
Retrieves the volume mount point where the specified path is mounted.
GetVolumePathNamesForVolumeName(PCWSTR lpszVolumeName, PWSTR? lpszVolumePathNames, int cchBufferLength, Pointer<Uint32> lpcchReturnLength) Win32Result<bool> kernel32
Retrieves a list of drive letters and mounted folder paths for the specified volume.
GlobalAlloc(GLOBAL_ALLOC_FLAGS uFlags, int dwBytes) Win32Result<HGLOBAL> kernel32
Allocates the specified number of bytes from the heap.
GlobalFree(HGLOBAL? hMem) Win32Result<HGLOBAL> kernel32
Frees the specified global memory object and invalidates its handle.
GlobalLock(HGLOBAL hMem) Win32Result<Pointer<NativeType>> kernel32
Locks a global memory object and returns a pointer to the first byte of the object's memory block.
GlobalMemoryStatusEx(Pointer<MEMORYSTATUSEX> lpBuffer) Win32Result<bool> kernel32
Retrieves information about the system's current usage of both physical and virtual memory.
GlobalSize(HGLOBAL hMem) Win32Result<int> kernel32
Retrieves the current size of the specified global memory object, in bytes.
GlobalUnlock(HGLOBAL hMem) Win32Result<bool> kernel32
Decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE.
HeapAlloc(HANDLE hHeap, HEAP_FLAGS dwFlags, int dwBytes) Pointer<NativeType> kernel32
Allocates a block of memory from a heap.
HeapCompact(HANDLE hHeap, HEAP_FLAGS dwFlags) Win32Result<int> kernel32
Returns the size of the largest committed free block in the specified heap.
HeapCreate(HEAP_FLAGS flOptions, int dwInitialSize, int dwMaximumSize) Win32Result<HANDLE> kernel32
Creates a private heap object that can be used by the calling process.
HeapDestroy(HANDLE hHeap) Win32Result<bool> kernel32
Destroys the specified heap object.
HeapFree(HANDLE hHeap, HEAP_FLAGS dwFlags, Pointer<NativeType>? lpMem) Win32Result<bool> kernel32
Frees a memory block allocated from a heap by the HeapAlloc or HeapReAlloc function.
HeapLock(HANDLE hHeap) Win32Result<bool> kernel32
Attempts to acquire the critical section object, or lock, that is associated with a specified heap.
HeapQueryInformation(HANDLE? heapHandle, HEAP_INFORMATION_CLASS heapInformationClass, Pointer<NativeType>? heapInformation, int heapInformationLength, Pointer<IntPtr>? returnLength) Win32Result<bool> kernel32
Retrieves information about the specified heap.
HeapReAlloc(HANDLE hHeap, HEAP_FLAGS dwFlags, Pointer<NativeType>? lpMem, int dwBytes) Pointer<NativeType> kernel32
Reallocates a block of memory from a heap.
HeapSetInformation(HANDLE? heapHandle, HEAP_INFORMATION_CLASS heapInformationClass, Pointer<NativeType>? heapInformation, int heapInformationLength) Win32Result<bool> kernel32
Enables features for a specified heap.
HeapSize(HANDLE hHeap, HEAP_FLAGS dwFlags, Pointer<NativeType> lpMem) int kernel32
Retrieves the size of a memory block allocated from a heap by the HeapAlloc or HeapReAlloc function.
HeapUnlock(HANDLE hHeap) Win32Result<bool> kernel32
Releases ownership of the critical section object, or lock, that is associated with a specified heap.
HeapValidate(HANDLE hHeap, HEAP_FLAGS dwFlags, Pointer<NativeType>? lpMem) bool kernel32
Validates the specified heap.
HeapWalk(HANDLE hHeap, Pointer<PROCESS_HEAP_ENTRY> lpEntry) Win32Result<bool> kernel32
Enumerates the memory blocks in the specified heap.
InitializeProcThreadAttributeList(LPPROC_THREAD_ATTRIBUTE_LIST? lpAttributeList, int dwAttributeCount, Pointer<IntPtr> lpSize) Win32Result<bool> kernel32
Initializes the specified list of attributes for process and thread creation.
IsDebuggerPresent() bool kernel32
Determines whether the calling process is being debugged by a user-mode debugger.
IsNativeVhdBoot(Pointer<Int32> nativeVhdBoot) Win32Result<bool> kernel32
Indicates if the OS was booted from a VHD container.
IsProcessInJob(HANDLE processHandle, HANDLE? jobHandle, Pointer<Int32> result) Win32Result<bool> kernel32
Determines whether the process is running in the specified job.
IsSystemResumeAutomatic() bool kernel32
Determines the current state of the computer.
IsValidLocaleName(PCWSTR lpLocaleName) bool kernel32
Determines if the specified locale name is valid for a locale that is installed or supported on the operating system.
IsWow64Process2(HANDLE hProcess, Pointer<Uint16> pProcessMachine, Pointer<Uint16>? pNativeMachine) Win32Result<bool> kernel32
Determines whether the specified process is running under WOW64; also returns additional machine process and architecture information.
LoadLibrary(PCWSTR lpLibFileName) Win32Result<HMODULE> kernel32
Loads the specified module into the address space of the calling process.
LoadLibraryEx(PCWSTR lpLibFileName, LOAD_LIBRARY_FLAGS dwFlags) Win32Result<HMODULE> kernel32
Loads the specified module into the address space of the calling process.
LoadResource(HMODULE? hModule, HRSRC hResInfo) Win32Result<HGLOBAL> kernel32
Retrieves a handle that can be used to obtain a pointer to the first byte of the specified resource in memory.
LocalAlloc(LOCAL_ALLOC_FLAGS uFlags, int uBytes) Win32Result<HLOCAL> kernel32
Allocates the specified number of bytes from the heap.
LocalFree(HLOCAL? hMem) Win32Result<HLOCAL> kernel32
Frees the specified local memory object and invalidates its handle.
LockFile(HANDLE hFile, int dwFileOffsetLow, int dwFileOffsetHigh, int nNumberOfBytesToLockLow, int nNumberOfBytesToLockHigh) Win32Result<bool> kernel32
Locks the specified file for exclusive access by the calling process.
LockFileEx(HANDLE hFile, LOCK_FILE_FLAGS dwFlags, int nNumberOfBytesToLockLow, int nNumberOfBytesToLockHigh, Pointer<OVERLAPPED> lpOverlapped) Win32Result<bool> kernel32
Locks the specified file for exclusive access by the calling process.
LockResource(HGLOBAL hResData) Pointer<NativeType> kernel32
Retrieves a pointer to the specified resource in memory.
MoveFile(PCWSTR lpExistingFileName, PCWSTR lpNewFileName) Win32Result<bool> kernel32
Moves an existing file or a directory, including its children.
MoveFileEx(PCWSTR lpExistingFileName, PCWSTR? lpNewFileName, MOVE_FILE_FLAGS dwFlags) Win32Result<bool> kernel32
Moves an existing file or directory, including its children, with various move options.
OpenEvent(SYNCHRONIZATION_ACCESS_RIGHTS dwDesiredAccess, bool bInheritHandle, PCWSTR lpName) Win32Result<HANDLE> kernel32
Opens an existing named event object.
OpenJobObject(int dwDesiredAccess, bool bInheritHandle, PCWSTR lpName) Win32Result<HANDLE> kernel32
Opens an existing job object.
OpenProcess(PROCESS_ACCESS_RIGHTS dwDesiredAccess, bool bInheritHandle, int dwProcessId) Win32Result<HANDLE> kernel32
Opens an existing local process object.
OutputDebugString(PCWSTR? lpOutputString) → void kernel32
Sends a string to the debugger for display.
PackageFamilyNameFromFullName(PCWSTR packageFullName, Pointer<Uint32> packageFamilyNameLength, PWSTR? packageFamilyName) WIN32_ERROR kernel32
Gets the package family name for the specified package full name.
PeekConsoleInput(HANDLE hConsoleInput, Pointer<INPUT_RECORD> lpBuffer, int nLength, Pointer<Uint32> lpNumberOfEventsRead) Win32Result<bool> kernel32
Reads data from the specified console input buffer without removing it from the buffer.
PeekNamedPipe(HANDLE hNamedPipe, Pointer<NativeType>? lpBuffer, int nBufferSize, Pointer<Uint32>? lpBytesRead, Pointer<Uint32>? lpTotalBytesAvail, Pointer<Uint32>? lpBytesLeftThisMessage) Win32Result<bool> kernel32
Copies data from a named or anonymous pipe into a buffer without removing it from the pipe.
PostQueuedCompletionStatus(HANDLE completionPort, int dwNumberOfBytesTransferred, int dwCompletionKey, Pointer<OVERLAPPED>? lpOverlapped) Win32Result<bool> kernel32
Posts an I/O completion packet to an I/O completion port.
ProcessIdToSessionId(int dwProcessId, Pointer<Uint32> pSessionId) Win32Result<bool> kernel32
Retrieves the Remote Desktop Services session associated with a specified process.
PurgeComm(HANDLE hFile, PURGE_COMM_FLAGS dwFlags) Win32Result<bool> kernel32
Discards all characters from the output or input buffer of a specified communications resource.
QueryDosDevice(PCWSTR? lpDeviceName, PWSTR? lpTargetPath, int ucchMax) Win32Result<int> kernel32
Retrieves information about MS-DOS device names.
QueryFullProcessImageName(HANDLE hProcess, PROCESS_NAME_FORMAT dwFlags, PWSTR lpExeName, Pointer<Uint32> lpdwSize) Win32Result<bool> kernel32
Retrieves the full name of the executable image for the specified process.
QueryInformationJobObject(HANDLE? hJob, JOBOBJECTINFOCLASS jobObjectInformationClass, Pointer<NativeType> lpJobObjectInformation, int cbJobObjectInformationLength, Pointer<Uint32>? lpReturnLength) Win32Result<bool> kernel32
Retrieves limit and job state information from the job object.
QueryIoRateControlInformationJobObject(HANDLE? hJob, PCWSTR? volumeName, Pointer<Pointer<JOBOBJECT_IO_RATE_CONTROL_INFORMATION>> infoBlocks, Pointer<Uint32> infoBlockCount) Win32Result<int> kernel32
Gets information about the control of the I/O rate for a job object.
QueryPerformanceCounter(Pointer<Int64> lpPerformanceCount) Win32Result<bool> kernel32
Retrieves the current value of the performance counter, which is a high resolution (<1us) time stamp that can be used for time-interval measurements.
QueryPerformanceFrequency(Pointer<Int64> lpFrequency) Win32Result<bool> kernel32
Retrieves the frequency of the performance counter.
ReadConsole(HANDLE hConsoleInput, Pointer<NativeType> lpBuffer, int nNumberOfCharsToRead, Pointer<Uint32> lpNumberOfCharsRead, Pointer<CONSOLE_READCONSOLE_CONTROL>? pInputControl) Win32Result<bool> kernel32
Reads character input from the console input buffer and removes it from the buffer.
ReadConsoleInput(HANDLE hConsoleInput, Pointer<INPUT_RECORD> lpBuffer, int nLength, Pointer<Uint32> lpNumberOfEventsRead) Win32Result<bool> kernel32
Reads data from a console input buffer and removes it from the buffer.
ReadFile(HANDLE hFile, Pointer<Uint8>? lpBuffer, int nNumberOfBytesToRead, Pointer<Uint32>? lpNumberOfBytesRead, Pointer<OVERLAPPED>? lpOverlapped) Win32Result<bool> kernel32
Reads data from the specified file or input/output (I/O) device.
ReadFileEx(HANDLE hFile, Pointer<Uint8>? lpBuffer, int nNumberOfBytesToRead, Pointer<OVERLAPPED> lpOverlapped, Pointer<NativeFunction<LPOVERLAPPED_COMPLETION_ROUTINE>> lpCompletionRoutine) Win32Result<bool> kernel32
Reads data from the specified file or input/output (I/O) device.
ReadFileScatter(HANDLE hFile, Pointer<FILE_SEGMENT_ELEMENT> aSegmentArray, int nNumberOfBytesToRead, Pointer<OVERLAPPED> lpOverlapped) Win32Result<bool> kernel32
Reads data from a file and stores it in an array of buffers.
ReadProcessMemory(HANDLE hProcess, Pointer<NativeType> lpBaseAddress, Pointer<NativeType> lpBuffer, int nSize, Pointer<IntPtr>? lpNumberOfBytesRead) Win32Result<bool> kernel32
Reads data from an area of memory in a specified process.
ReleaseActCtx(HANDLE hActCtx) → void kernel32
Decrements the reference count of the specified activation context.
RemoveDirectory(PCWSTR lpPathName) Win32Result<bool> kernel32
Deletes an existing empty directory.
RemoveDllDirectory(Pointer<NativeType> cookie) Win32Result<bool> kernel32
Removes a directory that was added to the process DLL search path by using AddDllDirectory.
ReOpenFile(HANDLE hOriginalFile, int dwDesiredAccess, FILE_SHARE_MODE dwShareMode, FILE_FLAGS_AND_ATTRIBUTES dwFlagsAndAttributes) Win32Result<HANDLE> kernel32
Reopens the specified file system object with different access rights, sharing mode, and flags.
ResetEvent(HANDLE hEvent) Win32Result<bool> kernel32
Sets the specified event object to the nonsignaled state.
ResizePseudoConsole(HPCON hPC, COORD size) → void kernel32
Resizes the internal buffers for a pseudoconsole to the given size.
ScrollConsoleScreenBuffer(HANDLE hConsoleOutput, Pointer<SMALL_RECT> lpScrollRectangle, Pointer<SMALL_RECT>? lpClipRectangle, COORD dwDestinationOrigin, Pointer<CHAR_INFO> lpFill) Win32Result<bool> kernel32
Moves a block of data in a screen buffer.
SetCommBreak(HANDLE hFile) Win32Result<bool> kernel32
Suspends character transmission for a specified communications device and places the transmission line in a break state until the ClearCommBreak function is called.
SetCommConfig(HANDLE hCommDev, Pointer<COMMCONFIG> lpCC, int dwSize) Win32Result<bool> kernel32
Sets the current configuration of a communications device.
SetCommMask(HANDLE hFile, COMM_EVENT_MASK dwEvtMask) Win32Result<bool> kernel32
Specifies a set of events to be monitored for a communications device.
SetCommState(HANDLE hFile, Pointer<DCB> lpDCB) Win32Result<bool> kernel32
Configures a communications device according to the specifications in a device-control block (a DCB structure).
SetCommTimeouts(HANDLE hFile, Pointer<COMMTIMEOUTS> lpCommTimeouts) Win32Result<bool> kernel32
Sets the time-out parameters for all read and write operations on a specified communications device.
SetConsoleCtrlHandler(Pointer<NativeFunction<PHANDLER_ROUTINE>>? handlerRoutine, bool add) Win32Result<bool> kernel32
Adds or removes an application-defined HandlerRoutine function from the list of handler functions for the calling process.
SetConsoleCursorInfo(HANDLE hConsoleOutput, Pointer<CONSOLE_CURSOR_INFO> lpConsoleCursorInfo) Win32Result<bool> kernel32
Sets the size and visibility of the cursor for the specified console screen buffer.
SetConsoleCursorPosition(HANDLE hConsoleOutput, COORD dwCursorPosition) Win32Result<bool> kernel32
Sets the cursor position in the specified console screen buffer.
SetConsoleDisplayMode(HANDLE hConsoleOutput, int dwFlags, Pointer<COORD>? lpNewScreenBufferDimensions) Win32Result<bool> kernel32
Sets the display mode of the specified console screen buffer.
SetConsoleMode(HANDLE hConsoleHandle, CONSOLE_MODE dwMode) Win32Result<bool> kernel32
Sets the input mode of a console's input buffer or the output mode of a console screen buffer.
SetConsoleTextAttribute(HANDLE hConsoleOutput, CONSOLE_CHARACTER_ATTRIBUTES wAttributes) Win32Result<bool> kernel32
Sets the attributes of characters written to the console screen buffer by the WriteFile or WriteConsole function, or echoed by the ReadFile or ReadConsole function.
SetConsoleWindowInfo(HANDLE hConsoleOutput, bool bAbsolute, Pointer<SMALL_RECT> lpConsoleWindow) Win32Result<bool> kernel32
Sets the current size and position of a console screen buffer's window.
SetCurrentDirectory(PCWSTR lpPathName) bool kernel32
Changes the current directory for the current process.
SetDefaultCommConfig(PCWSTR lpszName, Pointer<COMMCONFIG> lpCC, int dwSize) Win32Result<bool> kernel32
Sets the default configuration for a communications device.
SetDefaultDllDirectories(LOAD_LIBRARY_FLAGS directoryFlags) Win32Result<bool> kernel32
Specifies a default set of directories to search when the calling process loads a DLL.
SetEndOfFile(HANDLE hFile) Win32Result<bool> kernel32
Sets the physical file size for the specified file to the current position of the file pointer.
SetEnvironmentVariable(PCWSTR lpName, PCWSTR? lpValue) Win32Result<bool> kernel32
Sets the contents of the specified environment variable for the current process.
SetErrorMode(THREAD_ERROR_MODE uMode) THREAD_ERROR_MODE kernel32
Controls whether the system will handle the specified types of serious errors or whether the process will handle them.
SetEvent(HANDLE hEvent) Win32Result<bool> kernel32
Sets the specified event object to the signaled state.
SetFileApisToANSI() → void kernel32
Causes the file I/O functions to use the ANSI character set code page for the current process.
SetFileApisToOEM() → void kernel32
Causes the file I/O functions for the process to use the OEM character set code page.
SetFileAttributes(PCWSTR lpFileName, FILE_FLAGS_AND_ATTRIBUTES dwFileAttributes) Win32Result<bool> kernel32
Sets the attributes for a file or directory.
SetFileInformationByHandle(HANDLE hFile, FILE_INFO_BY_HANDLE_CLASS fileInformationClass, Pointer<NativeType> lpFileInformation, int dwBufferSize) Win32Result<bool> kernel32
Sets the file information for the specified file.
SetFileIoOverlappedRange(HANDLE fileHandle, Pointer<Uint8> overlappedRangeStart, int length) Win32Result<bool> kernel32
Associates a virtual address range with the specified file handle.
SetFilePointer(HANDLE hFile, int lDistanceToMove, Pointer<Int32>? lpDistanceToMoveHigh, SET_FILE_POINTER_MOVE_METHOD dwMoveMethod) Win32Result<int> kernel32
Moves the file pointer of the specified file.
SetFilePointerEx(HANDLE hFile, int liDistanceToMove, Pointer<Int64>? lpNewFilePointer, SET_FILE_POINTER_MOVE_METHOD dwMoveMethod) Win32Result<bool> kernel32
Moves the file pointer of the specified file.
SetFileShortName(HANDLE hFile, PCWSTR lpShortName) Win32Result<bool> kernel32
Sets the short name for the specified file.
SetFileTime(HANDLE hFile, Pointer<FILETIME>? lpCreationTime, Pointer<FILETIME>? lpLastAccessTime, Pointer<FILETIME>? lpLastWriteTime) Win32Result<bool> kernel32
Sets the date and time that the specified file or directory was created, last accessed, or last modified.
SetFileValidData(HANDLE hFile, int validDataLength) Win32Result<bool> kernel32
Sets the valid data length of the specified file.
SetFirmwareEnvironmentVariable(PCWSTR lpName, PCWSTR lpGuid, Pointer<NativeType>? pValue, int nSize) Win32Result<bool> kernel32
Sets the value of the specified firmware environment variable.
SetFirmwareEnvironmentVariableEx(PCWSTR lpName, PCWSTR lpGuid, Pointer<NativeType>? pValue, int nSize, int dwAttributes) Win32Result<bool> kernel32
Sets the value of the specified firmware environment variable and the attributes that indicate how this variable is stored and maintained.
SetHandleInformation(HANDLE hObject, int dwMask, HANDLE_FLAGS dwFlags) Win32Result<bool> kernel32
Sets certain properties of an object handle.
SetInformationJobObject(HANDLE hJob, JOBOBJECTINFOCLASS jobObjectInformationClass, Pointer<NativeType> lpJobObjectInformation, int cbJobObjectInformationLength) Win32Result<bool> kernel32
Sets limits for a job object.
SetIoRateControlInformationJobObject(HANDLE hJob, Pointer<JOBOBJECT_IO_RATE_CONTROL_INFORMATION> ioRateControlInfo) Win32Result<int> kernel32
Sets I/O limits on a job object.
SetLastError(WIN32_ERROR dwErrCode) → void kernel32
Sets the last-error code for the calling thread.
SetNamedPipeHandleState(HANDLE hNamedPipe, Pointer<Uint32>? lpMode, Pointer<Uint32>? lpMaxCollectionCount, Pointer<Uint32>? lpCollectDataTimeout) Win32Result<bool> kernel32
Sets the read mode and the blocking mode of the specified named pipe.
SetProcessAffinityMask(HANDLE hProcess, int dwProcessAffinityMask) Win32Result<bool> kernel32
Sets a processor affinity mask for the threads of the specified process.
SetProcessPriorityBoost(HANDLE hProcess, bool bDisablePriorityBoost) Win32Result<bool> kernel32
Disables or enables the ability of the system to temporarily boost the priority of the threads of the specified process.
SetProcessWorkingSetSize(HANDLE hProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize) Win32Result<bool> kernel32
Sets the minimum and maximum working set sizes for the specified process.
SetStdHandle(STD_HANDLE nStdHandle, HANDLE hHandle) Win32Result<bool> kernel32
Sets the handle for the specified standard device (standard input, standard output, or standard error).
SetThreadAffinityMask(HANDLE hThread, int dwThreadAffinityMask) Win32Result<int> kernel32
Sets a processor affinity mask for the specified thread.
SetThreadErrorMode(THREAD_ERROR_MODE dwNewMode, Pointer<Uint32>? lpOldMode) Win32Result<bool> kernel32
Controls whether the system will handle the specified types of serious errors or whether the calling thread will handle them.
SetThreadExecutionState(EXECUTION_STATE esFlags) EXECUTION_STATE kernel32
Enables an application to inform the system that it is in use, thereby preventing the system from entering sleep or turning off the display while the application is running.
SetThreadUILanguage(int langId) Win32Result<int> kernel32
Sets the user interface language for the current thread.
SetupComm(HANDLE hFile, int dwInQueue, int dwOutQueue) Win32Result<bool> kernel32
Initializes the communications parameters for a specified communications device.
SetVolumeLabel(PCWSTR? lpRootPathName, PCWSTR? lpVolumeName) Win32Result<bool> kernel32
Sets the label of a file system volume.
SizeofResource(HMODULE? hModule, HRSRC hResInfo) Win32Result<int> kernel32
Retrieves the size, in bytes, of the specified resource.
Sleep(int dwMilliseconds) → void kernel32
Suspends the execution of the current thread until the time-out interval elapses.
SleepEx(int dwMilliseconds, bool bAlertable) int kernel32
Suspends the current thread until the specified condition is met.
SystemTimeToFileTime(Pointer<SYSTEMTIME> lpSystemTime, Pointer<FILETIME> lpFileTime) Win32Result<bool> kernel32
Converts a system time to file time format.
TerminateJobObject(HANDLE hJob, int uExitCode) Win32Result<bool> kernel32
Terminates all processes currently associated with the job.
TerminateProcess(HANDLE hProcess, int uExitCode) Win32Result<bool> kernel32
Terminates the specified process and all of its threads.
TerminateThread(HANDLE hThread, int dwExitCode) Win32Result<bool> kernel32
Terminates a thread.
TransactNamedPipe(HANDLE hNamedPipe, Pointer<NativeType>? lpInBuffer, int nInBufferSize, Pointer<NativeType>? lpOutBuffer, int nOutBufferSize, Pointer<Uint32> lpBytesRead, Pointer<OVERLAPPED>? lpOverlapped) Win32Result<bool> kernel32
Combines the functions that write a message to and read a message from the specified named pipe into a single operation.
TransmitCommChar(HANDLE hFile, CHAR cChar) Win32Result<bool> kernel32
Transmits a specified character ahead of any pending data in the output buffer of the specified communications device.
UnlockFile(HANDLE hFile, int dwFileOffsetLow, int dwFileOffsetHigh, int nNumberOfBytesToUnlockLow, int nNumberOfBytesToUnlockHigh) Win32Result<bool> kernel32
Unlocks a region in an open file.
UnlockFileEx(HANDLE hFile, int nNumberOfBytesToUnlockLow, int nNumberOfBytesToUnlockHigh, Pointer<OVERLAPPED> lpOverlapped) Win32Result<bool> kernel32
Unlocks a region in the specified file.
UpdateProcThreadAttribute(LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList, int dwFlags, int attribute, Pointer<NativeType>? lpValue, int cbSize, Pointer<NativeType>? lpPreviousValue, Pointer<IntPtr>? lpReturnSize) Win32Result<bool> kernel32
Updates the specified attribute in a list of attributes for process and thread creation.
UpdateResource(HANDLE hUpdate, PCWSTR lpType, PCWSTR lpName, int wLanguage, Pointer<NativeType>? lpData, int cb) Win32Result<bool> kernel32
Adds, deletes, or replaces a resource in a portable executable (PE) file.
VerifyVersionInfo(Pointer<OSVERSIONINFOEX> lpVersionInformation, VER_FLAGS dwTypeMask, int dwlConditionMask) Win32Result<bool> kernel32
Compares a set of operating system version requirements to the corresponding values for the currently running version of the system.
VerLanguageName(int wLang, PWSTR szLang, int cchLang) int kernel32
Retrieves a description string for the language associated with a specified binary Microsoft language identifier.
VerSetConditionMask(int conditionMask, VER_FLAGS typeMask, int condition) int kernel32
Sets the bits of a 64-bit value to indicate the comparison operator to use for a specified operating system version attribute.
VirtualAlloc(Pointer<NativeType>? lpAddress, int dwSize, VIRTUAL_ALLOCATION_TYPE flAllocationType, PAGE_PROTECTION_FLAGS flProtect) Win32Result<Pointer<NativeType>> kernel32
Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process.
VirtualAllocEx(HANDLE hProcess, Pointer<NativeType>? lpAddress, int dwSize, VIRTUAL_ALLOCATION_TYPE flAllocationType, PAGE_PROTECTION_FLAGS flProtect) Win32Result<Pointer<NativeType>> kernel32
Reserves, commits, or changes the state of a region of memory within the virtual address space of a specified process.
VirtualFree(Pointer<NativeType> lpAddress, int dwSize, VIRTUAL_FREE_TYPE dwFreeType) Win32Result<bool> kernel32
Releases, decommits, or releases and decommits a region of pages within the virtual address space of the calling process.
VirtualFreeEx(HANDLE hProcess, Pointer<NativeType> lpAddress, int dwSize, VIRTUAL_FREE_TYPE dwFreeType) Win32Result<bool> kernel32
Releases, decommits, or releases and decommits a region of memory within the virtual address space of a specified process.
VirtualLock(Pointer<NativeType> lpAddress, int dwSize) Win32Result<bool> kernel32
Locks the specified region of the process's virtual address space into physical memory, ensuring that subsequent access to the region will not incur a page fault.
VirtualProtect(Pointer<NativeType> lpAddress, int dwSize, PAGE_PROTECTION_FLAGS flNewProtect, Pointer<Uint32> lpflOldProtect) Win32Result<bool> kernel32
Changes the protection on a region of committed pages in the virtual address space of the calling process.
VirtualProtectEx(HANDLE hProcess, Pointer<NativeType> lpAddress, int dwSize, PAGE_PROTECTION_FLAGS flNewProtect, Pointer<Uint32> lpflOldProtect) Win32Result<bool> kernel32
Changes the protection on a region of committed pages in the virtual address space of a specified process.
VirtualQuery(Pointer<NativeType>? lpAddress, Pointer<MEMORY_BASIC_INFORMATION> lpBuffer, int dwLength) Win32Result<int> kernel32
Retrieves information about a range of pages in the virtual address space of the calling process.
VirtualQueryEx(HANDLE hProcess, Pointer<NativeType>? lpAddress, Pointer<MEMORY_BASIC_INFORMATION> lpBuffer, int dwLength) Win32Result<int> kernel32
Retrieves information about a range of pages within the virtual address space of a specified process.
VirtualUnlock(Pointer<NativeType> lpAddress, int dwSize) Win32Result<bool> kernel32
Unlocks a specified range of pages in the virtual address space of a process, enabling the system to swap the pages out to the paging file if necessary.
WaitCommEvent(HANDLE hFile, Pointer<Uint32> lpEvtMask, Pointer<OVERLAPPED>? lpOverlapped) Win32Result<bool> kernel32
Waits for an event to occur for a specified communications device.
WaitForMultipleObjects(int nCount, Pointer<Pointer<NativeType>> lpHandles, bool bWaitAll, int dwMilliseconds) Win32Result<WAIT_EVENT> kernel32
Waits until one or all of the specified objects are in the signaled state or the time-out interval elapses.
WaitForSingleObject(HANDLE hHandle, int dwMilliseconds) Win32Result<WAIT_EVENT> kernel32
Waits until the specified object is in the signaled state or the time-out interval elapses.
WideCharToMultiByte(int codePage, int dwFlags, PCWSTR lpWideCharStr, int cchWideChar, PSTR? lpMultiByteStr, int cbMultiByte, PCSTR? lpDefaultChar, Pointer<Int32>? lpUsedDefaultChar) Win32Result<int> kernel32
Maps a UTF-16 (wide character) string to a new character string.
Wow64SuspendThread(HANDLE hThread) Win32Result<int> kernel32
Suspends the specified WOW64 thread.
WriteConsole(HANDLE hConsoleOutput, PCWSTR lpBuffer, int nNumberOfCharsToWrite, Pointer<Uint32>? lpNumberOfCharsWritten) Win32Result<bool> kernel32
Writes a character string to a console screen buffer beginning at the current cursor location.
WriteFile(HANDLE hFile, Pointer<Uint8>? lpBuffer, int nNumberOfBytesToWrite, Pointer<Uint32>? lpNumberOfBytesWritten, Pointer<OVERLAPPED>? lpOverlapped) Win32Result<bool> kernel32
Writes data to the specified file or input/output (I/O) device.
WriteFileEx(HANDLE hFile, Pointer<Uint8>? lpBuffer, int nNumberOfBytesToWrite, Pointer<OVERLAPPED> lpOverlapped, Pointer<NativeFunction<LPOVERLAPPED_COMPLETION_ROUTINE>> lpCompletionRoutine) Win32Result<bool> kernel32
Writes data to the specified file or input/output (I/O) device.
WriteFileGather(HANDLE hFile, Pointer<FILE_SEGMENT_ELEMENT> aSegmentArray, int nNumberOfBytesToWrite, Pointer<OVERLAPPED> lpOverlapped) Win32Result<bool> kernel32
Retrieves data from an array of buffers and writes the data to a file.
WriteProcessMemory(HANDLE hProcess, Pointer<NativeType> lpBaseAddress, Pointer<NativeType> lpBuffer, int nSize, Pointer<IntPtr>? lpNumberOfBytesWritten) Win32Result<bool> kernel32
Writes data to an area of memory in a specified process.
ZeroMemory(Pointer<NativeType> destination, int length) → void kernel32
Fills a block of memory with zeros.