为了账号安全,请及时绑定邮箱和手机立即绑定

我实在是想不通就这样调用也会编译不通过。求高手指点迷津啊!

我实在是想不通就这样调用也会编译不通过。求高手指点迷津啊!

PIPIONE 2022-09-03 14:10:37
我用的VC6.0 下面是我的代码:void CAsdfasdfDlg::OnButton1(){// TODO: Add your control notification handler code hereHANDLE h=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);}错误提示:ompiling...asdfasdfDlg.cppC:\Program Files\Microsoft Visual Studio\MyProjects\进程查找\asdfasdf\asdfasdfDlg.cpp(176) : error C2065: 'CreateToolhelp32Snapshot' : undeclared identifierC:\Program Files\Microsoft Visual Studio\MyProjects\进程查找\asdfasdf\asdfasdfDlg.cpp(176) : error C2065: 'TH32CS_SNAPPROCESS' : undeclared identifierC:\Program Files\Microsoft Visual Studio\MyProjects\进程查找\asdfasdf\asdfasdfDlg.cpp(176) : error C2440: 'initializing' : cannot convert from 'int' to 'void *'Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style castError executing cl.exe.asdfasdf.exe - 3 error(s), 0 warning(s)
查看完整描述

1 回答

?
梦里花落0921

TA贡献1772条经验 获得超6个赞

CreateToolhelp32Snapshot
Requirements
Minimum supported clientWindows XP [desktop apps only]
Minimum supported serverWindows Server 2003 [desktop apps only]
Header TlHelp32.h
Library Kernel32.lib
DLL Kernel32.dll
_______

有没有包含头文件TlHelp32.h?

查看完整回答
反对 回复 2022-09-06
  • 1 回答
  • 0 关注
  • 84 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信