IL_CREATE_CONTEXT(3X)
NAME
IL_CREATE_CONTEXT − create an Image Library context
SYNOPSIS
ilError
IL_CREATE_CONTEXT (
ilContext *pContext,
long mustBeZero);
DESCRIPTION
IL_CREATE_CONTEXT() creates an ilContext data structure and returns a pointer to it. To destroy the context, use ilDestroyContext().
IL_CREATE_CONTEXT() is a macro that passes a version number defined in il.h to a function in the Image Library. If IL_CREATE_CONTEXT() finds the version number is greater than its own definition, it returns an IL_ERROR_VERSION_MISMATCH error. This error indicates the context was not created, because the installed Image Library is an old version, which does not support the features exposed in the current il.h.
*pContext receives the pointer to the ilContext created.
mustBeZero is a value that must be zero; this parameter is reserved for future use.
RETURN VALUE
Upon successful completion, IL_CREATE_CONTEXT() returns IL_OK (0) and sets *pContext to the newly-created context; if the call fails, it returns a non-zero error code.
EXAMPLE
The following example creates and destroys an Image Library context
ilContext context;
ilError errCode;
.
.
.
if (!(errCode = IL_CREATE_CONTEXT(&context, 0))) return (errCode);
.
.
.
ilDestroyContext(context);
AUTHOR
IL_CREATE_CONTEXT() was developed by HP.
SEE ALSO
Using the Image Developer’s Kit.
Hewlett-Packard Company — Image Library: February, 1995