The Windows 10 may restart unexpectedly. In order to find out why you can execute the following command:
wevtutil qe System /q:"*[System[(EventID=41) or (EventID=1074) or (EventID=6008)]]" /c:1 /f:text /rd:true
If the case is
Operating System: Service pack (Planned), set the following registry key to disable automatic Windows update restart:
There was this special application that I wanted to intercept all Windows messages for a specific remote processor. For that, I came to
SetWindowsHookEx function but in order to install this hook on an external application you cannot do that simply by calling this function inside your code because it will fail with the following error
ERROR_HOOK_NEEDS_HMOD 1428 (0x594) Cannot set nonlocal hook without a module handle.
In order to fix that at first I thought I need to create a DLL which contains the hook function and then inject that into every application that I need to intercept its messages. What I later found out was that this is not required
To shed some light in there there are two subjects around this, first, there is this DLL injection topic which you can use this function to inject some DLL into other programs and the second one is my application which intercepts events from other applications. For the first one you need to inject the dll which contains the codes you want to inject into the application you want, obviously.
But for the second application that I mentioned you just need to write your codes inside some dll and then just load that codes inside your application and because you wrote down the
SetWindowsHookEx function and the hook callback inside the DLL main function your code will successfully execute and actually you don’t need to inject it into any other application so it is pretty straightforward.
Because at first, it seems to be so complicated I decided to write this down so I wouldn’t forget it later.
That it, enjoy and if it was helpful please send some feedback.
SetWinEventHook Is a completely different Hook. What exactly it does is it reports the events regarding the window manager. To be more specific it reports events related to window creation and destruction, window resizing and losing, or getting Focus around different windows. But it would never give any response regarding the window internal messages.
run in cmd
reg ADD HKLM\SOFTWARE\Policies\Mozilla\Firefox /v DisableAppUpdate /t REG_DWORD /d 1 /f
or run ff_update_dis.reg
reg ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoWinKeys /t REG_DWORD /d 1 /f
or run win_key_dis.reg
reg ADD HKCU\Control Panel\Desktop /v AutoEndTasks /t REG_SZ /s "1" /f
or run win_end_task.reg
So exciting that even after 13 years of introducing to Qt by my great teacher, Mani Monajjemi there’s still a lot to learn.
I was trying to use WinRT with Qt today and now after so long time sticking to MinGW, I’m switching to MSVC. Here are the 4 reasons
|• CoInitialize:||Initializes the COM library for use by the calling thread, sets the thread’s concurrency model, and creates a new apartment|
|• CoInitializeEx:||More advanced version
|• CoUninitialize:||Should be called on deconstructor|
Useful links to preserve:
Microsoft – Universal Audio Architecture: Guideline to for Sound Card Without Propriety Driver
Update 1: Finished developing! Here is the link to the released driver
I use AutoHotkey in almost all my application but I notice some Qt applications (Like ADS) had some difficulty interpreting the AHK keys correctly. The problem turns out to be affiliated with UAC and Admin rights rather than the Qt library. To solve the issue simply add following lines to the top of your AHK scripts that you want to be applied on the specific app.
#SingleInstance Force SetWorkingDir %A_ScriptDir% if not A_IsAdmin Run *RunAs "%A_ScriptFullPath%" ; Run Script as admin
This problem arises when you open a software instance with the admin rights while the AHK script doesn’t spawn with the same permission level. The above script simply run AHK with admin rights too so whether application is with or without admin right AHK script will always be able to set the key bindings.