Class MswUtils.NativeMethods
Contains native methods.
public static class MswUtils.NativeMethods
- Inheritance
-
MswUtils.NativeMethods
Fields
Methods
- AllocConsole()
Allocates console.
- AllowDarkModeForApp(bool)
Allows or disallows dark mode for the entire application (internal uxtheme API).
- AllowDarkModeForWindow(nint, bool)
Enables or disables dark mode for a specific window using an undocumented uxtheme entry.
- BitBlt(nint, int, int, int, int, nint, int, int, int)
Performs a bit-block transfer of color data from a source device context to a destination device context.
- ChoosePixelFormat(nint, ref PIXELFORMATDESCRIPTOR)
Chooses the pixel format that best matches the specified device context and pixel format descriptor.
- CreateCompatibleDC(nint)
Creates a memory device context (DC) compatible with the specified device context.
- CreateDIBSection(nint, ref BITMAPINFO, uint, out nint, nint, uint)
Creates a device-independent bitmap (DIB) and returns a handle to the newly created DIB.
- DeleteDC(nint)
Deletes the specified device context (DC).
- DeleteObject(nint)
Deletes a GDI object, such as a pen, brush, font, bitmap, or region, and frees any system resources associated with it.
- DwmSetWindowAttribute(nint, DwmWindowAttribute, ref int, int)
Sets the value of Desktop Window Manager (DWM) non-client rendering attributes for a window.
- DwmSetWindowAttribute(nint, DwmWindowAttribute, nint, int)
Sets a Desktop Window Manager (DWM) window attribute by pointer.
- EnumProcessModules(nint, nint[], int, out int)
Enumerates the modules (loaded DLLs) for the specified process.
- FlushMenuThemes()
Flushes menu themes, forcing theme changes to menus to be applied immediately.
- FreeConsole()
Frees console.
- GetAsyncKeyState(int)
Gets key state.
- GetConsoleWindow()
Gets console window.
- GetDC(nint)
Retrieves a handle to the device context (DC) for the specified window or for the entire screen.
- GetForegroundWindow()
Retrieves a handle to the foreground window (the window with which the user is currently working).
- GetModuleFileNameEx(nint, nint, StringBuilder, uint)
Retrieves the fully qualified path for the file containing the specified module.
- GetProcAddress(nint, string)
Retrieves the address of an exported function or variable from the specified dynamic-link library (DLL).
- GetWindowInfo(nint, ref WindowInfo)
Retrieves information about the specified window.
- IsDarkModeAllowedForApp()
Determines whether dark mode is allowed for the current application (internal uxtheme API).
- IsDarkModeAllowedForWindow(nint)
Determines whether dark mode is allowed for a specific window (internal uxtheme API).
- LoadLibrary(string)
Loads the specified module into the address space of the calling process.
- OpenProcess(uint, bool, uint)
Opens an existing process object and returns a handle that can be used to access the process.
- RefreshImmersiveColorPolicyState()
Refreshes the immersive color policy state used by the system theme (internal uxtheme call).
- ReleaseDC(nint, nint)
Releases a device context (DC) for the specified window, freeing it for use by other applications.
- SHGetKnownFolderPath(Guid, uint, nint, out nint)
Retrieves the full path of a known folder identified by its GUID.
- SelectObject(nint, nint)
Selects an object into the specified device context, replacing the previous object.
- SendMessage(nint, uint, nint, nint)
Sends the specified message to a window or windows.
- SetPixelFormat(nint, int, ref PIXELFORMATDESCRIPTOR)
Sets the pixel format for a device context to the specified format.
- SetPreferredAppMode(AppThemeMode)
Sets the preferred application theme mode (internal uxtheme API).
- SetProp(nint, string, nint)
Associates a string property with the specified window handle.
- SetWindowCompositionAttribute(nint, ref WindowCompositionAttributeData)
Sets various window composition attributes (such as accent, cloak, etc.).
- SetWindowTheme(nint, string, string)
Sets the visual style of a window by applying a theme from the current theme data.
- SwapBuffers(nint)
Exchanges the front and back buffers if the pixel format supports double buffering.
- SystemParametersInfo(uint, uint, ref HighContrastData, uint)
Retrieves or sets various system-wide parameters.
- WriteConsoleOutput(SafeFileHandle, ConsoleCharInfo[], SmallPoint, SmallPoint, ref SmallRect)
Writes text to console.
- glViewport(int, int, int, int)
Sets the viewport for rendering in OpenGL.
- wglCreateContext(nint)
Creates a new OpenGL rendering context for the specified device context.
- wglDeleteContext(nint)
Deletes a specified OpenGL rendering context.
- wglGetProcAddress(string)
Windows-specific: resolve OpenGL function pointers
- wglMakeCurrent(nint, nint)
Makes a specified OpenGL rendering context the current rendering context for the calling thread.