Copy link to clipboard
Copied
Is there any workaround for an issue that appeared with the move from Acrobat Reader 11 to Acrobat reader DC? We have an application that embeds the Acrobat Reader Browser Control Type Library 1.0 on a VCL form using Delphi. This application works fine with Acrobat 11 installed. With DC, the application gives an access violation when closing. It seems like the control tries to "Free" itself twice. The second time it gives the error because the reference has already been freed.
Others have posted the question with no response.
Thanks in advance for any response.
Copy link to clipboard
Copied
Also got no help, so i worked it out by myself and got to this:
Put this into the one of your units, not into the project code!
const hnd:integer= 0;
initialization
hnd:= loadlibrary('c:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroPDFImpl.dll');
finalization
if hnd <> 0 then
FreeLibrary(hnd);
end.
The clue is, the lib cant be really unloaded in the proccess space if there is at least one use-reference to it left.
Thats what i'm doing with loading it.
This file be found in different places on different computers,
so you better detect where it's stored, mybe like the next example.
ReggetKeyStr is an own function, but you should get the idea
const
hnd:integer= 0;
imName:string='';
initialization
imName:= RegGetKeyStr(HKEY_CLASSES_ROOT, 'CLSID\{CA8A9780-280D-11CF-A24D-444553540000}\InprocServer32','');
if imName <> '' then
imName:= ExtractFilePath(imName) + 'AcroPDFImpl.dll'
else
imName:= 'c:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroPDFImpl.dll';
hnd:= loadlibrary(pchar(imName));
finalization
if hnd <> 0 then
FreeLibrary(hnd);
end.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now