Windows Kernel32 declarations for synchronization, file and overlapped I/O, processes, threads, fibers, modules, timing, waits, completion ports, and UTF conversion.
CREATE_NEW, CREATE_ALWAYS, OPEN_EXISTING, OPEN_ALWAYS, and TRUNCATE_EXISTING: file-creation disposition constants.FILE_SHARE_READ, FILE_SHARE_WRITE, and FILE_SHARE_DELETE: file-sharing flags.GENERIC_READ, GENERIC_WRITE, GENERIC_EXECUTE, and GENERIC_ALL: generic access masks.INFINITE: no-timeout constant for wait, sleep, and completion-port wait operations.INVALID_HANDLE_VALUE, INVALID_FILE_SIZE, INVALID_SET_FILE_POINTER, and INVALID_FILE_ATTRIBUTES: invalid-result sentinels.ERROR_ALREADY_EXISTS, ERROR_FILE_NOT_FOUND, ERROR_NOT_FOUND, ERROR_OPERATION_ABORTED, ERROR_PATH_NOT_FOUND, and ERROR_TIMEOUT: common Win32 error constants.WAIT_OBJECT_0, WAIT_TIMEOUT, and WAIT_FAILED: wait-result constants.CP_UTF8 and MB_ERR_INVALID_CHARS: UTF conversion constants.CONDITION_VARIABLE_LOCKMODE_SHARED: shared-lock wait flag."windows/kernel32" use
"control" use
{} () {} [
CREATE_ALWAYS printStack _:;
WAIT_TIMEOUT printStack _:;
CP_UTF8 printStack _:;
CONDITION_VARIABLE_LOCKMODE_SHARED printStack _:;
] "main" exportFunction
2
258n32
65001n32
1n32
FARPROC: imported procedure-address schema.LPFIBER_START_ROUTINE and LPTHREAD_START_ROUTINE: fiber and thread start callback schemas.HINSTANCE and HMODULE: module-handle schemas and aliases.CONDITION_VARIABLE and SRWLOCK: minimal synchronization-storage schemas.CRITICAL_SECTION: critical-section state schema.LARGE_INTEGER: split low/high integer representation used by file-size and performance-counter helpers.OVERLAPPED: overlapped-I/O schema with status fields, offset union storage, and event handle.OVERLAPPED_ENTRY: completion-port result schema with completion key, overlapped pointer, internal status, and transferred-byte count.PROCESS_INFORMATION: process handle, thread handle, process identifier, and thread identifier.SECURITY_ATTRIBUTES: size, security-descriptor pointer, and handle-inheritance flag.STARTUPINFOW: process-startup schema with reserved string pointers, geometry fields, window-display fields, reserved binary fields, and standard-handle fields.SYSTEM_INFO: processor architecture, page size, address range, processor count, and allocation-granularity information."windows/kernel32" use
"control" use
{} () {} [
PROCESS_INFORMATION fieldCount printStack _:;
SYSTEM_INFO 6 fieldName printStack _:;
] "main" exportFunction
4
"dwNumberOfProcessors"
OVERLAPPED.Internal and InternalHigh are completion-status fields written by the completion mechanism.GetOverlappedResult, GetQueuedCompletionStatus, GetQueuedCompletionStatusEx, or an equivalent completion query.GetQueuedCompletionStatus writes the transferred-byte count, the completion key, and one OVERLAPPED Ref through caller-supplied output pointers.GetQueuedCompletionStatusEx writes up to ulCount OVERLAPPED_ENTRY results into caller-provided storage and writes the number removed through ulNumEntriesRemoved.ReadFile, WriteFile, and GetOverlappedResult write transferred-byte counts through caller-supplied output pointers.OVERLAPPED.Internal together with the transferred-byte counts supplied by these result paths.Natx parameters.CreateDirectoryW.lpPathName, CreateFileW.lpFileName, CreateProcessW.lpApplicationName, CreateProcessW.lpCommandLine, CreateProcessW.lpCurrentDirectory, DeleteFileW.lpFileName, GetFileAttributesW.lpFileName, GetModuleHandleW.lpModuleName, and LoadLibraryW.lpLibFileName.GetProcAddress.lpProcName is one raw procedure-name address.ReadFile.lpBuffer, WriteFile.lpBuffer, MultiByteToWideChar.lpMultiByteStr, MultiByteToWideChar.lpWideCharStr, WideCharToMultiByte.lpWideCharStr, and WideCharToMultiByte.lpMultiByteStr are raw caller-owned buffer addresses whose extents are described by the accompanying size arguments.PROCESS_INFORMATION-based CreateProcessW.lpProcessInformation, CreateThread.lpThreadId, GetExitCodeProcess.lpExitCode, GetExitCodeThread.lpExitCode, LARGE_INTEGER-based GetFileSizeEx.lpFileSize, SYSTEM_INFO-based GetSystemInfo.lpSystemInfo, and the performance-counter outputs.ReadFile, WriteFile, GetOverlappedResult, GetQueuedCompletionStatus, and GetQueuedCompletionStatusEx use caller-owned writable storage for transferred-byte counts or completion records.INFINITE selects no timeout for wait, sleep, and completion-port wait operations.WaitForSingleObject returns WAIT_OBJECT_0 for one signaled handle, WAIT_TIMEOUT for timeout, and WAIT_FAILED for failure.0, FALSE, or invalid sentinels such as INVALID_HANDLE_VALUE, INVALID_FILE_ATTRIBUTES, INVALID_FILE_SIZE, and INVALID_SET_FILE_POINTER.GetLastError returns the Win32 error code associated with the preceding failing call.CreateFileW, CreateIoCompletionPort, and CreateThread produce handles released with CloseHandle when they are no longer needed.CreateProcessW writes the returned process handle and thread handle into caller-owned PROCESS_INFORMATION storage. Successful callers close both with CloseHandle when they are no longer needed.LoadLibraryW returns one module handle released with FreeLibrary.GetModuleHandleW returns one existing module handle for lookup and comparison.TerminateProcess and WaitForSingleObject do not close the supplied handle.OVERLAPPED storage remains caller-owned until completion is observed or cancellation is processed.AcquireSRWLockExclusive, AcquireSRWLockShared, ReleaseSRWLockExclusive, ReleaseSRWLockShared, TryAcquireSRWLockExclusive, TryAcquireSRWLockShared, SleepConditionVariableSRW, WakeConditionVariable, and WakeAllConditionVariable: SRW lock and condition-variable operations.InitializeCriticalSectionAndSpinCount, EnterCriticalSection, and LeaveCriticalSection: critical-section operations.CreateFileW, ReadFile, WriteFile, CancelIoEx, GetOverlappedResult, GetFileAttributesW, GetFileSizeEx, CreateDirectoryW, and DeleteFileW: file and overlapped-I/O operations.CreateIoCompletionPort, GetQueuedCompletionStatus, GetQueuedCompletionStatusEx, and PostQueuedCompletionStatus: completion-port operations.CreateProcessW, TerminateProcess, and GetExitCodeProcess: process creation and termination operations.CreateThread, GetExitCodeThread, and WaitForSingleObject: thread creation and waiting operations.ConvertThreadToFiber, CreateFiber, and SwitchToFiber: fiber operations.GetModuleHandleW, LoadLibraryW, FreeLibrary, and GetProcAddress: module-loading and procedure-lookup operations.QueryPerformanceCounter, QueryPerformanceFrequency, GetTickCount64, GetSystemInfo, and GetLastError: timing and system-information operations.MultiByteToWideChar and WideCharToMultiByte: UTF conversion operations.CloseHandle and Sleep: generic handle-closing and timing helpers.Printing imported names during compilation shows the exact imported signatures.
"windows/kernel32" use
"control" use
{} Int32 {} [
@CreateFileW printStack _:;
@CreateProcessW printStack _:;
@QueryPerformanceCounter printStack _:;
0
] "main" exportFunction
{lpFileName: Natx; dwDesiredAccess: Nat32; dwShareMode: Nat32; lpSecurityAttributes: {nLength: Nat32; lpSecurityDescriptor: Natx; bInheritHandle: Int32;} Ref; dwCreationDisposition: Nat32; dwFlagsAndAttributes: Nat32; hTemplateFile: Natx;} Natx {convention: "";} codeRef
{lpApplicationName: Natx; lpCommandLine: Natx; lpProcessAttributes: {nLength: Nat32; lpSecurityDescriptor: Natx; bInheritHandle: Int32;} Ref; lpThreadAttributes: {nLength: Nat32; lpSecurityDescriptor: Natx; bInheritHandle: Int32;} Ref; bInheritHandles: Int32; dwCreationFlags: Nat32; lpEnvironment: Natx; lpCurrentDirectory: Natx; lpStartupInfo: {cb: Nat32; lpReserved: Natx; lpDesktop: Natx; lpTitle: Natx; dwX: Nat32; dwY: Nat32; dwXSize: Nat32; dwYSize: Nat32; dwXCountChars: Nat32; dwYCountChars: Nat32; dwFillAttribute: Nat32; dwFlags: Nat32; wShowWindow: Nat16; cbReserved2: Nat16; lpReserved2: Natx; hStdInput: Natx; hStdOutput: Natx; hStdError: Natx;} Ref; lpProcessInformation: {hProcess: Natx; hThread: Natx; dwProcessId: Nat32; dwThreadId: Nat32;} Ref;} Int32 {convention: "";} codeRef
{lpPerformanceCount: Int64 Ref;} Int32 {convention: "";} codeRef