====== format_GetOptionValue ====== ===== Description ===== Retrieve the value of an option in a file format. ===== Function prototype ===== bool CExtAPI::format_GetOptionValue(ZFORMAT hFormat, const char* lpOptionName, long VarID, void* pValue); ===== Arguments ===== ^ Name ^ Type ^ Comment ^ | hFormat | [[zeolite:types:ZFORMAT]] | A ZFORMAT handle, an option of which is to be retrieved. | | lpOptionName | const char* | A pointer to a C-style string, containing the option name. | | VarID | long | The expected integer [[zeolite:varid|VarID]] of the option, such as VarID_int. | | pValue | void* | A pointer (of unknown type) to the entity that shall receive the option data. It is the caller's responsibility to ensure that the appropriate memory has been allocated (see [[#example]] for usage). | ===== Return value ===== False if: * hFormat is invalid, or does not refer to a variable of type VarID_format. * lpOptionName is null, or points to a zero-length string. * The option already exists and is of a different type to that given by VarID. * The pValue pointer is invalid (null). * The data of the variable cannot be set by this method (this is true for classes such as varlist, map, ComboSelector, etc.). In such cases, you should instead use [[zeolite:functions:format_GetOptionList|CExtAPI::format_GetOptionList]], [[zeolite:functions:list_GetItemA|CExtAPI::list_GetItemA]], and then the appropriate native methods for the class. See the example provided for [[zeolite:functions:format_GetOptionList#Example|CExtAPI::format_GetOptionList]]. True otherwise. ===== Comments ===== None. ===== Example ===== // default values int TileSize = 64; bool Overlap = true; theAPI.format_GetOptionValue(hFormat, "TileSize", VarID_int, &TileSize); theAPI.format_GetOptionValue(hFormat, "Overlap", VarID_bool, &Overlap);