Remove GetMsgCode

too simple and not needed except in one place