flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Bug in COMCTL64.inc

Author
Thread Post new topic Reply to topic
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 18 Jul 2008, 23:14
It is defined as
Code:
struct TBBUTTON
  iBitmap   dd ?
  idCommand dd ?
  fsState   db ?
  fsStyle   db ?
            dw ?
  dwData    dd ?
  iString   dd ?
ends    


But it should be
Code:
struct TBBUTTON
  iBitmap   dd ?
  idCommand dd ?
  fsState   db ?
  fsStyle   db ?
            dp ?
  dwData    dd ?
  iString   dd ?
ends    


Here the C definition as per MSDN
Code:
typedef struct _TBBUTTON {
    int         iBitmap; 
    int         idCommand; 
    BYTE     fsState; 
    BYTE     fsStyle; 
#ifdef _WIN64
    BYTE     bReserved[6]     // padding for alignment
#elif defined(_WIN32)
    BYTE     bReserved[2]     // padding for alignment
#endif
    DWORD_PTR   dwData; 
    INT_PTR          iString; 
} TBBUTTON, NEAR *PTBBUTTON *LPTBBUTTON;    


http://msdn.microsoft.com/en-us/library/bb760476(VS.85).aspx

Maybe there are more errors like this, I've checked only this one due to a recent post ( http://board.flatassembler.net/topic.php?p=79541 )
Post 18 Jul 2008, 23:14
View user's profile Send private message 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.