Direct X SDK Audio Playback error in VB8 not VB7

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

Guest

hi, im using the Direct X SDK AudioVideoPlayback to play back MP3s, and it
worked fine in VB7, but when i try to use it in VB 8, it throws errors on
this code

//Global Declaration
Private song as Audio

//Inside of an event, i try to set the file to play from

//Doesnt Work
song.Open(.filename) //filename is a filename from an openfiledialog box

//Doesnt Work
song = Audio.FromFile(.filename) //filename same as above

says i cant use managed code like this bc itl hang the program....then how
can i get around this?
 
iwdu15 said:
hi, im using the Direct X SDK AudioVideoPlayback to play back MP3s, and it
worked fine in VB7, but when i try to use it in VB 8, it throws errors on
this code

//Global Declaration
Private song as Audio

//Inside of an event, i try to set the file to play from

//Doesnt Work
song.Open(.filename) //filename is a filename from an openfiledialog
box

//Doesnt Work
song = Audio.FromFile(.filename) //filename same as above

says i cant use managed code like this bc itl hang the program....then how
can i get around this?

Could you post the complete error message? Is it a runtime or compile time
error?
 
hi, its a runtime error when i attempt to open a file after already declaring
the variable...heres the error
--

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 great, thanks

-iwdu15
 
Back
Top