DirectSoundEnumerate help
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: DirectSoundEnumerate help

  1. #1
    Join Date
    Jul 2009
    Posts
    1

    DirectSoundEnumerate help

    Hi all,

    I'm new to directx programming and am trying to learn how to use directsound. For starters I want to enumerate the sound devices so I use the DirectSoundEnumerate function.

    I created a simple callback function (that does nothing). I get the following error (code listed afterwards):

    Code:
    error C3867: 'CAud4App::DSEnumProc': function call missing argument list; use '&CAud4App::DSEnumProc' to create a pointer to member
    on the following line:
    Code:
    DirectSoundEnumerate(DSEnumProc,(void*)NULL);
    DSEnumProc is:
    Code:
    BOOL CALLBACK DSEnumProc(LPGUID lpGUID, 
             LPCTSTR lpszDesc,
             LPCTSTR lpszDrvName, 
             LPVOID lpContext )
    Can anyone explain what I am doing wrong? Thanks

  2. #2
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: DirectSoundEnumerate help

    Is DSEnumProc a static function of CAud4App?

    Try this:
    Code:
    DirectSoundEnumerate(&CAud4App::DSEnumProc,(void*)NULL);
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  3. #3
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: DirectSoundEnumerate help

    Is DSEnumProc a static function of CAud4App?
    Not necessarily. VC++ 2005 generates error C3867, to avoid any ambiguity.
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center