Kernel32 Class

Platform Invocation methods (P/Invoke), access unmanaged code.

Kernel32.dll.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[HideModuleNameAttribute]
public sealed class Kernel32
Inheritance
Object    Kernel32

Methods

AddAtom Adds a character string to the local atom table and returns a unique value (an atom) identifying the string.
AddDllDirectory Adds a directory to the process DLL search path.
AddSIDToBoundaryDescriptor Adds a security identifier (SID) to the specified boundary descriptor.
AllocateUserPhysicalPages(IntPtr, IntPtr, IntPtr) Allocates physical memory pages to be mapped and unmapped within any Address Windowing Extensions (AWE) region of a specified process.
AllocateUserPhysicalPages(IntPtr, UIntPtr, UIntPtr) Allocates physical memory pages to be mapped and unmapped within any Address Windowing Extensions (AWE) region of a specified process.
AllocateUserPhysicalPagesNuma(IntPtr, IntPtr, IntPtr, UInt32) Allocates physical memory pages to be mapped and unmapped within any Address Windowing Extensions (AWE) region of a specified process and specifies the NUMA node for the physical memory.
AllocateUserPhysicalPagesNuma(IntPtr, UIntPtr, UIntPtr, UInt32) Allocates physical memory pages to be mapped and unmapped within any Address Windowing Extensions (AWE) region of a specified process and specifies the NUMA node for the physical memory.
AllocConsole Allocates a new console for the calling process.
ApplicationRecoveryFinished Indicates that the calling application has completed its data recovery.
ApplicationRecoveryInProgress Indicates that the calling application is continuing to recover data.
AppPolicyGetCreateFileAccess Retrieves a value indicating whether a process has full or restricted access to the I/O devices (file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe).
AppPolicyGetProcessTerminationMethod Retrieves the method used to end a process.
AppPolicyGetShowDeveloperDiagnostic Retrieves the method used for a process to surface developer information, such as asserts, to the user.
AppPolicyGetThreadInitializationType Retrieves the kind of initialization that should be automatically performed for a process when beginthread[ex] creates a thread.
AreFileApisANSI Determines whether the file I/O functions are using the ANSI or OEM character set code page.

This function is useful for 8-bit console input and output operations.

AttachConsole Attaches the calling process to the console of the specified process.
BackupRead This function can be used to back up a file or directory, including the security information.

This function reads data associated with a specified file or directory into a buffer, which can then be written to the backup medium using the WriteFile function.

BackupSeek Seeks forward in a data stream initially accessed by using the BackupRead(SafeFileHandle, IntPtr, UInt32, UInt32, Boolean, Boolean, IntPtr) or BackupWrite function.
BaseFlushAppcompatCache Flushes the application compatibility cache.
Beep Generates simple tones on the speaker.

The function is synchronous; it performs an alertable wait and does not return control to its caller until the sound finishes.

BeginUpdateResource Retrieves a handle that can be used by the UpdateResource(SafeModuleHandle, ResourceType, IntPtr, UInt16, IntPtr, UInt32) function to add, delete, or replace resources in a binary module.
CancelIo Cancels all pending input and output (I/O) operations that are issued by the calling thread for the specified file.

The function does not cancel I/O operations that other threads issue for a file handle.

To cancel I/O operations from another thread, use the CancelIoEx function.

CeipIsOptedIn Checks whether the user has opted in for SQM data collection as part of the Customer Experience Improvement Program (CEIP).
CheckRemoteDebuggerPresent Determines whether the specified process is being debugged.
ClearCommBreak Restores character transmission for a specified communications device and places the transmission line in a nonbreak state.
CloseHandle(IntPtr) Closes the specified object handle.
CloseHandle(SafeHandle) Closes the specified object handle.
ClosePrivateNamespace Closes an open namespace handle.
CompareStringOrdinal(IntPtr, Int32, IntPtr, Int32, Boolean) Compares two Unicode strings to test binary equivalence.
CompareStringOrdinal(IntPtr, Int32, String, Int32, Boolean) Compares two Unicode strings to test binary equivalence.
ContinueDebugEvent Enables a debugger to continue a thread that previously reported a debugging event.
ConvertFiberToThread Converts the current fiber into a thread.
ConvertThreadToFiber Converts the current thread into a fiber.

You must convert a thread into a fiber before you can schedule other fibers.

ConvertThreadToFiberEx Converts the current thread into a fiber.

You must convert a thread into a fiber before you can schedule other fibers.

CopyFileEx Copies an existing file to a new file, notifying the application of its progress through a callback function.
CreateBoundaryDescriptor Creates a boundary descriptor.
CreateDirectory Creates a new directory.

If the underlying file system supports security on files and directories, the function applies a specified security descriptor to the new directory.

CreateDirectoryA Creates a new directory.

If the underlying file system supports security on files and directories, the function applies a specified security descriptor to the new directory.

CreateDirectoryW Creates a new directory.

If the underlying file system supports security on files and directories, the function applies a specified security descriptor to the new directory.

