Important: The information in this document is obsolete and should not be used for new development.
GetString
TheGetStringfunction loads a string from a string ('STR ') resource into memory. It returns a handle to the string with the specified resource ID, reading it from the resource file if necessary.
FUNCTION GetString (stringID: Integer): StringHandle;
stringID- The resource ID of the string (
'STR ') resource containing the string.DESCRIPTION
TheGetStringfunction returns a handle to a string with the specified resource ID. IfGetStringcannot read the resource, it returnsNIL.
GetStringcalls theGetResourcefunction of the Resource Manager to access the string. This means that if the specified resource is already in memory,GetStringsimply returns its handle.Like the NewString function, GetString returns a handle whose size is based upon the actual length of the string.
- Note
- If your application uses a large number of strings, it is more efficient to store them in a string list (
'STR#') resource than as individual resources in the resource file. You then use the GetIndString procedure to access each string in the list.![]()
SPECIAL CONSIDERATIONS
GetStringdoes not create a copy of the string.
GetStringmay move memory; your application should not call this function at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro for theGetStringfunction is
Trap macro _GetString