By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,156 Members | 989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,156 IT Pros & Developers. It's quick & easy.

Direct X SDK Audio Playback error in VB8 not VB7

P: n/a
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
Nov 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"iwdu15" <iw****@discussions.microsoft.com> schrieb:
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?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #2

P: n/a
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.290 2.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
Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.