Commit Graph

462 Commits

Author SHA1 Message Date
Martin Wilck 9ca4285a9f Fixed ReadFile() semantics when reading asynchronously on sockets.
Provide more accurate status codes than STATUS_UNSUCCESSFUL.
2002-04-25 22:58:59 +00:00
Martin Wilck af16c98f71 Implemented overlapped WSARecvFrom(), WSASendTo(), and
WSAGetOverlappedResult().
Fixed shutdown() to work correctly for overlapped sockets (do not
actually do a shutdown() system call as long as there are pending
overlapped requests).
Also added correct error reporting when trying to read or write on a
shut down connection, also for ReadFile()/WriteFile() calls.
2002-04-25 21:34:24 +00:00
Martin Wilck ef79c38e76 Avoid segfault with overlapped WriteFile() calls. 2002-04-23 19:27:51 +00:00
Eric Pouech ac24236d9a Always close fd when reading super block. 2002-04-22 22:34:00 +00:00
Martin Wilck e0587d4a64 GetOverlappedResult: Return ERROR_IO_INCOMPLETE if IO still pending.
ReadFile / WriteFile: Use GetOverlappedResult() to check for immediate
completion.
2002-04-17 16:46:06 +00:00
Martin Wilck 08867f7149 - Need a "cleanup" method.
- calling the "call_completion" method unconditionally in finish_async
  (introduced by me) was wrong, because the thread may never be in an
  alertable wait state -> call it only if user completion function is present.
- We need two constant "ops" objects, one with and one without call_completion
  method (the event field may NOT be used to determine whether the completion
  must be called or not).
2002-04-14 19:34:57 +00:00
Stefan Leichter f25efa0660 Compile fixes for gcc 2.7.2.3. 2002-04-11 17:34:46 +00:00
Martin Wilck 2b47fb3cee - separate cleanly between async scheduling and file IO related issues.
- make the API compatible with other types of async requests (e.g. for
  sockets).
