Re: [PATCH] Use CreateFile2 in UWP builds

2023-05-16 Thread Steve Lhomme
Hi, On 2023-05-16 16:52, Bruno Haible wrote: Steve Lhomme wrote: CreateFileA and CreateFileW are forbidden calls in UWP. CreateFile2 is close enough, some parameters are passed in a structure and it requires a WCHAR filename. CreateFileW has an emulation in mingw's winstorecompat:

Re: [PATCH] Use CreateFile2 in UWP builds

2023-05-16 Thread Bruno Haible
Steve Lhomme wrote: > CreateFileA and CreateFileW are forbidden calls in UWP. > CreateFile2 is close enough, some parameters are passed in a structure > and it requires a WCHAR filename. CreateFileW has an emulation in mingw's winstorecompat:

[PATCH] Use CreateFile2 in UWP builds

2023-05-16 Thread Steve Lhomme
CreateFileA and CreateFileW are forbidden calls in UWP. CreateFile2 is close enough, some parameters are passed in a structure and it requires a WCHAR filename. Given the original stat uses the "multibyte code page currently in use" [1], the char should be converted using CP_ACP [2]. [1]