Understanding the rationale behind a rule when trying to circumvent it
I mean, technically I didn't do it.
Opening excerpt (first ~120 words) tap to expand
In the documentation for best practices for implementing process and thread-related callback functions, it calls out Keep routines short and simple. Don’t make calls into a user mode service to validate the process, thread, or image. Don’t make registry calls. Don’t make blocking and/or Interprocess Communication (IPC) function calls. Don’t synchronize with other threads because it can lead to reentrancy deadlocks. So far so good. It seems that these callback functions need to operate quickly and cannot block. These are callbacks that are invoked when a process starts or exits, when a thread starts or exits, when a DLL or EXE is loaded or unloaded, and various other low-level events.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at The Old New Thing.