Showing results for October 16, 2014 - The Old New Thing

Oct 16, 2014
Post comments count0
Post likes count0

If only DLLs can get DllMain notifications, how can an EXE receive a notification when a thread is created (for example)?

Raymond Chen
Raymond Chen

When a DLL is loaded, it receives a notification, and when it is unloaded (or when the process terminates), it gets a notification. DLLs also receive notifications when a thread is created and notifications when a thread exits. But what if you are an EXE? EXEs don't have a , so there is no way to receive these notifications. The trick here i...

Code