Previous Menu Next
Example Value Extraction

The following code fragment copies an EV_STRING from requestList into a null terminated C string surname.
char* surname = 0;
EV_AttrType type;
int32 size;
void* elementData;

int index = 1;
if (requestList != 0 &&
    EV_extractElement(requestList,index,
		      &type,&size,
		      &elementData) == ECS_SUCCESS &&
    type == EV_STRING)
{
	surname = (char*) malloc(size+1);
	memcpy(surname,elementData,size);
	surname[size] = '\0';
}