Results 1 to 3 of 3

Thread: [2008] LoaderLock was Detected - Solved but more problems afterward

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2001
    Location
    Iowa
    Posts
    73

    Question [2008] LoaderLock was Detected - Solved but more problems afterward

    I'm using a DLL that was provided to us from another company. It is an analytical DLL similar to MatLab DLLs (for those that know/have worked with it).

    I've imported System.Runtime.InteropService and now I'm trying to load the DLL using the following code:
    Code:
        <DllImport("C:\Program Files\OLUP\OLUP32.dll", EntryPoint:="olpOpenPredictor2")> _
        Public Shared Function olpOpenPredictor2() As Long
        End Function
    It loads fine, I do not get the dll not found exception. I have also tried it in the application directory as well as windows/system32 and it successfully found it in each directory. But when I actually go to call the function (olpOpenPredictor2), I get the fantastic LoaderLock was Detected error.

    I've looked around and have seen many posts and comments of the same solution:
    Disable LoaderLock in Debug > Exceptions > MDA
    After doing this, I no longer receive the error. But I get a bunch of message boxes saying "The specified module/procedure could not be found." I'm assuming they are called by the DLL I am loading. They are all located in the same directory as OLUP32.dll. For example: atlas_PIII.dll and lapack.dll are 2 of the module messages and then it goes into the procedure messages. Since I have pointed to OLUP32.dll in program files/olup, shouldn't the dll load the other dlls from it's home directory? Or is there some better way for me to do this?

    Thank you for your help.

    EDIT: I also tried adding C:\Program Files\OLUP\ to my environment variables to see if that might solve anything, but it did not.
    Last edited by sdouble; Aug 19th, 2008 at 11:53 AM.

  2. #2
    Frenzied Member MaximilianMayrhofer's Avatar
    Join Date
    Aug 2007
    Location
    IM IN YR LOOP
    Posts
    2,001

    Re: [2008] LoaderLock was Detected - Solved but more problems afterward

    Just out of curiousity, since you are going to be using this dll quite frequently, i suspect, why not simply add it as a reference?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2001
    Location
    Iowa
    Posts
    73

    Re: [2008] LoaderLock was Detected - Solved but more problems afterward

    I tried that first. But when I select it, I get an error that says it was unable to add it as a reference and to check if it's a valid assembly or com component. The company that provided us the dll also gave us their own software that uses that same dll file. We're just adding the dll into our own custom software. Their application was written in C#, but I do not know what the dll was written in as someone else is the maker of OLUP32.dll.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width