Attempting to execute managed code within the OS loader lock. Do not try to run the managed code in the dllmain or image initialization function. This will cause the application to be suspended.

Source: Internet
Author: User

Trying to load in OSProgramLock execution hostingCode. Do not try to run the managed code in the dllmain or image initialization function. This will cause the application to be suspended..

42 powerful debugging assistants (MDA,Loaderlock
Is one of them. Loaderlock detects a loader in an operating system.
The status of hosting code running on the lock thread (the video running thread in the preceding example. This may cause deadlocks and may be used before the operating system loader initializes the DLL. Although
This is necessary, but it is too troublesome for development and debugging.

This is because a specific resource is being loaded: for example, when the skin swap Control

    • Method 1
    1. Debug the vs2005 menu-> exception-> managed debuggin assistants-> loaderlock
      Removed from the selected status
    2. If the exception item does not exist, select Debug on the left of tool --- custom --- command tab --- Debug on the right and place the exception in the menu.
    3. Press CTRL + ALT + e to modify the selected status of managed debuggin assistants-> loaderlock.
    • Method 2
    1. Add a string under HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \. netframework with the value "0"
      However, in this case, all development based on. net2.0 on this computer will not benefit from MDA.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.