winrt: Fully initialize CREATEFILE2_EXTENDED_PARAMETERS struct
Not properly initializing all members of the extended parameter struct will cause an "invalid handle specified" exception on use. Task-number: QTBUG-63883 Change-Id: Ic3a58df864c9e29ccbadc04bd71c18c8ef34374c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
This commit is contained in:
parent
c99d8532c8
commit
c05268222c
@ -628,6 +628,9 @@ QByteArray QFileSystemEngine::id(const QFileSystemEntry &entry)
|
||||
params.dwSize = sizeof(params);
|
||||
params.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
|
||||
params.dwFileFlags = FILE_FLAG_BACKUP_SEMANTICS;
|
||||
params.dwSecurityQosFlags = SECURITY_ANONYMOUS;
|
||||
params.lpSecurityAttributes = NULL;
|
||||
params.hTemplateFile = NULL;
|
||||
const HANDLE handle =
|
||||
CreateFile2((const wchar_t*)entry.nativeFilePath().utf16(), 0,
|
||||
FILE_SHARE_READ, OPEN_EXISTING, ¶ms);
|
||||
|
Loading…
Reference in New Issue
Block a user