I am trying to have a server program that runs at startup and accepts several
commands from the clients. One of the commands is to play an audio file. I am
using Microsoft.DirectX.AudioVideoPlayback.Audio class for that purpose.
My problem is whenever I send a command to the program windows gives an
error related to the directX, and shuts down the program. However if I run
the program manually after the startup it works just fine. I have placed a
registry file under
MyComputer\HKEY_LOCAL_MACHINE\Software\Microsoft\W indows\CurrentVersion\Run
subkeys. I have tried putting my program to sleep, using
Microsoft.DirectX.AudioVideoPlayback.Audio everytime I use the class instead
of a Header file, but none worked. Is there a way to overcome this problem?