Windows APC won't be of use to me

I was happy to see that Windows has support for Asynchronous Procedure Calls (APCs). APC seems to have the same functionality that the signals have, i.e. the Windows API allows to run some code in the context of another thread. But there's a catch - APCs are only invoked during specific moments.

Hence I had to resort to calling code in the context of another thread by manipulating the stack and the context of a thread in order to “plant” a call to the function. At least, that's what I've been able to conjure as a hack. I still have to find out how blocking calls would work in the interrupted thread but simple tests show that evertything should be OK with it.