flat assembler
Message board for the users of flat assembler.

Index > Windows > [bug] wrong definition CHOOSECOLOR struct in COMDLG64.INC

Author
Thread Post new topic Reply to topic
murder



Joined: 03 Nov 2011
Posts: 14
murder 01 Aug 2023, 14:03
Field lCustData defined as DWORD, but must be a QWORD, and of course must be 8 bytes aligned.

Right definition:
Code:
struct CHOOSECOLOR
  lStructSize    dd ?,?
  hwndOwner      dq ?
  hInstance      dq ?
  rgbResult      dd ?,?
  lpCustColors   dq ?
  Flags          dd ?,?
  lCustData      dq ?
  lpfnHook       dq ?
  lpTemplateName dq ?
ends    
Post 01 Aug 2023, 14:03
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20430
Location: In your JS exploiting you and your system
revolution 01 Aug 2023, 16:55
This seems to be a common problem with lCustData in more of those structures.

FINDREPLACE & CHOOSEFONT define it as dd ?
OPENFILENAME, PRINTDLG & PAGESETUPDLG define it as dd ?,?
Post 01 Aug 2023, 16:55
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 01 Aug 2023, 19:24
The package is updated now.
Post 01 Aug 2023, 19:24
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.