Author Topic: Input_Record  (Read 2227 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
Input_Record
« on: November 02, 2011, 09:25:08 AM »
Deleted.
« Last Edit: May 05, 2015, 12:20:21 PM by Peter »

Charles Pegge

  • Guest
Re: Input_Record
« Reply #1 on: November 02, 2011, 10:31:35 AM »

Hi Peter,

I think an alignment to 4 bytes is needed after EventType. (or make it a Dword)

Code: [Select]
Type INPUT_RECORD
  WORD  EventType
align 4
  union
  {
    KEY_EVENT_RECORD          KeyEvent
    MOUSE_EVENT_RECORD        MouseEvent
    WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent
    MENU_EVENT_RECORD         MenuEvent
    FOCUS_EVENT_RECORD        FocusEvent
  } 
End Type

#recordof input_record

Charles

Charles Pegge

  • Guest
Re: Input_Record
« Reply #2 on: November 02, 2011, 02:19:59 PM »

No-padding is the default for Oxygen Types. Different compilers have different rules unfortunately. I could make it Visual-C compliant for MS Windows.

Charles Pegge

  • Guest
Re: Input_Record
« Reply #3 on: November 03, 2011, 03:19:40 PM »
Hi Peter,

Unfortunately I'm not well acquainted with the console API.

Have you defined all the type structures? Error trapping needs strengthening in this area  undefined elements within types are interpreted as 32 bit sys type.

Charles