10-09-2009, 02:44 PM
Thanks that's useful!
Just a little addition is that when used as it is in Visual Studio I can't see the full process name, just the first character.
The solution to that is to have the Conversion Code %ls instead of %s in printf, because proc32.szExeFile is of type WCHAR
printf("\n%d\t\t%ls",proc32.th32ProcessID,proc32.szExeFile);/*print pid and processname*/
Just a little addition is that when used as it is in Visual Studio I can't see the full process name, just the first character.
The solution to that is to have the Conversion Code %ls instead of %s in printf, because proc32.szExeFile is of type WCHAR
printf("\n%d\t\t%ls",proc32.th32ProcessID,proc32.szExeFile);/*print pid and processname*/