Re: winspool: Add a test for DeviceCapabilities, fix some bugs found