Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Using QuickPDF in Multi-Thread app |
Post Reply ![]() |
Author | |
RedOctober2018 ![]() Team Player ![]() ![]() Joined: 22 Jun 18 Location: West Status: Offline Points: 25 |
![]() ![]() ![]() ![]() ![]() Posted: 04 Jul 21 at 10:45PM |
Platform: Windows 2016 Server Lazarus 2.0.10, FreePascal 3.2.0
Web App: Brook 5 Framework QuickPDF Library 10.13 Uses clause contains: ComObj, ActiveX, DebenuPDFLibrary64AX1013_10_13_TLB; I need use the QuickPDF library in a non-main thread of my web app. However, when I run the code to create a library object: ... var qpdfDCL: TAxcPDFLibrary; begin qpdfDCL := TAxcPDFLibrary.Create(frmMain); ... I always get this error message: CheckSynchronize called from non-main thread What is the correct, thread-safe way, to .Create, use and .Free, the QuickPDFLibrary in a non-main thread? Thanks in advance. |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi,
think this haven't to do with QuickPDF itself. Try Google with CheckSynchronize... Think you'll get the solution of your issue in the www ;-) Edited by Ingo - 04 Jul 21 at 10:51PM |
|
Cheers,
Ingo |
|
![]() |
|
RedOctober2018 ![]() Team Player ![]() ![]() Joined: 22 Jun 18 Location: West Status: Offline Points: 25 |
![]() ![]() ![]() ![]() ![]() |
Hi Ingo, Yes, I researched this problem and found CoInitialize and CoUnitialize, but no matter where I call these in relation to the call to create a QuickPDFLibrary object, I get an error message. I suspect there is a call to CheckSynchronize inside the QuickPDFLibrary which means it always needs to be in the main thread. But it can't be, because I'm using QPDF Lib in the non-main thread.
CoInitialize must be called within the non-main thread. UnCoInitialize must not be called in the non-main thread, it must be called in the main thread. That's why I just asked the open ended question "what is the correct way to do this" which usually elicits a broader and more complete answer than asking a more narrowly focused question. |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi,
i've made a complete scan through all source elements of version 18.11 ... There isn't a single Synchronize... Nothing. CoInitialize i've found - but i didn't found UnCoInitialize. Edited by Ingo - 05 Jul 21 at 10:54PM |
|
Cheers,
Ingo |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store