CreateFile(String, FileAccessRights, FileShare, IntPtr, FileMode, CreateFileFlags, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFile(String, FileAccessRights, FileShare, IntPtr, FileMode, FileAttributes, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFile(String, FileAccessRights, FileShare, IntPtr, FileMode, UInt32, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFile(String, Int32, FileShare, IntPtr, FileMode, CreateFileFlags, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFile(String, Int32, FileShare, IntPtr, FileMode, FileAttributes, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFile(String, Int32, FileShare, IntPtr, FileMode, UInt32, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFileA(String, FileAccessRights, FileShare, IntPtr, FileMode, CreateFileFlags, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFileA(String, FileAccessRights, FileShare, IntPtr, FileMode, FileAttributes, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFileA(String, FileAccessRights, FileShare, IntPtr, FileMode, UInt32, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFileA(String, Int32, FileShare, IntPtr, FileMode, CreateFileFlags, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFileA(String, Int32, FileShare, IntPtr, FileMode, FileAttributes, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFileA(String, Int32, FileShare, IntPtr, FileMode, UInt32, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFileW(String, FileAccessRights, FileShare, IntPtr, FileMode, CreateFileFlags, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFileW(String, FileAccessRights, FileShare, IntPtr, FileMode, FileAttributes, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFileW(String, FileAccessRights, FileShare, IntPtr, FileMode, UInt32, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFileW(String, Int32, FileShare, IntPtr, FileMode, CreateFileFlags, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFileW(String, Int32, FileShare, IntPtr, FileMode, FileAttributes, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateFileW(String, Int32, FileShare, IntPtr, FileMode, UInt32, IntPtr) Creates or opens a file or I/O device.

The most commonly used I/O devices are as follows:

file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.

The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.

CreateHardLink(String, String, SecurityAttributes) Establishes a hard link between an existing file and a new file.

This function is only supported on the NTFS file system, and only for files, not directories.

CreateHardLink(String, String, IntPtr) Establishes a hard link between an existing file and a new file.

This function is only supported on the NTFS file system, and only for files, not directories.

CreateMemoryResourceNotification Creates a memory resource notification object.
CreateMutex Creates or opens a named or unnamed mutex object.

To specify an access mask for the object, use the CreateMutexEx(SecurityAttributes, String, CreateMutexFlags, StandardAccessRights) function.

CreateMutexEx(SecurityAttributes, String, CreateMutexFlags, StandardAccessRights) Creates or opens a named or unnamed mutex object and returns a handle to the object.
CreateMutexEx(SecurityAttributes, String, CreateMutexFlags, UInt32) Creates or opens a named or unnamed mutex object and returns a handle to the object.
CreatePrivateNamespace Creates a private namespace.
CreateProcess(String, StringBuilder, SecurityAttributes, SecurityAttributes, Boolean, CreateProcessFlags, IntPtr, String, ProcessStartupInfo, ProcessInformation) Creates a new process and its primary thread. The new process runs in the security context of the calling process.

If the calling process is impersonating another user, the new process uses the token for the calling process, not the impersonation token.

To run the new process in the security context of the user represented by the impersonation token, use the CreateProcessAsUser(IntPtr, String, StringBuilder, SecurityAttributes, SecurityAttributes, Boolean, CreateProcessFlags, IntPtr, String, ProcessStartupInfo, ProcessInformation) or CreateProcessWithLogon(String, String, String, ProcessLogonFlags, String, StringBuilder, CreateProcessFlags, IntPtr, String, ProcessStartupInfo, ProcessInformation) function.

CreateProcess(String, StringBuilder, SecurityAttributes, SecurityAttributes, Boolean, CreateProcessFlags, IntPtr, String, ProcessStartupInfoEx, ProcessInformation) Creates a new process and its primary thread. The new process runs in the security context of the calling process.

If the calling process is impersonating another user, the new process uses the token for the calling process, not the impersonation token.

To run the new process in the security context of the user represented by the impersonation token, use the CreateProcessAsUser(IntPtr, String, StringBuilder, SecurityAttributes, SecurityAttributes, Boolean, CreateProcessFlags, IntPtr, String, ProcessStartupInfo, ProcessInformation) or CreateProcessWithLogon(String, String, String, ProcessLogonFlags, String, StringBuilder, CreateProcessFlags, IntPtr, String, ProcessStartupInfo, ProcessInformation) function.

CreateRemoteThread(IntPtr, SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, UInt32) Creates a thread that runs in the virtual address space of another process.

Use the CreateRemoteThreadEx(IntPtr, SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, IntPtr, UInt32) function to create a thread that runs in the virtual address space of another process and optionally specify extended attributes.

CreateRemoteThread(IntPtr, SecurityAttributes, IntPtr, ThreadStart, IntPtr, CreateThreadFlags, UInt32) Creates a thread that runs in the virtual address space of another process.

Use the CreateRemoteThreadEx(IntPtr, SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, IntPtr, UInt32) function to create a thread that runs in the virtual address space of another process and optionally specify extended attributes.

CreateRemoteThread(IntPtr, SecurityAttributes, IntPtr, UIntPtr, IntPtr, CreateThreadFlags, UInt32) Creates a thread that runs in the virtual address space of another process.

Use the CreateRemoteThreadEx(IntPtr, SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, IntPtr, UInt32) function to create a thread that runs in the virtual address space of another process and optionally specify extended attributes.

CreateRemoteThread(IntPtr, IntPtr, IntPtr, IntPtr, IntPtr, CreateThreadFlags, UInt32) Creates a thread that runs in the virtual address space of another process.

Use the CreateRemoteThreadEx(IntPtr, SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, IntPtr, UInt32) function to create a thread that runs in the virtual address space of another process and optionally specify extended attributes.

CreateRemoteThread(IntPtr, IntPtr, IntPtr, ThreadStart, IntPtr, CreateThreadFlags, UInt32) Creates a thread that runs in the virtual address space of another process.

Use the CreateRemoteThreadEx(IntPtr, SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, IntPtr, UInt32) function to create a thread that runs in the virtual address space of another process and optionally specify extended attributes.

CreateRemoteThread(IntPtr, IntPtr, IntPtr, UIntPtr, IntPtr, CreateThreadFlags, UInt32) Creates a thread that runs in the virtual address space of another process.

Use the CreateRemoteThreadEx(IntPtr, SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, IntPtr, UInt32) function to create a thread that runs in the virtual address space of another process and optionally specify extended attributes.

CreateRemoteThreadEx(IntPtr, SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, IntPtr, UInt32) Creates a thread that runs in the virtual address space of another process and optionally specifies extended attributes such as processor group affinity.
CreateRemoteThreadEx(IntPtr, SecurityAttributes, IntPtr, ThreadStart, IntPtr, CreateThreadFlags, IntPtr, UInt32) Creates a thread that runs in the virtual address space of another process and optionally specifies extended attributes such as processor group affinity.
CreateRemoteThreadEx(IntPtr, IntPtr, IntPtr, IntPtr, IntPtr, CreateThreadFlags, IntPtr, UInt32) Creates a thread that runs in the virtual address space of another process and optionally specifies extended attributes such as processor group affinity.
CreateRemoteThreadEx(IntPtr, IntPtr, IntPtr, ThreadStart, IntPtr, CreateThreadFlags, IntPtr, UInt32) Creates a thread that runs in the virtual address space of another process and optionally specifies extended attributes such as processor group affinity.
CreateSymbolicLink Creates a symbolic link.
CreateThread(IntPtr, IntPtr, IntPtr, IntPtr, CreateThreadFlags, UInt32) Creates a thread to execute within the virtual address space of the calling process.

To create a thread that runs in the virtual address space of another process, use the CreateRemoteThread(IntPtr, SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, UInt32) function.

CreateThread(IntPtr, IntPtr, ThreadStart, IntPtr, CreateThreadFlags, UInt32) Creates a thread to execute within the virtual address space of the calling process.

To create a thread that runs in the virtual address space of another process, use the CreateRemoteThread(IntPtr, SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, UInt32) function.

CreateThread(SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, UInt32) Creates a thread to execute within the virtual address space of the calling process.

To create a thread that runs in the virtual address space of another process, use the CreateRemoteThread(IntPtr, SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, UInt32) function.

CreateThread(SecurityAttributes, IntPtr, ThreadStart, IntPtr, CreateThreadFlags, UInt32) Creates a thread to execute within the virtual address space of the calling process.

To create a thread that runs in the virtual address space of another process, use the CreateRemoteThread(IntPtr, SecurityAttributes, IntPtr, IntPtr, IntPtr, CreateThreadFlags, UInt32) function.

DebugActiveProcess Enables a debugger to attach to an active process and debug it.
DebugActiveProcessStop Stops the debugger from debugging the specified process.
DebugBreak Causes a breakpoint exception to occur in the current process. This allows the calling thread to signal the debugger to handle the exception.

To cause a breakpoint exception in another process, use the DebugBreakProcess(IntPtr) function.

DebugBreakProcess Causes a breakpoint exception to occur in the specified process. This allows the calling thread to signal the debugger to handle the exception.
DebugSetProcessKillOnExit Sets the action to be performed when the calling thread exits.
DecodePointer(IntPtr) Decodes a pointer that was previously encoded with EncodePointer(IntPtr).
DecodePointer(UIntPtr) Decodes a pointer that was previously encoded with EncodePointer(IntPtr).
DecodeSystemPointer(IntPtr) Decodes a pointer that was previously encoded with EncodeSystemPointer(IntPtr).
DecodeSystemPointer(UIntPtr) Decodes a pointer that was previously encoded with EncodeSystemPointer(IntPtr).
DefineDosDevice Defines, redefines, or deletes MS-DOS device names.
DeleteAtom Decrements the reference count of a local string atom.

If the atom's reference count is reduced to zero, DeleteAtom(UInt16) removes the string associated with the atom from the local atom table.

DeleteBoundaryDescriptor Deletes the specified boundary descriptor.
DeleteFile Deletes an existing file.
DeleteVolumeMountPoint Deletes a drive letter or mounted folder.
DeviceIoControl(IntPtr, DirectoryManagementControlCodes, IntPtr, Int32, IntPtr, Int32, Int32, IntPtr) Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.
DeviceIoControl(IntPtr, UInt32, IntPtr, Int32, IntPtr, Int32, Int32, IntPtr) Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.
DeviceIoControl(SafeFileHandle, DirectoryManagementControlCodes, IntPtr, Int32, IntPtr, Int32, Int32, IntPtr) Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.
DeviceIoControl(SafeFileHandle, UInt32, IntPtr, Int32, IntPtr, Int32, Int32, IntPtr) Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.
DisableThreadLibraryCalls Disables the DLL_THREAD_ATTACH and DLL_THREAD_DETACH notifications for the specified dynamic-link library (DLL). This can reduce the size of the working set for some applications.
DiscardVirtualMemory(IntPtr, IntPtr) Discards the memory contents of a range of memory pages, without decommitting the memory.

The contents of discarded memory is undefined and must be rewritten by the application.

DiscardVirtualMemory(IntPtr, UInt32) Discards the memory contents of a range of memory pages, without decommitting the memory.

The contents of discarded memory is undefined and must be rewritten by the application.

DuplicateHandle(IntPtr, IntPtr, IntPtr, IntPtr, GenericAccessRights, Boolean, DuplicateHandleOptions) Duplicates an object handle.
DuplicateHandle(IntPtr, IntPtr, IntPtr, IntPtr, ProcessAccessRights, Boolean, DuplicateHandleOptions) Duplicates an object handle.
DuplicateHandle(IntPtr, IntPtr, IntPtr, IntPtr, StandardAccessRights, Boolean, DuplicateHandleOptions) Duplicates an object handle.
DuplicateHandle(IntPtr, IntPtr, IntPtr, IntPtr, ThreadAccessRights, Boolean, DuplicateHandleOptions) Duplicates an object handle.
DuplicateHandle(IntPtr, IntPtr, IntPtr, IntPtr, UInt32, Boolean, DuplicateHandleOptions) Duplicates an object handle.
EncodePointer(IntPtr) Encodes the specified pointer.

Encoded pointers can be used to provide another layer of protection for pointer values.

EncodePointer(UIntPtr) Encodes the specified pointer.

Encoded pointers can be used to provide another layer of protection for pointer values.

EncodeSystemPointer(IntPtr) Encodes the specified pointer with a system-specific value.

Encoded pointers can be used to provide another layer of protection for pointer values.

EncodeSystemPointer(UIntPtr) Encodes the specified pointer with a system-specific value.

Encoded pointers can be used to provide another layer of protection for pointer values.

EndUpdateResource(IntPtr, Boolean) Commits or discards changes made prior to a call to UpdateResource(SafeModuleHandle, ResourceType, IntPtr, UInt16, IntPtr, UInt32) function.

Before you call this function, make sure all file handles other than the one returned by BeginUpdateResource(String, Boolean) are closed.

EndUpdateResource(SafeModuleHandle, Boolean) Commits or discards changes made prior to a call to UpdateResource(SafeModuleHandle, ResourceType, IntPtr, UInt16, IntPtr, UInt32) function.

Before you call this function, make sure all file handles other than the one returned by BeginUpdateResource(String, Boolean) are closed.

EnumSystemCodePages Enumerates the code pages that are either installed on or supported by an operating system.
EnumSystemLocales Enumerates the locales that are either installed on or supported by an operating system.
EnumUILanguages Enumerates the user interface languages that are available on the operating system and calls the callback function with every language in the list.
Equals Determines whether the specified object is equal to the current object.
(Inherited from Object)
ExitProcess Ends the calling process and all its threads.
ExitThread Ends the calling thread.
FatalAppExit Displays a message box and terminates the application when the message box is closed.

If the system is running with a debug version of Kernel32.dll, the message box gives the user the opportunity to terminate the application or to cancel the message box and return to the application that called FatalAppExit(UInt32, String).

FatalExit Transfers execution control to the debugger. The behavior of the debugger thereafter is specific to the type of debugger used.
FileTimeToSystemTime Converts a file time to system time format. System time is based on Coordinated Universal Time (UTC).
FillConsoleOutputAttribute Sets the character attributes for a specified number of character cells, beginning at the specified coordinates in a screen buffer.
FillConsoleOutputCharacter Writes a character to the console screen buffer a specified number of times, beginning at the specified coordinates.
FillMemory Fills a block of memory with a specified value.
FindAtom Searches the local atom table for the specified character string and retrieves the atom associated with that string.
FindClose Closes a file search handle opened by FindFirstFile, FindFirstFileEx, FindFirstFileTransacted, FindFirstFileNameW, FindFirstFileNameTransactedW, FindFirstStreamW(String, FindStreamInfoLevels, FindStreamData, UInt32) or FindFirstStreamTransactedW functions.
FindFirstStreamW Enumerates the first stream with a ::$DATA stream type in the specified file or directory.

To perform this operation as a transacted operation, use the 'FindFirstStreamTransactedW' function.

FindNextStreamW Continues a stream search started by a previous call to the FindFirstStreamW(String, FindStreamInfoLevels, FindStreamData, UInt32) function.
FindResource(IntPtr, IntPtr, ResourceType) Determines the location of a resource with the specified type and name in the specified module.

To specify a language of the resource, use the FindResourceEx(SafeModuleHandle, ResourceType, IntPtr, UInt16) function.

FindResource(IntPtr, IntPtr, String) Determines the location of a resource with the specified type and name in the specified module.

To specify a language of the resource, use the FindResourceEx(SafeModuleHandle, ResourceType, IntPtr, UInt16) function.

FindResource(IntPtr, String, ResourceType) Determines the location of a resource with the specified type and name in the specified module.

To specify a language of the resource, use the FindResourceEx(SafeModuleHandle, ResourceType, IntPtr, UInt16) function.

FindResource(IntPtr, String, String) Determines the location of a resource with the specified type and name in the specified module.

To specify a language of the resource, use the FindResourceEx(SafeModuleHandle, ResourceType, IntPtr, UInt16) function.

FindResource(SafeModuleHandle, IntPtr, ResourceType) Determines the location of a resource with the specified type and name in the specified module.

To specify a language of the resource, use the FindResourceEx(SafeModuleHandle, ResourceType, IntPtr, UInt16) function.

FindResource(SafeModuleHandle, IntPtr, String) Determines the location of a resource with the specified type and name in the specified module.

To specify a language of the resource, use the FindResourceEx(SafeModuleHandle, ResourceType, IntPtr, UInt16) function.

FindResource(SafeModuleHandle, String, ResourceType) Determines the location of a resource with the specified type and name in the specified module.

To specify a language of the resource, use the FindResourceEx(SafeModuleHandle, ResourceType, IntPtr, UInt16) function.

FindResource(SafeModuleHandle, String, String) Determines the location of a resource with the specified type and name in the specified module.

To specify a language of the resource, use the FindResourceEx(SafeModuleHandle, ResourceType, IntPtr, UInt16) function.

FindResourceEx(IntPtr, ResourceType, IntPtr, UInt16) Determines the location of the resource with the specified type, name, and language in the specified module.
FindResourceEx(IntPtr, ResourceType, String, UInt16) Determines the location of the resource with the specified type, name, and language in the specified module.
FindResourceEx(IntPtr, String, IntPtr, UInt16) Determines the location of the resource with the specified type, name, and language in the specified module.
FindResourceEx(IntPtr, String, String, UInt16) Determines the location of the resource with the specified type, name, and language in the specified module.
FindResourceEx(SafeModuleHandle, ResourceType, IntPtr, UInt16) Determines the location of the resource with the specified type, name, and language in the specified module.
FindResourceEx(SafeModuleHandle, ResourceType, String, UInt16) Determines the location of the resource with the specified type, name, and language in the specified module.
FindResourceEx(SafeModuleHandle, String, IntPtr, UInt16) Determines the location of the resource with the specified type, name, and language in the specified module.
FindResourceEx(SafeModuleHandle, String, String, UInt16) Determines the location of the resource with the specified type, name, and language in the specified module.
FlushConsoleInputBuffer Flushes the console input buffer. All input records currently in the input buffer are discarded.
FlushFileBuffers Flushes the buffers of a specified file and causes all buffered data to be written to a file.
FlushProcessWriteBuffers Flushes the write queue of each processor that is running a thread of the current process.
FormatMessage Formats a message string. The function requires a message definition as input. The message definition can come from a buffer passed into the function. It can come from a message table resource in an already-loaded module. Or the caller can ask the function to search the system's message table resource(s) for the message definition. The function finds the message definition in a message table resource based on a message identifier and a language identifier. The function copies the formatted message text to an output buffer, processing any embedded insert sequences if requested.
FreeConsole Detaches the calling process from its console.
FreeLibrary(IntPtr) Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count.

When the reference count reaches zero, the module is unloaded from the address space of the calling process and the handle is no longer valid.

FreeLibrary(SafeModuleHandle) Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count.

When the reference count reaches zero, the module is unloaded from the address space of the calling process and the handle is no longer valid.

FreeLibraryAndExitThread Decrements the reference count of a loaded dynamic-link library (DLL) by one, then calls ExitThread to terminate the calling thread.

This function does not return a value. Invalid module handles are ignored.

FreeUserPhysicalPages(IntPtr, IntPtr, IntPtr) Frees physical memory pages that are allocated previously by using AllocateUserPhysicalPages(IntPtr, IntPtr, IntPtr) or AllocateUserPhysicalPagesNuma(IntPtr, IntPtr, IntPtr, UInt32).

If any of these pages are currently mapped in the Address Windowing Extensions (AWE) region, they are automatically unmapped by this call.

This does not affect the virtual address space that is occupied by a specified Address Windowing Extensions (AWE) region.

FreeUserPhysicalPages(IntPtr, UIntPtr, UIntPtr) Frees physical memory pages that are allocated previously by using AllocateUserPhysicalPages(IntPtr, IntPtr, IntPtr) or AllocateUserPhysicalPagesNuma(IntPtr, IntPtr, IntPtr, UInt32).

If any of these pages are currently mapped in the Address Windowing Extensions (AWE) region, they are automatically unmapped by this call.

This does not affect the virtual address space that is occupied by a specified Address Windowing Extensions (AWE) region.

GetActiveProcessorGroupCount Returns the number of active processor groups in the system.
GetAnsiCodePage Retrieves the current Windows ANSI code page identifier for the operating system.
GetApplicationRecoveryCallback Retrieves a pointer to the callback routine registered for the specified process.

The address returned is in the virtual address space of the process.

GetApplicationRestartSettings Retrieves the restart information registered for the specified process.
GetAtomName Retrieves a copy of the character string associated with the specified local atom.
GetBinaryType Determines whether a file is an executable (.exe) file, and if so, which subsystem runs the executable file.
GetCommandLine Retrieves the command-line string for the current process.
GetCompressedFileSize Retrieves the actual number of bytes of disk storage used to store a specified file.

If the file is located on a volume that supports compression and the file is compressed, the value obtained is the compressed size of the specified file.

If the file is located on a volume that supports sparse files and the file is a sparse file, the value obtained is the sparse size of the specified file.

GetConsoleCodepage Retrieves the input code page used by the console associated with the calling process.

A console uses its input code page to translate keyboard input into the corresponding character value.

GetConsoleDisplayMode Sets the display mode of the specified console screen buffer.
GetConsoleFontSize Retrieves the size of the font used by the specified console screen buffer.
GetConsoleOriginalTitle Retrieves the original title for the current console window.
GetConsoleOutputCodepage Retrieves the output code page used by the console associated with the calling process.

A console uses its output code page to translate the character values written by the various output functions into the images displayed in the console window.

GetConsoleTitle Retrieves the title for the current console window.
GetConsoleWindow Retrieves the window handle used by the console associated with the calling process.
GetCurrentConsoleFont Retrieves information about the current console font.
GetCurrentConsoleFontEx Retrieves extended information about the current console font.
GetCurrentDirectory Retrieves the current directory for the current process.
GetCurrentProcess Retrieves a handle for the current process.
GetCurrentProcessId Retrieves the process identifier of the calling process.
GetCurrentProcessorNumber Retrieves the number of the processor the current thread was running on during the call to this function.
GetCurrentThread Retrieves a pseudo handle for the calling thread.
GetCurrentThreadId Gets the thread identifier of the calling thread.
GetCurrentThreadStackLimits Retrieves the boundaries of the stack that was allocated by the system for the current thread.
GetDevicePowerState Retrieves the current power state of the specified device.

This function cannot be used to query the power state of a display device.

GetDllDirectory(UInt32, IntPtr) Retrieves the application-specific portion of the search path used to locate DLLs for the application.
GetDllDirectory(UInt32, StringBuilder) Retrieves the application-specific portion of the search path used to locate DLLs for the application.
GetErrorMode Retrieves the error mode for the current process.
GetExitCodeProcess Retrieves the termination status of the specified process.
GetExitCodeThread Retrieves the termination status of the specified thread.
GetFileSize(IntPtr, UInt32) Retrieves the size of the specified file, in bytes.

It is recommended that you use GetFileSizeEx(SafeFileHandle, Int64) instead.
Obsolete.

GetFileSize(SafeFileHandle, UInt32) Retrieves the size of the specified file, in bytes.

It is recommended that you use GetFileSizeEx(SafeFileHandle, Int64) instead.
Obsolete.

GetFileSizeEx(IntPtr, Int64) Retrieves the size of the specified file.
GetFileSizeEx(SafeFileHandle, Int64) Retrieves the size of the specified file.
GetFirmwareEnvironmentVariable Retrieves the value of the specified firmware environment variable.

Note that firmware variables are not supported on a legacy BIOS-based system.

The GetFirmwareEnvironmentVariable(String, String, IntPtr, Int32) function will always fail on a legacy BIOS-based system, or if Windows was installed using legacy BIOS on a system that supports both legacy BIOS and UEFI.

To identify these conditions, call the function with a dummy firmware environment name such as an empty string ("") for the variableName parameter, and a dummy GUID such as "{00000000-0000-0000-0000-000000000000}" for the vendorGuid parameter.

On a legacy BIOS-based system, or on a system that supports both legacy BIOS and UEFI where Windows was installed using legacy BIOS, the function will fail with ERROR_INVALID_FUNCTION

On a UEFI-based system, the function will fail with an error specific to the firmware, such as ERROR_NOACCESS, to indicate that the dummy GUID namespace does not exist.

GetHandleInformation Retrieves certain properties of an object handle.
GetHashCode Serves as the default hash function.
(Inherited from Object)
GetIntegratedDisplaySize Retrieves the best estimate of the diagonal size of the built-in screen, in inches.
GetLargePageMinimum Retrieves the minimum size of a large memory page.
GetLastError Retrieves the calling thread's last-error code value.

The last-error code is maintained on a per-thread basis. Multiple threads do not overwrite each other's last-error code.

GetLocalTime Retrieves the current local date and time.

To retrieve the current date and time in Coordinated Universal Time (UTC) format, use the GetLocalTime(SystemTime) function.

GetLogicalDrives Retrieves a bitmask representing the currently available disk drives.
GetLogicalDriveStrings Fills a buffer with strings that specify valid drives in the system.
GetLongPathName Converts the specified path to its long form.
GetMaximumProcessorCount Returns the maximum number of logical processors that a processor group or the system can have.
GetMaximumProcessorGroupCount Returns the maximum number of processor groups that the system can have.
GetModuleFileName Retrieves the fully qualified path for the file that contains the specified module. The module must have been loaded by the current process.

To locate the file for a module that was loaded by another process, use the GetModuleFileNameEx(IntPtr, IntPtr, StringBuilder, UInt32) function.

GetModuleHandle Retrieves a module handle for the specified module.

The module must have been loaded by the calling process.

GetModuleHandleEx Retrieves a module handle for the specified module and increments the module's reference count unless UnchangedReferenceCount flag is specified.

The module must have been loaded by the calling process.

GetOEMCodePage Returns the current original equipment manufacturer (OEM) code page identifier for the operating system.

Note: The ANSI code pages can be different on different computers, or can be changed for a single computer, leading to data corruption.

For the most consistent results, applications should use Unicode, such as UTF-8 or UTF-16, instead of a specific code page.

GetOsManufacturingMode Determine whether the device is in Manufacturing Mode or not.
GetPhysicallyInstalledSystemMemory Retrieves the amount of RAM that is physically installed on the computer.
GetPriorityClass Retrieves the priority class for the specified process.

This value, together with the priority value of each thread of the process, determines each thread's base priority level.

GetProcAddress(IntPtr, String) Retrieves the address of an exported function or variable from the specified dynamic-link library (DLL).
GetProcAddress(SafeModuleHandle, String) Retrieves the address of an exported function or variable from the specified dynamic-link library (DLL).
GetProcessHandleCount Retrieves the number of open handles that belong to the specified process.
GetProcessHeap Retrieves a handle to the default heap of the calling process. This handle can then be used in subsequent calls to the heap functions.
GetProcessHeaps Returns the number of active heaps and retrieves handles to all of the active heaps for the calling process.
GetProcessId Retrieves the process identifier (PID) of the specified process handle.
GetProcessIdOfThread Retrieves the process identifier of the process associated with the specified thread.
GetProcessIoCounters Retrieves accounting information for all I/O operations performed by the specified process.
GetProcessPreferredUILanguages Retrieves the preferred UI languages for the current process.
GetProcessPriorityBoost Retrieves the priority boost control state of the specified process.
GetProcessTimes Retrieves timing information for the specified process.
GetProcessVersion Retrieves the major and minor version numbers of the system on which the specified process expects to run.
GetProcessWorkingSetSize Retrieves the minimum and maximum working set sizes of the specified process.
GetShortPathName Retrieves the short path form of the specified path.
GetStdHandle Retrieves a handle to the specified standard device (standard input, standard output, or standard error).
GetSystemDefaultLangID Returns the language identifier for the system locale.
GetSystemDefaultLCID Returns the locale identifier for the system locale.

Note: any application that runs only on Windows Vista and later should use GetSystemDefaultLocaleName(StringBuilder, Int32) in preference to this function.

GetSystemDefaultLocaleName Retrieves the system default locale name.

Note: it is recommended that applications call GetUserDefaultLocaleName(StringBuilder, Int32) in preference over this function. This is due to the user locale generally being more useful and accurate for the user than the system locale.

GetSystemDefaultUILanguage Retrieves the language identifier for the system default UI language of the operating system, also known as the "install language" on Windows Vista and later.
GetSystemPreferredUILanguages Retrieves the preferred UI languages for the operating system.
GetSystemTime Retrieves the current system date and time. The system time is expressed in Coordinated Universal Time (UTC).

To retrieve the current system date and time in local time, use the GetLocalTime(SystemTime) function.

GetSystemTimeAsFileTime Retrieves the current system date and time. The information is in Coordinated Universal Time (UTC) format.
GetSystemTimePreciseAsFileTime(FILETIME) Rretrieves the current system date and time with the highest possible level of precision (<1us).

The retrieved information is in Coordinated Universal Time (UTC) format.

GetSystemTimePreciseAsFileTime(Int64) Retrieves the current system date and time with the highest possible level of precision (<1us).

The retrieved information is in Coordinated Universal Time (UTC) format.

GetSystemTimes Retrieves system timing information. On a multiprocessor system, the values returned are the sum of the designated times across all processors.
GetSystemWow64Directory Retrieves the path of the system directory used by WOW64. This directory is not present on 32-bit Windows.
GetThreadDescription Retrieves the description that was assigned to a thread by calling SetThreadDescription(IntPtr, String).
GetThreadErrorMode Retrieves the error mode for the current thread.
GetThreadId Retrieves the thread identifier of the specified thread.
GetThreadIOPendingFlag Determines whether a specified thread has any I/O requests pending.
GetThreadPreferredUILanguages(MuiLanguageMode, UInt32, IntPtr, UInt32) Retrieves the preferred UI languages for the current thread.
GetThreadPreferredUILanguages(MuiLanguageMode, UInt32, StringBuilder, UInt32) Retrieves the thread preferred UI languages for the current thread.
GetThreadPriority Retrieves the priority class for the specified process.

This value, together with the priority value of each thread of the process, determines each thread's base priority level.

GetThreadTimes Retrieves timing information for the specified thread.
GetThreadUILanguage Returns the language identifier of the first user interface language for the current thread.
GetTickCount64 Retrieves the number of milliseconds that have elapsed since the system was started.
GetType Gets the Type of the current instance.
(Inherited from Object)
GetUserDefaultGeoName Retrieves the two-letter International Organization for Standardization (ISO) 3166-1 code or numeric United Nations (UN) Series M, Number 49 (M.49) code for the default geographical location of the user.
GetUserDefaultLangID Returns the language identifier of the Region Format setting for the current user.
GetUserDefaultLCID Returns the locale identifier for the user default locale.

Caution: If the user default locale is a custom locale, an application cannot accurately tag data with the value or exchange it. In this case, the application should use GetUserDefaultLocaleName(StringBuilder, Int32) in preference to GetUserDefaultLCID.

Note: applications that are intended to run only on Windows Vista and later should use GetUserDefaultLocaleName(StringBuilder, Int32).

GetUserDefaultLocaleName Retrieves the user default locale name.
GetUserDefaultUILanguage Returns the language identifier for the user UI language for the current user.

If the current user has not set a language, GetUserDefaultUILanguage returns the preferred language set for the system.

If there is no preferred language set for the system, then the system default UI language (also known as "install language") is returned.

GetUserPreferredUILanguages Retrieves information about the user preferred UI languages.
GetVersionEx Returns version information about the current operating system.

With the release of Windows 8.1, the behavior of the GetVersionEx(OsVersionInfoEx) API has changed in the value it will return for the OS version. The value returned by the GetVersionEx(OsVersionInfoEx) function now depends on how the application is manifested.

Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2). Once an application is manifested for a given operating system version, GetVersionEx(OsVersionInfoEx) will always return the version that the application is manifested for in future releases.

GetVolumeInformation Retrieves information about the file system and volume associated with the specified root directory.
GetVolumeNameForVolumeMountPoint 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 Retrieves the volume mount point where the specified path is mounted.
GetVolumePathNamesForVolumeName Retrieves a list of drive letters and mounted folder paths for the specified volume.
GlobalAddAtom Adds a character string to the global atom table and returns a unique value (an atom) identifying the string.
GlobalAddAtomEx Adds a character string to the global atom table and returns a unique value (an atom) identifying the string.
GlobalDeleteAtom Decrements the reference count of a global string atom.

If the atom's reference count reaches zero, GlobalDeleteAtom(UInt16) removes the string associated with the atom from the global atom table.

GlobalFindAtom Searches the global atom table for the specified character string and retrieves the global atom associated with that string.
GlobalGetAtomName Retrieves a copy of the character string associated with the specified global atom.
GlobalMemoryStatusEx Retrieves information about the system's current usage of both physical and virtual memory.
HeapAlloc Allocates a block of memory from a heap. The allocated memory is not movable.
HeapCompact Returns the size of the largest committed free block in the specified heap.

If the Disable heap coalesce on free global flag is set, this function also coalesces adjacent free blocks of memory in the heap.

HeapCreate Creates a private heap object that can be used by the calling process.

The function reserves space in the virtual address space of the process and allocates physical storage for a specified initial portion of this block.

HeapDestroy Destroys the specified heap object.

It decommits and releases all the pages of a private heap object, and it invalidates the handle to the heap.

HeapFree Frees a memory block allocated from a heap by the HeapAlloc(IntPtr, HeapFlags, UInt32) or HeapReAlloc(IntPtr, HeapFlags, IntPtr, UInt32) function.
HeapLock Attempts to acquire the critical section object, or lock, that is associated with a specified heap.
HeapQueryInformation Retrieves information about the specified heap.
HeapReAlloc Reallocates a block of memory from a heap.

This function enables you to resize a memory block and change other memory block properties. The allocated memory is not movable.

HeapSetInformation Enables features for a specified heap.
HeapSize Retrieves the size of a memory block allocated from a heap by the HeapAlloc(IntPtr, HeapFlags, UInt32) or HeapReAlloc(IntPtr, HeapFlags, IntPtr, UInt32) function.
HeapUnlock Releases ownership of the critical section object, or lock, that is associated with a specified heap.

It reverses the action of the HeapLock(IntPtr) function.

HeapValidate Validates the specified heap.

The function scans all the memory blocks in the heap and verifies that the heap control structures maintained by the heap manager are in a consistent state.

You can also use the HeapValidate(IntPtr, HeapFlags, IntPtr) function to validate a single memory block within a specified heap without checking the validity of the entire heap.

InitAtomTable Initializes the local atom table and sets the number of hash buckets to the specified size.
IsDebuggerPresent Determines whether the calling process is being debugged by a user-mode debugger.
IsNativeVhdBoot Indicates if the operating system was booted from a Virtual Hard Disk (VHD) container
IsProcessCritical(IntPtr, Boolean) Determines whether the specified process is considered critical.
IsProcessCritical(SafeProcessHandle, Boolean) Determines whether the specified process is considered critical.
IsProcessorFeaturePresent Determines whether the specified processor feature is supported by the current computer.
IsSystemResumeAutomatic Determines the current state of the computer.
IsThreadAFiber Determines whether the current thread is a fiber.
IsValidCodePage Determines if a specified code page is valid.
IsWow64Process(IntPtr, Boolean) Determines whether the specified process is running under WOW64.
IsWow64Process(SafeProcessHandle, Boolean) Determines whether the specified process is running under WOW64.
LoadLibrary Loads the specified module into the address space of the calling process.

The specified module may cause other modules to be loaded.

LoadLibraryEx Loads the specified module into the address space of the calling process.

The specified module may cause other modules to be loaded.

LoadResource(IntPtr, IntPtr) Retrieves a handle that can be used to obtain a pointer to the first byte of the specified resource in memory.
LoadResource(SafeModuleHandle, IntPtr) Retrieves a handle that can be used to obtain a pointer to the first byte of the specified resource in memory.
LocalFree Frees the specified local memory object and invalidates its handle.
MapUserPhysicalPages(IntPtr, IntPtr, IntPtr) Maps previously allocated physical memory pages at a specified address in an Address Windowing Extensions (AWE) region.

The contents of discarded memory is undefined and must be rewritten by the application.

MapUserPhysicalPages(IntPtr, UIntPtr, UIntPtr) Maps previously allocated physical memory pages at a specified address in an Address Windowing Extensions (AWE) region.

The contents of discarded memory is undefined and must be rewritten by the application.

MoveMemory(IntPtr, IntPtr, IntPtr) Moves a block of memory from one location to another.
MoveMemory(IntPtr, IntPtr, UInt32) Moves a block of memory from one location to another.
MoveMemory(IntPtr, IntPtr, UIntPtr) Moves a block of memory from one location to another.
MultiByteToWideChar(CodePage, MultiByteCharConversionType, Byte, Int32, Char, Int32) Maps a character string to a UTF-16 (wide character) string. The character string is not necessarily from a multibyte character set.

Caution: Using the MultiByteToWideChar(CodePage, MultiByteCharConversionType, Byte, Int32, Char, Int32) function incorrectly can compromise the security of your application.

Calling this function can easily cause a buffer overrun because the size of the input buffer indicated by multiByteStr equals the number of bytes in the string, while the size of the output buffer indicated by wideCharStr equals the number of characters.

To avoid a buffer overrun, your application must specify a buffer size appropriate for the data type the buffer receives.

MultiByteToWideChar(CodePage, MultiByteCharConversionType, String, Int32, StringBuilder, Int32) Maps a character string to a UTF-16 (wide character) string. The character string is not necessarily from a multibyte character set.

Caution: Using the MultiByteToWideChar(CodePage, MultiByteCharConversionType, Byte, Int32, Char, Int32) function incorrectly can compromise the security of your application.

Calling this function can easily cause a buffer overrun because the size of the input buffer indicated by multiByteStr equals the number of bytes in the string, while the size of the output buffer indicated by wideCharStr equals the number of characters.

To avoid a buffer overrun, your application must specify a buffer size appropriate for the data type the buffer receives.

MultiByteToWideChar(UInt32, MultiByteCharConversionType, Byte, Int32, Char, Int32) Maps a character string to a UTF-16 (wide character) string. The character string is not necessarily from a multibyte character set.

Caution: Using the MultiByteToWideChar(CodePage, MultiByteCharConversionType, Byte, Int32, Char, Int32) function incorrectly can compromise the security of your application.

Calling this function can easily cause a buffer overrun because the size of the input buffer indicated by multiByteStr equals the number of bytes in the string, while the size of the output buffer indicated by wideCharStr equals the number of characters.

To avoid a buffer overrun, your application must specify a buffer size appropriate for the data type the buffer receives.

MultiByteToWideChar(UInt32, MultiByteCharConversionType, String, Int32, StringBuilder, Int32) Maps a character string to a UTF-16 (wide character) string. The character string is not necessarily from a multibyte character set.

Caution: Using the MultiByteToWideChar(CodePage, MultiByteCharConversionType, Byte, Int32, Char, Int32) function incorrectly can compromise the security of your application.

Calling this function can easily cause a buffer overrun because the size of the input buffer indicated by multiByteStr equals the number of bytes in the string, while the size of the output buffer indicated by wideCharStr equals the number of characters.

To avoid a buffer overrun, your application must specify a buffer size appropriate for the data type the buffer receives.

OfferVirtualMemory(IntPtr, IntPtr, OfferVirtualMemoryPriority) Indicates that the data contained in a range of memory pages is no longer needed by the application and can be discarded by the system if necessary.

The specified pages will be marked as inaccessible, removed from the process working set, and will not be written to the paging file.

To later reclaim offered pages, call ReclaimVirtualMemory(IntPtr, IntPtr) function.

OfferVirtualMemory(IntPtr, UInt32, OfferVirtualMemoryPriority) Indicates that the data contained in a range of memory pages is no longer needed by the application and can be discarded by the system if necessary.

The specified pages will be marked as inaccessible, removed from the process working set, and will not be written to the paging file.

To later reclaim offered pages, call ReclaimVirtualMemory(IntPtr, IntPtr) function.

OfferVirtualMemory(IntPtr, UIntPtr, OfferVirtualMemoryPriority) Indicates that the data contained in a range of memory pages is no longer needed by the application and can be discarded by the system if necessary.

The specified pages will be marked as inaccessible, removed from the process working set, and will not be written to the paging file.

To later reclaim offered pages, call ReclaimVirtualMemory(IntPtr, IntPtr) function.

OpenMutex Opens an existing named mutex object.
OpenPrivateNamespace Opens a private namespace.
OpenProcess(GenericAccessRights, Boolean, Int32) Opens an existing local process object.
OpenProcess(ProcessAccessRights, Boolean, Int32) Opens an existing local process object.
OpenThread(GenericAccessRights, Boolean, UInt32) Opens an existing thread object.

When done, don't forget to call CloseHandle(IntPtr) function.

OpenThread(ThreadAccessRights, Boolean, UInt32) Opens an existing thread object.

When done, don't forget to call CloseHandle(IntPtr) function.

OutputDebugString Sends a string to the debugger for display.
PrefetchVirtualMemory Provides an efficient mechanism to bring into memory potentially discontiguous virtual address ranges in a process address space.
ProcessIdToSessionId Retrieves the Remote Desktop Services session associated with a specified process.
PssCaptureSnapshot Captures a snapshot of a target process.
PssDuplicateSnapshot Duplicates a snapshot handle from one process to another.

To take a snapshot, call PssCaptureSnapshot(IntPtr, PssCaptureFlags, UInt32, IntPtr) function.

PssFreeSnapshot Frees a process snapshot.

To take a snapshot, call PssCaptureSnapshot(IntPtr, PssCaptureFlags, UInt32, IntPtr) function.

PssQuerySnapshot Queries a process snapshot.

To take a snapshot, call PssCaptureSnapshot(IntPtr, PssCaptureFlags, UInt32, IntPtr) function.

QueryDosDevice(String, IntPtr, UInt32) Retrieves information about MS-DOS device names.

The function can obtain the current mapping for a particular MS-DOS device name. The function can also obtain a list of all existing MS-DOS device names.

MS-DOS device names are stored as junctions in the object namespace. The code that converts an MS-DOS path into a corresponding path uses these junctions to map MS-DOS devices and drive letters.

The QueryDosDevice(String, IntPtr, UInt32) function enables an application to query the names of the junctions used to implement the MS-DOS device Namespace DevCase.Interop.as well as the value of each specific junction.

QueryDosDevice(String, StringBuilder, UInt32) Retrieves information about MS-DOS device names.

The function can obtain the current mapping for a particular MS-DOS device name. The function can also obtain a list of all existing MS-DOS device names.

MS-DOS device names are stored as junctions in the object namespace. The code that converts an MS-DOS path into a corresponding path uses these junctions to map MS-DOS devices and drive letters.

The QueryDosDevice(String, IntPtr, UInt32) function enables an application to query the names of the junctions used to implement the MS-DOS device Namespace DevCase.Interop.as well as the value of each specific junction.

QueryFullProcessImageName Retrieves the full name of the executable image for the specified process.
QueryIdleProcessorCycleTime Retrieves the cycle time for the idle thread of each processor in the system.

On a system with more than 64 processors, this function retrieves the cycle time for the idle thread of each processor in the processor group to which the calling thread is assigned.

Use the QueryIdleProcessorCycleTimeEx(UInt16, UInt32, IntPtr) function to retrieve the cycle time for the idle thread on each logical processor for a specific processor group.

QueryIdleProcessorCycleTimeEx Retrieves the accumulated cycle time for the idle thread on each logical processor in the specified processor group.
QueryMemoryResourceNotification Retrieves the state of the specified memory resource object.
QueryProcessCycleTime Retrieves the sum of the cycle time of all threads of the specified process.
QueryThreadCycleTime Retrieves the cycle time for the specified thread.
RaiseException Raises an exception in the calling thread.
ReadConsoleOutput Reads character and color attribute data from a rectangular block of character cells in a console screen buffer, and the function writes the data to a rectangular block at a specified location in the destination buffer.
ReadConsoleOutputAttribute Copies a specified number of character attributes from consecutive cells of a console screen buffer, beginning at a specified location.
ReadConsoleOutputCharacter Copies a number of characters from consecutive cells of a console screen buffer, beginning at a specified location.
ReadFile(SafeFileHandle, Byte, Int32, Int32, NativeOverlapped) Reads data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device.

This function is designed for both synchronous and asynchronous operations. For a similar function designed solely for asynchronous operation, see ReadFileEx.

ReadFile(SafeFileHandle, Byte, UInt32, UInt32, IntPtr) Reads data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device.

This function is designed for both synchronous and asynchronous operations. For a similar function designed solely for asynchronous operation, see ReadFileEx.

ReadFile(SafeFileHandle, IntPtr, UInt32, UInt32, IntPtr) Reads data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device.

This function is designed for both synchronous and asynchronous operations. For a similar function designed solely for asynchronous operation, see ReadFileEx.

ReadProcessMemory(IntPtr, IntPtr, Byte, IntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(IntPtr, IntPtr, Byte, UIntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(IntPtr, IntPtr, IntPtr, IntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(IntPtr, IntPtr, IntPtr, UIntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(IntPtr, IntPtr, StringBuilder, IntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(IntPtr, IntPtr, StringBuilder, UIntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(IntPtr, UIntPtr, Byte, IntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(IntPtr, UIntPtr, Byte, UIntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(IntPtr, UIntPtr, IntPtr, IntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(IntPtr, UIntPtr, IntPtr, UIntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(IntPtr, UIntPtr, StringBuilder, IntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(IntPtr, UIntPtr, StringBuilder, UIntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(SafeProcessHandle, IntPtr, Byte, IntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(SafeProcessHandle, IntPtr, Byte, UIntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(SafeProcessHandle, IntPtr, IntPtr, IntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(SafeProcessHandle, IntPtr, IntPtr, UIntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(SafeProcessHandle, IntPtr, StringBuilder, IntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(SafeProcessHandle, IntPtr, StringBuilder, UIntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(SafeProcessHandle, UIntPtr, Byte, IntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(SafeProcessHandle, UIntPtr, Byte, UIntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(SafeProcessHandle, UIntPtr, IntPtr, IntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(SafeProcessHandle, UIntPtr, IntPtr, UIntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(SafeProcessHandle, UIntPtr, StringBuilder, IntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReadProcessMemory(SafeProcessHandle, UIntPtr, StringBuilder, UIntPtr, IntPtr) Reads data from an area of memory in a specified process.

The entire area to be read must be accessible or the operation fails.

ReclaimVirtualMemory(IntPtr, IntPtr) Reclaims a range of memory pages that were offered to the system with OfferVirtualMemory(IntPtr, IntPtr, OfferVirtualMemoryPriority) function.

If the offered memory has been discarded, the contents of the memory region is undefined and must be rewritten by the application.

If the offered memory has not been discarded, it is reclaimed intact.

ReclaimVirtualMemory(IntPtr, UInt32) Reclaims a range of memory pages that were offered to the system with OfferVirtualMemory(IntPtr, IntPtr, OfferVirtualMemoryPriority) function.

If the offered memory has been discarded, the contents of the memory region is undefined and must be rewritten by the application.

If the offered memory has not been discarded, it is reclaimed intact.

ReclaimVirtualMemory(IntPtr, UIntPtr) Reclaims a range of memory pages that were offered to the system with OfferVirtualMemory(IntPtr, IntPtr, OfferVirtualMemoryPriority) function.

If the offered memory has been discarded, the contents of the memory region is undefined and must be rewritten by the application.

If the offered memory has not been discarded, it is reclaimed intact.

RegisterApplicationRecoveryCallback Registers the active instance of an application for recovery.
RegisterApplicationRestart Registers the active instance of an application for restart.
ReleaseMutex Releases ownership of the specified mutex object.
RemoveDirectory Deletes an existing empty directory.
RemoveDllDirectory Removes a directory that was added to the process DLL search path by using AddDllDirectory(String).
RestoreLastError Restores the last-error code for the calling thread.
ResumeThread(IntPtr) Decrements a thread's suspend count.

When the suspend count is decremented to zero, the execution of the thread is resumed.

ResumeThread(SafeAccessTokenHandle) Decrements a thread's suspend count.

When the suspend count is decremented to zero, the execution of the thread is resumed.

SetCommBreak Suspends character transmission for a specified communications device and places the transmission line in a break state until the ClearCommBreak function is called.
SetComputerName Sets a new NetBIOS name for the local computer.

The name is stored in the registry and the name change takes effect the next time the user restarts the computer.

If the local computer is a node in a cluster, SetComputerName(String) sets NetBIOS name of the local computer, not that of the cluster virtual server.

To set the DNS host name or the DNS domain name, call the SetComputerNameEx(ComputerNameFormat, String) function.

SetComputerNameEx Sets a new NetBIOS or DNS name for the local computer.

Name changes made by SetComputerNameEx(ComputerNameFormat, String) do not take effect until the user restarts the computer.

SetConsoleCodepage Sets the input code page used by the console associated with the calling process.

A console uses its input code page to translate keyboard input into the corresponding character value.

SetConsoleDisplayMode Sets the display mode of the specified console screen buffer.
SetConsoleOutputCodepage Sets the output code page used by the console associated with the calling process.

A console uses its output code page to translate the character values written by the various output functions into the images displayed in the console window.

SetConsoleTextAttribute Sets the attributes of characters written to the console screen buffer by the WriteFile or WriteConsole(IntPtr, Char, UInt32, UInt32, IntPtr) function, or echoed by the ReadFile or ReadConsole function.

This function affects text written after the function call.

SetConsoleTitle Sets the title for the current console window.
SetCurrentConsoleFontEx Sets extended information about the current console font.
SetCurrentDirectory Changes the current directory for the current process.
SetDllDirectory Adds a directory to the search path used to locate DLLs for the application.
SetEndOfFile Sets the physical file size for the specified file to the current position of the file pointer.

The physical file size is also referred to as the end of the file.

The SetEndOfFile(IntPtr) function can be used to truncate or extend a file. To set the logical end of a file, use the SetFileValidData function.

SetErrorMode Controls whether the system will handle the specified types of serious errors or whether the process will handle them for the current process.
SetFileApisToANSI Causes the file I/O functions to use the ANSI character set code page for the current process.

This function is useful for 8-bit console input and output operations.

SetFileApisToOEM Causes the file I/O functions for the process to use the OEM character set code page.

This function is useful for 8-bit console input and output operations.

SetHandleInformation Sets certain properties of an object handle.
SetLastError(UInt32) Sets the last-error code for the calling thread.
SetLastError(Win32ErrorCode) Sets the last-error code for the calling thread.
SetLocalTime Sets the current local date and time.

To set the system date and time, use the SetSystemTime(SystemTime) function.

SetPriorityClass Sets the priority class for the specified process.

This value, together with the priority value of each thread of the process, determines each thread's base priority level.

SetProcessDefaultCpuSets Sets the default CPU Sets assignment for threads in the specified process.

Threads that are created, which don’t have CPU Sets explicitly set using SetThreadSelectedCpuSets(IntPtr, UInt32, UInt32), will inherit the sets specified by SetProcessDefaultCpuSets(IntPtr, UInt32, UInt32) automatically.

SetProcessPreferredUILanguages Sets the process preferred UI languages for the current process.
SetProcessPriorityBoost Disables or enables the ability of the system to temporarily boost the priority of the threads of the specified process.
SetProcessWorkingSetSize Sets the minimum and maximum working set sizes for the specified process.
SetProcessWorkingSetSizeEx Sets the minimum and maximum working set sizes for the specified process.
SetStdHandle Sets the handle for the specified standard device (standard input, standard output, or standard error).
SetStdHandleEx Sets the handle for the specified standard device (standard input, standard output, or standard error) and returns the previous one.
SetSystemTime Sets the current system time and date. The system time is expressed in Coordinated Universal Time (UTC).

To set the local date and time, use the SetLocalTime(SystemTime) function.

SetThreadDescription Assigns a description to a thread.
SetThreadErrorMode Controls whether the system will handle the specified types of serious errors or whether the current thread will handle them.
SetThreadExecutionState 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.
SetThreadPreferredUILanguages Sets the process preferred UI languages for the current thread.
SetThreadPriority Sets the priority value for the specified thread.

This value, together with the priority class of the thread's process, determines the thread's base priority level.

SetThreadSelectedCpuSets Sets the selected CPU Sets assignment for the specified thread. This assignment overrides the process default assignment, if one is set.
SetThreadStackGuarantee Sets the minimum size of the stack associated with the calling thread or fiber that will be available during any stack overflow exceptions.

This is useful for handling stack overflow exceptions; the application can safely use the specified number of bytes during exception handling.

SetThreadUILanguage Sets the user interface language for the current thread.
SetVolumeLabel Sets the label of a file system volume.
SetVolumeMountPoint Associates a volume with a drive letter or a directory on another volume.
SizeofResource(IntPtr, IntPtr) Retrieves the size, in bytes, of the specified resource..
SizeofResource(SafeModuleHandle, IntPtr) Retrieves the size, in bytes, of the specified resource..
Sleep Suspends the execution of the current thread until the time-out interval elapses.

To enter an alertable wait state, use the SleepEx(Int32, Boolean) function.

SleepEx Suspends the current thread until the specified condition is met. Execution resumes when one of the following occurs:

- An I/O completion callback function is called.

- An asynchronous procedure call (APC) is queued to the thread.

- The time-out interval elapses.

SuspendThread32(IntPtr) Suspends the specified 32-Bit thread.

A 32-bit application can suspend a 64-Bit thread using the SuspendThread64(SafeAccessTokenHandle) function.

SuspendThread32(SafeAccessTokenHandle) Suspends the specified 32-Bit thread.

A 32-bit application can suspend a 64-Bit thread using the SuspendThread64(SafeAccessTokenHandle) function.

SuspendThread64(IntPtr) Suspends the specified 64-Bit thread.

A 64-bit application can suspend a 32-Bit thread using the SuspendThread32(SafeAccessTokenHandle) function.

SuspendThread64(SafeAccessTokenHandle) Suspends the specified 64-Bit thread.

A 64-bit application can suspend a 32-Bit thread using the SuspendThread32(SafeAccessTokenHandle) function.

SwitchToFiber Schedules a fiber.

This function must be called on a fiber.

SwitchToThread Causes the calling thread to yield execution to another thread that is ready to run on the current processor.

The operating system selects the next thread to be executed.

SystemTimeToFileTime Converts a system time to file time format. System time is based on Coordinated Universal Time (UTC).
TerminateProcess Terminates the specified process and all of its threads.
TerminateThread(IntPtr, UInt32) Terminates a thread.
TerminateThread(SafeAccessTokenHandle, UInt32) Terminates a thread.
TlsAlloc Allocates a thread local storage (TLS) index.

Any thread of the process can subsequently use this index to store and retrieve values that are local to the thread, because each thread receives its own slot for the index.

TlsFree Releases a thread local storage (TLS) index, making it available for reuse.
TlsGetValue Retrieves the value in the calling thread's thread local storage (TLS) slot for the specified TLS index.

Each thread of a process has its own slot for each TLS index.

TlsSetValue Stores a value in the calling thread's thread local storage (TLS) slot for the specified TLS index.

Each thread of a process has its own slot for each TLS index.

ToString Returns a string that represents the current object.
(Inherited from Object)
TransmitCommChar Transmits a specified character ahead of any pending data in the output buffer of the specified communications device.
UnregisterApplicationRecoveryCallback Removes the active instance of an application from the recovery list.
UnregisterApplicationRestart Removes the active instance of an application from the restart list.
UpdateResource(IntPtr, ResourceType, IntPtr, UInt16, IntPtr, UInt32) Adds, deletes, or replaces a resource in a portable executable (PE) file.

There are some restrictions on resource updates in files that contain Resource Configuration (RC Config) data: language-neutral (LN) files and language-specific resource (.mui) files.

UpdateResource(IntPtr, ResourceType, String, UInt16, IntPtr, UInt32) Adds, deletes, or replaces a resource in a portable executable (PE) file.

There are some restrictions on resource updates in files that contain Resource Configuration (RC Config) data: language-neutral (LN) files and language-specific resource (.mui) files.

UpdateResource(IntPtr, String, IntPtr, UInt16, IntPtr, UInt32) Adds, deletes, or replaces a resource in a portable executable (PE) file.

There are some restrictions on resource updates in files that contain Resource Configuration (RC Config) data: language-neutral (LN) files and language-specific resource (.mui) files.

UpdateResource(IntPtr, String, String, UInt16, IntPtr, UInt32) Adds, deletes, or replaces a resource in a portable executable (PE) file.

There are some restrictions on resource updates in files that contain Resource Configuration (RC Config) data: language-neutral (LN) files and language-specific resource (.mui) files.

UpdateResource(SafeModuleHandle, ResourceType, IntPtr, UInt16, IntPtr, UInt32) Adds, deletes, or replaces a resource in a portable executable (PE) file.

There are some restrictions on resource updates in files that contain Resource Configuration (RC Config) data: language-neutral (LN) files and language-specific resource (.mui) files.

UpdateResource(SafeModuleHandle, ResourceType, String, UInt16, IntPtr, UInt32) Adds, deletes, or replaces a resource in a portable executable (PE) file.

There are some restrictions on resource updates in files that contain Resource Configuration (RC Config) data: language-neutral (LN) files and language-specific resource (.mui) files.

UpdateResource(SafeModuleHandle, String, IntPtr, UInt16, IntPtr, UInt32) Adds, deletes, or replaces a resource in a portable executable (PE) file.

There are some restrictions on resource updates in files that contain Resource Configuration (RC Config) data: language-neutral (LN) files and language-specific resource (.mui) files.

UpdateResource(SafeModuleHandle, String, String, UInt16, IntPtr, UInt32) Adds, deletes, or replaces a resource in a portable executable (PE) file.

There are some restrictions on resource updates in files that contain Resource Configuration (RC Config) data: language-neutral (LN) files and language-specific resource (.mui) files.

VirtualAlloc(IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process.

Memory allocated by this function is automatically initialized to zero.

To allocate memory in the address space of another process, use the VirtualAllocEx(IntPtr, IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) function.

VirtualAlloc(IntPtr, UIntPtr, MemoryAllocationType, MemoryProtectionOptions) Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process.

Memory allocated by this function is automatically initialized to zero.

To allocate memory in the address space of another process, use the VirtualAllocEx(IntPtr, IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) function.

VirtualAlloc(UIntPtr, UIntPtr, MemoryAllocationType, MemoryProtectionOptions) Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process.

Memory allocated by this function is automatically initialized to zero.

To allocate memory in the address space of another process, use the VirtualAllocEx(IntPtr, IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) function.

VirtualAllocEx(IntPtr, IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) Reserves, commits, or changes the state of a region of memory within the virtual address space of a specified process.

The function initializes the memory it allocates to zero.

VirtualAllocEx(IntPtr, IntPtr, UIntPtr, MemoryAllocationType, MemoryProtectionOptions) Reserves, commits, or changes the state of a region of memory within the virtual address space of a specified process.

The function initializes the memory it allocates to zero.

VirtualAllocEx(IntPtr, UIntPtr, UIntPtr, MemoryAllocationType, MemoryProtectionOptions) Reserves, commits, or changes the state of a region of memory within the virtual address space of a specified process.

The function initializes the memory it allocates to zero.

VirtualAllocExNuma(IntPtr, IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions, UInt32) Reserves, commits, or changes the state of a region of memory within the virtual address space of the specified process, and specifies the NUMA node for the physical memory.

The function initializes the memory it allocates to zero.

VirtualAllocExNuma(IntPtr, IntPtr, UInt32, MemoryAllocationType, MemoryProtectionOptions, UInt32) Reserves, commits, or changes the state of a region of memory within the virtual address space of the specified process, and specifies the NUMA node for the physical memory.

The function initializes the memory it allocates to zero.

VirtualAllocExNuma(IntPtr, UIntPtr, UInt32, MemoryAllocationType, MemoryProtectionOptions, UInt32) Reserves, commits, or changes the state of a region of memory within the virtual address space of the specified process, and specifies the NUMA node for the physical memory.

The function initializes the memory it allocates to zero.

VirtualAllocExNuma(IntPtr, UIntPtr, UIntPtr, MemoryAllocationType, MemoryProtectionOptions, UInt32) Reserves, commits, or changes the state of a region of memory within the virtual address space of the specified process, and specifies the NUMA node for the physical memory.

The function initializes the memory it allocates to zero.

VirtualFree(IntPtr, IntPtr, MemoryFreeType) Releases, decommits, or releases and decommits a region of pages within the virtual address space of the calling process.

To free memory allocated in another process by the VirtualAllocEx(IntPtr, IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) function, use the VirtualFreeEx(IntPtr, IntPtr, IntPtr, MemoryFreeType) function.

VirtualFree(IntPtr, UIntPtr, MemoryFreeType) Releases, decommits, or releases and decommits a region of pages within the virtual address space of the calling process.

To free memory allocated in another process by the VirtualAllocEx(IntPtr, IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) function, use the VirtualFreeEx(IntPtr, IntPtr, IntPtr, MemoryFreeType) function.

VirtualFree(UIntPtr, UIntPtr, MemoryFreeType) Releases, decommits, or releases and decommits a region of pages within the virtual address space of the calling process.

To free memory allocated in another process by the VirtualAllocEx(IntPtr, IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) function, use the VirtualFreeEx(IntPtr, IntPtr, IntPtr, MemoryFreeType) function.

VirtualFreeEx(IntPtr, IntPtr, IntPtr, MemoryFreeType) Releases, decommits, or releases and decommits a region of memory within the virtual address space of a specified process.
VirtualFreeEx(IntPtr, IntPtr, UIntPtr, MemoryFreeType) Releases, decommits, or releases and decommits a region of memory within the virtual address space of a specified process.
VirtualFreeEx(IntPtr, UIntPtr, UIntPtr, MemoryFreeType) Releases, decommits, or releases and decommits a region of memory within the virtual address space of a specified process.
VirtualLock(IntPtr, IntPtr) 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.
VirtualLock(IntPtr, UIntPtr) 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.
VirtualLock(UIntPtr, UIntPtr) 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(IntPtr, IntPtr, MemoryProtectionOptions, MemoryProtectionOptions) Changes the protection on a region of committed pages in the virtual address space of the calling process.
VirtualProtect(IntPtr, UIntPtr, MemoryProtectionOptions, MemoryProtectionOptions) Changes the protection on a region of committed pages in the virtual address space of the calling process.
VirtualProtect(UIntPtr, IntPtr, MemoryProtectionOptions, MemoryProtectionOptions) Changes the protection on a region of committed pages in the virtual address space of the calling process.
VirtualProtect(UIntPtr, UIntPtr, MemoryProtectionOptions, MemoryProtectionOptions) Changes the protection on a region of committed pages in the virtual address space of the calling process.
VirtualProtectEx(IntPtr, IntPtr, IntPtr, MemoryProtectionOptions, MemoryProtectionOptions) Changes the protection on a region of committed pages in the virtual address space of a specified process.
VirtualProtectEx(IntPtr, IntPtr, UIntPtr, MemoryProtectionOptions, MemoryProtectionOptions) Changes the protection on a region of committed pages in the virtual address space of a specified process.
VirtualProtectEx(IntPtr, UIntPtr, UIntPtr, MemoryProtectionOptions, MemoryProtectionOptions) Changes the protection on a region of committed pages in the virtual address space of a specified process.
VirtualQuery(IntPtr, MemoryBasicInformation32, IntPtr) Retrieves information about a range of pages in the virtual address space of the calling (current) process.
VirtualQuery(IntPtr, MemoryBasicInformation64, IntPtr) Retrieves information about a range of pages in the virtual address space of the calling (current) process.
VirtualQuery(UIntPtr, MemoryBasicInformation32, IntPtr) Retrieves information about a range of pages in the virtual address space of the calling (current) process.
VirtualQuery(UIntPtr, MemoryBasicInformation64, IntPtr) Retrieves information about a range of pages in the virtual address space of the calling (current) process.
VirtualQueryEx(IntPtr, IntPtr, MemoryBasicInformation32, IntPtr) Retrieves information about a range of pages within the virtual address space of a specified process.
VirtualQueryEx(IntPtr, IntPtr, MemoryBasicInformation32, UInt32) Retrieves information about a range of pages within the virtual address space of a specified process.
VirtualQueryEx(IntPtr, IntPtr, MemoryBasicInformation64, IntPtr) Retrieves information about a range of pages within the virtual address space of a specified process.
VirtualQueryEx(IntPtr, IntPtr, MemoryBasicInformation64, UInt32) Retrieves information about a range of pages within the virtual address space of a specified process.
VirtualQueryEx(IntPtr, UIntPtr, MemoryBasicInformation32, IntPtr) Retrieves information about a range of pages within the virtual address space of a specified process.
VirtualQueryEx(IntPtr, UIntPtr, MemoryBasicInformation32, UInt32) Retrieves information about a range of pages within the virtual address space of a specified process.
VirtualQueryEx(IntPtr, UIntPtr, MemoryBasicInformation64, IntPtr) Retrieves information about a range of pages within the virtual address space of a specified process.
VirtualQueryEx(IntPtr, UIntPtr, MemoryBasicInformation64, UInt32) Retrieves information about a range of pages within the virtual address space of a specified process.
VirtualUnlock(IntPtr, IntPtr) 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.
VirtualUnlock(IntPtr, UIntPtr) 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.
VirtualUnlock(UIntPtr, UIntPtr) 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.
WaitForSingleObject Waits until the specified object is in the signaled state or the time-out interval elapses.

To enter an alertable wait state, use the WaitForSingleObjectEx(IntPtr, UInt32, Boolean) function.

WaitForSingleObjectEx Waits until the specified object is in the signaled state, an I/O completion routine or asynchronous procedure call (APC) is queued to the thread, or the time-out interval elapses.
WerGetFlags Retrieves the fault reporting settings for the specified process.
WerRegisterAdditionalProcess Registers a process to be included in the error report along with the main application process.

Optionally specifies a thread within that registered process to get additional data from.

WerRegisterAppLocalDump Registers a path relative to the local app store for the calling application where Windows Error Reporting (WER) should save a copy of the diagnostic memory dump that WER collects when one of the processes for the application stops responding.
WerRegisterCustomMetadata Registers app-specific metadata to be collected (in the form of key/value strings) when WER creates an error report.
WerRegisterExcludedMemoryBlock Marks a memory block (that is normally included by default in error reports) to be excluded from the error report.
WerRegisterFile Registers a file to be collected when WER creates an error report.
WerRegisterMemoryBlock Registers a memory block to be collected when WER creates an error report.
WerRegisterRuntimeExceptionModule Registers a custom runtime exception handler that is used to provide custom error reporting for crashes.
WerSetFlags Sets the fault reporting settings for the current process.
WerUnregisterAdditionalProcess Removes a process from the list of additional processes to be included in the error report.
WerUnregisterAppLocalDump Cancels the registration that was made by calling the WerRegisterAppLocalDump(String) function to specify that Windows Error Reporting (WER) should save a copy of the diagnostic memory dump that WER collects when one of the processes for the application stops responding.
WerUnregisterCustomMetadata Removes an item of app-specific metadata being collected during error reporting for the application.
WerUnregisterExcludedMemoryBlock Removes a memory block that was previously marked as excluded (it will again be included in error reports).
WerUnregisterFile Removes a file from the list of files to be added to reports generated for the current process.
WerUnregisterMemoryBlock Removes a memory block from the list of data to be collected during error reporting for the application.
WerUnregisterRuntimeExceptionModule Removes the registration of your WER exception handler.
WideCharToMultiByte(CodePage, WideCharConversionType, String, Int32, StringBuilder, Int32, String, Boolean) Maps a UTF-16 (wide character) string to a new character string. The new character string is not necessarily from a multibyte character set.

Caution: Using the WideCharToMultiByte(CodePage, WideCharConversionType, String, Int32, StringBuilder, Int32, String, Boolean) function incorrectly can compromise the security of your application. Calling this function can easily cause a buffer overrun because the size of the input buffer indicated by wideCharStr equals the number of characters in the Unicode string, while the size of the output buffer indicated by multiByteStr equals the number of bytes.

To avoid a buffer overrun, your application must specify a buffer size appropriate for the data type the buffer receives.

Data converted from UTF-16 to non-Unicode encodings is subject to data loss, because a code page might not be able to represent every character used in the specific Unicode data.

WideCharToMultiByte(UInt32, WideCharConversionType, String, Int32, StringBuilder, Int32, String, Boolean) Maps a UTF-16 (wide character) string to a new character string. The new character string is not necessarily from a multibyte character set.

Caution: Using the WideCharToMultiByte(CodePage, WideCharConversionType, String, Int32, StringBuilder, Int32, String, Boolean) function incorrectly can compromise the security of your application. Calling this function can easily cause a buffer overrun because the size of the input buffer indicated by wideCharStr equals the number of characters in the Unicode string, while the size of the output buffer indicated by multiByteStr equals the number of bytes.

To avoid a buffer overrun, your application must specify a buffer size appropriate for the data type the buffer receives.

Data converted from UTF-16 to non-Unicode encodings is subject to data loss, because a code page might not be able to represent every character used in the specific Unicode data.

WinExec Runs the specified application.

Note: This function is provided only for compatibility with 16-bit Windows. Applications should use the CreateProcess(String, StringBuilder, SecurityAttributes, SecurityAttributes, Boolean, CreateProcessFlags, IntPtr, String, ProcessStartupInfo, ProcessInformation) function.
Obsolete.

Wow64DisableWow64FsRedirection Disables file system redirection for the calling thread.

File system redirection is enabled by default.

Wow64EnableWow64FsRedirection Enables or disables file system redirection for the calling thread.

This function may not work reliably when there are nested calls. Therefore, this function has been replaced by the Wow64DisableWow64FsRedirection(IntPtr) and Wow64RevertWow64FsRedirection(IntPtr) functions.

Note: These two methods of controlling file system redirection cannot be combined in any way. Do not use the Wow64EnableWow64FsRedirection(Boolean) function with either the Wow64DisableWow64FsRedirection(IntPtr) or the Wow64RevertWow64FsRedirection(IntPtr) function.

Wow64RevertWow64FsRedirection Restores file system redirection for the calling thread.

This function should not be called without a previous call to the Wow64DisableWow64FsRedirection(IntPtr).

Any data allocation on behalf of the Wow64DisableWow64FsRedirection(IntPtr) function is cleaned up by this function.

WriteConsole Writes a character string to a console screen buffer beginning at the current cursor location.
WriteConsoleOutput Writes character and color attribute data to a specified rectangular block of character cells in a console screen buffer.

The data to be written is taken from a correspondingly sized rectangular block at a specified location in the source buffer.

WriteConsoleOutputAttribute Copies a number of character attributes to consecutive cells of a console screen buffer, beginning at a specified location.
WriteConsoleOutputCharacter Copies a number of characters to consecutive cells of a console screen buffer, beginning at a specified location.
WriteFile(SafeFileHandle, Byte, Int32, Int32, NativeOverlapped) Writes data to the specified file or input/output (I/O) device..

This function is designed for both synchronous and asynchronous operation. For a similar function designed solely for asynchronous operation, see WriteFileEx.

WriteFile(SafeFileHandle, Byte, UInt32, UInt32, IntPtr) Writes data to the specified file or input/output (I/O) device..

This function is designed for both synchronous and asynchronous operation. For a similar function designed solely for asynchronous operation, see WriteFileEx.

WriteFile(SafeFileHandle, IntPtr, UInt32, UInt32, IntPtr) Writes data to the specified file or input/output (I/O) device..

This function is designed for both synchronous and asynchronous operation. For a similar function designed solely for asynchronous operation, see WriteFileEx.

WriteProcessMemory(IntPtr, IntPtr, Byte, IntPtr, IntPtr) Writes data to an area of memory in a specified process.

The entire area to be written to must be accessible or the operation fails.

WriteProcessMemory(IntPtr, IntPtr, Byte, UIntPtr, IntPtr) Writes data to an area of memory in a specified process.

The entire area to be written to must be accessible or the operation fails.

WriteProcessMemory(IntPtr, IntPtr, IntPtr, IntPtr, IntPtr) Writes data to an area of memory in a specified process.

The entire area to be written to must be accessible or the operation fails.

WriteProcessMemory(IntPtr, IntPtr, IntPtr, UIntPtr, IntPtr) Writes data to an area of memory in a specified process.

The entire area to be written to must be accessible or the operation fails.

WriteProcessMemory(IntPtr, UIntPtr, Byte, IntPtr, IntPtr) Writes data to an area of memory in a specified process.

The entire area to be written to must be accessible or the operation fails.

WriteProcessMemory(IntPtr, UIntPtr, Byte, UIntPtr, IntPtr) Writes data to an area of memory in a specified process.

The entire area to be written to must be accessible or the operation fails.

WriteProcessMemory(IntPtr, UIntPtr, IntPtr, IntPtr, IntPtr) Writes data to an area of memory in a specified process.

The entire area to be written to must be accessible or the operation fails.

WriteProcessMemory(IntPtr, UIntPtr, IntPtr, UIntPtr, IntPtr) Writes data to an area of memory in a specified process.

The entire area to be written to must be accessible or the operation fails.

WTSGetActiveConsoleSessionId Retrieves the session identifier of the console session.

The console session is the session that is currently attached to the physical console.

Note that it is not necessary that Remote Desktop Services be running for this function to succeed.

ZeroMemory(IntPtr, IntPtr) Fills a block of memory with zeros.
ZeroMemory(IntPtr, UInt32) Fills a block of memory with zeros.
ZeroMemory(IntPtr, UIntPtr) Fills a block of memory with zeros.
ZeroMemory(UIntPtr, UInt32) Fills a block of memory with zeros.
ZeroMemory(UIntPtr, UIntPtr) Fills a block of memory with zeros.

Extension Methods

CanConvertTo Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
CanConvertToT Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
ConvertToT Converts an object to the specified target type.

If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions)

ConvertToT Converts an object to the specified target type.

If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions)

IsDisposable Determines whether the specified object is a disposable type (i.e., it implements IDisposable interface).
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
ThrowIfNullTException Throws the specified exception if the source object is null.
(Defined by ObjectExtensions)

See Also