Click here to Skip to main content
13,091,248 members (50,033 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
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.

How can I use it?
Posted 14-Mar-10 5:48am
Updated 14-Mar-10 13:33pm
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Google is your friend[^]

Always Google for the answer before posting. It saves everyone time.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

Debug-->Exceptions-->managed debugging assistances-->Loader Lock(uncheck thrown)
  Permalink  
Comments
Member 11151914 14-Oct-14 6:04am
   
Thank yoooooooooooooooooooooooooooooooooooooooooooooooooou
Member 12061506 30-Oct-15 11:36am
   
I am using 2008 and i have unchecked the loader Lock, then it says, Error in the Application.

The problem comes
Dim videoFile As Video = New Video("C:\Users\dlp\Downloads\Video\How to Initially Configure a Cisco Switch Tutorial - YouTube.mp4", False)
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

In reference to Rob Graham: Hmmm, I googled this "attempting managed execution inside OS Loader lock" problem and found this answer in CodeProject!!!!!


Anyway, I had the error message on another third product DLL. My program had been compiling and working fine. Then I did a full build and got this error the next run. I restored all source code from backups and still received the error!


The real problem: During my testing of a module, I turned on Exception handling to wake up the debugger when the exception is first thrown. The next time I did a full compile, everything had this option set. The third party DLL was throwing this error, catching and handling it but when I turned on this exception option, then the debugger woke up.

The solution: set Exceptions back to normal.

Had I run the compiled program without the debugger I think it would have worked.

-rwg
  Permalink  
Comments
Member 10785068 11-Jun-14 8:35am
   
i dont have it in vs2012 web express what can i do

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 10 Apr 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100