Developer

API Reference

IResFile_GetNamedSource()

Brew Release
Brew MP 1.0.2
See Also
IResFile Interface IResFile_GetNamed() IResFile_GetSource()
Description

Gets a named source from a resource file. Names for a resources 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.
Loading the source, for example, of an image could look like:
      IResFile_GetNamedSource(piResFile, RESTYPE_IMAGE, &piSource, "Main", "Background", "Image", 0)

or could look like:
      IResFile_GetNamedSource(piResFile, RESTYPE_IMAGE, &piSource, "Main.Background.Image", 0)

or a mix of the above:
      IResFile_GetNamedSource(piResFile, RESTYPE_IMAGE, &piSource, "Main", "Background.Image", 0)
Parameters
  • pif
    []:
    [in] A pointer to an IResFile object.
  • restype
    []:
    [in] Type of the resource to be loaded
  • ppif
    []:
    [out] A pointer to a destination for the resulting ISource pointer ...: [in] Null-terminated string list of names (see above)

Interface
Prototype
   int IResFile_GetNamedSource(IResFile *pif, uint16 restype, ISource **ppif, ...);
Return
   AEE_SUCCESS: Resource was found and loaded
   AEE_EFAILED: Resource could not be found or failed to load
   ENOTSUPPORT: Sources are not supported for this resource file
   ENOMEMORY:   Memory could not be allocated for the source result
Side Effect
None
Comment
This function is a shortcut function for the actual interface function IResFile_GetNamedSourceV which takes an actual vararg parameter.
  • Follow