win32: disk/printer, error handling, proxy support, fixes

The pull request contains 9 commits with several addition and fixes. I have tried to separate each point in a separate commit to make it easy reviewable. I hope this works this way with github.

Things are tested on win32, but not on other platforms yet.

See the indivdual commit message for details.

Looking forward for your comments.