[fpc-devel]Possible copyright problem while writing messages.pp for Win32 target

Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Thu Oct 4 21:07:04 CEST 2001

On Thu, 4 Oct 2001, Pavel V. Ozerski wrote:

> Hello,
> I began to write messages.pp for win32 as an analog of messages.pas from Delphi.
> The first part - describing of WM_... constants is easily solvable: "uses windows" is enough.
> But Delphi's messages.pas contains also some type definitions which are not translated from MS C header but
> are introduced by Borland to dispatching Windows messages by TObject.Dispatch. How to translate them not
> disturbing Borland's (c)? That are very simple records (e.g.,
>   TWMActivateApp = record
>     Msg: Cardinal;
>     Active: BOOL;
>     ThreadId: Longint;
>     Result: Longint;
>   end;
> ) and I see no alternative ways to define them keeping compatible fields names. I tried to make one large record with many
> "case integer of WM_..."'s but this way is unusable because some fields with the same names at different offsets must be declared.
> Declaring all these records as packed seems to be not enough to differ from Borland. Any other ideas? Messages.pp is a very
> important to port most sources developed for Delphi.

Copying an API is not prohibited; you simply cannot use their sources.
I see no problems in what you're trying to do.


More information about the fpc-devel mailing list