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

Pavel V. Ozerski pavel at insect.mail.iephb.ru
Thu Oct 4 15:04:35 CEST 2001


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.

Sincerely, Pavel





More information about the fpc-devel mailing list