In case of string parameters, additional memory for the parameter values has to be allocated, because the Hcpar structure only contains a pointer to char. The easiest way to do this is to use HAllocStringMem specifying the expected number of characters for all input strings (parameter size) at the begin of a supply procedure, see figure 5.32 and figure 5.33. It is not necessary to free this memory explicitly — this is done automatically at the end of the supply procedure.
Note that HAllocStringMem automatically checks the result state of the underlying procedure using HCkP (see section “HCkP”). Thus, you must not use HCkP on HAllocStringMem yourself.