SetWindowsHookEx Callback Never Called

Posted by in Software, Windows

Previously, we learned we needed to put our callback function in a separate DLL and then load that DLL in another program. So you did that you create a separate dll, you put the callback there you call the SetWindowsHookEx function to set up the callback, But the callback doesn’t get called at all. So…

SetWindowsHookEx without DLL?

Posted by in Software, Windows

Previously we discussed why it isn’t required to inject the DLL containing the callback to every application you need to set a hook on. In this post, we are going to see if it’s possible to create a hook or a global Hook with SetWindowsHookEx function without using any sort of DLL. There is this…

SetWindowsHookEx with WH_GETMESSAGE

Posted by in Windows

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…

Batch Size vs Mini Batch Size

Posted by in Speech Recognition

Batch Size: There is no such a thing as batch size, there’s only mini batch size which is number of the samples you train your model on before updating the weight and biases but sometimes programmers just drop the mini in the term, and use batch sizes instead so basically batch size is exactly the…

Golden SSH Commands

Posted by in Linux

Are you tired of entering your password for sshing into a remote server? Are you tired of verifying host fingerprint changes every time? Use this golden ssh command and save your valuable time ssh -o “StrictHostKeyChecking no” -i ~/Documents/identify root@ip echo “y\n” | HOSTNAME=`hostname` ssh-keygen -t rsa -C “$HOSTNAME” -f “$HOME/.ssh/id_rsa” -P “” # copy…

CronTab @Reboot

Posted by in Linux

You can use the @reboot keyword in crontab to start a shell script at system startup but here is why this isn’t a very good solution to do that. The problem is that if you don’t shut down the system cleanly on the next startup this message will pop up and cron will simply skip…

Useful Firefox/Windows Hacks

Posted by in Windows

Disable Firefox Update Prompt run in cmd reg ADD HKLM\SOFTWARE\Policies\Mozilla\Firefox /v DisableAppUpdate /t REG_DWORD /d 1 /f or run ff_update_dis.reg Disable Windows Keys reg ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoWinKeys /t REG_DWORD /d 1 /f or run win_key_dis.reg Disable Shutdown Prompt Ending Application reg ADD HKCU\Control Panel\Desktop /v AutoEndTasks /t REG_SZ /s “1” /f or run win_end_task.reg…

RegEx: My Greatest Fear

Posted by in Linux

Regex, Sed, and AWK are freaks in programming but they are pretty simple, well not at the beginning though. Here I summarize some of the most amazing ones for RegEx To Be or Not To Be, is possible with: LookAround Stop Worrying! Regex101 is all you need to know

Qt MSVC vs MinGW

Posted by in Software, Windows

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 MinGW is opensource but deep…

COM Object and C++

Posted by in Software, Windows

• 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 CoInitialize that specify the thread’s concurrency model • CoUninitialize: Should be called on deconstructor

‹ previous posts next posts ›