TResources.RegisterWriter¶
Registers a resource writer class
Declaration¶
Source position: resource.pp line 280
public
class procedure TResources.RegisterWriter(const aExtension: string;
aClass: TResourceWriterClass);
Description¶
This class method registers a resource writer class.
When registered, a class is known to TResources class, and can be used by WriteToFile method when probing.
Usually this method is called in the initialization section of the unit implementing a TAbstractResourceWriter descendant.
A class can be registered multiple times, one for each extension it is able to write. Multiple class can be registered for the same extension (e.g. both a coff and a elf writer can be registered for the .o extension) although only the first one found will be used when probing. The extension must include the leading dot unless the empty string is used (which means "no extension", e.g. a unix executable, which doesn't have an extension).
See also¶
| Name | Description |
|---|---|
| TAbstractResourceWriter | Base abstract resource writer class |
| TResources.WriteToFile | Writes the contents of the object to a file |