Recent

Author Topic: Delphi OPC client projet to lazarus  (Read 7625 times)

vinceducat

  • New Member
  • *
  • Posts: 15
Delphi OPC client projet to lazarus
« on: July 31, 2010, 11:46:38 pm »
I try to convert a delphi projetc OPCclient find here
http://code.google.com/p/opcdelphi/

conversion is ok but when i compile i have an identifier error

on a PResultList in OPCDA.pas

Resultlist an unkown type in lazarus ?
« Last Edit: July 31, 2010, 11:56:23 pm by vinceducat »

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Delphi OPC client projet to lazarus
« Reply #1 on: September 29, 2016, 09:31:11 am »
Searching forum I have bumped into this post and didn't want to let it unanswered since meanwhile there was a significant progress with COM and ActiveX. Please forgive me if reading an answer to such an old topic bothers you.

Quote
Resultlist an unkown type in lazarus ?
In \fpcsrc\packages\winunits-base\src\activex.pp you can find this defined:

Code: Pascal  [Select][+][-]
  1. type
  2.   ..
  3.   TResultList           = array[0..high(integer) div 4-50] of HResult;
  4.   PResultList         = ^TResultList;

So simply including this unit should solve this problem.

Anyway, working FPC/LAZ wrapper files for OPC DA and complete OPC DA client can be found at https://sourceforge.net/projects/myopcclient/files/?source=navbar
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Thaddy

  • Hero Member
  • *****
  • Posts: 14210
  • Probably until I exterminate Putin.
Re: Delphi OPC client projet to lazarus
« Reply #2 on: September 29, 2016, 09:58:24 am »
And here, full implementation in Delphi. Maybe translatable. I don't see anything urgent that would make it undoable.
And https://github.com/engycz/propc full implementation in Delphi, not a wrapper.
Specialize a type, not a var.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Delphi OPC client projet to lazarus
« Reply #3 on: September 29, 2016, 10:16:13 am »
full implementation in Delphi, not a wrapper.
I have probably brought some confusion to the table so please forgive me. The way you look at it, it could not be called a wrapper. It's also a native lib using just headers for OPC foundation Data Access DLLs. However I have called it a wrapper since, like any other OPC DA library, it uses COM/DCOM to talk to these foundation provided DLLs.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Thaddy

  • Hero Member
  • *****
  • Posts: 14210
  • Probably until I exterminate Putin.
Re: Delphi OPC client projet to lazarus
« Reply #4 on: September 29, 2016, 10:21:50 am »
Ok, no problem. If your code is already FPC compilable I would choose that rather than converting the code I pointed to, unless that proves to be of higher quality.
(It is nicely written code, but all text is in Russian.)

[edit]
It works on lazarus, there is even a lazarus package file included. Nice.

So TS has options ;)
« Last Edit: September 29, 2016, 12:03:51 pm by Thaddy »
Specialize a type, not a var.

 

TinyPortal © 2005-2018