AW: [fpc-pascal]Create an OCX with FreePascal
Dirk.Mattes at unitedplanet.de
Thu Oct 11 14:59:35 CEST 2001
> Michael Van Canneyt wrote:
> > I don't know what the OCX format is, if it is a simple
> .dll, then it should
> > be possible.
> an OCX is a DLL, which follows some special convention (exportet names
> etc.). Writing an ActiveX Control by hand should be possible with FPC,
> but it isn't trivial, as you have to implement a lot of COM
> I think Visual C++ or the Platform SDK come with some examples how to
> write such a thing by hand, they should translate to FPC quite
to write COM-Objects in FPC is possible and not difficult too much.
But an OCX (ActiveX-Control) is a problem, cause has to do with
OLE-Automation. Like Michael says, you have to implement many interfaces
(i.e. IDispatch for late-binding your methods, IEnumVARIANT and others),
that Delphi or VC creates automaticly or Automation gives you in order
to you type library. Most of your interfaces have to be comaptible with
OLE-Automation. You also have to convert many Header files for constants
that OLE uses (like VT_DISPATCH and many others).
So, forget about it an use Delphi or VC.
More information about the fpc-pascal