Specifically, position, Length, LinesAdded, and LineNumber should all have type IntPtr, not int.
More generally, every place in the plugin where the Scintilla documentation says Sci_Position should be IntPtr, not int. I don't feel like going through the rest of the plugin to look for other mistakes, but I can submit a PR to fix this specific issue.
I ran into this problem when I was trying to get the ModificationType of a notification, and it worked correctly in x86, but not in x64. Since ModificationType comes after some of the wrong-size fields, it was misaligned until I fixed this bug.
I should also mention that the IdFrom field of the ScNotificationHeader struct should probably technically be a UIntPtr, but AFAIK it doesn't matter at all, so I'm going to choose to believe that it's fine.
Specifically,
position
,Length
,LinesAdded
, andLineNumber
should all have typeIntPtr
, not int.More generally, every place in the plugin where the Scintilla documentation says
Sci_Position
should beIntPtr
, not int. I don't feel like going through the rest of the plugin to look for other mistakes, but I can submit a PR to fix this specific issue.I ran into this problem when I was trying to get the
ModificationType
of a notification, and it worked correctly in x86, but not in x64. Since ModificationType comes after some of the wrong-size fields, it was misaligned until I fixed this bug.I should also mention that the
IdFrom
field of theScNotificationHeader
struct should probably technically be aUIntPtr
, but AFAIK it doesn't matter at all, so I'm going to choose to believe that it's fine.