There's a bug in tlhelp32.h, when invoked in WIN64:
If there's a #pragma pack directive somewhere before including tlhelp32.h, it will generate a PROCESSENTRY32 structure with the wrong size.
Then anything can happen, including Process32First failures, or even crashes.
Try including tlhelp32.h this way:
#pragma pack(push,8) /* Work around a bug in tlhelp32.h in WIN64, which generates the wrong structure if packing has been changed */
#include <tlhelp32.h>
#pragma pack(pop)
链接:http://www.youngroe.com/2015/09/26/Windows/Process32First-error-of-command-length/