错误代码
void CWaveAudio::Close(void)
{
m_bRecording=FALSE;
m_bOpened=FALSE; if(m_wDeviceID){//下面两行出错
mciSendCommand(m_wDeviceID,MCI_STOP,MCI_WAIT,NULL);
mciSendCommand(m_wDeviceID,MCI_CLOSE,NULL,NULL);
}
m_wDeviceID=0;
}
错误信息;
WavePlayer error LNK2019: 无法解析的外部符号 __imp__mciSendCommandA@16 ,该符号在函数 "public: int __thiscall CWaveAudio::Load(class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > >)" (?Load@CWaveAudio@@QAEHV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z) 中被引用
g:\1学习资料\C++工程\WavePlayer\WaveAudio.cpp(105): warning C4244: “return” : 从“DWORD_PTR”转换到“DWORD”,可能丢失数据
g:\1学习资料\C++工程\WavePlayer\WaveAudio.cpp(122): warning C4311: “类型转换” : 从“LPVOID”到“DWORD”的指针截断
头文件#include "afxwin.h"
#include "mmsystem.h"