PDFXEdit_TLB.pas

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

PDFXEdit_TLB.pas

Post by jeffp »

I thought I'd bring this tlb file issue to your attention. In Delphi, when I create the TLB file from your DLL, it gets one thing wrong.

It has to do with the viewMatrix type in the procedure OnCameraEvent of the IPXV_Annot3DCallbackDisp interface.

Here's what it gives me:

Code: Select all

procedure OnCameraEvent(const pContext: IPXV_Annot3DContext; const pView: IUnknown; 
                            nCurTool: Integer; nBinding: PXC_3DProjScaleType; 
                            nProjType: PXC_3DProjType; nFar: Double; nNear: Double; nFOV: Double; 
                            nCO: Double; nViewPlaneSize: Double; var viewMatrix: PXC_3DMatrix4x4;
                            const pViewName: WideString); dispid 1610743816;
And here's how I have to change it:

Code: Select all

                      
procedure OnCameraEvent(const pContext: IPXV_Annot3DContext; const pView: IUnknown; 
                            nCurTool: Integer; nBinding: PXC_3DProjScaleType; 
                            nProjType: PXC_3DProjType; nFar: Double; nNear: Double; nFOV: Double; 
                            nCO: Double; nViewPlaneSize: Double; var viewMatrix: OleVariant;
                            const pViewName: WideString); dispid 1610743816;
Essentially, I have to make the type OleVariant and NOT PXC_3DMatrix4x4.

It's now problem to fix it each time, but just thought I'd bring it up in case it's an easy fix.

Attached is my corrected unit.

PDFXEdit_TLB.zip
(219.85 KiB) Downloaded 37 times

--Jeff
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: PDFXEdit_TLB.pas

Post by zarkogajic »

Hi Jeff,

That's not something Tracker guys can fix. This is due to how Delphi tlb parser generates that unit. A small manual fix required (as you noted).

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17818
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

PDFXEdit_TLB.pas

Post by Tracker Supp-Stefan »

:)
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: PDFXEdit_TLB.pas

Post by zarkogajic »

Jeff,

Another small manual fix required if you are (/will be) using the following methods:

IPXC_PageText:
function GetTextQuads3(nFirstCharIndex: ULONG_T; nCharsCount: ULONG_T; (*out*) pQuads: IPXC_QuadsF; out stBBox: PXC_RectF): HResult; stdcall;

IUIX_Obj:
procedure QueryImpl(var riid: TGUID; const pSkipImpl: IUnknown; (*out*) pImpl: Pointer); safecall;

So: those two parameters should not be "out".

p.s.
Those I know of as I'm using them atm. If later I find some other fixes to be needed - I'll post here...

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17818
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PDFXEdit_TLB.pas

Post by Tracker Supp-Stefan »

Many thanks for your help Zarko!

Kind regards,
Stefan
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: PDFXEdit_TLB.pas

Post by jeffp »

Thanks Zarko. I don't currently use those, but I'll update my unit to reflect your changes just in case.

Thanks again.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17818
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

PDFXEdit_TLB.pas

Post by Tracker Supp-Stefan »

:)
Post Reply