Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

loseredkimo

A problem for IDirectSound8

This topic is 5542 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When I use IDirectSound8::SetCooperativeLevel(); always have problem... I show my source code... ---------------------------------------------- #include <iostream> #include <tchar.h> #include <windows.h> #include <dmusici.h> using namespace std; IDirectSound8* g_pDS = NULL; int _tmain(int argc, _TCHAR* argv[]) { CoInitialize( 0 ); if( FAILED( DirectSoundCreate8( NULL, &g_pDS, NULL ) ) ) { MessageBox( NULL, "Unable to create!!", "Error", MB_OK ); return 0; } if( FAILED( g_pDS->SetCooperativeLevel(NULL,DSSCL_NORMAL) ) ) { MessageBox( NULL, "can''t setCooperative","Error",MB_OK ); return 0; } return 0; } ----------------------------------------------------------- But it always has error for g_pDS->SetCooperativeLevel(); How do I do?? P.S. I have include libraries: dsound.lib & dxguid.lib

Share this post


Link to post
Share on other sites
Advertisement
My guess is your passing a null window handle? I don''t really know much about DSound. I recommend you check the DirectX docs for details on the SetCooperativeLevel().

Nine times out of ten, DSERR_INVALIDPARAM means you''re asking DirectX to do something that just doesn''t make any sense in DX''s world. Like enabling multi-sampling on a 3d card that doesn''t support it.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!