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
fd8fae10
Commit
fd8fae10
authored
Feb 26, 2015
by
Michael Müller
Committed by
Alexandre Julliard
Jun 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Improve stub for SetFileInformationByHandle.
parent
82d090dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
6 deletions
+41
-6
file.c
dlls/kernel32/file.c
+40
-2
file.c
dlls/kernel32/tests/file.c
+0
-4
winbase.h
include/winbase.h
+1
-0
No files found.
dlls/kernel32/file.c
View file @
fd8fae10
...
...
@@ -1040,12 +1040,50 @@ BOOL WINAPI SetEndOfFile( HANDLE hFile )
return
FALSE
;
}
/***********************************************************************
* SetFileInformationByHandle (KERNEL32.@)
*/
BOOL
WINAPI
SetFileInformationByHandle
(
HANDLE
file
,
FILE_INFO_BY_HANDLE_CLASS
class
,
VOID
*
info
,
DWORD
size
)
{
FIXME
(
"%p %u %p %u - stub
\n
"
,
file
,
class
,
info
,
size
);
return
FALSE
;
TRACE
(
"%p %u %p %u
\n
"
,
file
,
class
,
info
,
size
);
switch
(
class
)
{
case
FileBasicInfo
:
case
FileNameInfo
:
case
FileRenameInfo
:
case
FileDispositionInfo
:
case
FileAllocationInfo
:
case
FileEndOfFileInfo
:
case
FileStreamInfo
:
case
FileIdBothDirectoryInfo
:
case
FileIdBothDirectoryRestartInfo
:
case
FileIoPriorityHintInfo
:
case
FileFullDirectoryInfo
:
case
FileFullDirectoryRestartInfo
:
case
FileStorageInfo
:
case
FileAlignmentInfo
:
case
FileIdInfo
:
case
FileIdExtdDirectoryInfo
:
case
FileIdExtdDirectoryRestartInfo
:
FIXME
(
"%p, %u, %p, %u
\n
"
,
file
,
class
,
info
,
size
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
case
FileStandardInfo
:
case
FileCompressionInfo
:
case
FileAttributeTagInfo
:
case
FileRemoteProtocolInfo
:
default:
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
return
TRUE
;
}
/***********************************************************************
* SetFilePointer (KERNEL32.@)
*/
...
...
dlls/kernel32/tests/file.c
View file @
fd8fae10
...
...
@@ -4614,18 +4614,15 @@ static void test_SetFileInformationByHandle(void)
/* invalid classes */
SetLastError
(
0xdeadbeef
);
ret
=
pSetFileInformationByHandle
(
file
,
FileStandardInfo
,
&
stdinfo
,
sizeof
(
stdinfo
));
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %d, error %d
\n
"
,
ret
,
GetLastError
());
memset
(
&
compressinfo
,
0
,
sizeof
(
compressinfo
));
SetLastError
(
0xdeadbeef
);
ret
=
pSetFileInformationByHandle
(
file
,
FileCompressionInfo
,
&
compressinfo
,
sizeof
(
compressinfo
));
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %d, error %d
\n
"
,
ret
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pSetFileInformationByHandle
(
file
,
FileAttributeTagInfo
,
&
fileattrinfo
,
sizeof
(
fileattrinfo
));
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %d, error %d
\n
"
,
ret
,
GetLastError
());
memset
(
&
protinfo
,
0
,
sizeof
(
protinfo
));
...
...
@@ -4633,7 +4630,6 @@ todo_wine
protinfo
.
StructureSize
=
sizeof
(
protinfo
);
SetLastError
(
0xdeadbeef
);
ret
=
pSetFileInformationByHandle
(
file
,
FileRemoteProtocolInfo
,
&
protinfo
,
sizeof
(
protinfo
));
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %d, error %d
\n
"
,
ret
,
GetLastError
());
CloseHandle
(
file
);
...
...
include/winbase.h
View file @
fd8fae10
...
...
@@ -2460,6 +2460,7 @@ WINBASEAPI VOID WINAPI SetFileApisToOEM(void);
WINBASEAPI
BOOL
WINAPI
SetFileAttributesA
(
LPCSTR
,
DWORD
);
WINBASEAPI
BOOL
WINAPI
SetFileAttributesW
(
LPCWSTR
,
DWORD
);
#define SetFileAttributes WINELIB_NAME_AW(SetFileAttributes)
WINBASEAPI
BOOL
WINAPI
SetFileInformationByHandle
(
HANDLE
,
FILE_INFO_BY_HANDLE_CLASS
,
LPVOID
,
DWORD
);
WINBASEAPI
DWORD
WINAPI
SetFilePointer
(
HANDLE
,
LONG
,
LPLONG
,
DWORD
);
WINBASEAPI
BOOL
WINAPI
SetFilePointerEx
(
HANDLE
,
LARGE_INTEGER
,
LARGE_INTEGER
*
,
DWORD
);
WINADVAPI
BOOL
WINAPI
SetFileSecurityA
(
LPCSTR
,
SECURITY_INFORMATION
,
PSECURITY_DESCRIPTOR
);
...
...
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