http://bugs.winehq.org/show_bug.cgi?id=7025
Summary: StgOpenStorage API function should not create a file if file does not exist Product: Wine Version: 0.9.28. Platform: PC-x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-files AssignedTo: wine-bugs@winehq.org ReportedBy: mikegardiner@bigpond.com
Comparing the behaviour of StgOpenStorage in Wine and WindowsXP, Windows: StgOpenStorage calls CreateFileW with the creation parameter set to OPEN_EXISTING, even if the file does not exist. Wine: StgOpenStorage calls CreateFileW with the creation parameter set to CREATE_NEW if the file does not exist.
This confuses an application that I am trying to get fully working (Orcad Capture 9.2), because it expects the StgOpenStorage API to return an error if the file does not exist. I removed the code in StgOpenStorage that creates the file if it does not exist, so it now behaves as the Windows fn does, and this fixed this particular bug in Orcad.