flat assembler
Message board for the users of flat assembler.
Index
> Windows > [solved] Bug in COMDLG64.INC |
Author |
|
Oliver 20 Apr 2020, 01:49
Hi,
the OPENFILENAMEA struc in INCLUDE/EQUATES/COMDLG64.INC is not correct. GetOpenFileNameA failed, so I tried to find the reason with the help of a little C-Program that displays offsets and sizes of the struc members. Inside the attached file ofn.c the second comment is a copy of the output. Note that it is possible to set lStructSize to 136 (instead of 152). In this case the GetOpenFileNameA function ignores the new/extended members. Presumably GetOpenFileNameW is incorrect as well.[/code][/quote]
|
|||||||||||
20 Apr 2020, 01:49 |
|
Oliver 20 Apr 2020, 09:19
You are right. I had wrong offsets in MY structure after conversion from 32 to 64 bit. After I had found this bug I took a look at the structure in COMDLG64.INC and mixed things up. The only mistake in this structure is not significant:
"Wrong": lCustData dd ?,? Correct: lCustData dq ? As I had mentioned, one can use this structure without the new members. My bug was independent from the new members and was referring to offsets. Sorry. |
|||
20 Apr 2020, 09:19 |
|
Ali.Z 20 Apr 2020, 10:29
Oliver wrote: "Wrong": lCustData dd ?,? its not a bug, it reserves two dwords. there is another use for ?,? in duplicates: dd 2 dup(12,89) dd dup(?,?) you maybe want to initialize them first. _________________ Asm For Wise Humans |
|||
20 Apr 2020, 10:29 |
|
Tomasz Grysztar 20 Apr 2020, 12:30
Ali.Z wrote:
|
|||
20 Apr 2020, 12:30 |
|
Oliver 20 Apr 2020, 13:28
That is all clear to me and I already mentioned that this difference is neither significant (with assembler) nor the problem I had. I had simply made a mistake with offsets during conversion of a 32-bit tool to 64-bit and mixed things up after I found my mistake. I'm sorry that I have wasted your time with a simple confusion!
Thank you very much for your effort. |
|||
20 Apr 2020, 13:28 |
|
ProMiNick 20 Apr 2020, 14:20
Other structs that has no structsize member are more dengerous LOGFONT, LOGPEN,LOGBRUSH and something similar because they could be part of larger structs. there is significant aligned they or not to 8 byte boundary and aligned or not their sizes.
|
|||
20 Apr 2020, 14:20 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.