This function takes the following parameters:
Pointer to a cookie.
Pointer to a value.
Pointer to a pointer to the location of the new cookie.