D
Dave
I have a structure declared as:
[StructLayout(LayoutKind.Explicit, Size=6)]
private struct StandardFrame
{
[FieldOffset(0)] public byte [] frame;
[FieldOffset(0)] public UInt32 integrityCheck;
[FieldOffset(2)] public UInt32 sequenceNo;
[FieldOffset(4)] public UInt32 dataLength;
}
This is part of a Windows Service C# app. I've added an installer and
setup project but the install fails with "Unable to get installer types
in the <name of executable> --> one or more of the types in the
assembly unable to load."
I've narrowed the problem down to this struct. If I make the struct
LayoutKind.Sequential and remove the FieldOffset values the service
installs no problem. Obviously this is not what I want, the struct is
to be used as a union. This has really got me stumped, I can work
around it but I would prefer to use this approach.
Any clues gratefully accepted.
[StructLayout(LayoutKind.Explicit, Size=6)]
private struct StandardFrame
{
[FieldOffset(0)] public byte [] frame;
[FieldOffset(0)] public UInt32 integrityCheck;
[FieldOffset(2)] public UInt32 sequenceNo;
[FieldOffset(4)] public UInt32 dataLength;
}
This is part of a Windows Service C# app. I've added an installer and
setup project but the install fails with "Unable to get installer types
in the <name of executable> --> one or more of the types in the
assembly unable to load."
I've narrowed the problem down to this struct. If I make the struct
LayoutKind.Sequential and remove the FieldOffset values the service
installs no problem. Obviously this is not what I want, the struct is
to be used as a union. This has really got me stumped, I can work
around it but I would prefer to use this approach.
Any clues gratefully accepted.