OK, some time has passed, but I'd like to give a definitive answer to this question of mine. Unfortunately, what I was asking for it's not possible. @vahancho's answer is right, and the solution he pointed out is correct for the majority of situations. However, DecodePointer
is "included" in Windows XP SP 2 kernel, and it's not possible to compile an application using it for an older Microsoft OS, even by choosing the VC++2008 compiler.
An additional reference is given by this post on CodeProject. Fortunately for me, my application was simple enough to let me rewrite it using the good old VB6 :)