PTM_U: Implemented the GetShellState function.