mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 10:47:48 +02:00
Updated Utilities
This commit is contained in:
parent
0641ccd6cf
commit
b509b6d0be
1 changed files with 12 additions and 0 deletions
|
@ -24,6 +24,12 @@ namespace Utilities
|
||||||
Array.Copy(bytes, 0, buffer, offset, bytes.Length);
|
Array.Copy(bytes, 0, buffer, offset, bytes.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void WriteInt16(byte[] buffer, ref int offset, short value)
|
||||||
|
{
|
||||||
|
WriteInt16(buffer, offset, value);
|
||||||
|
offset += 2;
|
||||||
|
}
|
||||||
|
|
||||||
public static void WriteUInt32(byte[] buffer, int offset, uint value)
|
public static void WriteUInt32(byte[] buffer, int offset, uint value)
|
||||||
{
|
{
|
||||||
byte[] bytes = LittleEndianConverter.GetBytes(value);
|
byte[] bytes = LittleEndianConverter.GetBytes(value);
|
||||||
|
@ -66,6 +72,12 @@ namespace Utilities
|
||||||
Array.Copy(bytes, 0, buffer, offset, bytes.Length);
|
Array.Copy(bytes, 0, buffer, offset, bytes.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void WriteInt64(byte[] buffer, ref int offset, long value)
|
||||||
|
{
|
||||||
|
WriteInt64(buffer, offset, value);
|
||||||
|
offset += 8;
|
||||||
|
}
|
||||||
|
|
||||||
public static void WriteGuidBytes(byte[] buffer, int offset, Guid value)
|
public static void WriteGuidBytes(byte[] buffer, int offset, Guid value)
|
||||||
{
|
{
|
||||||
byte[] bytes = LittleEndianConverter.GetBytes(value);
|
byte[] bytes = LittleEndianConverter.GetBytes(value);
|
||||||
|
|
Loading…
Add table
Reference in a new issue