Developer

API Reference

IRESFILE_GetNamedString()

deprecated
Items marked as deprecated have been replaced by a more powerful, alternative feature. Deprecated interfaces include a reference to the replacement interface, which should be used for all new application development. Deprecated features are still supported for backward compatibility, but should be avoided when developing new applications.
Brew Release
Brew MP 1.0.2
See Also
IResFile IResFile_GetNamed() ISHELL_LoadResString()
Description

This method is deprecated.
Retrieves the string for a named resource in a resource file. Names for a resource can be given as a variable set of null terminated string arguments. Each string specifies one or more levels in the naming tree. A simple string without '.' characters specifies a single level in the naming tree where as a dot separated set of names in a string specify a series of names in the naming tree. The final argument must be 0 to indicate the end of the name list.
Finding a size of named string can be done by passing -1 as the buffer argument, as follows:
      IRESFILE_GetNamedString(piResFile, (AECHAR*)-1, &len, "Main", "Dialog", "Title", 0))

After allocating the buffer, a future call would retrieve the actual string:
      IRESFILE_GetNamedString(piResFile, pBuf, &len, "Main", "Dialog", "Title", 0))

If successful, the number of bytes copied with be stored in len.
Parameters
  • po
    []:
    A pointer to an IResFile object.
  • buf
    []:
    Pointer to a storage area for the located string
  • plen
    []:
    Pointer to size of resource or input buffer

Interface
IRESFILE
Prototype
   int   IRESFILE_GetNamedString(IResFile *po, AECHAR *buf, uint32 *plen, ...)   
Return
SUCCESS, if the named resource was found and the resource id located EBADPARM, if one of the given parameters is invalid EBADSTATE, if this resource file is not open EUNSUPPORTED, if this resource file does not support named resources EUNABLETOLOAD, if the named resource could not be resolved
Side Effect
None
Comment
This function is a shortcut function for the actual interface function IRESFILE_GetNamedStringV which takes an actual vararg parameter.
  • Follow