update 11.0.07 causes ActiveX crash on Delphi applications

Community Beginner ,
May 16, 2014 May 16, 2014

Copy link to clipboard

Copied

In version 11.0.07 there was a change in behavior of acropdf.dll. An exception occurs when the application invokes the "SetClientSite" method of the dll. I do not know if there is a relationship, the dll is now invoking "GetContainer" method of Delphi applications.

We have a desktop system used by thousand companies, which allows you to view pdf into our application. With automatic updating this new version we are having several phone calls and having to install earlier versions on thousands of stations.

Is there anything I can do? I appreciate any help.

Views

14.5K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
May 22, 2014 May 22, 2014
solution for Delphi users.copy  oleCtrls.pas to oleCtrlsAdobe.pas.then remove from TOleControl:- IServiceProvider - function QueryService(...): HResult; stdcall; - function TOleControl.QueryService(..): HResult;the definition looks as follows:  TOleControl = class (Twin Control, IUnknown, IOleClientSite,      IOleControlSite, IOleInPlaceSite, IOleInPlaceFrame, IDispatch,      IPropertyNotifySink, ISimpleFrameSite)then replace in the unit AcroPDFLib_TLB.pas OleCtrls by OleCtrlsAdobe.

Likes

Translate

Translate
Community Beginner ,
May 16, 2014 May 16, 2014

Copy link to clipboard

Copied

We are having this issue as well - eagerly awaiting an answer of some sort.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 16, 2014 May 16, 2014

Copy link to clipboard

Copied

Same problem here on VB6

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 22, 2014 May 22, 2014

Copy link to clipboard

Copied

We are seeing the same problem with wxPython, up to 11.0.6 all works fine, but with 11.07 we see a crash at following code:

hwnd = user32.CreateWindowExA(0, "AtlAxWin", axID,

                                      WS_CHILD | WS_VISIBLE

                                      | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,

                                      x,y, w,h, parent.GetHandle(), None,

                                      hInstance, 0)

axID = 'AcroPDF.PDF.1'

XI installed 'AcroPDF64.dll into C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX which does not make sense, there should only be 32bit stuff in there.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 22, 2014 May 22, 2014

Copy link to clipboard

Copied

Thanks for the information. Please report too in this discussion: Re: The AcroPDF.PDF Class is no longer accessible from VisualBasic6 after update 11.0.0.7.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 22, 2014 May 22, 2014

Copy link to clipboard

Copied

solution for Delphi users.

copy  oleCtrls.pas to oleCtrlsAdobe.pas.

then remove from TOleControl:

- IServiceProvider
- function QueryService(...): HResult; stdcall;
- function TOleControl.QueryService(..): HResult;

the definition looks as follows:

  TOleControl = class (Twin Control, IUnknown, IOleClientSite,
     IOleControlSite, IOleInPlaceSite, IOleInPlaceFrame, IDispatch,
     IPropertyNotifySink, ISimpleFrameSite)

then replace in the unit AcroPDFLib_TLB.pas OleCtrls by OleCtrlsAdobe.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 14, 2014 Aug 14, 2014

Copy link to clipboard

Copied

function TAcroPDF.QueryInterface(const IID: TGUID; out Obj): HResult;

begin

   if IID = IServiceProvider then //[DCC Error] AcroPDFLib_TLB.pas(454): E2015 Operator not applicable to this operand type

       Result := E_NOINTERFACE

   else

     inherited;

end;

This code good compile on DelphiXE , but i try compile on D2010, and i have:

@

-- ( IID = IServiceProvider ) not applicable

Can you help me with D2010 code?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 26, 2015 Feb 26, 2015

Copy link to clipboard

Copied

anyone?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 14, 2015 Apr 14, 2015

Copy link to clipboard

Copied

try this:

function TAcroPDF.QueryInterface(const IID: TGUID; out Obj): HResult;

var

  Guid: TGUID;

begin

  Guid := GetTypeData(TypeInfo(IServiceProvider))^.Guid;

  if IsEqualGUID( IID, Guid ) then

    Result := E_NOINTERFACE

  else

    Result := inherited QueryInterface( IID, Obj );

end;

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 16, 2016 Sep 16, 2016

Copy link to clipboard

Copied

LATEST

Am 22.05.2014 22:53, schrieb sailJock:

try this, it's the same but another way

1) open AcroPDFLib_TLB.pas

2) add this

   TAcroPDF = class(TOleControl)

   ...

   protected

     procedure CreateControl;...

     //ADDED

     function QueryInterface(const IID: TGUID; out Obj): HResult; override;

//ADDED

3) Added this in the implementation section:

function TAcroPDF.QueryInterface(const IID: TGUID; out Obj): HResult;

begin

    if IID = IServiceProvider then

       Result := E_NOINTERFACE

   else

     inherited;

end;

4) re-build the package you are using and re-install it in the IDE

5) you should be good to go

vaniusrb escreveu:

try this:

function TAcroPDF.QueryInterface(const IID: TGUID; out Obj): HResult;

var

Guid: TGUID;

begin

Guid := GetTypeData(TypeInfo(IServiceProvider))^.Guid;

if IsEqualGUID( IID, Guid ) then

Result := E_NOINTERFACE

else

Result := inherited QueryInterface( IID, Obj );

end;

Does not work in Delphi 7

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 22, 2014 May 22, 2014

Copy link to clipboard

Copied

Thanks for your post.  I've followed your directions exactly (I believe) and when installing the package I get the error: Registration procedure, Acropdflib_tlb.Register in {path to my bpl file} raised exception class EFilerError: A class named TOleControl already exists.

For the life of me I can't find why this is occurring.  Any and all help is appreciated.  It seems like you have the answer but I'm not quite there.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 22, 2014 May 22, 2014

Copy link to clipboard

Copied

Sorry, I don't use activex as a registered component, I create programatically (dynamically), not in a form at design time.

Maybe you should adjust in oleCtrlsAdobe.pas and Acropdflib_tlb.pas, rename class TOleControl to something like TOleControlAdobe.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 22, 2014 May 22, 2014

Copy link to clipboard

Copied

Check that you are not referencing the original oleCtrls anywhere else in your code

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 22, 2014 May 22, 2014

Copy link to clipboard

Copied

Another odd thing is, in the source code for AcroPDFLib_TLB I am unable to locate the source file vcl.OleCtrlsAdobe in the uses section with a 'right click' selecting Find Declaration; nothing is found.  All the other files in the uses section are found.  I have my edited version of vcl.OleCtrlsAdobe.pas in the same folder as vcl.OleCtrls.pas and when the folder is sorted by Name, it appears immediately after vcl.OleCtrls as I would expect. I can put vcl.OleCtrls back in the uses and Find Declaration finds it as expected.  Baffling to me! 

I rechecked to see if the original vcl.OleCtrls is used anywhere in my code and it is not.

Thanks for everyones' help.  It's quite frustrating as we know...  Any more thoughts?

By the way, using Delphi RAD Studio XE2, Windows 7 Pro with all updates.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 22, 2014 May 22, 2014

Copy link to clipboard

Copied

I put the OleCtrlsAdobe.pas in with my code - the same folder as AcroPDFLib_TLB.pas. Right click find works for me.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 22, 2014 May 22, 2014

Copy link to clipboard

Copied

I give up for now.  Gonna take a long weekend and maybe some dust will settle, inspiration will arrive, or another work around will appear!  Who knows?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 22, 2014 May 22, 2014

Copy link to clipboard

Copied

Please visit the help doc here for some workarounds: http://helpx.adobe.com/acrobat/kb/vb-60-64-bit-issue-11007.html

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 22, 2014 May 22, 2014

Copy link to clipboard

Copied

Am 22.05.2014 22:53, schrieb sailJock:

put the OleCtrlsAdobe.pas in with my code - the same folder as

AcroPDFLib_TLB.pas..

update 11.0.07 causes ActiveX crash on Delphi applications

created by sailJock <https://forums.adobe.com/people/sailJock> in

/Adobe Reader/ - View the full discussion

<https://forums.adobe.com/message/6401998#6401998>

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 23, 2014 May 23, 2014

Copy link to clipboard

Copied

Am 22.05.2014 22:53, schrieb sailJock:

try this, it's the same but another way

1) open AcroPDFLib_TLB.pas

2) add this

TAcroPDF = class(TOleControl)

...

protected

procedure CreateControl;...

//ADDED

function QueryInterface(const IID: TGUID; out Obj): HResult; override;

//ADDED

3) Added this in the implementation section:

function TAcroPDF.QueryInterface(const IID: TGUID; out Obj): HResult;

begin

if IID = IServiceProvider then

Result := E_NOINTERFACE

else

inherited;

end;

4) re-build the package you are using and re-install it in the IDE

5) you should be good to go

update 11.0.07 causes ActiveX crash on Delphi applications

created by sailJock <https://forums.adobe.com/people/sailJock> in

/Adobe Reader/ - View the full discussion

<https://forums.adobe.com/message/6401998#6401998>

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 29, 2014 May 29, 2014

Copy link to clipboard

Copied

After a long needed break, I got back to this and...

It worked perfectly. Thank you, thank you, thank you!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines