Assign method

Project: Binary Version Information Manipulation Units.

Unit: DelphiDabbler.Lib.VIBin.Resource.

Class: TVIBinResource

Applies to: ~>1.0

procedure Assign(const Source: TVIBinResource);

Description

Copies the contents of another TVIBinResource object to this object, making the content of the two objects equal.

Parameter:

Note

This method can be used to convert an ANSI resource into a Unicode resource and vice versa if one object is created as ANSI and the other as Unicode.

Example

In this example we convert an ANSI version information resource object to Unicode.

begin
  // Create an ANSI version information resource object
  var AnsiVI := TVIBinResource.Create(vrtAnsi);
  // ...
  // add information to AnsiVI here
  // ...

  // Create a Unicode version information resource object
  var UnicodeVI := TVIBinResource.Create(vrtUnicode);
  // Set Unicode resource to be a copy of AnsiVI, but with
  // content converted from ANSI to Unicode
  UnicodeVI.Assign(AnsiVI);
  // ...
  // do something with UnicodeVI here
  // ...
  
  UnicodeVI.Free;
  AnsiVI.Free;
end;

See Als0