- remove exports of async IO related functions for DLL separation.
2002-04-05 22:53:57 +00:00
Alexandre Julliard 1bb69a0c09 Make GetFullPathName fail if input path name is empty. 2002-04-02 02:46:27 +00:00
Francois Gouget 34372dcbf0 Fix SetFileAttributes to honor the umask (rather than making files
world-writable).
2002-03-29 18:17:35 +00:00
Patrik Stridvall f89d4a8673 Fixed some issues found by winapi_check. 2002-03-23 21:39:05 +00:00
Alexandre Julliard 8d1550d1c6 Export the FILE_GetUnixHandle functionality from ntdll. 2002-03-23 18:48:12 +00:00
Gerald Pfeifer c8764e4de0 Add missing #includes for FreeBSD and Solaris. 2002-03-19 02:06:25 +00:00
Mike McCormack fc93261150 Begin to make wine an SMB client. 2002-03-12 19:24:04 +00:00
Mike McCormack 4a6b990ce8 Set an overlapped hEvent before calling any APCs. 2002-03-11 01:19:29 +00:00
Alexandre Julliard 0799c1a780 Added LGPL standard comment, and copyright notices where necessary.
Global replacement of debugtools.h by wine/debug.h.
2002-03-09 23:29:33 +00:00
Andreas Mohr 8f925ae5c8 Implemented "App Paths" registry key support for SearchPath(). 2002-02-27 18:49:40 +00:00
Andreas Mohr c8dcafc65e Fixed overflow and signed/unsigned behaviour. 2002-02-27 18:49:06 +00:00
Peter Hunnisett 73ab649ced New file msvcrt/excpt.h. Move some stuff out of winnt.h into it. 2002-02-25 20:10:35 +00:00
Gerhard W. Gruber 814a3fa2a1 MoveFileEx now enters the files in the registry when the boot delay
flag is set.
2002-02-22 21:30:22 +00:00
Jukka Heinonen 34f5563dab Added missing break statement. 2002-02-12 18:45:06 +00:00
Gerhard Gruber 024a0ac158 WritePrivateProfileSection should allow to create duplicate keys
because it takes the buffer as it is without any modifications.
2002-02-05 19:44:54 +00:00
Jukka Heinonen fd33517a41 Added support for DOS EMS memory. 2002-01-29 17:55:21 +00:00
Aric Stewart c43985b275 GetDiskFreeSpace needs to set the last error on failure. 2002-01-29 02:45:23 +00:00
Marcus Meissner 4589a07499 Handle section==NULL (error) in WritePrivateProfileStringA. 2002-01-21 23:36:53 +00:00
Alexandre Julliard 45342a35fe Fixed function prototype that confused winapi_extract. 2002-01-21 17:37:24 +00:00
Dmitry Timoshkov 4291e45c98 Fix return value of GetWindowsDirectoryA/W and GetSystemDirectoryA/W. 2002-01-18 18:53:11 +00:00
Eric Pouech 5cc6105b39 Changed the Wine internal cdrom interface to the NT model. 2002-01-13 01:44:00 +00:00
Martin Wilck 88cd32b2d1 More general approach to file descriptor types and flags. 2002-01-09 20:30:51 +00:00
Martin Wilck 718b1b711b Add server side support for async IO on files.
Use pread/pwrite to read/write from the offset specified in the
overlapped structure.
2002-01-07 21:02:15 +00:00
Mike McCormack 99a5cfea91 - Attempt write before going overlapped in Writefile.
- Fix return codes in WriteFileEx.
2002-01-07 18:11:28 +00:00
Mike McCormack de339f3021 Implement CancelIo properly. 2002-01-07 18:06:59 +00:00
Mehmet Yasar 39e001962b Do not save empty sections names. 2002-01-04 18:24:37 +00:00
Mike McCormack 9119543795 Set an overlapped's hEvent for ReadFile/WriteFile in an overlapped
completion function, not in ReadFileEx or WriteFileEx.
2002-01-01 01:11:32 +00:00
Alexandre Julliard 193cf50a09 Removed some of the calls to HEAP_strdup* functions. 2002-01-01 00:24:30 +00:00
Mike McCormack 5d754fc958 Don't return from overlapped ReadFile on EAGAIN and other non-fatal
errors.
2001-12-21 19:16:33 +00:00
Mike McCormack 6f011c0847 - move async activation into the server
- implement async queues
2001-12-20 00:07:05 +00:00
Mike McCormack 27cf4a41c2 Implemented timed-out non-overlapped ReadFile. 2001-12-19 18:48:29 +00:00
Alexandre Julliard 9caa71eef4 Redesign of the server communication protocol to allow arbitrary sized
data to be exchanged.
Split request and reply structures to make backwards compatibility
easier.
Moved many console functions to dlls/kernel, added code page support,
changed a few requests to behave properly with the new protocol.
2001-11-30 18:46:42 +00:00
Eric Pouech 0b83d4cbc6 New console code based on Win32 windows. 2001-11-23 23:04:58 +00:00
Andreas Mohr 9cef2d0b1d - fix wrong hexadecimal GetLastError() output
- misc fixes
- changed my email address
2001-11-19 02:30:01 +00:00
François Gouget 1425941e29 Fix the #include order for config.h.
Add #include "config.h" directives where needed.
2001-11-06 20:57:11 +00:00
Ove Kaaven 708a846a88 Save a disk file's drive type in the server object. 2001-10-24 00:23:25 +00:00
Francois Gouget 3bb9a36ee0 Spelling, grammar and a bit of comment formatting fixes. 2001-10-22 19:04:32 +00:00
Andreas Mohr e15badb478 Cosmetics. 2001-10-21 15:18:15 +00:00
Mike McCormack ea4f32c4eb Separate code to overlapped timeouts into FILE_GetTimeout. 2001-10-17 17:45:11 +00:00
Francois Gouget 386cf6e342 When including 'wine/port.h', include it first.
Remove redundant 'config.h' includes.
2001-10-14 16:25:47 +00:00
Eric Pouech 3bbeb72d3f Pass security attributes for DOSFS creation. 2001-10-14 16:08:45 +00:00
Mike McCormack 9e1fc62651 Do overlapped reads if and only if the file was opened with
FILE_FLAG_OVERLAPPED.
2001-10-10 20:26:58 +00:00
Gerard Patel d6bd28222e GetDiskFreeSpaceEx should accept an input like "C:". 2001-10-08 22:15:39 +00:00
Eric Pouech c73316db5b - fixed copy&paste bug (GENERIC_WRITE instead of GENERIC_READ)
- when getting the type of a handle, it has to be done even if no fd
  is attached to it (console for example)
