switch code style to kernel mode & update hide checking.