Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. OS Loader Lock

OS Loader Lock

Scheduled Pinned Locked Moved C#
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dsl fahk
    wrote on last edited by
    #1

    When testing one of my programs i got a Loader Lock Message from VIsual Studio 2005: LoaderLock was detected 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. I did some testing and it occurs whenever I press a key on a program i am testing, even if there is only a form and nothing else. How should I fix this problem? I need this fixed to test my program. Thanks.

    J 1 Reply Last reply
    0
    • D dsl fahk

      When testing one of my programs i got a Loader Lock Message from VIsual Studio 2005: LoaderLock was detected 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. I did some testing and it occurs whenever I press a key on a program i am testing, even if there is only a form and nothing else. How should I fix this problem? I need this fixed to test my program. Thanks.

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      The loader lock detection isn't an actual exception; it's a Visual Studio "debugging assistant" that helps you track down bad practices, leaks, and other workin's of the devil. ;) First of all, make sure this is valid: are you doing any unmanaged interop during initialization? If so, this error may be valid and you should fix it. If this isn't a valid error, fortunately for this scenario, you can disable this debugging assistant: Debug->Exceptions->Managed Debugging Assistants->Loader Lock. Uncheck the "thrown" box, and you won't see this error any more.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Rabbi Kadouri Meets Messiah? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      D 1 Reply Last reply
      0
      • J Judah Gabriel Himango

        The loader lock detection isn't an actual exception; it's a Visual Studio "debugging assistant" that helps you track down bad practices, leaks, and other workin's of the devil. ;) First of all, make sure this is valid: are you doing any unmanaged interop during initialization? If so, this error may be valid and you should fix it. If this isn't a valid error, fortunately for this scenario, you can disable this debugging assistant: Debug->Exceptions->Managed Debugging Assistants->Loader Lock. Uncheck the "thrown" box, and you won't see this error any more.

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Rabbi Kadouri Meets Messiah? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

        D Offline
        D Offline
        dsl fahk
        wrote on last edited by
        #3

        Thanks. :) I'm definately not doing any unmanaged interop, I'm using the code the designer made for me, and it has an error with its own code. So I will turn it off.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups