Category "winapi"

Replacing malloc() with my own implementation

I need a fast malloc() / free() replacement. There's mimalloc vom Microsoft Research which is actually on average the fastest malloc()- / free()-replacement. I'

Get Parent property of network adapter device from c#

I need to get the Parent property of network adapter device from c# program Please find the image here Tried below code but the property "Parent" is not availab

Synchronize the Scroll position of two Controls with different content

I use this simple code to set the position of two Scrollbars of different RichTextBox Controls, at same time. The trouble comes when the text of a RichTextBox i

Why does CreateDXGIFactory occupy GPU even if I call it's release interface

First I run the following code: IDXGIFactory* pFactory; HRESULT hr = CreateDXGIFactory(__uuidof(IDXGIFactory1), (void**)(&pFactory)); if (FAILED(hr)

Scroll Chat Window in Microsoft Teams

I am trying to make an application that would allow me to copy a chat(archive) from "Microsoft Teams". I used SPY++ to get window handles and then I used WIN32

Is it possible to check chromedriver.exe version at runtime in python?

I'm trying to check compatibility of chrome and chromedriver to prompt the user to download the correct chromedriver version if needed. I'm looking to check the

Show a list of all "Alt+Tab windows" (even full screen UWP windows) and retrieve the handle of the one picked by the user

I need to retrieve the handle of a window selected by the user and then retrieve its handle. This window must be one of those shown when ALT+TAB is pressed. I t

Programmatic control of virtual desktops in Windows 10

I love that Windows 10 now has support for virtual desktops built in, but I have some features that I'd like to add/modify (e.g., force a window to appear on al

Can I insert my code to my coded interface using Win32?

I have a C program and I am supposed to add an interface to it. Can I insert my code to my coded interface using Win32? Example: Here is my code to convert bina

Multiple definition running MF Media Session Playback Example using Windows SDK 10.0.22000.0

I'm new to Media Foundation, and I downloaded the code from the media session playback example, and the Windows 11 SDK. I used the following makefile to compile

How to load 16-bit executables (NE) for resources?

Is it possible to open a 16-bit Windows executable, just to browse its resources? I want to use LoadLibraryEx with LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY

Trying to group __InstanceCreationEvents from WMI Query -

I have a WMI query that notifies me on USB insertions, but I am trying to group the results of this query so that my handler can operate on a batch of these ins

Python MAPI, windows service issue on windows server 2016

Im writing a script that downloads the attached document from every email in a subfolder of my Outlook inbox. The script works great when running from CMD or Py

Windows Console (conhost) discards newline when output matches witdth of the window

I have a C++ application on Windows, that logs to stdout (via the Win32 api using WriteConsole). Each logline consists of some text and a trailing newline chara

Pure OpenGL on Windows? [duplicate]

I want to use OpenGL without GLFW, the docs say that I need to add opengl32.lib to linker dependencies. How do I specifically import OpenGL an

Undefined reference to GetConsoleWindow

I am trying to get a handle for the console window with the following: #include <Windows.h> #include <stdio.h> #include <stdlib.h> #define N

Add texts with line breaks in Win32 API ListView

I am using the WC_LISTVIEW control to create a table that is filled with data at runtime. The table is working fine. However, I cannot display multiple lines in

How to add layer on top of file system? Like cache in OneDrive or Google Drive

I'm looking for a way (using C# .Net or C++ and WinApi or anything) to add a layer between filesystem and client application to add custom behaviour. Like OneD

Unable to refer to typedef struct definitions done in Win32 Header files (.h files in External dependencies) from WinRT C++ Library

Unable to refer to typedef struct definitions done in Win32 Header files (.h files in External dependencies) when consumed from WinRT C++ Library #include <m

Win32 raw input blocks input locale switching when RIDEV_NOLEGACY is specified

I'm writing a keyboard input system for Windows based on Raw Input. It is implemented with RIDEV_NOLEGACY flag set, and legacy keyboard messages are generated m