Skip to content

Resource Class

Represents a Win32 resource which can be loaded from and saved to a PE file.

MethodDescription
Equals(obj)Tests if type, name, and locale of this Resource object match another Resource object.
GetHashCode()Gets a hash code for this Resource object.
Load(file)Loads the resource data from a file. The file is searched for a resource with matching type, name, and locale.
Save(file)Saves the resource to a file. Any existing resource data with matching type, name, and locale is overwritten.
PropertyDescription
DataGets or sets the raw data of the resource.
LocaleGets or sets the locale of the resource.
NameGets or sets the name of the resource. For a numeric resource identifier, the decimal number is prefixed with a ”#”.
ResourceTypeGets or sets the type of the resource. This may be one of the ResourceType constants or a user-defined type name.
WixToolset.Dtf.Resources.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

Tests if type, name, and locale of this Resource object match another Resource object.

public bool Equals(
System.Object obj
)
ParameterTypeDescription
objSystem.ObjectResource object to be compared

bool True if the objects represent the same resource; false otherwise.

Gets a hash code for this Resource object.

public int GetHashCode()

int Hash code generated from the resource type, name, and locale.

Loads the resource data from a file. The file is searched for a resource with matching type, name, and locale.

public void Load(
string file
)
ParameterTypeDescription
filestringWin32 PE file containing the resource

Saves the resource to a file. Any existing resource data with matching type, name, and locale is overwritten.

public void Save(
string file
)
ParameterTypeDescription
filestringWin32 PE file to contain the resource

Gets or sets the raw data of the resource.

public System.Byte[] Data { get; set; }

Gets or sets the locale of the resource.

public int Locale { get; set; }

Gets or sets the name of the resource. For a numeric resource identifier, the decimal number is prefixed with a ”#”.

public string Name { get; set; }

Gets or sets the type of the resource. This may be one of the ResourceType constants or a user-defined type name.

public ResourceType ResourceType { get; set; }