The I/O Manager sends the IRP_MJ_SET_EA request to set a file's extended attributes.
Operation: File System Drivers
If the file system supports extended attributes, the file system driver should process the request and complete the IRP. Otherwise, the file system driver should return STATUS_EAS_NOT_SUPPORTED.
Operation: File System Filter Drivers
The filter driver should pass this IRP down to the next-lower driver on the stack.
A file system or filter driver calls IoGetCurrentIrpStackLocation with the given IRP to get a pointer to its own stack location in the IRP, shown in the following list as IrpSp. (The IRP is shown as Irp.) The driver can use the information that is set in the following members of the IRP and the IRP stack location in processing a set extended attributes request:
Pointer to an IO_STATUS_BLOCK structure that receives the final completion status and information about the requested operation.
Pointer to a caller-supplied FILE_FULL_EA_INFORMATION-structured input buffer that receives the extended attribute information. Used for METHOD_NEITHER I/O.
The IrpSp->FileObject parameter contains a pointer to the RelatedFileObject field, which is also a FILE_OBJECT structure. The RelatedFileObject field of the FILE_OBJECT structure is not valid during the processing of IRP_MJ_SET_EA and should not be used.