HighTechTalks DotNet Forums  

'LoaderLock' Issue

Dotnet Framework (CLR) microsoft.public.dotnet.framework.clr


Discuss 'LoaderLock' Issue in the Dotnet Framework (CLR) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
mohan (AT) tek (DOT) com
 
Posts: n/a

Default 'LoaderLock' Issue - 05-24-2006 , 01:38 AM






Hi all,

I have ported my VB.Net project from VS2003 to VS2005. I am using some
unmanaged code in my project. while running my application,Iam getting
the following error

"Managed Debugging Assistant 'LoaderLock' has detected a problem in
'F:\VBSource\bin\Debug\TekRobo.exe'.
Additional Information: DLL 'F:\VBSource\bin\Debug\Tekspyhook.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 to resolve the above Issue?

it would be greatful ,if any one help me to resolve ..
issues.
Thanks
Mohan


Reply With Quote
  #2  
Old   
Barry Kelly
 
Posts: n/a

Default Re: 'LoaderLock' Issue - 05-24-2006 , 02:41 AM






"mohan (AT) tek (DOT) com" <mohan (AT) tek (DOT) com> wrote:

Quote:
"Managed Debugging Assistant 'LoaderLock' has detected a problem in
'F:\VBSource\bin\Debug\TekRobo.exe'.
Additional Information: DLL 'F:\VBSource\bin\Debug\Tekspyhook.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 to resolve the above Issue?
Move the managed code in the DLL out of DllMain, into some routine that
you can call later to initialize the DLL.

-- Barry

--
http://barrkel.blogspot.com/


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.