|
|
|
@ -676,7 +676,7 @@ fail_without_close: |
|
|
|
|
wchar_t * wchar_file_name = (wchar_t *) hb_malloc (sizeof (wchar_t) * size); |
|
|
|
|
if (unlikely (!wchar_file_name)) goto fail_without_close; |
|
|
|
|
mbstowcs (wchar_file_name, file_name, size); |
|
|
|
|
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
|
|
|
|
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) |
|
|
|
|
{ |
|
|
|
|
CREATEFILE2_EXTENDED_PARAMETERS ceparams = { 0 }; |
|
|
|
|
ceparams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); |
|
|
|
@ -697,7 +697,7 @@ fail_without_close: |
|
|
|
|
|
|
|
|
|
if (unlikely (fd == INVALID_HANDLE_VALUE)) goto fail_without_close; |
|
|
|
|
|
|
|
|
|
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
|
|
|
|
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) |
|
|
|
|
{ |
|
|
|
|
LARGE_INTEGER length; |
|
|
|
|
GetFileSizeEx (fd, &length); |
|
|
|
@ -710,7 +710,7 @@ fail_without_close: |
|
|
|
|
#endif |
|
|
|
|
if (unlikely (!file->mapping)) goto fail; |
|
|
|
|
|
|
|
|
|
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
|
|
|
|
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) |
|
|
|
|
file->contents = (char *) MapViewOfFileFromApp (file->mapping, FILE_MAP_READ, 0, 0); |
|
|
|
|
#else |
|
|
|
|
file->contents = (char *) MapViewOfFile (file->mapping, FILE_MAP_READ, 0, 0, 0); |
|
|
|
|