Re: FLAC v1.3.2 Final
Reply #65 –
I'm using 20180209__flac-HEAD-45f7d41.tar.gz and this CreateFile code (bottom) is called by grabbag__file_are_same(infilename, outfilename), resulting in the create-always of the files being compared, even if neither exist. In this case, the output.flac is being written, and so cannot be later created (sharing violation/EACCESS) when the output file is created. My compiler _MSC_VER is 1912. The #else case uses the passed in dwCreationDisposition (e.g., OPEN_EXISTING).
HANDLE WINAPI flac_internal_CreateFile_utf8(...){
#if _MSC_VER > 1900 && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
...
handle = CreateFile2(wname, dwDesiredAccess, dwShareMode, CREATE_ALWAYS, NULL);
#else
...
Also, it needs to return handle for that #if _MSC_VER > 1900 case:
...\windows_unicode_filenames.c(220): warning C4716: 'flac_internal_CreateFile_utf8': must return a value