I've been getting by with things like what's below.
If I understand you correctly this should not work or is just that the
4-byte items must be on 4-byte boundaries?
Or are the Shorts followed by 2 unused bytes?
I do know of a case something like a Short followed by a DWORD, and there
were two extra bytes after the short.
If you have only four bytes must you use Pack:1
How about a Structure containing only 4 Shorts, need Pack:2
Comments?
Thanks
Public Structure PARAFORMAT
Public cbSize As Integer
Public dwMask As Integer
Public wNumbering As Short
Public wReserved As Short
Public dxStartIndent As Integer
Public dxRightIndent As Integer
....
End Structure
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atwrote in message
news:eC5DL17yHHA.988@TK2MSFTNGP02.phx.gbl...
Quote:
>" active" <activeNOSPAM@a-znet.comschrieb:
Quote:
>What does vb.net do.
>>
>I'm wondering when I need to include Pack:
>
IIRC the default is a packing on 'DWORD'-boundaries (4-byte boundaries).
You need to include 'Pack' when the target system expects another packing,
such as packing on single-byte boundaries.
>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>