remobjects / pascalscript

pascalscript
Other
447 stars 178 forks source link

Importing _TLB file : Issue with Dispinterface #235

Open shekhardelphi opened 4 years ago

shekhardelphi commented 4 years ago

Hi, I am trying to import type library _TLB.pas file but whenever it encounter dispinterface it gives the error and does not proceed further. Error : Exception Exception in module CMDimp.exe at 000DE5C3. Expecting Token ';' but token '[' found Previous tokens : 'IMyDISP = DISPINTERFACE [ ' At postion: 487:5.

so in order to fix the problem i need to change dispinterface declaration. Please find the existing code snippet and the modified one in order to compile.

Exiting :

IMyCBDisp = dispinterface
    ['{1F6XX8C8-1511-4EZ6-B370-A105M1F7A86D}']
    function Method1(Text: OleVariant): HResult; dispid 1;
    function Method2 (var Res: OleVariant;): HResult; dispid 2;
  end; 

Modified IMyCBDisp = dispinterface;

Please help in resolving this as i find very limited very limited documentation for it.

Regards, Shekhar

pult commented 3 years ago

maybe so: dispinterface => interface

IMyCBDisp = interface ['{1F6XX8C8-1511-4EZ6-B370-A105M1F7A86D}'] procedure Method1(Text: OleVariant); safecall; procedure Method2 (var Res: OleVariant): safecall; end;