Resource library RsrcUserDraw() RsrcXfree()
Programming guideline of WinDom

RsrcXload()

NAME

RsrcXload - load multiple resource file

PROTOTYPAGE

void *RsrcXload( char *filename);

PARAMETERS

filename:
resource file to load.

return:
0 if no error.

DESCRIPTION

As RsrcLoad(), RsrcXload() load in memory a resource file. The difference is RsrcXload() can load severals resource file. As RsrcLoad(), RsrcXload() use the PATH variable to locate the resource file (in this case, the filename should not be a pathname). The function returns a pointer which identify the resource or a NULL value if an error occurs. The pointer must be kept in memory because it is used by RsrcGaddr() to get an object address in resource and it is used by RsrcXfree() to release resource memory. Icons colors are automatically fixed by RsrcXload() using RsrcFixCicon() and transformed into a XCICON extended type. Due to this, color icons are displaying on any TOS version. To access to ICONBLK structure of a XCICON object, use the macro GET_XCICON().

EXAMPLE

     	{
     		void *rsc1, *rsc2;
     		OBJECT *tree;
     		/* Loads resources */
     		rsc1 = RsrcXload( "myrsc1.rsc");
     		rsc2 = RsrcXload( "myrsc2.rsc");
     		/* Get an object */
     		RsrcGaddr( rsc1, R_TREE, FORM1, &tree);
     		...
     
     
     		RsrcXfree( rsc2);
     		RsrcXfree( rsc1);
         }
SEE ALSO

RsrcXfree(), RsrcGaddr(), RsrcGhdr(), RsrcLoad().