This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):
If the cookie was successfully decoded and coped.
If the cookie or buffer is NULL..
If the defined size is smaller than the decoded value.
If any other error occurred.