PEXCreateOCC - Create an OC Context


Synopsis

 
 PEXOCC PEXCreateOCC(
          unsigned long *mask,
          PEXOCCValues *values
 )
 

Arguments

mask
A pointer to an array of one unsigned long indicating which values provided in the PEXOCCValues data structure are to be used to modify the OC Context that is created and returned by this function.

values
The address of the PEXOCCValues data structure containing the values to be used to modify the OC Context.

Returns

PEXOCC - a pointer to an opaque data structure that an application can use in subsequent OC Context manipulation functions and in OC Context attribute and primitive functions.

Description

Invoke PEXCreateOCC to create and return a PEX OC Context.

If the mask contains all zero bits, then this function sets all of the values in the context to the default values, as specified in the introduction to this section. Otherwise, for each defined bit that is one, this function copies the corresponding value from the values argument to the OC context.

Build the mask with the PEXSetOCCValueMask function.

Invoke the PEXFreeOCC function to deallocate the memory associated with the OC Context.

Errors

This function returns a NULL pointer in the case of a memory allocation error.

This function ignores undefined bits in the mask field.

Errors in setting the OC Context will not be apparent until the application actually uses the OCC as an argument in an OC function invocation.

See Also

For an overview, see Bitmask/Value Interface.