using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.IO;
namespace Vestris.ResourceLib
{
///
/// Resource utilities.
///
public abstract class ResourceUtil
{
///
/// Write a value at a given position.
/// Used to write a size of data in an earlier located header.
///
/// Binary stream.
/// Value to write.
/// Address to write the value at.
internal static void WriteAt(BinaryWriter w, long value, long address)
{
long cur = w.BaseStream.Position;
w.Seek((int) address, SeekOrigin.Begin);
w.Write((UInt16) value);
w.Seek((int) cur, SeekOrigin.Begin);
}
}
}