I am trying to read system keyboard events in my c++ application using SetWindowsHookExA. Application is able to get the system keyboard events as long as the hooking is done in a dll. If I try to create hook inside my application code (without a dll), I am not getting keyboard events. Is it mandatory for hook functions to be in a dll? If yes, is there a reason?
Does the hook function used in SetWindowsHookExA need to be in dll?
273 views Asked by DBR404 At
1
There are 1 answers
Related Questions in C++
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Why can't I use templates members in its specialization?
- How to fix "Access violation executing location" when using GLFW and GLAD
- Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
- How do I apply the interface concept with the base-class in design?
- File refuses to compile std::erase() even if using -std=g++23
- How can I do a successful map when the number of elements to be mapped is not consistent in Thrust C++
- Can std::bit_cast be applied to an empty object?
- Unexpected inter-thread happens-before relationships from relaxed memory ordering
- How i can move element of dynamic vector in argument of function push_back for dynamic vector
- Brick Breaker Ball Bounce
- Thread-safe lock-free min where both operands can change c++
- Watchdog Timer Reset on ESP32 using Webservers
- How to solve compiler error: no matching function for call to 'dmhFS::dmhFS()' in my case?
- Conda CMAKE CXX Compiler error while compiling Pytorch
Related Questions in MSDN
- CreateFile function being called twice to open the same serial COM port
- how to edit memory using CreateFileMappingA in windows
- Create an Online Meeting Event in Microsoft Teams Using the Graph API
- .NET documentation confusion around inheritance
- How to make only certain ListBox items not selectable?
- parsing a PE file to find the export table address using CFF explorer and msdn doc
- MSDN Array error when training tensorflow model on Macbook M2 chip
- Download link Microsoft Application Request Routing Version 2 for IIS 7
- IsDebuggerPresent returns true on a standard customer PC
- Bcryptdecrypt unable to decrypt data correctly
- What error code should I use for the Edge vs IE
- Can webhooks return the response code as well as message from the api endpoint?
- How to get program to list results in GB or TB rather than bytes?
- Linking error while porting VS-2012 project in VS-2019
- cryptdecrypt API not able to decrypt 3Des Encrypted data on Windows 11
Related Questions in SETWINDOWSHOOKEX
- Virtual Key Code Constant from decimal value
- Why isn't VK_CODE corresponding to my keyboard input?
- How to capture global windows event using SetWindowsHookEx from c# forms application - what do I have to set for hInstance?
- SetWindowsHookEx always returning 0 with error code 87 (ERROR_INVALID_PARAMETER) in .net 8 WPF
- How to prevent a service executable from being suspended? (C++, win32)
- Problem displaying the full name, including the side, of a keyboard key captured in WindowsHook
- Rust Foreground Change `SetWindowsHookExW()`
- Intercepting Windows messages with a global hook that application does not peeks or gets
- How to set SetWindowsHookEx only on a specific window to listen for mouse left button up events
- Hook keyboard layout change event for specific window [Windows][x64]
- How can I detect Mouse Click simulated by SendMessage or PostMessage?
- GetKeyState() false positive only on German keyboard layouts
- VS2022 - vb.NET 4.8 Project - Calling SetWindowsHookEx() returns "Arithmetic operation resulted in an overflow"
- How global SetWindowsHookEx manages to inject dll into all threads?
- Does the hook function used in SetWindowsHookExA need to be in dll?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
No, a hook does not need to be in a DLL. See the description of the parameters:
You can have it in your EXE, but then you'll have to use a thread from your process. And IIRC this thread will need to pump messages.