Project: Resource File Unit
Unit: PJResFile.
These helper routines are to assist in manipulating resource identifiers. They can be useful when working with Windows API routines as well as the classes provided in this unit. They are:
Applies to: ~>1.0
function IsIntResource(const ResID: PChar): Boolean;
This is a clone of the IS_INTRESOURCE
macro defined on MSDN that checks if a resource identifier is ordinal or a string. Complements the MakeIntResource "macro" defined in Windows.pas.
Parameter:
- ResID: The resource identifier to be checked. May be either an numeric identifier (like those produced by MakeIntResource, or a name in the form of a null terminated string).
Returns:
True
if ResID is numeric orFalse
if it is a null terminated string.
Applies to: ~>1.0
function IsEqualResID(const R1, R2: PChar): Boolean;
Checks for equality of two resource identifiers. To be equal the identifiers either be ordinal and have the same value or must both point to strings that have the same text when case is ignored.
Parameters:
- R1: The first resource identifier to check.
- R2: The second resource identifier to check.
Returns:
True
if the identifiers are equal andFalse
otherwise.
Applies to: ~>1.0
function ResIDToStr(const ResID: PChar): string;
Converts a resource identifier into its string representation as defined on MSDN.
Parameter:
- ResID: The resource identifier to convert.
Returns:
- The required string representation. If the identifier is a string pointer then the string itself is returned. If the identifier is ordinal then the returned string is the integer value preceded by a # character.