When is it safe to unlock?

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
rec
Posts: 19
Joined: Tue Feb 21 2006

When is it safe to unlock?

Post by rec »

We are using PDF Converter v3.03 via cdintf.dll in a multi-threaded application and have always used the lpszOutput member of DOCINFO to specify the PDF filename. This has always worked but we are now experimenting with Windows Server 2003 64 and this method doesn't seem to work.

Instead we want to try using Lock/SetDocFileProps/Unlock functions. My question is this: when is it safe to call Unlock? Do we only need to lock until ::StartDoc has been called? Or do we need to wait until the document has been printed and ::EndDoc has been called? Performance is crucial to us, so having to lock for the entire length of the print would be a real problem for us.

Any advice would be welcome.
rec
Posts: 19
Joined: Tue Feb 21 2006

Re: When is it safe to unlock?

Post by rec »

I should of read the manual! You only need to call Unlock if an error occurs printing.
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Re: When is it safe to unlock?

Post by Joan »

you are right unlock is called only if a problem occurs during printing

In normal workflow the job is unlocked before the Unlock command is called in the code.

Therefore Unlock should be added to the code but it is not called for each print job, it is called only when the print job hands or so.
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
Post Reply