Message from discussion
"Managed Debugging Assistant 'LoaderLock' has detected a problem in
From: "Greg Young" <druckdruckREMOVEgo...@hotmail.com>
References: <1149489172.672028.192690@i39g2000cwa.googlegroups.com>
Subject: Re: "Managed Debugging Assistant 'LoaderLock' has detected a problem in
Date: Mon, 5 Jun 2006 06:18:54 -0400
Lines: 64
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original
Message-ID: <#Pw8mlIiGHA.4368@TK2MSFTNGP03.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.clr
NNTP-Posting-Host: c-67-191-181-37.hsd1.ga.comcast.net 67.191.181.37
Path: g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!msrtrans!TK2MSFTFEEDS01.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP03.phx.gbl
Problem 1: Are you using any other dlls? Basically it is saying that the
TekSpyHook DLL is accessing another DLL in its DLLMain which is a big no no.
Is this your own DLL or from somewhere else?
Problem 2: You can only access controls on the thread that they were created
on. You should be using Invoke/BeginInvoke in order to marshal operations on
controls back to the main thread. If you do a google on VB.NET control
invoke (or begininvoke) you can find a ton of articles .. here is one from
msdn mag
http://msdn.microsoft.com/msdnmag/issues/04/05/BasicInstincts/default.aspx.
Basically in 2.0 its alerting you that you have a threading problem where as
it did not in 1.x.
Cheers,
Greg Young
MVP - C#
http://geekswithblogs.net/gyoung
<mo...@tek.com> wrote in message
news:1149489172.672028.192690@i39g2000cwa.googlegroups.com...
> Hi all,
>
> I have ported my VB.Net project from VS2003 to VS2005. I am facing two
> issues while running my applications:
> Issue1:
> I am calling some managed dlls (developed in C#) from my Vb .net .
> Whne I
> debug the code,Iam getting the following Error message.
>
> "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 error?
>
> i ssue2:
>
> I am calling mainform instance (static variable) from other VB .net
> modules
> from the same projects.In VS2003 ,I did not face any issues. But in
> VS2005 ,I
> am getting the following exception. P.s I am running the application
> under
> thread.
>
> "A first chance exception of type 'System.InvalidOperationException'
> occurred in System.Windows.Forms.dll
> Additional information: Cross-thread operation not valid: Control
> 'StressTest' accessed from a thread other than the thread it was
> created on."
>
> it would be greatful ,if any one help me to resolve the above two
> issues.
> Thanks
> Mohan
> Was this
>