====== zvar_GetValueEx ====== ===== Description ===== Retrieve the value of a variable, ensuring first it is of the correct [[zeolite:varID|variable type]]. ===== Files ===== ^ Declaration | ''Zeolite.h'' | ^ Implementation | ''Zeolite.cpp'' | ===== Function prototype ===== bool zvar_GetValueEx(ZVAR hVar, long VarID, void* pValue); ===== Arguments ===== ^ Name ^ Type ^ Comment ^ | hVar | ZVAR | A ZVAR handle to a variable, the value of which is to be retrieved. | | VarID | long | The expected [[zeolite:varID|type ID]] of the variable. | | pValue | void* | A user-supplied handle to an allocated block of memory for the appropriate data type, ready to receive the value from the ZVAR. | ===== Return value ===== False if: - //hVar// does not reference a valid variable (e.g. is null). - //pValue// is null. - The variable referenced by //hVar// is not initialised. - The variable referenced by //hVar// is not of the type given by //VarID//. - The variable type of //hVar// cannot be copied (see [[zeolite:functions:zvar_GetValue#Comments|comments for zvar_GetValue]].) True otherwise. ===== Comments ===== Please refer to the comments for [[zeolite:functions:zvar_GetValue#Comments|zvar_GetValue]], which apply equally to this function.