Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-07

TPaintStruct size

7 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Micha Nelissen
to Micha Nelissen: Can someone check the size of the TPaintStruct structure? My guess is that it is too…
Mattias Gaertner wrote 16 lines
On Wed, 2 Jul 2003 11:06:51 +0200 (W. Europe Daylight Time) Michael Van Canneyt wrote: > > > On Wed, 2 Jul 2003, Micha Nelissen wrote: > >> Hi, >> >> Can someone check the size of the TPaintStruct structure? My guess >> is that it is too short, causing BeginPaint to overwrite stack data >> of other variables leading to garbage. Fixed TPaintStruct. Maybe there are some other mistyped records too. Only the win32 interface can tell.

Great! The memory leak has been closed now. Previous patches of which I was doubtful (due to that memory leak), can be applied now.

Regards,

Micha.

Reply by email

Mattias Gaertner
to Micha Nelissen: Can someone check the size of the TPaintStruct structure? My guess is that it is too…
Show quoted text 9 lines
On Wed, 2 Jul 2003, Micha Nelissen wrote: > Hi, > > Can someone check the size of the TPaintStruct structure? My guess is > that it is too short, causing BeginPaint to overwrite stack data of > other variables leading to garbage.

Fixed TPaintStruct.
Maybe there are some other mistyped records too. Only the win32 interface can tell.

Mattias

Show quoted text 14 lines
> > Ie.: what is the size of a boolean in FPC and in WIN32? Boolean : 1 LongBool : 4 WordBool : 2 Windows Bool : 4 Michael. _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Micha Nelissen

Hi,

Can someone check the size of the TPaintStruct structure? My guess is that it is too short, causing BeginPaint to overwrite stack data of other variables leading to garbage.

Ie.: what is the size of a boolean in FPC and in WIN32?

Thanks,

Micha.

Reply by email

Micha Nelissen
to Micha Nelissen
Mattias Gaertner wrote 16 lines
On Wed, 2 Jul 2003 12:50:07 +0200 "Micha Nelissen" wrote: > Mattias Gaertner wrote: >> On Wed, 2 Jul 2003 11:06:51 +0200 (W. Europe Daylight Time) >> Michael Van Canneyt wrote: >> >>> >> Fixed TPaintStruct. >> Maybe there are some other mistyped records too. Only the win32 >> interface can tell. > > Great! The memory leak has been closed now. Previous patches of > which I was doubtful (due to that memory leak), can be applied now. Which patches?

In the thread 'Re: FW: [..] LCL: menu creation order' I submitted a beginendpaint.patch.

Never mind, I attached a patch which fixes:
1) beginendpaint (implements, actually)
2) setmenuitemcaption crash
3) criticalsection interface. (dunno who wrote it, seemed way too difficult and produced errors).

Please apply it from the root this time.

Regards,

Micha.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00047.bin
Type: application/octet-stream
Size: 7882 bytes
Desc: "all.patch"
Url : http://localhost/pipermail/lazarus/attachments/20030702/dce19ba3/bin00047.bin

Reply by email

Mattias Gaertner
to Micha Nelissen: Can someone check the size of the TPaintStruct structure? My guess is that it is too…
Show quoted text 20 lines
Mattias Gaertner wrote: > On Wed, 2 Jul 2003 11:06:51 +0200 (W. Europe Daylight Time) > Michael Van Canneyt wrote: > >> >> >> On Wed, 2 Jul 2003, Micha Nelissen wrote: >> >>> Hi, >>> >>> Can someone check the size of the TPaintStruct structure? My guess >>> is that it is too short, causing BeginPaint to overwrite stack data >>> of other variables leading to garbage. > > Fixed TPaintStruct. > Maybe there are some other mistyped records too. Only the win32 > interface can tell. Great! The memory leak has been closed now. Previous patches of which I was doubtful (due to that memory leak), can be applied now.

Which patches?

Mattias

Reply by email

Mattias Gaertner
to Micha Nelissen: Can someone check the size of the TPaintStruct structure? My guess is that it is too…
Show quoted text 28 lines
Mattias Gaertner wrote: > On Wed, 2 Jul 2003 12:50:07 +0200 > "Micha Nelissen" wrote: > >> Mattias Gaertner wrote: >>> On Wed, 2 Jul 2003 11:06:51 +0200 (W. Europe Daylight Time) >>> Michael Van Canneyt wrote: >>> >>>> >>> Fixed TPaintStruct. >>> Maybe there are some other mistyped records too. Only the win32 >>> interface can tell. >> >> Great! The memory leak has been closed now. Previous patches of >> which I was doubtful (due to that memory leak), can be applied now. > > Which patches? In the thread 'Re: FW: [..] LCL: menu creation order' I submitted a beginendpaint.patch. Never mind, I attached a patch which fixes: 1) beginendpaint (implements, actually) 2) setmenuitemcaption crash 3) criticalsection interface. (dunno who wrote it, seemed way too difficult and produced errors). Please apply it from the root this time.

Applied.

Mattias

Reply by email