I have a serious problem about OpenProcess function (link to msdna
I need that function to get all process handles, to collect basic information (process name, cpu usage, memory usage) about the currently running processes. The problem is when I build a release version of my application some process handle cannot be opened with this function (debug version open these handles succesfully). I've tried several solution, but some of them have a bottleneck. This "solutions" was:
- Initialize privileges, also need Open Process function, the failure was my application cannot open its own handle.
- Tried other function to get process name and cpu usage (these are ok)
Unfortunately, I cannot found another way to get memory usage of processes, thats is why OpenProcess needs to be solved, but if you have an idea to collect memory usage info without OpenProcess please let me know that or solve the OpenProcess failure.
Sorry about not sharing the program code, but its trade secret currently.