PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com _____________________________________________________________
OK, Aandi, I discovered the source file AVCOMPAT.CPP which enable to use function calls prior to v6.0 for changed types, like ASText which replace now char* in many functions in v6.0 SDK.
With this and the use of ACRO_SDK_LEVEL we can write plug-ins compatible with previous versions of Acrobat using SDK v6.0.
So thanks for your advices, now Acrobat unloads correctly, but many problems remain...
Mikael LAUSSEUR Aalto Consultant FRANCE
Aandi Inston wrote:
I don't like the look of that. You are destroying a callback that is still active in an HFT. I know it's cleanup time and you might think this is safe. But consider: another plug-in might be about to clean up, and it might open a file as part of its processing.
It's easy to say "you should restore the original value" but that has its dangers. What if another plug-in replaced it after you?
I don't have an ideal solution, but given that Acrobat doesn't currently support dynamic plug-in unloading, I would recommend
not destroying it. Also, be sure that your callback will not
fail if it is called AFTER your plug-in has otherwise quit. Store
the previous address in a static variable, and have a static
"Finished" variable; if Finished is true (set by Unload) just
call the previous method.
I think if Adobe do ever support dynamic unloading they will need a neater method of replacing HFT entries.
You should also bear in mind in the processing for your AVDocOpenWithParams intercept that the length of the parameter block may now be larger than you expect. Be sure you handle this correctly, and pass the entire original block through to the next level, not just the length you think it should have.
Aandi
To change your subscription: http://www.pdfzone.com/discussions/lists-pdfdev.html
