Solved

DirectSoundEnumerate

Posted on 1998-07-08
6
372 Views
Last Modified: 2013-12-03
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!
0
Comment
Question by:overworked
  • 4
  • 2
6 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 1409670
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?
0
 

Author Comment

by:overworked
ID: 1409671
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.
0
 

Author Comment

by:overworked
ID: 1409672
Oops, in previous text substitute 'method to accomplish a DirectSoundEnumerate' with text 'method to accomplish a DirectSoundCreate'.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:overworked
ID: 1409673
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.

0
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1409674
That's easy to accomplish. Use LoadLibrary to load the dsound.dll. If sucessful, use GetProcAddress to get the function pointer. Note the actual function names are DirectSoundEnumerateA (ANSI version) and DirectSoundEnumerateW (Unicode version).
0
 

Author Comment

by:overworked
ID: 1409675
I know, I know :)

0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA Import all database objects 12 52
Vb.Net Loading Word 11 103
Problem to DocumentFormat 8 95
Need more details 5 153
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question