I'm alittle stumped here... I'm trying to play an MP3 file with directx in vb 2005 express, it worked fine in vs 2003, but seems to not want to work in this version of VB :/
Heres what it says...
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.
heres where the error occures:
Dim
tempAudio As AudiotempAudio =
New Audio(fileOpen.FileName)That code is being executed when you click a button...
I have no clue whats going on, could someone please help me I've searched around about this loaderlock stuff but I'm stumped lol.
Thanks.

LoaderLock was Detected?
BURNxOUTx112
I hope this helps.Take care.
armin99
thanx alot mate... you saved me alot of effort :S.. :D
ZenX
Moldavia
Something *very* odd is going on then.
If you didn't have a reference before then it would not have compiled, even stranger if you didn't have a reference then you could not have got the error about the loader lock being in "DLL 'C:\WINDOWS\assembly\GAC\Microsoft.DirectX\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.dll' " becuase it won't load any DLLs that are not referenced.
I'm glad you solved it but if you are using VS2005 with the MDX 1.1 assemblies then this debugging aid can and usually does show up eventually until you disable it for that solution as Peter explained http://www.thezbuffer.com/articles/304.aspx
UnkName
Thus, you have to pay attention to the version number when adding Microsoft.DirectX -- make sure it says version 2.0.0.0 or higher!
Andre Bretas
Hmm ok so if I understand this correctly, I'd have to switch back to vs2003 If so that stinks lol...
Accualy I may have found a solution, seems that when you upgrade a 2003 project to 2005 it will work. Still have no clue why it works but w/e xD
Edit:
Well now I feel really stupid. The reason it kept giving me the loaderlock was because I forgot to add a refrence to "Microsoft.Directx" lol Just FYI for anyone else who gets the same error with Directx in 2005 ;P
Nicholas Buse
Tbia rules...
In a little while I will move this to the Direct-X forum...OK
LordWilson
Seemit
FYI. I tried using version 2 of Microsoft.DirectX but that caused another error so I used version 1.*** and chose false in the "Specific Version" property and that worked fine.