A
active
I have this and it seems to be working OK but now I wonder if the Pack value
shouldn't be 1.
What do you think?
<StructLayout(LayoutKind.Sequential, Pack:=4, CharSet:=CharSet.Auto)> _
Public Structure CHARFORMAT2
Public cbSize As Integer
Public dwMask As Integer
Public dwEffects As Integer
Public yHeight As Integer
Public yOffset As Integer
Public crTextColor As Integer
Public bCharSet As Byte
Public bPitchAndFamily As Byte
....snip
The Marshaller doesn't know enough to remove the alignment additions does
it?
====
for the following Pack:=2 would work, right?
But Pack=1 would also work, yes?
Public Structure BITMAP
Public bmType As Integer
Public bmWidth As Integer
Public bmHeight As Integer
Public bmWidthBytes As Integer
Public bmPlanes As Short
Public bmBitsPixel As Short
Public bmBits As Integer
End Structure
In fact, when dealing with Windows API struc's doesn't make sense to always
use Pack:=1, Why even try to find the maximum value that works? Just use 1.
What do you think about that?
Thanks
shouldn't be 1.
What do you think?
<StructLayout(LayoutKind.Sequential, Pack:=4, CharSet:=CharSet.Auto)> _
Public Structure CHARFORMAT2
Public cbSize As Integer
Public dwMask As Integer
Public dwEffects As Integer
Public yHeight As Integer
Public yOffset As Integer
Public crTextColor As Integer
Public bCharSet As Byte
Public bPitchAndFamily As Byte
....snip
The Marshaller doesn't know enough to remove the alignment additions does
it?
====
for the following Pack:=2 would work, right?
But Pack=1 would also work, yes?
Public Structure BITMAP
Public bmType As Integer
Public bmWidth As Integer
Public bmHeight As Integer
Public bmWidthBytes As Integer
Public bmPlanes As Short
Public bmBitsPixel As Short
Public bmBits As Integer
End Structure
In fact, when dealing with Windows API struc's doesn't make sense to always
use Pack:=1, Why even try to find the maximum value that works? Just use 1.
What do you think about that?
Thanks