Added return codes.

Finished the register stored procedure. Added pReturnCode and pMessage in the return.