winapi Questions
3
I have a simple code for changing wallpaper:
import ctypes
import random
import os
start_path = "D:/my_wallpapers"
list_images = os.listdir(start_path)
img_path = os.path.join(start_path...
1
How do I go about hooking/redirecting a function in a DLL (say, CreateThread from Kernel32.dll) loaded in the current process?
(I don't have control over which pieces of code call CreateThread, so...
3
Solved
QUESTION: Is there a programmatic way to prevent Windows 10 from automatically restarting after an update?
We work on "mission-critical" software that runs in Windows. In general, it is bad if a ...
4
How to use the Windows API in MinGW?
4
Solved
I am unaware of a win32 api function/functions used to query the local PC processor's current speed. I wish not to use WMI because it seems unlikely to be feasible on all PCs.
Rempe asked 25/9, 2011 at 6:47
2
Solved
I am currently trying to retrieve the list of icons from my desktop to change their locations and / or hide them as well as display others.
I tried to get the FolderView in the code below but it d...
2
Solved
I was wondering how can I create a window using Win32 API with a specific client area size.
When trying to create a window using the following piece of code, the entire window is 640x480, with the...
Lianne asked 30/1, 2011 at 15:54
6
I create a window with CreateWindow() and show it with ShowWindow(). But the parent window on which this was created should be disabled until user returns from this window, i.e. it should simulate ...
Peba asked 9/4, 2009 at 15:13
5
Solved
There is a function to set the "valid data length" value: SetFileValidData, but I didn't find a way to get the "valid data length" value.
I want to know about given file if the EOF is different fr...
3
Solved
First, to clarify, I am not asking how to drag-and-drop a file onto an exe's icon. I want to know how to handle drag and drop onto an already running win32 console application. I'm also not asking ...
Protrude asked 25/1, 2014 at 1:6
4
Solved
I am working on Win32 UI. I want to know the difference Between GetDC and BeginPaint. When to Use which API and when not to use which API.
4
Solved
I noticed a few times than when I print-screen while Media Player is running, the content is replaced with a grey rectangle. I've no idea if it's deliberate due to DRM, or some technical issue, but...
1
I'm trying to capture the entire desktop with BitBlt and I also want to exclude certain windows (of my own application) from the capture. I can set WS_EX_LAYERED attribute to them, but it wouldn’t ...
9
Solved
I found similar questions but no answer to what I am looking for. So here goes:
For a native Win32 dll, is there a Win32 API to enumerate its export function names?
5
Solved
I'm developing an application with a team in .Net (C++) and provide a COM interface to interact with python and other languages.
What we've found is that pushing data through COM turns out to be p...
Aguedaaguero asked 13/11, 2008 at 9:25
1
I am using the following library call to change the window to dark mode:
BOOL dark = TRUE;
DwmSetWindowAttribute(hwnd, DWMWA_USE_IMMERSIVE_DARK_MODE, &dark, sizeof(dark));
This works, with a s...
3
Solved
I would like to add an About dialog to my Win32 application (developed using C++). How can I add a hyperlink to the dialog? I'm loading the dialog from a resource file (.rc). Is it possible to defi...
4
Solved
Here is my code snippet:
char existingTarget[MAX_PATH];
HANDLE hFile = CreateFile(linkPath.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (INVALID_H...
Buccaneer asked 15/7, 2015 at 19:8
1
I have a native Win32 MDI application. That application calls unmanaged code that creates WPF Window and calls User32.SetParent() to wrap it into the Win32 MDI window. That works fine, but WPF Wind...
2
My Lenovo Yoga 7i laptop starts in Tablet Mode by default, so I end up with large desktop/taskbar icons and other unpleasant UI artifacts.
This can be fixed by installing and running Lenovo Yoga Mo...
6
Solved
FINAL UPDATE
It was our firmware the whole time. Embarrassing to a degree, but I'm happy we can move forward and I can put learning Java off for another day. My answer is below.
UPDATE
So I have...
Negative asked 14/2, 2013 at 22:31
3
Solved
I am trying to debug a program that manipulates a file. For example, I set the file-pointer to offset 4 (using a base of 0), but it seems to be starting at offset 5 instead.
To try to figure out w...
Watercourse asked 17/7, 2013 at 18:5
2
I'm trying to use a open source library from a Windows application, and the only pre-built version I can find comes as a file called "lib.dll.a"
What format is this, and can I convert it to a norm...
4
Solved
I have browsed several earlier questions about this, and the best answer I found so far is something like this:
(char) WinAPI.MapVirtualKey((uint) Keys.A, 2)
However, this doesn't work in two wa...
5
I am doing the screen shots of IE using PrintWindow. The problem is that some times I get images with black areas. It may be a whole html content what is black, some times only certain areas are bl...
Earpiercing asked 14/8, 2009 at 19:56
© 2022 - 2024 — McMap. All rights reserved.