Jonas Maebe wrote:
They should be.
Thank you for your careful answer. I will return later if I am able
to make a simple sample program that can reproduce the problem.
(Or may be I should stick to 1.0.10 that worked for me)
It would be nice if you could provide the sample program (and submit
it as a bugreport at http://www.freepascal.org/bugs.html), since if
you ran into this it's quite possible that other people will do so as
well.
When trying to locate the problem I found out that the first problem was
due to my mistake, I'm sorry. The error message was
Error: Incompatible types: got "<address of function(LongWord, LongWord,
LongWord, LongInt):LongInt;StdCall>" expected "<procedure variable type
of function(LongWord, LongWord, LongInt, LongInt):LongInt;StdCall>"
I interpreted this as if the error was caused by an address in stead of
a procedure variable, but actually correcting the type of the 3rd
parameter was sufficient to remove the error.
FPC 1.0.10 compiled the statement with a longword in stead of a longint
correctly without any comments, but it looks like 2.0.2 has a much
stronger type checking.
But my second problem persists. The program is compiled, but the
dialogue box does not show up, when using 2.0.2.
Before I go on trying to locate this problem I must take into account
that Windows requires the data structure for dialogue boxes to be
aligned in a certain way, so I would like to ask the question:
Does PPC 2.0.2 handle alignment of data the same way as former versions?
Will the statements (the conditions)
if (dword(pBoxtemplate) and 1)=1 then pBoxtemplate:=nil;
if (dword(pBoxtemplate) and 2)=2 then inc(pBoxtemplate);
be treated the same way, and is
pointer(pBoxItem) - pointer(pBoxAllokate)
still equal to the distance between the pointers measured in bytes,
regardless of the type of pBoxItem?
Hans Mårtensson
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal