DevIL Documentation Home | Previous | Next

ilutLoadResource

The ilutLoadResource function loads a Windows resource as the current image.


ILboolean ilutLoadResource(
  HINSTANCE hInst,
  ILint ID,
  char *ResourceType,
  ILenum Type
);

Parameters

hInst
The application's HINSTANCE.
ID
The resource identifier of the resource to be loaded.
ResourceType
The type of user-defined resource (name used when creating).
Type
The type of image to be loaded. Use IL_TYPE_UNKNOWN to let OpenIL determine the type.

Remarks

ilutLoadResource is a Windows-specific function that loads a resource as the current bound image. This feature allows you to have images directly in your .exe and not worry whether a particular file is present on the user's harddrive. An alternative, more portable solution is to use ilSave with IL_CHEAD as the Type parameter.

Error Codes

ILUT_ILLEGAL_OPERATION - There is currently no image bound. Use ilGenImages and ilBindImage before calling this function.

See Also

ilGenImages, ilBindImage, ilutGetWinClipboard, ilSave