Important: The information in this document is obsolete and should not be used for new development.
PutParameter
Adds the specified parameter to this parameter set.
void PutParameter (in ParameterKey key, in void* param, in ParamDestructorUPP destructor);
key
- The name of the parameter to add.
param
- A pointer to the parameter.
destructor
- A pointer to a programmer-defined destructor for the parameter.
DISCUSSION
You call this method to add a parameter and its destructor to aParameterSet
object. If the parameter set already contains a parameter of the same name, the method throws thekCDErrParamAlreadyExists
exception.The following type is used for parameter destructor functions. A parameter destructor takes two parameters: an environment pointer and a pointer of type
void*
; the function returns no value.
The
typedef void (* ParamDestructorProc)(Environment* ev,
void* param);MyParamDestructor
programmer-defined function (page 194) illustrates the form of a parameter destructor.If you do not specify a destructor function for a parameter in a parameter set, the parameter is not destroyed when the parameter set is disposed of.
SEE ALSO
TheParameterKey
type (page 171).
TheExtractParameter
method (page 393).
TheGetParameter
method (page 396).
TheRemoveParameter
method (page 398).