Perhaps your problem is putting Windows into Lock (or even worse Hibernate). Whenever I've done something like that, it normally doesn't work out so well.
If locking your computer, without turning it off, is important to you, why not look at some of the other ideas to locking such as with your...