This function queries a mark for the data from one of its named blocks.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ART_mark_block_query(
HIGEAR hIGear,
ART_MARK_INDEX hMarkIndex,
const LPART_BLOCK_NAME lpBlockName,
LPVOID lpBlockData,
LPDWORD lpBlockSize
);
|
Arguments:
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). |
Return Value:
Returns the number of ImageGear errors that occurred during the function call.
Supported Raster Image Formats:
All pixel formats supported by ImageGear Professional.
Sample:
Annotation
Example:
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); |
Remarks:
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:
- hIGear does not reference a valid ImageGear handle.
- There are no marks with a matching index block.
- lpBlockName does not point to a valid address.
- lpBlockData does not point to a valid address or is not NULL.
- lpBlockData points to a buffer smaller than the block data.
- lpBlockSize points to an invalid address.
- lpBlockSize points to a value smaller than the size of the block data.