ReactOS 0.4.15-dev-7842-g558ab78
io.c File Reference
#include <ntdef.h>
#include <ntifs.h>
Include dependency graph for io.c:

Go to the source code of this file.

Classes

struct  _EX_WORKITEM_CONTEXT
 

Macros

#define TAG_IOWI   'IWOI'
 

Typedefs

typedef struct _EX_WORKITEM_CONTEXT EX_WORKITEM_CONTEXT
 
typedef struct _EX_WORKITEM_CONTEXTPEX_WORKITEM_CONTEXT
 

Functions

NTKRNLVISTAAPI NTSTATUS NTAPI IoGetIrpExtraCreateParameter (IN PIRP Irp, OUT PECP_LIST *ExtraCreateParameter)
 
 _Function_class_ (IO_WORKITEM_ROUTINE)
 
NTKRNLVISTAAPI VOID NTAPI IoQueueWorkItemEx (_Inout_ PIO_WORKITEM IoWorkItem, _In_ PIO_WORKITEM_ROUTINE_EX WorkerRoutine, _In_ WORK_QUEUE_TYPE QueueType, _In_opt_ __drv_aliasesMem PVOID Context)
 
 _IRQL_requires_max_ (PASSIVE_LEVEL)
 Queries information details about a security descriptor.
 
NTKRNLVISTAAPI IO_PRIORITY_HINT NTAPI IoGetIoPriorityHint (_In_ PIRP Irp)
 
NTKRNLVISTAAPI VOID IoSetMasterIrpStatus (_Inout_ PIRP MasterIrp, _In_ NTSTATUS Status)
 

Macro Definition Documentation

◆ TAG_IOWI

#define TAG_IOWI   'IWOI'

Definition at line 19 of file io.c.

Typedef Documentation

◆ EX_WORKITEM_CONTEXT

◆ PEX_WORKITEM_CONTEXT

Function Documentation

◆ _Function_class_()

_Function_class_ ( IO_WORKITEM_ROUTINE  )

Definition at line 38 of file io.c.

45{
47
48 context->WorkItemRoutineEx(DeviceObject, context->Context, context->WorkItem);
50}
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
#define TAG_IOWI
Definition: io.c:19
Definition: http.c:7252
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055

◆ _IRQL_requires_max_()

_IRQL_requires_max_ ( PASSIVE_LEVEL  )

Queries information details about a security descriptor.

Computes the quota size of a security descriptor.

Assigns a security descriptor for a new object.

An extended function that assigns a security descriptor for a new object.

Frees a security descriptor.

An extended function that sets new information data to a security descriptor.

Modifies some information data about a security descriptor.

Parameters
[in]SecurityInformationSecurity information details to be queried from a security descriptor.
[out]SecurityDescriptorThe returned security descriptor with security information data.
[in,out]LengthThe returned length of a security descriptor.
[in,out]ObjectsSecurityDescriptorThe returned object security descriptor.
Returns
Returns STATUS_SUCCESS if the operations have been completed successfully and that the specific information about the security descriptor has been queried. STATUS_BUFFER_TOO_SMALL is returned if the buffer size is too small to contain the queried info about the security descriptor.
Parameters
[in]ObjectIf specified, the function will use this arbitrary object that points to an object security descriptor.
[in]SecurityInformationSecurity information details to be set.
[in]SecurityDescriptorA security descriptor where its info is to be changed.
[in,out]ObjectsSecurityDescriptorThe returned pointer to security descriptor objects.
[in]PoolTypePool type for the new security descriptor to allocate.
[in]GenericMappingThe generic mapping of access rights masks.
Returns
See SeSetSecurityDescriptorInfoEx.
Parameters
[in]ObjectIf specified, the function will use this arbitrary object that points to an object security descriptor.
[in]SecurityInformationSecurity information details to be set.
[in]SecurityDescriptorA security descriptor where its info is to be changed.
[in,out]ObjectsSecurityDescriptorThe returned pointer to security descriptor objects.
[in]AutoInheritFlagsFlags bitmask inheritation, influencing how the security descriptor can be inherited and if it can be in the first place.
[in]PoolTypePool type for the new security descriptor to allocate.
[in]GenericMappingThe generic mapping of access rights masks.
Returns
Returns STATUS_SUCCESS if the operations have been completed without problems and that new info has been set to the security descriptor. STATUS_NO_SECURITY_ON_OBJECT is returned if the object does not have a security descriptor. STATUS_INSUFFICIENT_RESOURCES is returned if memory pool allocation for the new security descriptor with new info set has failed.
Parameters
[in]SecurityDescriptorA security descriptor to be freed from memory.
Returns
Returns STATUS_SUCCESS.
Parameters
[in]_ParentDescriptorA security descriptor of the parent object that is being created.
[in]_ExplicitDescriptorAn explicit security descriptor that is applied to a new object.
[out]NewDescriptorThe new allocated security descriptor.
[in]ObjectTypeThe type of the new object.
[in]IsDirectoryObjectSet this to TRUE if the newly created object is a directory object, otherwise set this to FALSE.
[in]AutoInheritFlagsAutomatic inheritance flags that influence how access control entries within ACLs from security descriptors are inherited.
[in]SubjectContextSecurity subject context of the new object.
[in]GenericMappingGeneric mapping of access mask rights.
[in]PoolTypeThis parameter is unused.
Returns
Returns STATUS_SUCCESS if the operations have been completed successfully and that the security descriptor has been assigned to the new object. STATUS_NO_TOKEN is returned if the caller hasn't supplied a valid argument to a security subject context. STATUS_INVALID_OWNER is returned if the caller hasn't supplied a parent descriptor that belongs to the main user (owner). STATUS_INVALID_PRIMARY_GROUP is returned by the same reason as with the previous NTSTATUS code. The two NTSTATUS codes are returned if the calling thread stated that the owner and/or group is defaulted to the parent descriptor (SEF_DEFAULT_OWNER_FROM_PARENT and/or SEF_DEFAULT_GROUP_FROM_PARENT respectively). STATUS_INSUFFICIENT_RESOURCES is returned if memory pool allocation for the descriptor buffer has failed. A failure NTSTATUS is returned otherwise.
Parameters
[in]ParentDescriptorA security descriptor of the parent object that is being created.
[in]ExplicitDescriptorAn explicit security descriptor that is applied to a new object.
[out]NewDescriptorThe new allocated security descriptor.
[in]IsDirectoryObjectSet this to TRUE if the newly created object is a directory object, otherwise set this to FALSE.
[in]SubjectContextSecurity subject context of the new object.
[in]GenericMappingGeneric mapping of access mask rights.
[in]PoolTypeThis parameter is unused.
Returns
See SeAssignSecurityEx.
Parameters
[in]SecurityDescriptorA security descriptor.
[out]QuotaInfoSizeThe returned quota size of the given security descriptor to the caller. The function may return 0 to this parameter if the descriptor doesn't have a group or a discretionary access control list (DACL) even.
Returns
Returns STATUS_SUCCESS if the quota size of a security descriptor has been computed successfully. STATUS_UNKNOWN_REVISION is returned if the security descriptor has an invalid revision.

