Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Can't figure out these compile errors.

Can't figure out these compile errors.

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpvisual-studiotutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    redeemer
    wrote on last edited by
    #1

    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.

    D 1 Reply Last reply
    0
    • R redeemer

      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.

      D Offline
      D Offline
      Daniel Lohmann
      wrote on last edited by
      #2

      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 )

      R 1 Reply Last reply
      0
      • D Daniel Lohmann

        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 )

        R Offline
        R Offline
        redeemer
        wrote on last edited by
        #3

        Thankyou! Solved it all!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups