Forget the registry!
Take a look at this function:
Code:
BOOL GetProcessTimes(
HANDLE hProcess, // handle to process
LPFILETIME lpCreationTime, // process creation time
LPFILETIME lpExitTime, // process exit time
LPFILETIME lpKernelTime, // process kernel-mode time
LPFILETIME lpUserTime // process user-mode time
);
If you want other processs information, perhaps these functions are of interest:
Code:
BOOL GetProcessIoCounters(
HANDLE hProcess, // handle to process
PIO_COUNTERS lpIoCounters // I/O accouting information
);
BOOL GetProcessMemoryInfo(
HANDLE Process, // handle to process
PPROCESS_MEMORY_COUNTERS ppsmemCounters, // buffer
DWORD cb // size of buffer
);