对于相应的头文件,库文件我好像都加了,可是还是有错。怎么回事啊。大家帮我看看BOOL GetFilterDescription
(
LPWAVEFILTER pwfltr,
LPTSTR pszFilterTag,
LPTSTR pszFilter
)
{
MMRESULT mmr;
// Retrieve the name for the filter tag of the specified filter.
if (NULL != pszFilterTag) {
ACMFILTERTAGDETAILS aftd;
// Initialize all unused members of the ACMFILTERTAGDETAILS
// structure to zero.
memset(&aftd, 0, sizeof(aftd));
// Fill in the required members of the ACMFILTERTAGDETAILS
// structure for the ACM_FILTERTAGDETAILSF_FILTERTAG query.
aftd.cbStruct = sizeof(aftd);
aftd.dwFilterTag = pwfltr->dwFilterTag;
// Ask the ACM to find the first available driver that
// supports the specified filter tag.
mmr = acmFilterTagDetails(NULL, &aftd,
ACM_FILTERTAGDETAILSF_FILTERTAG);
if (MMSYSERR_NOERROR != mmr) {
// No ACM driver is available that supports the
// specified filter tag.
return (FALSE);
}
// Copy the filter tag name into the calling application's
// buffer.
lstrcpy(pszFilterTag, aftd.szFilterTag);
}
// Retrieve the description of the attributes for the specified
// filter.
if (NULL != pszFilter) {
ACMFILTERDETAILS afd;
// Initialize all unused members of the ACMFILTERDETAILS
// structure to zero.
memset(&afd, 0, sizeof(afd));
// Fill in the required members of the ACMFILTERDETAILS
// structure for the ACM_FILTERDETAILSF_FILTER query.
afd.cbStruct = sizeof(afd);
afd.dwFilterTag = pwfltr->dwFilterTag;
afd.pwfltr = pwfltr;
afd.cbwfltr = pwfltr->cbStruct;
// Ask the ACM to find the first available driver that
// supports the specified filter.
mmr = acmFilterDetails(NULL, &afd, ACM_FILTERDETAILSF_FILTER);
if (MMSYSERR_NOERROR != mmr) {
// No ACM driver is available that supports the
// specified filter.
return (FALSE);
}
// Copy the filter attributes description into the calling
// application's buffer.
lstrcpy(pszFilter, afd.szFilter);
}
return (TRUE);
}
(
LPWAVEFILTER pwfltr,
LPTSTR pszFilterTag,
LPTSTR pszFilter
)
{
MMRESULT mmr;
// Retrieve the name for the filter tag of the specified filter.
if (NULL != pszFilterTag) {
ACMFILTERTAGDETAILS aftd;
// Initialize all unused members of the ACMFILTERTAGDETAILS
// structure to zero.
memset(&aftd, 0, sizeof(aftd));
// Fill in the required members of the ACMFILTERTAGDETAILS
// structure for the ACM_FILTERTAGDETAILSF_FILTERTAG query.
aftd.cbStruct = sizeof(aftd);
aftd.dwFilterTag = pwfltr->dwFilterTag;
// Ask the ACM to find the first available driver that
// supports the specified filter tag.
mmr = acmFilterTagDetails(NULL, &aftd,
ACM_FILTERTAGDETAILSF_FILTERTAG);
if (MMSYSERR_NOERROR != mmr) {
// No ACM driver is available that supports the
// specified filter tag.
return (FALSE);
}
// Copy the filter tag name into the calling application's
// buffer.
lstrcpy(pszFilterTag, aftd.szFilterTag);
}
// Retrieve the description of the attributes for the specified
// filter.
if (NULL != pszFilter) {
ACMFILTERDETAILS afd;
// Initialize all unused members of the ACMFILTERDETAILS
// structure to zero.
memset(&afd, 0, sizeof(afd));
// Fill in the required members of the ACMFILTERDETAILS
// structure for the ACM_FILTERDETAILSF_FILTER query.
afd.cbStruct = sizeof(afd);
afd.dwFilterTag = pwfltr->dwFilterTag;
afd.pwfltr = pwfltr;
afd.cbwfltr = pwfltr->cbStruct;
// Ask the ACM to find the first available driver that
// supports the specified filter.
mmr = acmFilterDetails(NULL, &afd, ACM_FILTERDETAILSF_FILTER);
if (MMSYSERR_NOERROR != mmr) {
// No ACM driver is available that supports the
// specified filter.
return (FALSE);
}
// Copy the filter attributes description into the calling
// application's buffer.
lstrcpy(pszFilter, afd.szFilter);
}
return (TRUE);
}
我想你们把这行代码copy过去,然后编译一下,就知道我为什么问这个问题了。也不用问那么多。这样不是很麻烦吧,总比你们说一些无用的建议好吧。
谢绝无任何建设性的回复。
#include "MMREG.H"
#include "MMSYSTEM.H"
#include "MSACM.H"
d:\vcStudy\kk\MainFrm.h(46): error C2061: 语法错误 : 标识符“LPWAVEFILTER”怎么解决!!!!!
#include "MMSYSTEM.H"
#include "MSACM.H"
应该可以
#include "MMREG.H"
#include "MMSYSTEM.H"
#include "MSACM.H"我用了这几个文件,编译正常,你把错误贴出来嘛
d:\vcStudy\kk\MainFrm.h(46): error C2061: 语法错误 : 标识符“LPWAVEFILTER”要有mmreg.h顺便看看你的mmreg.h中有没有以下定义
typedef WAVEFILTER FAR *LPWAVEFILTER;