Commit Graph

235 Commits (b8675b431210ff6cbddf4aff71472df74bec50c8)

Author SHA1 Message Date
Eric Pouech 9bd4f6bf15 - made async.h ready for use in ntdll: replaced all calls to kernel32
functions with ntdll equivalent
- replaced status setter/getter for wine async structures with direct
  access to a (now included) IO_STATUS_BLOCK structure
- since we now have a IO_STATUS_BLOCK in async_private, we no longer
  need in most of the user (derivated) structures a field for
  LPOVERLAPPED (it's stored as the IO_STATUS_BLOCK)
- rewrote the async.h users accordingly
- implemented ntdll.Nt{Read|Write}File and let
  kernel32.{Read|Write}File(Ex)? use those new ntdll functions
- rewrote smb read/write interfaces to be more ntdll stylish (no
  overlapped yet)
2003-06-26 02:08:17 +00:00
Eric Pouech f6a70969e1 - start moving a few file related functions from files/file.c to
dlls/kernel subdir (also splitting 16bit APIs in a separate file)
- implemented ntdll.Nt{Lock|Unlock}File, and made use of those for the
  kernel32 equivalent
- implemented a few information classes in NtQueryInformationFile and
  NtSetInformationFile (still lots of missing classes)
- enhanced the get_file_info server request in order to implement
  correctly NtQueryInformationFile (change time & file alloc size)
- rewrote registry loading to comply with latest changes
2003-06-24 02:32:01 +00:00
Eric Pouech 412d37f6e6 - adapted kernel32 so that it no longer (directly) manages console
handles as wineserver handles
- console input handle object is no longer waitable (input record
  synchronisation is now implemented as a simple semaphore), and removed
  FD_TYPE_CONSOLE from fd types in wineserver
- console handles now always have their two lower bit set so one can
  distinguish a console handle from a kernel object handle
- implemented some undocumented kernel32 console related APIs
  (CloseConsoleHandle, GetConsoleInputWaitHandle, OpenConsoleW,
  VerifyConsoleIoHandle, DuplicateConsoleHandle)
- allowed a few kernel32 APIs to take console pseudo-handles
  (FlushFileBuffer, GetFileType, WaitFor*Object*)
- simplified the console inheritance at process creation
- in console tests, no longer create a console if one already exists
2003-06-21 02:07:10 +00:00
Alexandre Julliard 693bbd79b6 Make it possible to retrieve an inheritable handle in open_named_pipe
(spotted by Uwe Bonnes).
2003-06-14 01:31:56 +00:00
Philip Mason 1840e1890f Force FILE_GetTempFileName to continue looking for new temp file name
if error returned from CreateFileW is ERROR_SHARING_VIOLATION.
2003-05-15 22:57:48 +00:00
Eric Pouech b6338878a8 Moved kernel32.FlushFileBuffers to ntdll.NtFlushBuffersFile. 2003-04-22 04:04:17 +00:00
Alexandre Julliard ce61349334 Implemented file locking functions (partly based on my old Corel
patch). Added a few regression tests.
2003-03-18 05:04:33 +00:00
Alexandre Julliard 28d65b1ac9 MoveFile[AW] should simply call MoveFileEx[AW]. Should fix issue
reported by Roderick Colenbrander.
2003-02-26 20:28:37 +00:00
Shachar Shemesh 85a52cb27c Removed the FIXMEs when performing MoveFileEx with
MOVEFILE_DELAY_UNTIL_REBOOT, as wineboot will now take care of it.
2003-01-11 21:03:18 +00:00
Shachar Shemesh 44fb75f62c Set correct last error if the path contains wildcard characters. 2003-01-10 01:44:24 +00:00
Dimitrie O. Paun 297f3d898d Define NONAMELESS{STRUCT,UNION} explicitly in the files that need them. 2003-01-07 20:36:20 +00:00
Alberto Massari c019f53568 Add stub implementation for ReplaceFile. 2003-01-02 19:24:42 +00:00
György 'Nog' Jeney f7694794de - Reimplement time functions using ntdll functions.
- Some cleanups.
2002-12-13 20:30:06 +00:00
Francois Gouget e948ad1fc7 Fix the error codes returned by DeleteFile{A,W} to match NT.
Adapt the DeleteFileA error code checks to take into account variations
between Win9x and NT.
Test DeleteFile(NULL).
Add tests for DeleteFileW.
On NT, calling _lclose on an already closed handle will cause memory
corruption and thus sometimes crash -> removed the relevant test.
Skip the Unicode tests when on Win9x.
2002-12-12 03:54:01 +00:00
Martin Wilck 60cba9999c Fixed some problems with asynchronous file IO. 2002-11-30 01:48:32 +00:00
Andrew John Hughes ed800c69c8 Build ntdll with -DSTRICT. 2002-11-21 03:45:01 +00:00
Ryan Cumming 4cda16e03b Implemented GetFileSizeEx (based on a patch by Steve Lustbader). 2002-11-15 04:12:10 +00:00
Ryan Cumming 768d98e7e9 - Silence annoying "Empty path passed" error.
- Set error correctly when an empty path is passed to DeleteFile.
2002-11-08 18:52:18 +00:00
Alexandre Julliard 64e047fed3 Get rid of FILE_ATTRIBUTE_SYMLINK (based on a patch by Bill Medland). 2002-10-25 03:32:10 +00:00
Patrik Stridvall 1298eb4053 Fixed mismatches between the Wine headers and the Microsoft headers. 2002-10-23 18:50:10 +00:00
Martin Wilck 6a504be56f - Return correct error codes.
- Fix behaviour if files are on different Wine drives
  - delete source if copy successful
  - try rename() - files may be on the same Unix file system.
- Try copy/delete if rename() fails: files may be on the same DOS
  drive, but on different Unix file systems.
2002-09-17 01:27:55 +00:00
Marcus Meissner 065d537939 Fixed "conditional expr is always true due to being unsigned < 0"
problem.
2002-09-17 00:00:30 +00:00
Dimitrie O. Paun 14fb095758 Mark files starting with a dot as FA_HIDDEN.
Add configuration option 'ShowDotFiles' to turn this feature off.
2002-09-16 22:44:38 +00:00
Martin Wilck b18d32cff0 Wait timeout must be 0 if bWait == FALSE. 2002-09-13 17:55:33 +00:00
Alexandre Julliard 81bdcf126f Removed references to advapi32 registry functions from some of the
kernel functions.
2002-09-13 17:47:44 +00:00
Alexandre Julliard 1668870f38 Fixed warnings caused by new winternl.h. 2002-09-12 22:28:01 +00:00
Patrik Stridvall 9c1de6de30 Moved all the content of the DDK files ntdef.h and ntddk.h to
winternl.h.
2002-09-12 22:07:02 +00:00
Martin Wilck 2b54cf91fc Fix the behavior of GetOverlappedResult() and WSAGetOverlappedResult()
with non-manual-reset (auto-reset) events in the OVERLAPPED structures.
2002-09-12 17:56:30 +00:00
Alexandre Julliard 96d05d1559 Fixed permission check when renaming a directory (based on a patch by
Andriy Palamarchuk).
2002-08-27 01:29:07 +00:00
Dmitry Timoshkov d75aed2c92 Convert most of the file APIs to Unicode. 2002-08-27 01:13:58 +00:00
Patrik Stridvall 57bf45067a MSVC compatibility fixes. 2002-08-26 21:53:24 +00:00
Patrik Stridvall d016f819f1 Added include protection for unistd.h and sys/time.h. 2002-08-17 00:43:16 +00:00
Juergen Schmied 712caf3596 - Fixed possible loss of data with given overlapped structure on a
file opened in non overlapped mode.
- Fixme for file-lock functions.
2002-08-03 19:11:33 +00:00
Eric Pouech 7fcae15632 Made the calls to (Read|Write)Console through a function pointer to
ease up ntdll/kernel separation.
2002-07-31 18:46:43 +00:00
Rafael Kitover 530d50c827 Changed dos_handles to store dups of stdio/out/err as per Ove Kaaven's
suggestion.
2002-07-31 17:44:30 +00:00
Alexandre Julliard 267ca68253 Fixed HANDLE<->HFILE conversions, since they will be different types
when handles are void*.
2002-07-31 17:20:00 +00:00
Alexandre Julliard 034e39b2fe Check access rights before renaming or deleting files (based on
patches by Uwe Bonnes and Dmitry Timoshkov).
2002-06-05 00:47:38 +00:00
Vincent Béron 9a62491660 Removed trailing whitespace. 2002-05-31 23:06:46 +00:00
Alexandre Julliard be367c7270 Added wine_server_fd_to_handle to replace FILE_DupUnixHandle. 2002-05-30 20:40:02 +00:00
Jason Edmeades 922a5e4681 Silence fixme in unnecessary situation, add missing \n to another fixme. 2002-05-28 22:38:54 +00:00
Martin Wilck ff1f320ac8 Fixed some bugs in my recently submitted patch series. 2002-04-26 18:31:19 +00:00
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
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
Francois Gouget 34372dcbf0 Fix SetFileAttributes to honor the umask (rather than making files
world-writable).
2002-03-29 18:17:35 +00:00
Alexandre Julliard 8d1550d1c6 Export the FILE_GetUnixHandle functionality from ntdll. 2002-03-23 18:48:12 +00:00