ghaerr commented on PR #19912:
URL: https://github.com/apache/nuttx/pull/19912#issuecomment-5560790715

   Hello @ppisa,
   
   > Another easy solution is to define MWDLGTEMPLATE with pack(2) as well.
   
   I don't yet have much time to fully look into this, but given that structure 
DLGTEMPLATE and MWDLGTEMPLATE have the same members in the same order, then 
using `#pragma pack(2)` with MWDLGTEMPLATE may indeed be the best solution here.
   
   I haven't checked whether the MWDLGTEMPLATE extraData[] member would be 
offset differently using this, but the FIXSZ_MWDLGTEMPLATE define to 18 
corresponds to actually requiring that MWDLGTEMPLATE be packed to 16-bits.
   
   There is a demo that reads Windows .res files directly that may be of use to 
testing this: `mwdvetest`, whose source is in src/mwin/demos/mwdvetest.c.
   
   > It is possible that there are little more similar problems which are given 
by providing Win API as one of the APIs variants.
   
   Yes, although in years past I did take the trouble to ensure that 
Microwindows ran on CPUs that did not support unaligned access... so this 
particular issue may be one that slipped through the cracks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to