How to retrieve the shortcut info of the shortcut used to open the cmd.exe process used to run the program?
I’m working on a project where I need to determine the specific shortcut that was used to open the cmd.exe process that is currently running my program. I am not sure where to start with this and would like to know if it is even possible to achieve this API-wise.
C++ How to bypass SendInput when using CreateDesktop without SwitchDesktop
I have such a problem I want to automate repetition of actions in applications but the standard UI Automation methods do not work the application asks for a cursor.
Drag&Drop Files – But get list of files already during drag
I would like to allow users to drag&drop files from the windows explorer, but already fetch some infos about the files even before the user drops them into the application. E.g., to already fetch some metadata or previews of massive files.
ReadDirectoryChangesW: no immediate FILE_ACTION_MODIFIED on writes, waits for file handle being closed or opened on the file
I am currently trying to use ReadDirectoryChangesW()
to listen for filesystem events on Windows in a directory. In general this works, but I’ve run into an issue: when something just writes to a file (using e.g. WriteFile
) no event will be triggered immediately. Instead the event will only be triggered once the file is either closed by the writer, or someone opens a new handle for the same file (assuming that sharing is enabled), but the write itself doesn’t cause the event to trigger, even though the file is in fact written. (Also, this doesn’t even trigger even after a reasonable wait time – if nobody opens and/or closes a file handle for that file after a write operation, no event will be generated at all.)
Is it safe to UnregisterWindowClassEx() inside the message loop?
I am making a little self-contained Dialog class and can’t find any documentation on UnregisterWindowClassEx() regarding when it’s safe to call this function. According to the documentation, you must destroy all windows created with this class before calling this function: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-unregisterclassa
Set mouse position for another window
I want to make autoclicker, that is able to click on specific window, f.e. I am playing some game on full screen and I have an opened app, that I need autoclicker to click on. I want to click on it without closing the game.
WM_HOTKEY Message Not Triggering Window Resize in WinMain Message Loop
#ifndef UNICODE #define UNICODE #endif #define HOTKEY_REG_ERR -10 #define HOTKEY_DEC_ID 1 #define HOTKEY_INC_ID 2 #define HOTKEY_CEN_ID 3 #define WND_CHANGE_SIZE 50 #include <windows.h> LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK WindowProcAlt(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); SHORT ResizeWindow(HWND hwnd, int widthChange, int heightChange); int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, […]
How to properly handle c++ exceptions on dynamically loaded code?
I have this pe that I dynamically want to load using a pe loader:
How to use RtlVirtualUnwind() on dynamic code?
I wrote the following code that can handle c++ exception manually (inside a veh handler):
Why is the memory being rolled back?
Hello fellow developers;