As requested :-) Try to place the ReleaseHdc directly after the PrintWinow() call.
I have to guess for the reason, but it might be something like "as long as the HDC is locked by unmanaged code, managed code cannot access it. Therefore the HDC must be released to see the bitmap in C#"