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
4072c64a
Commit
4072c64a
authored
Jul 25, 2002
by
Uwe Bonnes
Committed by
Alexandre Julliard
Jul 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fill lpcbAvail for PeekNamedPipe.
parent
ebc6feb5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
sync.c
dlls/kernel/sync.c
+27
-3
No files found.
dlls/kernel/sync.c
View file @
4072c64a
...
...
@@ -21,6 +21,11 @@
#include "config.h"
#include <string.h>
#include <unistd.h>
#include <errno.h>
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#include "winbase.h"
#include "winerror.h"
...
...
@@ -28,6 +33,7 @@
#include "wine/server.h"
#include "wine/unicode.h"
#include "file.h"
#include "wine/debug.h"
...
...
@@ -530,9 +536,28 @@ HANDLE WINAPI CreateNamedPipeW( LPCWSTR name, DWORD dwOpenMode,
BOOL
WINAPI
PeekNamedPipe
(
HANDLE
hPipe
,
LPVOID
lpvBuffer
,
DWORD
cbBuffer
,
LPDWORD
lpcbRead
,
LPDWORD
lpcbAvail
,
LPDWORD
lpcbMessage
)
{
FIXME
(
"(%08x, %p, %08lx, %p, %p, %p): stub
\n
"
,
hPipe
,
lpvBuffer
,
cbBuffer
,
lpcbRead
,
lpcbAvail
,
lpcbMessage
);
int
avail
=
0
,
fd
;
fd
=
FILE_GetUnixHandle
(
hPipe
,
GENERIC_READ
);
if
(
fd
==
-
1
)
return
FALSE
;
/* On linux fstat on pipes doesn't work */
if
(
ioctl
(
fd
,
FIONREAD
,
&
avail
)
!=
0
)
{
TRACE
(
"FIONREAD failed reason: %s
\n
"
,
strerror
(
errno
));
close
(
fd
);
return
FALSE
;
}
close
(
fd
);
TRACE
(
" 0x%08x bytes available
\n
"
,
avail
);
if
(
!
lpvBuffer
&&
lpcbAvail
)
{
*
lpcbAvail
=
avail
;
return
TRUE
;
}
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
FIXME
(
"function not implemented
\n
"
);
return
FALSE
;
}
...
...
@@ -800,4 +825,3 @@ BOOL WINAPI CallNamedPipeW(
lpOutput
,
lpOutputSize
,
lpBytesRead
,
nTimeout
);
return
FALSE
;
}
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