• Advertisement
Sign in to follow this  

directx in console?

This topic is 4515 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

Advertisement
It should be possible to use DirectSound in a console application.

Share this post


Link to post
Share on other sites
the problem is that I need HWND to set Cooperative Level.
how do i get this from my console app or can i skip it?

if(FAILED(DirectSoundCreate8(NULL, &g_pDSound, NULL))) return false;
g_pDSound->SetCooperativeLevel(hWnd, DSSCL_PRIORITY);

Share this post


Link to post
Share on other sites
Quote:
Original post by davethebrave
the problem is that I need HWND to set Cooperative Level.
how do i get this from my console app or can i skip it?

if(FAILED(DirectSoundCreate8(NULL, &g_pDSound, NULL))) return false;
g_pDSound->SetCooperativeLevel(hWnd, DSSCL_PRIORITY);

You can always create a window, but just not show it. This will give you an HWND, but the window still won't appear. I do this for D3D console applications where I am only processing data using the GPU.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement