This function returns one of the following values:
0 if successful.
-1 if an error occurs (for example, if an invalid ID is specified).