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
6122eeb5
Commit
6122eeb5
authored
Jun 14, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 14, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented SetFilePointerEx.
parent
8f9d07f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletion
+47
-1
file.c
dlls/kernel/file.c
+46
-0
kernel32.spec
dlls/kernel/kernel32.spec
+1
-1
No files found.
dlls/kernel/file.c
View file @
6122eeb5
...
@@ -861,6 +861,52 @@ DWORD WINAPI SetFilePointer( HANDLE hFile, LONG distance, LONG *highword,
...
@@ -861,6 +861,52 @@ DWORD WINAPI SetFilePointer( HANDLE hFile, LONG distance, LONG *highword,
/***********************************************************************
/***********************************************************************
* SetFilePointerEx (KERNEL32.@)
*/
BOOL
WINAPI
SetFilePointerEx
(
HANDLE
hFile
,
LARGE_INTEGER
distance
,
LARGE_INTEGER
*
newpos
,
DWORD
method
)
{
static
const
int
whence
[
3
]
=
{
SEEK_SET
,
SEEK_CUR
,
SEEK_END
};
BOOL
ret
=
FALSE
;
NTSTATUS
status
;
int
fd
;
TRACE
(
"handle %p offset %s newpos %p origin %ld
\n
"
,
hFile
,
wine_dbgstr_longlong
(
distance
.
QuadPart
),
newpos
,
method
);
if
(
method
>
FILE_END
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
ret
;
}
if
(
!
(
status
=
wine_server_handle_to_fd
(
hFile
,
0
,
&
fd
,
NULL
,
NULL
)))
{
off_t
pos
,
res
;
pos
=
distance
.
QuadPart
;
if
((
res
=
lseek
(
fd
,
pos
,
whence
[
method
]
))
==
(
off_t
)
-
1
)
{
/* also check EPERM due to SuSE7 2.2.16 lseek() EPERM kernel bug */
if
(((
errno
==
EINVAL
)
||
(
errno
==
EPERM
))
&&
(
method
!=
FILE_BEGIN
)
&&
(
pos
<
0
))
SetLastError
(
ERROR_NEGATIVE_SEEK
);
else
FILE_SetDosError
();
}
else
{
ret
=
TRUE
;
if
(
newpos
)
newpos
->
QuadPart
=
res
;
}
wine_server_release_fd
(
hFile
,
fd
);
}
else
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
ret
;
}
/***********************************************************************
* GetFileTime (KERNEL32.@)
* GetFileTime (KERNEL32.@)
*/
*/
BOOL
WINAPI
GetFileTime
(
HANDLE
hFile
,
FILETIME
*
lpCreationTime
,
BOOL
WINAPI
GetFileTime
(
HANDLE
hFile
,
FILETIME
*
lpCreationTime
,
...
...
dlls/kernel/kernel32.spec
View file @
6122eeb5
...
@@ -777,7 +777,7 @@
...
@@ -777,7 +777,7 @@
@ stdcall SetFileAttributesA(str long)
@ stdcall SetFileAttributesA(str long)
@ stdcall SetFileAttributesW(wstr long)
@ stdcall SetFileAttributesW(wstr long)
@ stdcall SetFilePointer(long long ptr long)
@ stdcall SetFilePointer(long long ptr long)
@ st
ub SetFilePointerEx
@ st
dcall SetFilePointerEx(long long long ptr long)
@ stdcall SetFileTime(long ptr ptr ptr)
@ stdcall SetFileTime(long ptr ptr ptr)
@ stdcall SetHandleContext(long long)
@ stdcall SetHandleContext(long long)
@ stdcall SetHandleCount(long)
@ stdcall SetHandleCount(long)
...
...
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