We are currently using PowerBuilder 2017 R2 from Appeon Corporation.
We paint the ActiveX OLE Control onto our Window as follows: As you can see from the Object Browser, the OLE Control has class information and Properties exposed. We have the following code for the Clicked event of our button to activate the PDF: Here is the same code in case the image is hard to read:
Code: Select all
OLEObject lole_Doc OLEObject lole_CoreDoc OLEObject lole_info OLEObject lole_SrcInfo OLEObject lole_Icab ole_pdf.Object.OpenDocFromPath( "C:\ProgramData\Mustimuhw\Forms\test_form.pdf", lole_Icab) lole_Doc = ole_pdf.Object.Doc IF IsValid(lole_Doc) THEN MessageBox("lole_Doc", "Valid") ELSE MessageBox("lole_Doc", 'Not Valid') END IF lole_CoreDoc = lole_doc.CoreDoc IF IsValid(lole_CoreDoc) THEN MessageBox("lole_CoreDoc", "Valid") ELSE MessageBox("lole_CoreDoc", 'Not Valid') END IF lole_SrcInfo = lole_CoreDoc.SrcInfo IF IsValid(lole_SrcInfo) THEN MessageBox("lole_CoreDoc.SrcInfo", "Valid") ELSE MessageBox("lole_CoreDoc.SrcInfo", "Not Valid") END IF lole_Info = lole_coredoc.Info IF IsValid(lole_info) THEN MessageBox("lole_CoreDoc.Info", "Valid") ELSE MessageBox("lole_CoreDoc.Info", "Not Valid") END IF
https://sdkhelp.tracker-software.com/vi ... nt_SrcInfo
https://sdkhelp.tracker-software.com/vi ... ument_Info
So why are we NOT able to get a valid handle to the Info Interface when we can for the SrcInfo interface?
This may be something behind the scenes and a limitation with using PowerBuilder, BUT the documentation shows they have the same Syntax and return pointers.
So can you please explain why we get different results?
I hope this is all clear this time. If you need more detail, please advise.