Files
SabreTools.Models/PortableExecutable/VarFileInfo.cs

50 lines
1.5 KiB
C#
Raw Normal View History

2023-09-04 00:12:49 -04:00
namespace SabreTools.Models.PortableExecutable
2023-09-04 00:11:04 -04:00
{
/// <summary>
/// Represents the organization of data in a file-version resource. It contains version
/// information not dependent on a particular language and code page combination.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/menurc/varfileinfo"/>
public sealed class VarFileInfo
{
/// <summary>
/// The length, in bytes, of the entire VarFileInfo block, including all structures
/// indicated by the Children member.
/// </summary>
2023-09-10 21:24:10 -04:00
public ushort Length { get; set; }
2023-09-04 00:11:04 -04:00
/// <summary>
/// This member is always equal to zero.
/// </summary>
2023-09-10 21:24:10 -04:00
public ushort ValueLength { get; set; }
2023-09-04 00:11:04 -04:00
/// <summary>
/// The type of data in the version resource.
/// </summary>
2023-09-10 21:24:10 -04:00
public VersionResourceType ResourceType { get; set; }
2023-09-04 00:11:04 -04:00
/// <summary>
/// The Unicode string L"VarFileInfo".
/// </summary>
2023-09-04 21:14:41 -04:00
#if NET48
2023-09-10 21:24:10 -04:00
public string Key { get; set; }
2023-09-04 21:14:41 -04:00
#else
2023-09-10 21:24:10 -04:00
public string? Key { get; set; }
2023-09-04 21:14:41 -04:00
#endif
2023-09-04 00:11:04 -04:00
/// <summary>
/// As many zero words as necessary to align the Children member on a 32-bit boundary.
/// </summary>
2023-09-10 21:24:10 -04:00
public ushort Padding { get; set; }
2023-09-04 00:11:04 -04:00
/// <summary>
/// Typically contains a list of languages that the application or DLL supports.
/// </summary>
2023-09-04 21:14:41 -04:00
#if NET48
2023-09-10 21:24:10 -04:00
public VarData[] Children { get; set; }
2023-09-04 21:14:41 -04:00
#else
2023-09-10 21:24:10 -04:00
public VarData?[]? Children { get; set; }
2023-09-04 21:14:41 -04:00
#endif
2023-09-04 00:11:04 -04:00
}
}