ENV_SearchByType

C Specification

#include <nitro/env.h>
ENVResource* ENV_SearchByMember(
           ENVResourceIter*  iter,
           u16              type );
  

Arguments

iter The resource iterator.
type The type of resource to search for. (ENV_RESTYPE_xxx)

Return Values

Returns a pointer to the resource if it was able to be obtained.
Returns a NULL if not.

Description

Searches for and obtains the designated resource of the resource type.

Be sure to prepare a resource iterator in advance and initialize it with ENV_InitIter(). By continuously searching with this iterator, you can successively obtain resources that match the conditions.

For further information about resource types, refer to ENV_GetType.

(Example)
Below is an example of obtaining a resource of resource type u32.

ENVResourceIter iter;
ENVResource* p;

ENV_InitIter( &iter );
while( (p = ENV_SearchByType( &iter,
ENV_RESTYPE_U32 )
) )
{
OS_Printf( "resource = %s\n", p->name );
}

See Also

ENV_Init, ENV_GetType, ENV_InitIter
ENV_SearchByClass, ENV_SearchByMember, ENV_SearchByPartialName

ENV_GetLastResourceSetForIter

Revision History

08/18/2005 Initial version.