Link to home
Start Free TrialLog in
Avatar of overworked
overworked

asked on

DirectSoundEnumerate

My app uses waveout and if available directsound. If I link to dsound.lib and my app is run on a machine that does not have directx installed, user will receive 'dsound.dll not found message'. Therefore I would like to use COM interface so that I don't have to link to dsound.lib.

I only use two dsound.lib functions: DirectSoundCreate and DirectSoundEnumerate. I can use COM interface to do DirectSoundCreate but I don't know how to do DirectSoundEnumerate. Thanks for your help!
Avatar of chensu
chensu
Flag of Canada image

What do you mean? DirectSoundCreate and DirectSoundEnumerate are just normal functions, not COM interfaces. Why can't you do DirectSoundEnumerate while you can do DirectSoundCreate?
Avatar of overworked
overworked

ASKER

I can accomplish a DirectSoundCreate by doing a CoCreateInstance on the CLSID_DirectSound / IID_IDirectSound but there's no COM interface or method to accomplish a DirectSoundCreate. Therefore I need to extern it and link to dsound.lib which causes 'dsound.dll not found' message to appear when user does not have DX installed. However, I think I'll just dynamically link.
Oops, in previous text substitute 'method to accomplish a DirectSoundEnumerate' with text 'method to accomplish a DirectSoundCreate'.
Ignore, here's comment with out my error:

I can accomplish a DirectSoundCreate by doing a CoCreateInstance on the CLSID_DirectSound / IID_IDirectSound but there's no COM interface or method to accomplish a DirectSoundEnumerate. Therefore I need to extern it and link to dsound.lib which causes 'dsound.dll not found' message to appear when user does not have DX installed. However, I think I'll just dynamically link.

ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I know, I know :)