Not easy at all and you can't write it in managed code. This requires you to write, what is essentially, a debugger. It also requires you have a thorough knowledge of Windows internals and how processes really work. No, I don't have any references for this stuff.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...