早教吧 育儿知识 作业答案 考试题库 百科 知识分享

关于waveOutOpen()的用法问题我在用MFC编程,当我用到语句:waveOutOpen(&hWaveOut,WAVEMAPPER,&waveFormatEx,(unsignedlong)waveOutProc,0L,CALLBACKFUNCTION)编译后却得到:errorC2440:'typecast':cannotconver

题目详情
关于waveOutOpen() 的用法问题我在用MFC 编程,当我用到语句:waveOutOpen(&hWaveOut,WAVE_MAPPER,&waveFormatEx,(unsigned long)waveOutProc,0L,CALLBACK_FUNCTION) 编译后却得到: error C2440: 'type cast' : cannot convert from 'void (__stdcall CExchange::*)(struct HWAVEOUT__ *,unsigned int,unsigned short,struct wavehdr_tag *,unsigned long)' to 'unsigned long' Conversion is a valid standard conversion, which can be performed implicitly or by use of static_cast, C-style cast or function-style cast 的错误, 请问这是怎么的? 该怎么解决?
▼优质解答
答案和解析
回调函数必须定义为static ======================== 请问你有coredll.lib这个库文件吗? 如果你有的话你需要把这个LIB复制到VC目录的LIB目录里面 ======================= 没这个LIB那不行啊……缺少LIB文件根...