tags:

views:

42

answers:

1

We have some services that need to use sound output functionality. SoundPlayer won't play sounds while the application is running as a service on Windows 7. It will on Server 2003. Don't ask me why. This may have been deliberate on somebody's part at Microsoft, but ...

So, we thought we'd use interop to the waveOut functions. That works fine on 32 bit systems, and it works fine if the executable is set to compile x86. However, on 64 bit Windows 7 it won't work if the project is set to "Any CPU".

I can see three possible problems:

First, I don't know if there is a native winmm.dll on 64 bit systems, or if the system always uses winmm using WOW64. If it is using WOW64 I don't know if standard interop works as usual.

Second, there is a native 64 bit winmm, but our interop code is picking up the the 32 bit version. If there is a way to specify use of the 64 bit version I don't know what it is.

Finally, it may just be a DllImport signature error on our part. I've looked, but I'm not seeing it.

Does anybody have any experience with this?

A: 

I've been bothering with the above issue as well and would love to know anything related to that. Thanks.

wuhsi