Can't figure out these compile errors.
-
I'm making a list of all the available audio decoders in the system by calling
acmDriverEnum
, but i get some compile errors that i can't figure out how to get rid of, here's the callback prototype:BOOL ACMDRIVERENUMCB listCallback(HACMDRIVERID hadid, DWORD dwInstance, DWORD fdwSupport);
and here's the callback function (not finished yet, i just want it to compile):
BOOL ACMDRIVERENUMCB listCallback(HACMDRIVERID hadid, DWORD dwInstance, DWORD fdwSupport)
{
if (fwdSupport == ACMDRIVERDETAILS_SUPPORTF_CODEC)
{
ACMDRIVERDETAILS details;acmDriverDetails(hadid, &details, 0); }
}
these are the compile errors i get:
e:\mp3organizer\convertaudio\main.h(5) : error C2146: syntax error : missing ';' before identifier 'listCallback' e:\mp3organizer\convertaudio\main.h(5) : error C2377: 'ACMDRIVERENUMCB' : redefinition; typedef cannot be overloaded with any other symbol e:\program files\microsoft visual studio\vc98\include\msacm.h(250) : see declaration of 'ACMDRIVERENUMCB' e:\mp3organizer\convertaudio\main.h(5) : fatal error C1004: unexpected end of file found
All help appreciated, thankyou. -
I'm making a list of all the available audio decoders in the system by calling
acmDriverEnum
, but i get some compile errors that i can't figure out how to get rid of, here's the callback prototype:BOOL ACMDRIVERENUMCB listCallback(HACMDRIVERID hadid, DWORD dwInstance, DWORD fdwSupport);
and here's the callback function (not finished yet, i just want it to compile):
BOOL ACMDRIVERENUMCB listCallback(HACMDRIVERID hadid, DWORD dwInstance, DWORD fdwSupport)
{
if (fwdSupport == ACMDRIVERDETAILS_SUPPORTF_CODEC)
{
ACMDRIVERDETAILS details;acmDriverDetails(hadid, &details, 0); }
}
these are the compile errors i get:
e:\mp3organizer\convertaudio\main.h(5) : error C2146: syntax error : missing ';' before identifier 'listCallback' e:\mp3organizer\convertaudio\main.h(5) : error C2377: 'ACMDRIVERENUMCB' : redefinition; typedef cannot be overloaded with any other symbol e:\program files\microsoft visual studio\vc98\include\msacm.h(250) : see declaration of 'ACMDRIVERENUMCB' e:\mp3organizer\convertaudio\main.h(5) : fatal error C1004: unexpected end of file found
All help appreciated, thankyou.Without taking a look at the code in MSDN or windows headers, I assume that ACMDRIVEREENUMCB is the typedef for the callback function type. (The type for a pointer to the callback function.) Try BOOL WINAPI myCallback (HACMDRIVERID hadid, DWORD dwInstance, DWORD fdwSupport) instead of. -- Daniel Lohmann http://www.losoft.de (Hey, this page is worth looking! You can find some free and handy NT tools there :-D )
-
Without taking a look at the code in MSDN or windows headers, I assume that ACMDRIVEREENUMCB is the typedef for the callback function type. (The type for a pointer to the callback function.) Try BOOL WINAPI myCallback (HACMDRIVERID hadid, DWORD dwInstance, DWORD fdwSupport) instead of. -- Daniel Lohmann http://www.losoft.de (Hey, this page is worth looking! You can find some free and handy NT tools there :-D )