代码很短的.都来看看这个列举进程的代码有什么有关问题

代码很短的....都来看看这个列举进程的代码有什么问题 ?
#include "stdio.h"
#include "Tlhelp32.h"
#include "windows.h"
//#pragma comment(lib,"kernel32.lib")

void main()
{
HANDLE hprocesssnap;
PROCESSENTRY32 pe32={0};

hprocesssnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);

if(hprocesssnap == (HANDLE)-1 ){
printf("\n创建快照失败!\n");
return ;
}

pe32.dwSize = sizeof(PROCESSENTRY32);

printf("\n进程名字 进程PID\n");

if(Process32First(hprocesssnap,&pe32)){
char a[5];
do{
itoa(pe32.th32ProcessID,a,10);
//第一个参数要转换的数字
//第2个参数要写入数据的目标字符串
//第3个参数转移数字所用的基数
//10:10进制 2:2进制
printf("%s%-14d\n",pe32.szExeFile,pe32.th32ProcessID);
}while(Process32Next(hprocesssnap,&pe32))
}
else{
printf("\nProcess32First()函数出错:%d",GetLastError());
}
CloseHandle(hprocesssnap);
return ;

}


//为什么总报错呢??? 是不是少了什么库文件啊??


------解决方案--------------------
#include "Tlhelp32.h"
#include "windows.h"
这两个头文件顺序是否有问题,可以先试试.
然后是你在win32控制台使用#include "windows.h"可能会有问题.
http://download.csdn.net/detail/xiaohuh421/2879513
------解决方案--------------------
lz说的报错是什么报错?
看代码有如下问题:
1、windows.h 与 Tlhelp32.h 需要换个顺序
2、使用了 itoa,需要include stdlib.h
3、 do...while 的 while(Process32Next(hprocesssnap,&pe32)) 后面少了个分号