2001-10-08 20:57:12 +00:00
Mike McCormack 568c67e173 Make serial fd blocking mode depend on FILE_FLAG_OVERLAPPED. 2001-10-08 20:40:57 +00:00
Mike McCormack ff58be5c7f Fetch a handle type in FILE_GetUnixHandle. 2001-10-04 16:18:15 +00:00
Andreas Mohr f359895daf Yet another documentation/message text patch. 2001-10-02 17:49:20 +00:00
Uwe Bonnes ef3d022c62 Check for NULL path argument in DeleteFile. 2001-10-02 17:40:33 +00:00
Ove Kaaven 72f404421c Make MoveFileEx fail with ERROR_INVALID_PARAMETER (better than
crashing) when the source file operand is NULL.
2001-10-01 20:52:00 +00:00
Ove Kaaven 7efa8e258e A failure to open a pipe should return INVALID_HANDLE_VALUE. 2001-09-25 22:37:32 +00:00
Andreas Mohr 7bed696aa3 Updates and error message improvements. 2001-09-19 22:34:38 +00:00
Francois Gouget 9f88a54273 Make relative paths of [Drive] sections relative to WINEPREFIX. 2001-09-17 20:44:00 +00:00
Francois Gouget 60a83ef0f1 Fix the error returned by GetLongPathNameA. 2001-09-14 00:59:58 +00:00
Francois Gouget 19b05e5f28 Reimplement PROFILE_GetSectionNames to match the NT & MSDN behavior.
The 32A version is now the reference implementation (instead of the
16bit version).
2001-08-28 18:39:26 +00:00
Bill Medland 65fc1c92d4 Added LOAD_WITH_ALTERED_SEARCH_PATH support to LoadLibraryEx. 2001-08-24 21:13:02 +00:00
Mike McCormack b473a0f0b9 Added stub for CancelIo. 2001-08-22 18:02:39 +00:00
Mike McCormack 6f030e8d13 Read data immediately in overlapped ReadFile if possible. 2001-08-20 18:01:17 +00:00
Alexandre Julliard 301df6b5cd Added names to standard critical sections (suggested by Andreas
Mohr).
2001-08-16 18:12:56 +00:00
Alexandre Julliard 5f728cae70 Removed HEAP_strdupA. 2001-07-24 21:45:22 +00:00
Bernhard Rosenkraenzer 5dda1f7e2c Set executable permissions when creating .exe/.com files. 2001-07-23 18:09:41 +00:00
Lionel Ulmer f89722dbdb Fix 'undocumented' behaviour of GetPrivateProfileString. 2001-07-20 17:55:39 +00:00
Alexandre Julliard 37e9503ae8 Moved server.h to include/wine. 2001-07-19 00:39:09 +00:00
Patrik Stridvall 33929be46f - Made sure that the files that contains the declarations
of implementated functions are included.
- Corrected mismatching prototypes.
- Cleaned up the include section.
2001-07-18 21:04:23 +00:00
Patrik Stridvall e9782fa1fc Documentation fixes. 2001-07-12 22:33:51 +00:00
Mike McCormack e61ad3a9f3 Implement overlapped completion routines.
Don't use lpOverlapped->OffsetHigh to store bytes to transfer.
2001-07-12 22:29:41 +00:00
Patrik Stridvall 044855c6ec Documentation fixes. 2001-07-11 18:56:41 +00:00
Mike McCormack de7c3003e2 Start implementing named pipes. 2001-07-10 19:16:49 +00:00
Mike McCormack a38e5e5771 Implement ReadFileEx and WriteFileEx (lpOverlappedCompletion routine
is not supported yet...)
2001-07-08 20:29:26 +00:00
Patrik Stridvall 01d5e5b071 Documentation fixes. 2001-07-02 19:59:40 +00:00
Mike McCormack 838a3614f6 Declare stubs for ReadFileEx, WriteFileEx. 2001-07-02 18:56:01 +00:00
Patrik Stridvall 3ca9823941 Documentation ordinal fixes. 2001-06-20 23:03:14 +00:00
Patrik Stridvall dae8de69e2 Documentation ordinal fixes (using winapi_fixup). 2001-06-13 20:13:18 +00:00
Marcus Meissner ee6ea51c02 Check for enough buffer space in PROFILE_GetSection(). 2001-06-06 21:03:40 +00:00
Marcus Meissner 6bb990f7fd Drop any file64 functions, try to use system supplied 64-bit mode by
using proper defines.
2001-05-29 20:55:21 +00:00
Marcus Meissner 04d5efdf27 Don't just assume everything is a Dos Device, or mirc will not get any
DCC sends.
2001-05-25 20:39:45 +00:00
Marcus Meissner 3f1ed52d8b Implemented 64bit file size handling.
Removed several unneeded sys/stat.h includes.
2001-05-14 20:09:37 +00:00
Francois Gouget ee285b7ac8 Remove unnecessary single quoting of debugstr_xxx strings. 2001-05-11 20:03:40 +00:00
Francois Gouget e76218dd61 Add '\n' at the end of traces. 2001-05-09 17:31:31 +00:00
Francois Gouget 09a17830ac Potential buffer overflow in PROFILE_CopyEntry. 2001-05-07 18:11:57 +00:00
Dominik Strasser 4f46b5de45 Allow illegal handles in FindClose. 2001-04-20 18:38:41 +00:00
Andreas Mohr f32f918123 Spelling fixes. 2001-04-20 18:36:05 +00:00
Alexandre Julliard 2ec34e48a3 Added TASK_GetPtr/TASK_GetCurrent functions to get the TDB for a task
handle.
2001-04-04 00:21:05 +00:00
Alexandre Julliard 9515336378 Small dll separation fixes. 2001-03-23 19:13:23 +00:00
Michael McCormack 1c32a46d5a Use poll() on the client-side during server waits to implement
overlapped I/O.
2001-03-22 20:09:34 +00:00
Alexandre Julliard 566a52ad8c Changed isolated for loops to while loops (based on a patch by Andreas
Mohr).
2001-03-05 19:34:17 +00:00
Andreas Mohr 12bf7f1dde GetFileInformationByHandle() fails for pipe handles according to
MSDN, and also for serial handles (FILE_TYPE_CHAR in general ?).
2001-03-05 19:30:52 +00:00
Andreas Mohr 8c2f4b18fa Some more message cleanups. 2001-03-03 00:22:50 +00:00
Alexandre Julliard 8859d77279 Create the server pipes on the client side and transfer them to the
server on thread creation.
Use a single per-process socket instead of one per thread for
transferring file handles between client and server.
2001-03-01 22:13:49 +00:00
Alexandre Julliard f52424055f New mechanism to transfer file descriptors from client to server. 2001-02-28 21:45:23 +00:00
Alexandre Julliard 67a749999a New set of macros for server calls; makes requests without variable
part somewhat faster.
2001-02-27 02:09:16 +00:00
Alexandre Julliard 61d32b4e0d Allocations do not need to be on the system heap. 2001-02-23 01:35:36 +00:00
Rein Klazes 0a78857956 Correct error message in case DOSFS_OpenDevice() fails on a COMx
device.
2001-02-20 01:52:41 +00:00
Gerard Patel d52e1c4be9 Gives back the ERROR_FILE_NOT_FOUND to GetFileAttributes. 2001-02-16 19:05:42 +00:00