.NET

Reply
*Ben Rand
Message 1 of 7 (223 Views)

MDA: LoaderLock

223 Views, 6 Replies
12-19-2005 04:28 PM
Painfully new to .NET, working with VS 2005, Autocad 2006. Previously
working through some simple stuff in VS 2003 and the projects were working
fine. Migrated the projects to 2005 and tried to run them in Debug and I get
this error repeatedly:

Message: 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.

Things run once I get through the messages, but I don't understand what I've
apparently missed. Thanks for any help.

Ben Rand
CAD Manager
CEntry Constructors & Engineers
brand@centry.net
*J. Daniel Smith
Message 2 of 7 (223 Views)

Re: LoaderLock

12-20-2005 05:24 AM in reply to: *Ben Rand
See http://msdn2.microsoft.com/en-us/library/ms172219.aspx for your specific
problem and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vcconmixeddllloadingproblem.asp
for background information.

Dan

"Ben Rand" wrote in message
news:5041866@discussion.autodesk.com...
Painfully new to .NET, working with VS 2005, Autocad 2006. Previously
working through some simple stuff in VS 2003 and the projects were working
fine. Migrated the projects to 2005 and tried to run them in Debug and I get
this error repeatedly:

Message: 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.

Things run once I get through the messages, but I don't understand what I've
apparently missed. Thanks for any help.

Ben Rand
CAD Manager
CEntry Constructors & Engineers
brand@centry.net
*Ben Rand
Message 3 of 7 (223 Views)

Re: LoaderLock

12-21-2005 04:05 PM in reply to: *Ben Rand
Thanks for the info. Unfortunately I don't know what to do with it. Sorry,
just extremely new to .NET. Nothing changed from when the project was in
VS2003 and worked without this message.

"J. Daniel Smith" wrote in message
news:5042081@discussion.autodesk.com...
See http://msdn2.microsoft.com/en-us/library/ms172219.aspx for your specific
problem and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vcconmixeddllloadingproblem.asp
for background information.

Dan

"Ben Rand" wrote in message
news:5041866@discussion.autodesk.com...
Painfully new to .NET, working with VS 2005, Autocad 2006. Previously
working through some simple stuff in VS 2003 and the projects were working
fine. Migrated the projects to 2005 and tried to run them in Debug and I get
this error repeatedly:

Message: 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.

Things run once I get through the messages, but I don't understand what I've
apparently missed. Thanks for any help.

Ben Rand
CAD Manager
CEntry Constructors & Engineers
brand@centry.net
*Ben Rand
Message 4 of 7 (223 Views)

Re: LoaderLock

12-23-2005 07:29 AM in reply to: *Ben Rand
Thanks again for your help, Dan. The answer was in this first document you
sent me to, but it took hearing that from ADN DevHelp again to pound it
through my head--or help me understand that I was staring at the solution.
The fix was apparently to disable MDAs. This is a specific solution for
Autocad 2006/VS 2005 (because Acad 2006 was built with version 1.1 of the
.NET framework).

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"MDA"="1"Once I added this key to the registry, the error messages were
gone.

Ben

"J. Daniel Smith" wrote in message
news:5042081@discussion.autodesk.com...
See http://msdn2.microsoft.com/en-us/library/ms172219.aspx for your specific
problem and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vcconmixeddllloadingproblem.asp
for background information.

Dan

"Ben Rand" wrote in message
news:5041866@discussion.autodesk.com...
Painfully new to .NET, working with VS 2005, Autocad 2006. Previously
working through some simple stuff in VS 2003 and the projects were working
fine. Migrated the projects to 2005 and tried to run them in Debug and I get
this error repeatedly:

Message: 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.

Things run once I get through the messages, but I don't understand what I've
apparently missed. Thanks for any help.

Ben Rand
CAD Manager
CEntry Constructors & Engineers
brand@centry.net
*Juha
Message 5 of 7 (223 Views)

Re: LoaderLock

01-04-2006 04:17 AM in reply to: *Ben Rand
Hi,

for me setting the key

"MDA"="0"

seemed to work?

Juha

"Ben Rand" wrote in message
news:5045217@discussion.autodesk.com...
Thanks again for your help, Dan. The answer was in this first document you
sent me to, but it took hearing that from ADN DevHelp again to pound it
through my head--or help me understand that I was staring at the solution.
The fix was apparently to disable MDAs. This is a specific solution for
Autocad 2006/VS 2005 (because Acad 2006 was built with version 1.1 of the
.NET framework).

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"MDA"="1"Once I added this key to the registry, the error messages were
gone.

Ben

"J. Daniel Smith" wrote in message
news:5042081@discussion.autodesk.com...
See http://msdn2.microsoft.com/en-us/library/ms172219.aspx for your specific
problem and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vcconmixeddllloadingproblem.asp
for background information.

Dan

"Ben Rand" wrote in message
news:5041866@discussion.autodesk.com...
Painfully new to .NET, working with VS 2005, Autocad 2006. Previously
working through some simple stuff in VS 2003 and the projects were working
fine. Migrated the projects to 2005 and tried to run them in Debug and I get
this error repeatedly:

Message: 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.

Things run once I get through the messages, but I don't understand what I've
apparently missed. Thanks for any help.

Ben Rand
CAD Manager
CEntry Constructors & Engineers
brand@centry.net
*Fred Chateau
Message 6 of 7 (223 Views)

Re: LoaderLock

01-05-2006 03:43 PM in reply to: *Ben Rand
"Ben Rand" wrote ...

> Thanks again for your help, Dan. The answer was in this first document you
> sent me to, but it took hearing that from ADN DevHelp again to pound it
> through my head--or help me understand that I was staring at the solution.
> The fix was apparently to disable MDAs. This is a specific solution for
> Autocad 2006/VS 2005 (because Acad 2006 was built with version 1.1 of the
.NET framework).

Well, I read the document and I'm lost...

I'm running VS 2005 builds for AutoCAD 2006 using Framework 2.0 and my code
is written in C#.

It sounds like they're saying the AutoDesk developers need to correct the
problem and re-compile their code in Framework 2.0. Are we simply disabling
the warning without resolving the problem? If I manage to diagnose the
problem, is there anything I can do about it, some code I can modify?

--
Regards,

Fred Chateau
fchateauAtComcastDotNet
*Tony Tanzillo
Message 7 of 7 (223 Views)

Re: LoaderLock

01-05-2006 04:19 PM in reply to: *Ben Rand
AutoCAD will use the most recent version of the
framework installed, unless you set acad.exe.config
to use a specific version.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Fred Chateau" wrote in message news:5051943@discussion.autodesk.com...
"Ben Rand" wrote ...

> Thanks again for your help, Dan. The answer was in this first document you
> sent me to, but it took hearing that from ADN DevHelp again to pound it
> through my head--or help me understand that I was staring at the solution.
> The fix was apparently to disable MDAs. This is a specific solution for
> Autocad 2006/VS 2005 (because Acad 2006 was built with version 1.1 of the
.NET framework).

Well, I read the document and I'm lost...

I'm running VS 2005 builds for AutoCAD 2006 using Framework 2.0 and my code
is written in C#.

It sounds like they're saying the AutoDesk developers need to correct the
problem and re-compile their code in Framework 2.0. Are we simply disabling
the warning without resolving the problem? If I manage to diagnose the
problem, is there anything I can do about it, some code I can modify?

--
Regards,

Fred Chateau
fchateauAtComcastDotNet
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.