WinCE: fix cancellation safety