Skip to main content

TCustomdxPSExplorerItem.GetUniqueID(TBytes) Method

Enables you to obtain the item’s unique ID.

Declaration

function GetUniqueID(out AnUniqueID: TBytes): Integer; virtual;

Parameters

Name Type
AnUniqueID TBytes

Returns

Type
Integer

Remarks

The GetUniqueID method generates the item’s unique ID and writes it to the ABuffer parameter. This method’s return value is the number of bytes occupied by the written pointer.

As implemented in the TCustomdxPSExplorerItem class, the GetUniqueID method simply returns 0. Descendants override this method to write a proper ID to the parameter passed and return its size. For items in file-based explorers, an item’s unique ID is its fully qualified path. You should pass a pointer of the PShortString type as the parameter in this case. For data-aware explorers, an item’s unique ID is a pointer of a PdxDBBasedExplorerItemUniqueID type, so you need to pass such a pointer as the parameter.

See Also