mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[KERNEL32] Implement SetFileCompletionNotificationModes
Call native Nt* function to do the actual work, similarly to as it done in Wine: 530c183960
:/dlls/kernel32/file.c#l258.
Also add/fix some declarations in internal kernel32/public ndk neaders, to fix compilation.
CORE-17821
This commit is contained in:
parent
fe0415a4ba
commit
334ab0f2a5
3 changed files with 28 additions and 5 deletions
|
@ -3,7 +3,8 @@
|
|||
* PROJECT: ReactOS system libraries
|
||||
* FILE: dll/win32/kernel32/client/file/iocompl.c
|
||||
* PURPOSE: Io Completion functions
|
||||
* PROGRAMMER: Ariadne ( ariadne@xs4all.nl)
|
||||
* PROGRAMMERS: Ariadne (ariadne@xs4all.nl)
|
||||
* Oleg Dubinskiy (oleg.dubinskij2013@yandex.ua)
|
||||
* UPDATE HISTORY:
|
||||
* Created 01/11/98
|
||||
*/
|
||||
|
@ -23,21 +24,37 @@
|
|||
#endif
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
BOOL
|
||||
WINAPI
|
||||
SetFileCompletionNotificationModes(IN HANDLE FileHandle,
|
||||
IN UCHAR Flags)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
FILE_IO_COMPLETION_NOTIFICATION_INFORMATION FileInformation;
|
||||
IO_STATUS_BLOCK IoStatusBlock;
|
||||
|
||||
if (Flags & ~(FILE_SKIP_COMPLETION_PORT_ON_SUCCESS | FILE_SKIP_SET_EVENT_ON_HANDLE))
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
UNIMPLEMENTED;
|
||||
FileInformation.Flags = Flags;
|
||||
|
||||
Status = NtSetInformationFile(FileHandle,
|
||||
&IoStatusBlock,
|
||||
&FileInformation,
|
||||
sizeof(FileInformation),
|
||||
FileIoCompletionNotificationInformation);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
BaseSetLastNTError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <ndk/cmfuncs.h>
|
||||
#include <ndk/exfuncs.h>
|
||||
#include <ndk/iofuncs.h>
|
||||
#include <ndk/iotypes.h>
|
||||
#include <ndk/kdtypes.h>
|
||||
#include <ndk/kefuncs.h>
|
||||
#include <ndk/ldrfuncs.h>
|
||||
|
|
|
@ -323,8 +323,8 @@ typedef enum _FILE_INFORMATION_CLASS
|
|||
FileIdFullDirectoryInformation,
|
||||
FileValidDataLengthInformation,
|
||||
FileShortNameInformation,
|
||||
#if (NTDDI_VERSION >= NTDDI_VISTA)
|
||||
FileIoCompletionNotificationInformation,
|
||||
#if (NTDDI_VERSION >= NTDDI_VISTA)
|
||||
FileIoStatusBlockRangeInformation,
|
||||
FileIoPriorityHintInformation,
|
||||
FileSfioReserveInformation,
|
||||
|
@ -604,6 +604,11 @@ typedef struct _FILE_COMPLETION_INFORMATION
|
|||
PVOID Key;
|
||||
} FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
|
||||
|
||||
typedef struct _FILE_IO_COMPLETION_NOTIFICATION_INFORMATION
|
||||
{
|
||||
ULONG Flags;
|
||||
} FILE_IO_COMPLETION_NOTIFICATION_INFORMATION, *PFILE_IO_COMPLETION_NOTIFICATION_INFORMATION;
|
||||
|
||||
typedef struct _FILE_LINK_INFORMATION
|
||||
{
|
||||
BOOLEAN ReplaceIfExists;
|
||||
|
|
Loading…
Reference in a new issue