direct x sdk not working like it should in vb 2005

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

does anyone knpo why this code throws a runtime error saying unable to do
this managed code in this sense becayuse iot could hang


''Global Variable

Dim song as Audio ''direct x dll already imported




''inside of a button click event and "with openfiledialog1" statement



song.open(.filename)
''that doesnt work so i tried this

song = Audio.FromFile(.filename)
''Also doesnt work, throws same error

song = New Audio(.filename) ''also doesnt work....heres the error it throws
at runtime




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.

any help would be awsome because it worked fine in VB2003

-iwdu
 
iwdu15 said:
does anyone knpo why this code throws a runtime error saying unable
to do this managed code in this sense becayuse iot could hang


''Global Variable

Dim song as Audio ''direct x dll already imported




''inside of a button click event and "with openfiledialog1"
statement



song.open(.filename)
''that doesnt work so i tried this

song = Audio.FromFile(.filename)
''Also doesnt work, throws same error

song = New Audio(.filename) ''also doesnt work....heres the error it
throws at runtime




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.

any help would be awsome because it worked fine in VB2003

-iwdu




No solution, but:

http://msdn2.microsoft.com/en-us/library/ms172219.aspx

also:
http://msdn2.microsoft.com/en-us/library/d21c150d(en-US,VS.80).aspx
(section "Enabling and Disabling MDAs")

also:
microsoft.public.win32.programmer.directx.managed



Armin
 

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

Back
Top