Recently someone in the #winapi channel I frequent ask about EndTask. It doesn't seem to be declared in windows.h. Well, it was a late comer to the API after Windows XP and it doesn't even seem to be in windows.h for Visual Studio 2012's included SDK either.
If you are interested in a simpler implementation without using LoadLibrary & GetProcAddress I have written another article here.
Using EndTask is still simple, but requires you do all the work yourself using LoadLibrary and GetProcAddress. Here's the code:
Don't forget you'll need to include windows.h since we are using some window's types. The usage is the same as the documentation shows at MSDN.
If you were interested in a usage example, here it is: