Print Page | Close Window

LoaderLock was detected

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1938
Printed Date: 15 Dec 25 at 9:25PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: LoaderLock was detected
Posted By: softwaredev
Subject: LoaderLock was detected
Date Posted: 19 Aug 11 at 9:00PM

have following code am running inside of Visual Studio 2010, .NET 3.5, VB.NET ...

' Create Image using QuickPDF
Dim QP As QuickPDFAX0715.PDFLibrary
Dim Result As Integer
Dim lngFileHandle As Long
Dim pageRef As Long
Dim imageConversionResult As Integer
QP = New QuickPDFAX0715.PDFLibrary
Result = QP.UnlockKey("licensekehere")   EVAL license
lngFileHandle = QP.DAOpenFile(FILE_REPOSITORY & myRow.pFile_ID & "\" & myRow.pActive_version & myRow.pFile_Extension.ToUpper, "")
pageRef = QP.DAFindPage(lngFileHandle, 1)
imageConversionResult = QP.DARenderPageToFile(lngFileHandle, pageRef, 5, 75, strPNGImageFile)
QP.DACloseFile(lngFileHandle)
QP = Nothing

On the line   QP = New QuickPDFAX0715.PDFLibrary get following error.

LoaderLock was detected.
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.

Need help in finding out why the API is not working.





Replies:
Posted By: AndrewC
Date Posted: 21 Aug 11 at 4:54AM
Have you tried downloading the 7.26 release as there have have been more than a few changes to the ActiveX / DLL and .NET interface files.

The update can be downloaded from here.

   http://www.quickpdflibrary.com/products/quickpdf/updates.php - http://www.quickpdflibrary.com/products/quickpdf/updates.php

Andrew.


Posted By: softwaredev
Date Posted: 21 Aug 11 at 3:47PM

Tried the 7.26 same results, get the same exact error.


Posted By: softwaredev
Date Posted: 21 Aug 11 at 3:52PM

Just realized this error occurs only if I attempt a debug (F5) from within Visual Studio 2010. It does not get this error when directly launching the exe as normal program.

Guess its a low priority in that case for me. Though if you have any idea of what is going on with the VS2010 and your ActiveX API that will help me in the development process



Posted By: AndrewC
Date Posted: 24 Aug 11 at 2:28AM
I use VS 2010 and F5 all the time without getting this error.  It could be a project setting or something similar.  If you are getting the same results in 7.15 and 7.26 then it is most likely on your side as no one else has reported this problem.

Doing a Google or StackOverflow search turned up different solutions.  It sounds like you might be using other DLL's in your project that could be causing problems.  eg DirectX.


Andrew



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk