ImageGear for C and C++ on Linux v20.0 - Updated
API Reference Guide > ART Component API Reference > ART Component Functions Reference > Global Named Block Management Functions > ART_global_block_next

This function gets the name of the next global block associated with the HIGEAR image, and iterates through all global named blocks.


Copy Code
AT_ERRCOUNT ART_global_block_next(
        HIGEAR hIGear, 
        LPART_BLOCK_NAME lpBlockName


Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
lpBlockName LPART_BLOCK_NAME A far pointer to an 8-byte array of memory that returns the type of block to query. The block type is either an ART-defined constant beginning with ART_BLOCK or a user-defined block. See ARTAPI.H file for the full list of ART-defined constants.

Return Value:

Returns the number of ImageGear errors that occurred during the function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.


Copy Code
HIGEAR hIGear; /* HIGEAR handle of image */
ART_BLOCK_NAME lpBlockName; /* returned type of first */ 
/* global block  */
AT_ERRCOUNT nErrcount; /* tally of IG errors */ 
/* on stack  */
nErrcount = ART_global_block_first(hIGear,&lpBlockName);
while (*lpBlockName)
  if (!memcmp(&lpBlockName, "EYEBALL\0", 8))
nErrcount = ART_global_block_next(hIGear,


ART_global_block_first() gets the first block name. The block data for the named block is retrieved by calling ART_global_block_query() function. This function sets lpBlockName to zero when there are no more blocks, providing you with an easy check for ending your loop. Block names are returned in no particular order.

An error is set if any of the following conditions are met:

Is this page helpful?
Yes No
Thanks for your feedback.