AW: [fpc-pascal]Create an OCX with FreePascal

Marco van de Voort marcov at
Thu Oct 11 15:43:27 CEST 2001

[ Charset ISO-8859-1 unsupported, converting... ]
> Hi all,
> > 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 
> > interfaces.
> > 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
> > straightforwardly.
> 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.

The headers are available on the site Jedi.

More information about the fpc-pascal mailing list