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
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)