ImageGear Professional > API Reference Guide > ART Component API Reference > ART Component Functions Reference > Named Block Management Functions > ART_mark_block_query |
This function queries a mark for the data from one of its named blocks.
Copy Code
|
|
---|---|
AT_ERRCOUNT ART_mark_block_query(
HIGEAR hIGear,
ART_MARK_INDEX hMarkIndex,
const LPART_BLOCK_NAME lpBlockName,
LPVOID lpBlockData,
LPDWORD lpBlockSize
);
|
Name | Type | Description |
hIGear | HIGEAR | HIGEAR handle to the image. |
hMarkIndex | ART_MARK_INDEX | Mark identifier. |
lpBlockName | const LPART_BLOCK_NAME | Tells ART what type of block to query. Use an ART-defined constant beginning with ART_BLOCK. See ARTAPI.H for the full list. This parameter is also a user-defined block type. |
lpBlockData | LPVOID | The block data returned. |
lpBlockSize | LPDWORD | The size of BlockData (in bytes). |
Returns the number of ImageGear errors that occurred during the function call.
All pixel formats supported by ImageGear Professional.
Copy Code
|
|
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ ART_MARK_INDEX hMarkIndex; /* index to mark */ /* associated */ /* with block being */ /* queried */ LPVOID BlockData; /* memory to hold data */ /* from block */ DWORD BlockSize; /* size of blocks, */ /* in byte */ nErrcount = ART_mark_block_query(hIGear, hMarkIndex, ART_BLOCK_ANODAT, NULL, &BlockSize); BlockData = (LPVOID)alloca(BlockSize); nErrcount = ART_mark_block_query(hIGear, hMarkIndex, ART_BLOCK_ANODAT, &BlockData, &BlockSize); |
The block data for the named block associated with lpBlockName is copied into lpBlockData. The buffer pointed to by lpBlockData is large enough to fit the named block data. The size of the block is returned to lpBlockSize.
To find the size needed for a buffer to hold the block data, set lpBlockData to NULL and the size of the block is returned in lpBlockSize.
An error is set if any of the following conditions are met: