Glossary Item Box

ImageMan DLL Suite Version 8 Submit feedback on this topic   

ImgXOptBlkAdd

int IMAPI ImgXOptBlkAdd(hOptBlk, lpszKey, lpszValue, dwType, cxBuff)

This function adds a key/value pair to an Option Block.

 

Parameter

Type

Description

hOptBlk

HANDLE

Handle to the opt block to add or alter (obtained from ImgXOptBlkCreate)

lpszKey

LPSTR

Points to the key value to add or alter.

lpszValue

LPSTR

Points to the new value for the key.

dwType

DWORD

Type should be one of the OPTBLK_xxxx types.

cxBuff

DWORD

cxBuf can be NULL if the Value is a null terminated string and dwType is OPTBLK_STRING.

 

Return Value

The return value is a handle to the Option block.

 

Example

ImgXOptBlkAdd(hOptBlk, "APPEND", my_struct, size_of_my_struct);

 

Comments

This function adds a new key value to an option block or alters an existing key value. The opt block consists of a set of key/value pairs of the form "key = value", for instance:

 

Compress = DEFAULT

TIFF_COMPRESS = GROUP3

 

To remove a key from the opt block, call ImgXOptBlkAdd, setting the key to the key you wish to remove and the value to NULL:

 

ImgXOptBlkAdd(hOptBlk, "Compress", NULL, NULL, NULL);

 

All Option Block strings are case insensitive.

See Also

See General option block keys and values.

 

 


Copyright 2008 Data Techniques, Inc. All Rights Reserved