Product Documentation

VCL/CLX Developers Guide

Previous Topic

Next Topic

Methods

Method

Description

Create

constructor TCtResource.Create(hTable : TObject);

Construct a CTResource object with the resource type and number set to zero and the resource name set to NULL.

constructor TCtResource.Create(hTable : TObject; TypeID : LongWord; number : LongWord);

Construct a CTResource object passing the resource type and number. The resource name is set to NULL.

constructor TCtResource.Create(hTable : TObject; TypeID : LongWord; number : LongWord; name : string);

Construct a CTResource object passing the resource type and number, as well as the resource name.

Add

procedure Add(data : pointer; size : integer);

Add a new resource to the table.

Delete

procedure Delete;

Delete an existing resource from a table.

Update

procedure Update(data : pointer; size : integer);

Update the resource data of an existing resource. The resource TypeID and number passed to the resource object constructor must match the resource being updated.

First

function First(lock : boolean) : boolean;

Locate and read the first resource of a table. lock, if true, indicate that the resource must be locked. First return true if the resource is found or false if the resource was not found.

Next

function Next(lock : boolean) : boolean;

Locate and read the next resource of a table. lock, if true, indicate that the resource must be locked. Next return true if the resource is found or false if the resource was not found.

Find

function Find(TypeID : LongWord; number : LongWord; lock : boolean) : boolean;

Locate and read a resource that exactly match the TypeID and number. lock, if true, indicate that the resource must be locked. Find return true if the resource is found or false if the resource was not found.

function Find(name : string; lock : boolean) : boolean;

Locate and read a resource that match the name. c-tree Plus can not guarantee unique resource names. lock, if true, indicate that the resource must be locked. Find return true if the resource is found or false if the resource was not found.

Unlock

procedure Unlock;

Release the resource lock acquired by a call to First, Next or Find.

TOCIndex