Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
12bf7f1d
Commit
12bf7f1d
authored
Mar 05, 2001
by
Andreas Mohr
Committed by
Alexandre Julliard
Mar 05, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetFileInformationByHandle() fails for pipe handles according to
MSDN, and also for serial handles (FILE_TYPE_CHAR in general ?).
parent
9005a21f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
file.c
files/file.c
+25
-11
No files found.
files/file.c
View file @
12bf7f1d
...
...
@@ -557,16 +557,30 @@ DWORD WINAPI GetFileInformationByHandle( HANDLE hFile,
req
->
handle
=
hFile
;
if
((
ret
=
!
SERVER_CALL_ERR
()))
{
RtlSecondsSince1970ToTime
(
req
->
write_time
,
&
info
->
ftCreationTime
);
RtlSecondsSince1970ToTime
(
req
->
write_time
,
&
info
->
ftLastWriteTime
);
RtlSecondsSince1970ToTime
(
req
->
access_time
,
&
info
->
ftLastAccessTime
);
info
->
dwFileAttributes
=
req
->
attr
;
info
->
dwVolumeSerialNumber
=
req
->
serial
;
info
->
nFileSizeHigh
=
req
->
size_high
;
info
->
nFileSizeLow
=
req
->
size_low
;
info
->
nNumberOfLinks
=
req
->
links
;
info
->
nFileIndexHigh
=
req
->
index_high
;
info
->
nFileIndexLow
=
req
->
index_low
;
/* FIXME: which file types are supported ?
* Serial ports (FILE_TYPE_CHAR) are not,
* and MSDN also says that pipes are not supported.
* FILE_TYPE_REMOTE seems to be supported according to
* MSDN q234741.txt */
if
((
req
->
type
==
FILE_TYPE_DISK
)
||
(
req
->
type
==
FILE_TYPE_REMOTE
))
{
RtlSecondsSince1970ToTime
(
req
->
write_time
,
&
info
->
ftCreationTime
);
RtlSecondsSince1970ToTime
(
req
->
write_time
,
&
info
->
ftLastWriteTime
);
RtlSecondsSince1970ToTime
(
req
->
access_time
,
&
info
->
ftLastAccessTime
);
info
->
dwFileAttributes
=
req
->
attr
;
info
->
dwVolumeSerialNumber
=
req
->
serial
;
info
->
nFileSizeHigh
=
req
->
size_high
;
info
->
nFileSizeLow
=
req
->
size_low
;
info
->
nNumberOfLinks
=
req
->
links
;
info
->
nFileIndexHigh
=
req
->
index_high
;
info
->
nFileIndexLow
=
req
->
index_low
;
}
else
{
SetLastError
(
ERROR_NOT_SUPPORTED
);
ret
=
0
;
}
}
}
SERVER_END_REQ
;
...
...
@@ -621,7 +635,7 @@ DWORD WINAPI GetFileAttributesW( LPCWSTR name )
DWORD
WINAPI
GetFileSize
(
HANDLE
hFile
,
LPDWORD
filesizehigh
)
{
BY_HANDLE_FILE_INFORMATION
info
;
if
(
!
GetFileInformationByHandle
(
hFile
,
&
info
))
return
0
;
if
(
!
GetFileInformationByHandle
(
hFile
,
&
info
))
return
-
1
;
if
(
filesizehigh
)
*
filesizehigh
=
info
.
nFileSizeHigh
;
return
info
.
nFileSizeLow
;
}
...
...
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