473,394 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

direct x sdk not working like it should in vb 2005

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.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 awsome because it worked fine in VB2003

-iwdu


Nov 23 '05 #1
1 2100
"iwdu15" <iw****@discussions.microsoft.com> schrieb
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.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 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/lib...US,VS.80).aspx
(section "Enabling and Disabling MDAs")

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

Armin

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jmays | last post by:
Dev Direct June 2005 News Round Up http://www.devdirect.com/content/newsletters/dev200506.htm Dev Direct provides an authoritative and up-to-date catalog of 1000's of developer tools and...
0
by: jmays | last post by:
Dev Direct July 2005 News Round Up http://www.devdirect.com/content/newsletters/dev200507.htm Dev Direct provides an authoritative and up-to-date catalog of 1000's of developer tools and...
0
by: jmays | last post by:
Dev Direct September 2005 News Round Up http://www.devdirect.com/content/newsletters/dev200509.htm Dev Direct provides an authoritative and up-to-date catalog of 1000's of developer tools and...
10
by: Alex Greem | last post by:
Dear all, Our database (DB2 Workgroup 7.2 FP12) is constantly under heavy load. Most time CPU usage (1 Pentium3 1Ghz) is more 50% busy. We have 3GB RAM memory Our normal workload is 200-300...
1
by: Mike | last post by:
Hi We are new to the world of ASP Development and I have a simple question - we are starting a test development in ASP 2.0 Beta and we are building an application using a Direct Connection to...
0
by: jmays | last post by:
Dev Direct November 2005 News Round Up http://www.devdirect.com/content/newsletters/dev200511.htm Dev Direct provides an authoritative and up-to-date catalog of 1000's of developer tools and...
3
by: mike | last post by:
I added a linked server successfully; but the only tables accessible are only the system tables! I do have all the rights on both servers (Windows & SQL server). All the non system tables are...
0
by: IT Recruiter | last post by:
*Very Urgent Rek - SQL Server DBA from Direct Client: Full time* @ New Jersey ***Please send your resumes IMMEDIATELY to nslakshmi@eprocorp.com*** Job Title: SQL Server Developer with...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.