有没有那位用过<tlhelp32.h>里面的 CreateToolhelp32Snapshot() ?
MSDN里的原型 HANDLE WINAPI CreateToolhelp32Snapshot(
DWORD dwFlags,
DWORD th32ProcessID
);
以下语句
HANDLE hModuleSnap=::CreateToolhelp32Snapshot(TH32CS_SNAPMODULE,0);//0指示为本进程的模块
调用该函数后,编译出错:
--------------------Configuration: ModuleShow - Win32 Debug--------------------
Compiling...
ModuleShow.cpp
d:\program files\vc98\include\tlhelp32.h(24) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
d:\program files\vc98\include\tlhelp32.h(24) : error C2501: 'HANDLE' : missing storage-class or type specifiers
d:\program files\vc98\include\tlhelp32.h(24) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
ModuleShow.obj - 3 error(s), 0 warning(s)
编译环境 VC++ 6.0