Files
SabreTools.Serialization/SabreTools.Data.Models/PortableExecutable/Resource/Entries/VarData.cs

51 lines
2.1 KiB
C#
Raw Normal View History

2025-09-26 13:06:18 -04:00
namespace SabreTools.Data.Models.PortableExecutable.Resource.Entries
2025-09-26 12:09:34 -04:00
{
/// <summary>
/// Represents the organization of data in a file-version resource. It typically contains a
/// list of language and code page identifier pairs that the version of the application or
/// DLL supports.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/menurc/var-str"/>
public sealed class VarData
{
/// <summary>
/// The length, in bytes, of the Var structure.
/// </summary>
public ushort Length { get; set; }
/// <summary>
/// The size, in words, of the Value member.
/// </summary>
public ushort ValueLength { get; set; }
/// <summary>
/// The type of data in the version resource.
/// </summary>
public VersionResourceType ResourceType { get; set; }
/// <summary>
/// The Unicode string L"Translation".
/// </summary>
public string Key { get; set; } = string.Empty;
2025-09-26 12:09:34 -04:00
/// <summary>
/// As many zero words as necessary to align the Value member on a 32-bit boundary.
/// </summary>
public ushort Padding { get; set; }
/// <summary>
/// An array of one or more values that are language and code page identifier pairs.
2025-10-30 23:29:24 -04:00
///
2025-09-26 12:09:34 -04:00
/// If you use the Var structure to list the languages your application or DLL supports
/// instead of using multiple version resources, use the Value member to contain an array
/// of DWORD values indicating the language and code page combinations supported by this
/// file. The low-order word of each DWORD must contain a Microsoft language identifier,
/// and the high-order word must contain the IBM code page number. Either high-order or
/// low-order word can be zero, indicating that the file is language or code page
/// independent. If the Var structure is omitted, the file will be interpreted as both
/// language and code page independent.
/// </summary>
public uint[] Value { get; set; } = [];
2025-09-26 12:09:34 -04:00
}
}