怎么了?为什么我在输出时得到 0x0000etc?
int _tmain(int argc, _TCHAR* argv[])
{
HANDLE hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
if( !hSnapshot )
return -1;
PROCESSENTRY32W pe32w;
memset( &pe32w, 0, sizeof( pe32w ) );
pe32w.dwSize = sizeof( PROCESSENTRY32W );
Process32First( hSnapshot, &pe32w );
do
{
std::cout << pe32w.szExeFile << std::endl;
} while( Process32Next( hSnapshot, &pe32w ) );
CloseHandle( hSnapshot );
return 0;
}