how to play MP3 files

A

Andrew

Hi,

I need to play MP3 files from my .NET 2.0 SP1 C# WinForm app.

I tried referencing Microsoft.DirectX.AudioVideoPlayback; and creating Audio
class for playback. But I get the following error which is beyod my ability
to comprehend.

[
DLL
'C:\WINDOWS\assembly\GAC\Microsoft.DirectX\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.dll'
is attempting managed execution inside OS Loader lock. Do not attempt to run
managed code inside a DllMain or image initialization function since doing
so can cause the application to hang.
]

How do I do this. Please help.

- Andrew
 
R

Reuben

Try using creating an instance of the Windows Media Player ActiveX object. If
you Google for something along those lines, you should find plenty of
examples.
If you have troubles with the implementation, I recommend you start by
embedding it in a form, then create and use it exclusively in code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top