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): Previous 1 2 3
rektbyfaith
Administrator
0
05-29-2018, 12:24 PM
#21
Archived author: Deleted User • Posted: 2018-05-29T12:24:20.096000+00:00
Original source

Absolutely
rektbyfaith
05-29-2018, 12:24 PM #21

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

Absolutely

rektbyfaith
Administrator
0
05-29-2018, 12:24 PM
#22
Archived author: Deleted User • Posted: 2018-05-29T12:24:28.510000+00:00
Original source

My example was from C++
rektbyfaith
05-29-2018, 12:24 PM #22

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

My example was from C++

rektbyfaith
Administrator
0
05-29-2018, 12:25 PM
#23
Archived author: Warpten • Posted: 2018-05-29T12:25:07.077000+00:00
Original source

Even if you're trying to deserialize a byte[] into your T with pointer hacks like
```cs
public T To<T>(this byte[] buffer) where T : unmanaged
{
fixed (byte* b = buffer)
return *(T*)&b[0];
}
```
rektbyfaith
05-29-2018, 12:25 PM #23

Archived author: Warpten • Posted: 2018-05-29T12:25:07.077000+00:00
Original source

Even if you're trying to deserialize a byte[] into your T with pointer hacks like
```cs
public T To<T>(this byte[] buffer) where T : unmanaged
{
fixed (byte* b = buffer)
return *(T*)&b[0];
}
```

rektbyfaith
Administrator
0
05-29-2018, 12:25 PM
#24
Archived author: Warpten • Posted: 2018-05-29T12:25:17.186000+00:00
Original source

And please don't do that you you will get garbage anyway, but you get the idea
rektbyfaith
05-29-2018, 12:25 PM #24

Archived author: Warpten • Posted: 2018-05-29T12:25:17.186000+00:00
Original source

And please don't do that you you will get garbage anyway, but you get the idea

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

my point being that usually it's faster tomanually read a struct field by field rather than using the marshaller
rektbyfaith
05-29-2018, 12:25 PM #25

Archived author: Warpten • Posted: 2018-05-29T12:25:41.163000+00:00
Original source

my point being that usually it's faster tomanually read a struct field by field rather than using the marshaller

rektbyfaith
Administrator
0
05-29-2018, 12:28 PM
#26
Archived author: Warpten • Posted: 2018-05-29T12:28:36.907000+00:00
Original source

thankfully since apparently your type is purely made of value types you should be fine
rektbyfaith
05-29-2018, 12:28 PM #26

Archived author: Warpten • Posted: 2018-05-29T12:28:36.907000+00:00
Original source

thankfully since apparently your type is purely made of value types you should be fine

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