Definition at line 69 of file io.c.

82{
84}
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239

◆ IoGetIoPriorityHint()

◆ IoGetIrpExtraCreateParameter()

NTKRNLVISTAAPI NTSTATUS NTAPI IoGetIrpExtraCreateParameter ( IN PIRP  Irp,
OUT PECP_LIST ExtraCreateParameter 
)

Definition at line 24 of file io.c.

26{
27 /* Check we have a create operation */
29 {
31 }
32
33 /* If so, return user buffer */
34 *ExtraCreateParameter = Irp->UserBuffer;
35 return STATUS_SUCCESS;
36}
_In_ PIRP Irp
Definition: csq.h:116
#define BooleanFlagOn(F, SF)
Definition: ext2fs.h:183
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define IRP_CREATE_OPERATION

◆ IoQueueWorkItemEx()

NTKRNLVISTAAPI VOID NTAPI IoQueueWorkItemEx ( _Inout_ PIO_WORKITEM  IoWorkItem,
_In_ PIO_WORKITEM_ROUTINE_EX  WorkerRoutine,
_In_ WORK_QUEUE_TYPE  QueueType,
_In_opt_ __drv_aliasesMem PVOID  Context 
)

Definition at line 55 of file io.c.

60{
62 newContext->WorkItem = IoWorkItem;
63 newContext->WorkItemRoutineEx = WorkerRoutine;
64 newContext->Context = Context;
65
66 IoQueueWorkItem(IoWorkItem, IopWorkItemExCallback, QueueType, newContext);
67}
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
_Must_inspect_result_ _In_ PFLT_CALLBACK_DATA _In_ PFLT_DEFERRED_IO_WORKITEM_ROUTINE _In_ WORK_QUEUE_TYPE QueueType
Definition: fltkernel.h:1978
_Must_inspect_result_ _In_ PFLT_CALLBACK_DATA _In_ PFLT_DEFERRED_IO_WORKITEM_ROUTINE WorkerRoutine
Definition: fltkernel.h:1977
VOID NTAPI IoQueueWorkItem(IN PIO_WORKITEM IoWorkItem, IN PIO_WORKITEM_ROUTINE WorkerRoutine, IN WORK_QUEUE_TYPE QueueType, IN PVOID Context)
Definition: iowork.c:40
PVOID Context
Definition: io.c:16
PIO_WORKITEM WorkItem
Definition: io.c:14
PIO_WORKITEM_ROUTINE_EX WorkItemRoutineEx
Definition: io.c:15
_In_opt_ PVOID _In_ PIO_WORKITEM IoWorkItem
Definition: iotypes.h:521
@ NonPagedPoolMustSucceed
Definition: ketypes.h:880

Referenced by EnqueueFreeTransferPacket().

◆ IoSetMasterIrpStatus()

NTKRNLVISTAAPI VOID IoSetMasterIrpStatus ( _Inout_ PIRP  MasterIrp,
_In_ NTSTATUS  Status 
)

Definition at line 131 of file io.c.

134{
135 NTSTATUS MasterStatus = MasterIrp->IoStatus.Status;
136
138 {
139 return;
140 }
141
143 (MasterStatus == STATUS_SUCCESS && !NT_SUCCESS(Status)) ||
144 (!NT_SUCCESS(MasterStatus) && !NT_SUCCESS(Status) && Status > MasterStatus))
145 {
146 MasterIrp->IoStatus.Status = Status;
147 }
148}
LONG NTSTATUS
Definition: precomp.h:26
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Status
Definition: gdiplustypes.h:25
#define STATUS_FT_READ_FROM_COPY
Definition: ntstatus.h:167
#define STATUS_VERIFY_REQUIRED
Definition: udferr_usr.h:130

Referenced by TransferPktComplete().