FAQ: How to access other interfaces in WPTDynInt with Foxpro

  • Hello to all

    First, I'm using TextDynamic in Visual FoxPro 9 sp2 and it works fine with the exeption of what I explain you below.

    I CAN NOT ACCESS OTHER INTERFACE LIKE .MEMO OR PAGESIZE

    I read on the forum that nDragan made TextDynamic work under Visual Foxpro.

    I work with VFP 9 sp2 and i have tested all the possible solutions for two days but without success.

    Here is my starting code:

    Code
    ThisForm.oRTF1.editorStart("xxxxxxx", "zzzz-zzzz-zzzz-zzzz-zzzz")
    ThisForm.oRTF1.setlanguage("FR")
    ThisForm.oRTF1.SetLayout( "TDBtnMini.pcc", "Default", "", "main", "main")
    ThisForm.oRTF1.SetEditorMode( 0,1, 6,0)
    */ try to access other interfaces 
    oMemo = GETINTERFACE(oRTF1, "IWPMemo", "WPTDynInt.ocx")

    When I use function GETINTERFACE (), I receive the following error:

    OLE error code 0x80004002: Unknown COM status code.

    if i try to Enable ActiveX dual interface with SYS(2333, 1), then the VFP Form crash on the first function (Editor Start) with this error:

    OLE exeption error: Exeption code c0000005. OLE object may be corrupt

    I would be very happy if you could explain me how to make TextDynamic work under Visual Foxpro. An example of code that work with VFP would be welcome.

    Thank you in advance.
    Greetings from Switzerland

  • Hello,

    Yes, I received your Email. I requested council from nDragan which had also made “Text Dynamic” work with Visual Foxpro.

    You were on the good track but the right way is to reach the object like below:

    Code
    * Code from nDragan
    * this didn't work: 
    * ospell=GETINTERFACE(oRTF1.SpellCtrl, "iwpspell", "WPTDynInt.ocx") 
    ospell=GETINTERFACE(oRTF1.object.SpellCtrl, "{8A8763C7-D866-4D33-A6E9-FF17C008D57B}", "WPTDynInt.ocx")

    In this manner, I can reach all the functionalities which I need. Text Dynamic functions yet well with Foxpro.

    Thank you very much for your assistance.

    Martin

    • Offizieller Beitrag

    Many Thanks to You and Dragan!

    here I list of the GUIDs, they may be helpful:

    IID_IWPDLLInt: TGUID = '{12AD8DF2-3F90-4842-A8DA-238FBB997A2C}';
    DIID_IWPDLLIntEvents: TGUID = '{F3406696-3A1F-40B7-9223-45CEAEE763A9}';
    IID_IWPSpell: TGUID = '{8A8763C7-D866-4D33-A6E9-FF17C008D57B}';
    IID_IWPFieldContents: TGUID = '{3A9F60B7-68DE-4685-8C4E-9CA5CB6BA0A1}';
    IID_IWPReportBand: TGUID = '{229A4D15-EDC5-49E1-88F0-537AFB9E5545}';
    IID_IWPAttrInterface: TGUID = '{EE1F5982-43C0-4CCC-A57D-44355A439B8B}';
    IID_IWPParInterface: TGUID = '{EEC880BF-F8D7-4759-BE47-6A5451D08DBE}';
    IID_IWPPageSize: TGUID = '{00CBDEC6-0659-484C-8E9A-79EEE052CE8D}';
    IID_IWPTextObj: TGUID = '{68402602-9579-4833-ACCF-87C08445D09D}';
    IID_IWPCharacterAttr: TGUID = '{3AD3823E-F98F-45C5-8C6A-63C759CEF115}';
    IID_IWPDllButton: TGUID = '{8F6368D4-20D7-47C0-BF15-BE84DC7A19B2}';
    IID_IWPMeasurePageParam: TGUID = '{AE5DC437-13B8-4570-B51E-5782DB781372}';
    IID_IWPTextWriter: TGUID = '{E67714A5-920B-4D7C-ADC9-E69771B837AF}';
    IID_IWPPdfCreator: TGUID = '{C6B1B485-6EB5-4360-9C19-7BCBA4E43529}';
    IID_IWPTextCursor: TGUID = '{04210CF0-6926-4FD3-A7F0-4B6E49A8E631}';
    IID_IWPPicture: TGUID = '{4814E8DE-FD92-428A-9A50-D8415D212F7C}';
    IID_IWPMemo: TGUID = '{1E97E55D-87BD-4EAA-A9D3-4596CA692066}';
    IID_IWPDataBlock: TGUID = '{5B3F57A7-111F-4BC3-96CF-87B28F799D58}';
    IID_IWPPrintParameter: TGUID = '{1007B503-DE31-49EC-961E-5793E6F56BBB}';
    IID_IWPStream: TGUID = '{6E876673-C4DF-46B2-A6BF-0CD2EAD934B2}';
    IID_IWPReport: TGUID = '{22473C83-2A1E-4F86-B63C-96AA53C2D38B}';
    IID_IWPReportVar: TGUID = '{D5522CFE-7289-47E8-9980-AE5A684842C4}';
    IID_IWPNumberStyle: TGUID = '{C0084898-160F-4B43-8C7B-C1B9A18B36AF}';
    IID_IWPMapi: TGUID = '{FCD93E2C-09F6-429D-B77A-DD52DB5F7202}';
    CLASS_WPDLLInt: TGUID = '{2BBD28B0-E69A-4A69-8AFB-20048338C0C2}';
    IID_IWPLabelDef: TGUID = '{36A5EC1D-A642-45FB-8BFF-A4903A66BEFA}';
    IID_IWPPageSizeList: TGUID = '{03859513-A634-4C7F-AB33-0FB46BC027BA}';