Skip to content

Latest commit

 

History

History
52 lines (28 loc) · 1.8 KB

TPJResourceEntry-IsMatching.md

File metadata and controls

52 lines (28 loc) · 1.8 KB

IsMatching methods

Project: Resource File Unit

Unit: PJResFile.

Class: TPJResourceEntry

Applies to: ~>1.0

There are two overloaded IsMatching methods. They are both used to check if a resource matches the one represented by the TPJResourceEntry object on which the method is called.

Matching involves comparing the resource entries' names, types and language ids. In the first version of the method comparison of names and / or types can be omitted.


function IsMatching(const ResType, ResName: Pchar;
  const LangID: Word = $FFFF): Boolean;

Checks if the resource entry has the given type, name and language id. The resource name and/or language id can be ignored in which case only the values provided will be matched. For example to match only a resource type use IsMatching(MyResType, nil);.

Parameters:

  • ResType: The type of the resource to be matched as either an ordinal or string type.
  • ResName: The name of the resource to be matched as either an ordinal or string type. If nil is passed as this parameter then it is ignored when matching.
  • LangID: The language id of the resource to be matched. If this parameter is left out or if $FFFF is passed then the language id is ignored in the match. To test for a language neutral resource specify 0 here.

Returns:

True if the resources match or False if they do not.


function IsMatching(const Entry: TPJResourceEntry): Boolean;

Checks if the resource entry has the same type, name and language id as another resource entry.

Parameter:

  • Entry: The resource entry object to match against.

Returns:

True if the entries type, name and language id are all the same or False if they are not.