# PetscObjectGetCookie

Gets the cookie for any PetscObject,

### Synopsis

    #include "petsc.h"
    PetscErrorCode PETSC_DLLEXPORT PetscObjectGetCookie(PetscObject obj,PetscCookie *cookie)

Not Collective

### Input Parameter

obj -any PETSc object, for example a Vec, Mat or KSP. Thus must be cast with a (PetscObject), for example, PetscObjectGetCookie((PetscObject)mat,&cookie);

### Output Parameter

cookie -the cookie

Level:developer
Location:src/sys/objects/gcookie.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages