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> driver : HACMDRIVER;<br> details : TACMDRIVERDETAILS;<br> i : integer;<br> fmtDetails : TACMFORMATTAGDETAILS;<br>begin<br> if (fdwSupport and ACMDRIVERDETAILS_SUPPORTF_CODEC) <> 0 then<br> begin<br> details.cbStruct := sizeof(TACMDRIVERDETAILS);<br> acmDriverDetails(hadid, details, 0);<br> acmDriverOpen(driver, hadid, 0);<br> for i := 0 to details.cFormatTags - 1 do<br> begin<br> ZeroMemory(@fmtDetails, sizeof(fmtDetails));<br> fmtDetails.cbStruct := sizeof(TACMFORMATTAGDETAILS);<br> fmtDetails.dwFormatTagIndex := i;<br> acmFormatTagDetails(driver, fmtDetails, ACM_FORMATTAGDETAILSF_INDEX);<br> if (fmtDetails.dwFormatTag = WAVE_FORMAT_MPEGLAYER3) then inc(g_mp3Drivers);<br> end;<br> acmDriverClose(driver, 0);<br> end;<br> Result := true;<br>end;