Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERR trying to load audio file VB.NET 2005

Status
Not open for further replies.

arkomnv

Programmer
May 22, 2006
14
BE
TO play audio file's in 2005 !!!

I'm rewriteing a prog from 2003 to 2005 and adding some functions to the prog but a piece of code that was working in 2003 now gives a error message:
LoaderLock was detected
Message: 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.

I get the message on this code:
I'm using Microsoft.DirectX.AudioVideoPlayback
Code:
'declaration
Public WithEvents objAudio1 As Audio

'load a audio file on path filename
objAudio1 = New Audio(FileName, False)

 
As you are using 2k5 edition, then take alook at MY namespace. I think My.Computer.Audio ...
 
Thx but this wont work the my.computer.audio.play object is only good for playing .wav files


I would like to play all audio files like .mp3 , .wav , .midi ,...


Does someone now the error or could someone give me an other way of playing all kinds of audio files in 2005

my intensions are to create a database full of music files on your hd and a user can play 2 audio files at the same time and adjust sound,... . They also can create a playlist for the musicfiles in the database

I have made a progr in 2003 that does something a like with the code mentiont above but i would like to make it in 2005 now with some upgrading of the options and controls.
 
Nevermind the problem i have solved it !!!!

the directX reference has 2 types 1. and 2. that was the problem


but THX anyway
 
The next thing that comes across my mind is to launch the file:
system.Diagnostics.Process.Start(...)

Also you could use a com object like media player
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top