Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] <@367784837370609664> how do I tell c# not to allign my structs?

[DiscordArchive] <@367784837370609664> how do I tell c# not to allign my structs?

[DiscordArchive] <@367784837370609664> how do I tell c# not to allign my structs?

Pages (3): 1 2 3 Next
rektbyfaith
Administrator
0
05-29-2018, 12:08 PM
#1
Archived author: Maku • Posted: 2018-05-29T12:08:53.548000+00:00
Original source

<@367784837370609664> how do I tell c# not to allign my structs?
rektbyfaith
05-29-2018, 12:08 PM #1

Archived author: Maku • Posted: 2018-05-29T12:08:53.548000+00:00
Original source

<@367784837370609664> how do I tell c# not to allign my structs?

rektbyfaith
Administrator
0
05-29-2018, 12:09 PM
#2
Archived author: Deleted User • Posted: 2018-05-29T12:09:15.422000+00:00
Original source

There’s the structlaypit annotsrion
rektbyfaith
05-29-2018, 12:09 PM #2

Archived author: Deleted User • Posted: 2018-05-29T12:09:15.422000+00:00
Original source

There’s the structlaypit annotsrion

rektbyfaith
Administrator
0
05-29-2018, 12:09 PM
#3
Archived author: Deleted User • Posted: 2018-05-29T12:09:23.442000+00:00
Original source

Annotation
rektbyfaith
05-29-2018, 12:09 PM #3

Archived author: Deleted User • Posted: 2018-05-29T12:09:23.442000+00:00
Original source

Annotation

rektbyfaith
Administrator
0
05-29-2018, 12:09 PM
#4
Archived author: Deleted User • Posted: 2018-05-29T12:09:32.790000+00:00
Original source

StructLayout
rektbyfaith
05-29-2018, 12:09 PM #4

Archived author: Deleted User • Posted: 2018-05-29T12:09:32.790000+00:00
Original source

StructLayout

rektbyfaith
Administrator
0
05-29-2018, 12:16 PM
#5
Archived author: Warpten • Posted: 2018-05-29T12:16:13.048000+00:00
Original source

<@128154136020647936> `[StructLayout(LayoutKind.Explicit)]` and decorate members with `[FieldOffset(x)]`
rektbyfaith
05-29-2018, 12:16 PM #5

Archived author: Warpten • Posted: 2018-05-29T12:16:13.048000+00:00
Original source

<@128154136020647936> `[StructLayout(LayoutKind.Explicit)]` and decorate members with `[FieldOffset(x)]`

rektbyfaith
Administrator
0
05-29-2018, 12:16 PM
#6
Archived author: Warpten • Posted: 2018-05-29T12:16:31.618000+00:00
Original source

It's `LayoutKind.Sequential` by default
rektbyfaith
05-29-2018, 12:16 PM #6

Archived author: Warpten • Posted: 2018-05-29T12:16:31.618000+00:00
Original source

It's `LayoutKind.Sequential` by default

rektbyfaith
Administrator
0
05-29-2018, 12:16 PM
#7
Archived author: Maku • Posted: 2018-05-29T12:16:55.812000+00:00
Original source

Can't it just take the order of my fields?
rektbyfaith
05-29-2018, 12:16 PM #7

Archived author: Maku • Posted: 2018-05-29T12:16:55.812000+00:00
Original source

Can't it just take the order of my fields?

rektbyfaith
Administrator
0
05-29-2018, 12:17 PM
#8
Archived author: Maku • Posted: 2018-05-29T12:17:34.206000+00:00
Original source

and size of them?
rektbyfaith
05-29-2018, 12:17 PM #8

Archived author: Maku • Posted: 2018-05-29T12:17:34.206000+00:00
Original source

and size of them?

rektbyfaith
Administrator
0
05-29-2018, 12:18 PM
#9
Archived author: Deleted User • Posted: 2018-05-29T12:18:01.193000+00:00
Original source

That’s sequential
rektbyfaith
05-29-2018, 12:18 PM #9

Archived author: Deleted User • Posted: 2018-05-29T12:18:01.193000+00:00
Original source

That’s sequential

rektbyfaith
Administrator
0
05-29-2018, 12:18 PM
#10
Archived author: Maku • Posted: 2018-05-29T12:18:12.168000+00:00
Original source

```
[StructLayout(LayoutKind.Sequential, Pack = 0)]
unsafe public struct Command {
public UInt32 id;
public UInt32 size;
public fixed char name[16];

public UInt32 virtualOffset;
public UInt32 virtualSegmentSize;

public UInt32 fileOffset;
public UInt32 fileSegmentSize;

}
```
rektbyfaith
05-29-2018, 12:18 PM #10

Archived author: Maku • Posted: 2018-05-29T12:18:12.168000+00:00
Original source

```
[StructLayout(LayoutKind.Sequential, Pack = 0)]
unsafe public struct Command {
public UInt32 id;
public UInt32 size;
public fixed char name[16];

public UInt32 virtualOffset;
public UInt32 virtualSegmentSize;

public UInt32 fileOffset;
public UInt32 fileSegmentSize;

}
```

Pages (3): 1 2 3 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)