|imo, it's easier to do it in vbscript. btw, which WIN32 API are you referring to get performance of a process?|
In these scripts, we're mostly just using WMI as a Win32 wrapper. Win32_Process.Create wraps CreateProcess. Win32_PerfFormattedData_PerfProc_Process wraps . . . a lot of functions.
Let's talk about why you might want to use the Win32 API directly. As far as I can tell, WMI's __instancedeletionevent works like this: WMI processes its query. Next it compares the results of this poll to the previous poll, throwing _instancecreationevents and _instancedeletionevents for new objects and outdated objects, respectively. Obviously if something runs faster than this polling interval, having WMI detect it will be a crapshoot.
This is not the case with the Win32 API. When we use CreateProcess, we get a set of handles. As Windows won't clean up the process until all handles to it are closed, we can examine the now dead process at our leisure; Windows will even tell us the time of death. As for which language to choose, that depends on your personal preference. I'd choose C++, but that's far from the only option. You can use VBA, VB.NET, C# (actually, the .NET platforms might have something built-in, but a quick search turned up nothing), PERL (I think), Python (again, I think), pretty much any language that lets you interact directly with DLLs. (Sadly, this doesn't include VBScript.)
Honestly, I'd just set the polling interval to half a second, and say anything that runs quicker than a second is outside of the scope of the monitoring script.