参考帖子http://blog.csdn.net/jiedushi/article/details/6663177
http://blog.csdn.net/ww1982_0_0_0/article/details/9170285