I added a CancelIO statement just before the CloseHandle statement and have not been able to reproduce the blue screen since then. Not that I want it to happen (!) but I tried connecting then immediately disconnecting and things like that and there no longer seems to be a problem.
Thanks vart,
Philipp