我编译这个函数,有几个未知类型的错误,应该声明哪几个单元啊?(40分)

  • 主题发起人 主题发起人 mazheng
  • 开始时间 开始时间
M

mazheng

Unregistered / Unconfirmed
GUEST, unregistred user!
我编译这个函数,有几个未知类型的错误,应该声明哪几个单元啊?<br>//-----------------------------------------------------------------------------------<br><br>[Error] MainUnit.pas(60): Undeclared identifier: 'HACMDRIVERID'<br>[Error] MainUnit.pas(62): Undeclared identifier: 'HACMDRIVER'<br>[Error] MainUnit.pas(63): Undeclared identifier: 'TACMDRIVERDETAILS'<br>[Error] MainUnit.pas(65): Undeclared identifier: 'TACMFORMATTAGDETAILS'<br>[Error] MainUnit.pas(67): Undeclared identifier: 'ACMDRIVERDETAILS_SUPPORTF_CODEC'<br>[Error] MainUnit.pas(69): Missing operator or semicolon<br>[Error] MainUnit.pas(70): Undeclared identifier: 'acmDriverDetails'<br>[Error] MainUnit.pas(71): Undeclared identifier: 'acmDriverOpen'<br>[Error] MainUnit.pas(72): 'DO' expected but identifier 'cFormatTags' found<br>[Error] MainUnit.pas(75): Missing operator or semicolon<br>[Error] MainUnit.pas(76): Missing operator or semicolon<br>[Error] MainUnit.pas(77): Undeclared identifier: 'acmFormatTagDetails'<br>[Error] MainUnit.pas(77): Undeclared identifier: 'ACM_FORMATTAGDETAILSF_INDEX'<br>[Error] MainUnit.pas(78): ')' expected but identifier 'dwFormatTag' found<br>[Error] MainUnit.pas(100): Statement expected but 'PROCEDURE' found<br><br>//--------------------------------------------------------------------------------<br><br><br><br>function acmDriverEnumCallback(hadid: HACMDRIVERID; dwInstance: DWORD; fdwSupport: DWORD): BOOL; stdcall;<br>var<br>&nbsp; driver &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: HACMDRIVER;<br>&nbsp; details &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : TACMDRIVERDETAILS;<br>&nbsp; i &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : integer;<br>&nbsp; fmtDetails &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: TACMFORMATTAGDETAILS;<br>begin<br>&nbsp; if (fdwSupport and ACMDRIVERDETAILS_SUPPORTF_CODEC) &lt;&gt; 0 then<br>&nbsp; begin<br>&nbsp; &nbsp; details.cbStruct := sizeof(TACMDRIVERDETAILS);<br>&nbsp; &nbsp; acmDriverDetails(hadid, details, 0);<br>&nbsp; &nbsp; acmDriverOpen(driver, hadid, 0);<br>&nbsp; &nbsp; for i := 0 to details.cFormatTags - 1 do<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; ZeroMemory(@fmtDetails, sizeof(fmtDetails));<br>&nbsp; &nbsp; &nbsp; fmtDetails.cbStruct := sizeof(TACMFORMATTAGDETAILS);<br>&nbsp; &nbsp; &nbsp; fmtDetails.dwFormatTagIndex := i;<br>&nbsp; &nbsp; &nbsp; acmFormatTagDetails(driver, fmtDetails, ACM_FORMATTAGDETAILSF_INDEX);<br>&nbsp; &nbsp; &nbsp; if (fmtDetails.dwFormatTag = WAVE_FORMAT_MPEGLAYER3) then inc(g_mp3Drivers);<br>&nbsp; &nbsp; end;<br>&nbsp; &nbsp; acmDriverClose(driver, 0);<br>&nbsp; end;<br>&nbsp; Result := true;<br>end;
 
都市ACM啊,一般是msacm.pas,添加或下载!
 
我按照 wql 朋友说的,在工程里添加了 msacm.pas,编译后,还有个类型错误 <br>[Error] MainUnit.pas(78): Undeclared identifier: 'WAVE_FORMAT_MPEGLAYER3'<br><br>怎么办啊 &nbsp;谢谢
 
这个程序估计是C语言转换的,找一下原始C里面的WAVE_FORMAT_MPEGLAYER3变量!
 
后退
顶部