Windows shell integration: Always release the lock before calling win32 API

May help for 2515