Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
6314cf02
Commit
6314cf02
authored
Oct 10, 2012
by
Vincas Miliūnas
Committed by
Alexandre Julliard
Oct 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Added implementation of FileIdBothDirectoryInfo for GetFileInformationByHandleEx.
parent
9cec60bb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
5 deletions
+55
-5
file.c
dlls/kernel32/file.c
+53
-0
kernel32.spec
dlls/kernel32/kernel32.spec
+1
-0
file.c
dlls/kernel32/tests/file.c
+0
-5
directory.c
dlls/ntdll/directory.c
+1
-0
No files found.
dlls/kernel32/file.c
View file @
6314cf02
...
...
@@ -864,6 +864,59 @@ BOOL WINAPI GetFileInformationByHandle( HANDLE hFile, BY_HANDLE_FILE_INFORMATION
/***********************************************************************
* GetFileInformationByHandleEx (KERNEL32.@)
*/
BOOL
WINAPI
GetFileInformationByHandleEx
(
HANDLE
handle
,
FILE_INFO_BY_HANDLE_CLASS
class
,
LPVOID
info
,
DWORD
size
)
{
NTSTATUS
status
;
IO_STATUS_BLOCK
io
;
switch
(
class
)
{
case
FileBasicInfo
:
case
FileStandardInfo
:
case
FileNameInfo
:
case
FileRenameInfo
:
case
FileDispositionInfo
:
case
FileAllocationInfo
:
case
FileEndOfFileInfo
:
case
FileStreamInfo
:
case
FileCompressionInfo
:
case
FileAttributeTagInfo
:
case
FileIoPriorityHintInfo
:
case
FileRemoteProtocolInfo
:
case
FileFullDirectoryInfo
:
case
FileFullDirectoryRestartInfo
:
case
FileStorageInfo
:
case
FileAlignmentInfo
:
case
FileIdInfo
:
case
FileIdExtdDirectoryInfo
:
case
FileIdExtdDirectoryRestartInfo
:
FIXME
(
"%p, %u, %p, %u
\n
"
,
handle
,
class
,
info
,
size
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
case
FileIdBothDirectoryRestartInfo
:
case
FileIdBothDirectoryInfo
:
status
=
NtQueryDirectoryFile
(
handle
,
NULL
,
NULL
,
NULL
,
&
io
,
info
,
size
,
FileIdBothDirectoryInformation
,
FALSE
,
NULL
,
(
class
==
FileIdBothDirectoryRestartInfo
)
);
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
return
TRUE
;
default:
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
}
/***********************************************************************
* GetFileSize (KERNEL32.@)
*
* Retrieve the size of a file.
...
...
dlls/kernel32/kernel32.spec
View file @
6314cf02
...
...
@@ -533,6 +533,7 @@
@ stdcall GetFileAttributesExW(wstr long ptr)
@ stdcall GetFileAttributesW(wstr)
@ stdcall GetFileInformationByHandle(long ptr)
@ stdcall GetFileInformationByHandleEx(long long ptr long)
@ stdcall GetFileSize(long ptr)
@ stdcall GetFileSizeEx(long ptr)
@ stdcall GetFileTime(long ptr ptr ptr)
...
...
dlls/kernel32/tests/file.c
View file @
6314cf02
...
...
@@ -3303,7 +3303,6 @@ static void test_GetFileInformationByHandleEx(void)
{
SetLastError
(
0xdeadbeef
);
ret
=
pGetFileInformationByHandleEx
(
directory
,
checks
[
i
].
handleClass
,
checks
[
i
].
ptr
,
checks
[
i
].
size
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
checks
[
i
].
errorCode
,
"GetFileInformationByHandleEx: expected error %u, "
"got %u.
\n
"
,
checks
[
i
].
errorCode
,
GetLastError
());
}
...
...
@@ -3314,18 +3313,14 @@ static void test_GetFileInformationByHandleEx(void)
ret
=
pGetFileInformationByHandleEx
(
directory
,
FileIdBothDirectoryInfo
,
buffer
,
sizeof
(
buffer
));
if
(
!
ret
&&
GetLastError
()
==
ERROR_NO_MORE_FILES
)
break
;
todo_wine
ok
(
ret
,
"GetFileInformationByHandleEx: failed to query for FileIdBothDirectoryInfo, got error %u.
\n
"
,
GetLastError
());
if
(
!
ret
)
break
;
bothDirInfo
=
(
FILE_ID_BOTH_DIR_INFO
*
)
buffer
;
while
(
TRUE
)
{
todo_wine
ok
(
bothDirInfo
->
FileAttributes
!=
0xffffffff
,
"GetFileInformationByHandleEx: returned invalid file attributes.
\n
"
);
todo_wine
ok
(
bothDirInfo
->
FileId
.
u
.
LowPart
!=
0xffffffff
,
"GetFileInformationByHandleEx: returned invalid file id.
\n
"
);
todo_wine
ok
(
bothDirInfo
->
FileNameLength
!=
0xffffffff
,
"GetFileInformationByHandleEx: returned invalid file name length.
\n
"
);
if
(
!
bothDirInfo
->
NextEntryOffset
)
break
;
...
...
dlls/ntdll/directory.c
View file @
6314cf02
...
...
@@ -2042,6 +2042,7 @@ NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event,
case
FileIdBothDirectoryInformation
:
case
FileIdFullDirectoryInformation
:
if
(
length
<
dir_info_size
(
info_class
,
1
))
return
io
->
u
.
Status
=
STATUS_INFO_LENGTH_MISMATCH
;
if
(
!
buffer
)
return
io
->
u
.
Status
=
STATUS_ACCESS_VIOLATION
;
break
;
default:
FIXME
(
"Unsupported file info class %d
\n
"
,
info_class
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment