Code from win8
Merge pull request #1 from tangsanyuan/local

Code from win8