3 * Copyright (C) 2002, 2004 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * COPYRIGHT: See COPYING in the top level directory
22 * PROJECT: ReactOS kernel
23 * FILE: services/fs/cdfs/dirctl.c
24 * PURPOSE: CDROM (ISO 9660) filesystem driver
25 * PROGRAMMER: Art Yerkes
30 /* INCLUDES *****************************************************************/
37 /* FUNCTIONS ****************************************************************/
39 #define ROUND_DOWN(N, S) (((N) / (S)) * (S))
40 #define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
42 /* FUNCTIONS ****************************************************************/
45 * FUNCTION: Retrieves the file name, be it in short or long file name format
48 CdfsGetEntryName(PDEVICE_EXTENSION DeviceExt
,
51 PLARGE_INTEGER StreamOffset
,
58 PDIR_RECORD Record
= *Ptr
;
61 if (*CurrentOffset
>= DirLength
)
62 return(STATUS_NO_MORE_ENTRIES
);
64 if (*CurrentOffset
== 0)
67 Record
= (PDIR_RECORD
)*Block
;
68 while (Index
< *pIndex
)
70 (*Ptr
) = (PVOID
)((ULONG_PTR
)(*Ptr
) + Record
->RecordLength
);
71 (*CurrentOffset
) += Record
->RecordLength
;
73 if ((ULONG_PTR
)(*Ptr
) - (ULONG_PTR
)(*Block
) >= BLOCKSIZE
|| Record
->RecordLength
== 0)
75 DPRINT("Map next sector\n");
76 CcUnpinData(*Context
);
77 StreamOffset
->QuadPart
+= BLOCKSIZE
;
78 *CurrentOffset
= ROUND_UP(*CurrentOffset
, BLOCKSIZE
);
79 if (!CcMapData(DeviceExt
->StreamFileObject
,
84 DPRINT("CcMapData() failed\n");
85 return(STATUS_UNSUCCESSFUL
);
88 Record
= (PDIR_RECORD
)*Ptr
;
90 if (*CurrentOffset
>= DirLength
)
91 return(STATUS_NO_MORE_ENTRIES
);
97 if ((ULONG_PTR
)(*Ptr
) - (ULONG_PTR
)(*Block
) >= BLOCKSIZE
|| Record
->RecordLength
== 0)
99 DPRINT("Map next sector\n");
100 CcUnpinData(*Context
);
101 StreamOffset
->QuadPart
+= BLOCKSIZE
;
102 *CurrentOffset
= ROUND_UP(*CurrentOffset
, BLOCKSIZE
);
103 if (!CcMapData(DeviceExt
->StreamFileObject
,
108 DPRINT("CcMapData() failed\n");
109 return(STATUS_UNSUCCESSFUL
);
112 Record
= (PDIR_RECORD
)*Ptr
;
115 if (*CurrentOffset
>= DirLength
)
116 return STATUS_NO_MORE_ENTRIES
;
118 DPRINT("Index %lu RecordLength %lu Offset %lu\n",
119 *pIndex
, Record
->RecordLength
, *CurrentOffset
);
121 if (Record
->FileIdLength
== 1 && Record
->FileId
[0] == 0)
125 else if (Record
->FileIdLength
== 1 && Record
->FileId
[0] == 1)
131 if (DeviceExt
->CdInfo
.JolietLevel
== 0)
135 for (i
= 0; i
< Record
->FileIdLength
&& Record
->FileId
[i
] != ';'; i
++)
136 Name
[i
] = (WCHAR
)Record
->FileId
[i
];
141 CdfsSwapString(Name
, Record
->FileId
, Record
->FileIdLength
);
145 DPRINT("Name '%S'\n", Name
);
149 return(STATUS_SUCCESS
);
154 * FUNCTION: Find a file
157 CdfsFindFile(PDEVICE_EXTENSION DeviceExt
,
160 PUNICODE_STRING FileToFind
,
165 WCHAR ShortNameBuffer
[13];
166 UNICODE_STRING TempString
;
167 UNICODE_STRING ShortName
;
168 UNICODE_STRING LongName
;
175 PVOID Context
= NULL
;
178 LARGE_INTEGER StreamOffset
;
180 GENERATE_NAME_CONTEXT NameContext
;
182 DPRINT("FindFile(Parent %x, FileToFind '%wZ', DirIndex: %d)\n",
183 Parent
, FileToFind
, pDirIndex
? *pDirIndex
: 0);
184 DPRINT("FindFile: old Pathname %x, old Objectname %x)\n",
185 Fcb
->PathName
, Fcb
->ObjectName
);
190 if (FileToFind
== NULL
|| FileToFind
->Length
== 0)
192 RtlInitUnicodeString(&TempString
, L
".");
193 FileToFind
= &TempString
;
198 if (Parent
->Entry
.ExtentLocationL
== DeviceExt
->CdInfo
.RootStart
)
210 StreamOffset
.QuadPart
= (LONGLONG
)DeviceExt
->CdInfo
.RootStart
* (LONGLONG
)BLOCKSIZE
;
211 DirSize
= DeviceExt
->CdInfo
.RootSize
;
214 if (FileToFind
->Buffer
[0] == 0 ||
215 (FileToFind
->Buffer
[0] == '\\' && FileToFind
->Buffer
[1] == 0) ||
216 (FileToFind
->Buffer
[0] == '.' && FileToFind
->Buffer
[1] == 0))
218 /* it's root : complete essentials fields then return ok */
219 RtlZeroMemory(Fcb
, sizeof(FCB
));
221 Fcb
->PathName
[0] = '\\';
222 Fcb
->ObjectName
= &Fcb
->PathName
[1];
223 Fcb
->Entry
.ExtentLocationL
= DeviceExt
->CdInfo
.RootStart
;
224 Fcb
->Entry
.DataLengthL
= DeviceExt
->CdInfo
.RootSize
;
225 Fcb
->Entry
.FileFlags
= 0x02; //FILE_ATTRIBUTE_DIRECTORY;
231 DPRINT("CdfsFindFile: new Pathname %S, new Objectname %S)\n",Fcb
->PathName
, Fcb
->ObjectName
);
232 return STATUS_SUCCESS
;
237 StreamOffset
.QuadPart
= (LONGLONG
)Parent
->Entry
.ExtentLocationL
* (LONGLONG
)BLOCKSIZE
;
238 DirSize
= Parent
->Entry
.DataLengthL
;
241 DPRINT("StreamOffset %I64u DirSize %lu\n", StreamOffset
.QuadPart
, DirSize
);
243 if (pDirIndex
&& (*pDirIndex
))
244 DirIndex
= *pDirIndex
;
246 if (pOffset
&& (*pOffset
))
249 StreamOffset
.QuadPart
+= ROUND_DOWN(Offset
, BLOCKSIZE
);
252 if (!CcMapData(DeviceExt
->StreamFileObject
, &StreamOffset
,
253 BLOCKSIZE
, TRUE
, &Context
, &Block
))
255 DPRINT("CcMapData() failed\n");
256 return STATUS_UNSUCCESSFUL
;
259 Record
= (PDIR_RECORD
) ((ULONG_PTR
)Block
+ Offset
% BLOCKSIZE
);
262 Offset
+= Record
->RecordLength
;
263 Record
= (PDIR_RECORD
)((ULONG_PTR
)Record
+ Record
->RecordLength
);
268 DPRINT("RecordLength %u ExtAttrRecordLength %u NameLength %u\n",
269 Record
->RecordLength
, Record
->ExtAttrRecordLength
, Record
->FileIdLength
);
271 Status
= CdfsGetEntryName(DeviceExt
, &Context
, &Block
, &StreamOffset
,
272 DirSize
, (PVOID
*)&Record
, name
, &DirIndex
, &Offset
);
274 if (Status
== STATUS_NO_MORE_ENTRIES
)
278 else if (Status
== STATUS_UNSUCCESSFUL
)
280 /* Note: the directory cache has already been unpinned */
284 DPRINT("Name '%S'\n", name
);
286 RtlInitUnicodeString(&LongName
, name
);
287 ShortName
.Length
= 0;
288 ShortName
.MaximumLength
= 26;
289 ShortName
.Buffer
= ShortNameBuffer
;
291 if ((RtlIsNameLegalDOS8Dot3(&LongName
, NULL
, &HasSpaces
) == FALSE
) ||
294 /* Build short name */
295 RtlGenerate8dot3Name(&LongName
,
302 /* copy short name */
303 RtlUpcaseUnicodeString(&ShortName
,
308 DPRINT("ShortName '%wZ'\n", &ShortName
);
310 if (FsRtlIsNameInExpression(FileToFind
, &LongName
, TRUE
, NULL
) ||
311 FsRtlIsNameInExpression(FileToFind
, &ShortName
, TRUE
, NULL
))
313 if (Parent
&& Parent
->PathName
)
315 len
= wcslen(Parent
->PathName
);
316 memcpy(Fcb
->PathName
, Parent
->PathName
, len
*sizeof(WCHAR
));
317 Fcb
->ObjectName
=&Fcb
->PathName
[len
];
318 if (len
!= 1 || Fcb
->PathName
[0] != '\\')
320 Fcb
->ObjectName
[0] = '\\';
321 Fcb
->ObjectName
= &Fcb
->ObjectName
[1];
326 Fcb
->ObjectName
=Fcb
->PathName
;
327 Fcb
->ObjectName
[0]='\\';
328 Fcb
->ObjectName
=&Fcb
->ObjectName
[1];
331 DPRINT("PathName '%S' ObjectName '%S'\n", Fcb
->PathName
, Fcb
->ObjectName
);
333 memcpy(&Fcb
->Entry
, Record
, sizeof(DIR_RECORD
));
334 wcsncpy(Fcb
->ObjectName
, name
, MAX_PATH
);
336 /* Copy short name */
337 Fcb
->ShortNameU
.Length
= ShortName
.Length
;
338 Fcb
->ShortNameU
.MaximumLength
= ShortName
.Length
;
339 Fcb
->ShortNameU
.Buffer
= Fcb
->ShortNameBuffer
;
340 memcpy(Fcb
->ShortNameBuffer
, ShortName
.Buffer
, ShortName
.Length
);
343 *pDirIndex
= DirIndex
;
347 DPRINT("FindFile: new Pathname %S, new Objectname %S, DirIndex %d\n",
348 Fcb
->PathName
, Fcb
->ObjectName
, DirIndex
);
350 CcUnpinData(Context
);
352 return STATUS_SUCCESS
;
355 Offset
+= Record
->RecordLength
;
356 Record
= (PDIR_RECORD
)((ULONG_PTR
)Record
+ Record
->RecordLength
);
360 CcUnpinData(Context
);
363 *pDirIndex
= DirIndex
;
368 return STATUS_UNSUCCESSFUL
;
373 CdfsGetNameInformation(PFCB Fcb
,
374 PDEVICE_EXTENSION DeviceExt
,
375 PFILE_NAMES_INFORMATION Info
,
380 DPRINT("CdfsGetNameInformation() called\n");
382 Length
= wcslen(Fcb
->ObjectName
) * sizeof(WCHAR
);
383 if ((sizeof (FILE_BOTH_DIR_INFORMATION
) + Length
) > BufferLength
)
384 return(STATUS_BUFFER_OVERFLOW
);
386 Info
->FileNameLength
= Length
;
387 Info
->NextEntryOffset
=
388 ROUND_UP(sizeof(FILE_BOTH_DIR_INFORMATION
) + Length
, 4);
389 memcpy(Info
->FileName
, Fcb
->ObjectName
, Length
);
391 return(STATUS_SUCCESS
);
396 CdfsGetDirectoryInformation(PFCB Fcb
,
397 PDEVICE_EXTENSION DeviceExt
,
398 PFILE_DIRECTORY_INFORMATION Info
,
403 DPRINT("CdfsGetDirectoryInformation() called\n");
405 Length
= wcslen(Fcb
->ObjectName
) * sizeof(WCHAR
);
406 if ((sizeof (FILE_BOTH_DIR_INFORMATION
) + Length
) > BufferLength
)
407 return(STATUS_BUFFER_OVERFLOW
);
409 Info
->FileNameLength
= Length
;
410 Info
->NextEntryOffset
=
411 ROUND_UP(sizeof(FILE_BOTH_DIR_INFORMATION
) + Length
, 4);
412 memcpy(Info
->FileName
, Fcb
->ObjectName
, Length
);
414 /* Convert file times */
415 CdfsDateTimeToSystemTime(Fcb
,
416 &Info
->CreationTime
);
417 CdfsDateTimeToSystemTime(Fcb
,
418 &Info
->LastAccessTime
);
419 CdfsDateTimeToSystemTime(Fcb
,
420 &Info
->LastWriteTime
);
421 CdfsDateTimeToSystemTime(Fcb
,
424 /* Convert file flags */
425 CdfsFileFlagsToAttributes(Fcb
,
426 &Info
->FileAttributes
);
427 if (CdfsFCBIsDirectory(Fcb
))
429 Info
->EndOfFile
.QuadPart
= 0LL;
430 Info
->AllocationSize
.QuadPart
= 0LL;
434 Info
->EndOfFile
.QuadPart
= Fcb
->Entry
.DataLengthL
;
436 /* Make AllocSize a rounded up multiple of the sector size */
437 Info
->AllocationSize
.QuadPart
= ROUND_UP(Fcb
->Entry
.DataLengthL
, BLOCKSIZE
);
442 return(STATUS_SUCCESS
);
447 CdfsGetFullDirectoryInformation(PFCB Fcb
,
448 PDEVICE_EXTENSION DeviceExt
,
449 PFILE_FULL_DIR_INFORMATION Info
,
454 DPRINT("CdfsGetFullDirectoryInformation() called\n");
456 Length
= wcslen(Fcb
->ObjectName
) * sizeof(WCHAR
);
457 if ((sizeof (FILE_BOTH_DIR_INFORMATION
) + Length
) > BufferLength
)
458 return(STATUS_BUFFER_OVERFLOW
);
460 Info
->FileNameLength
= Length
;
461 Info
->NextEntryOffset
=
462 ROUND_UP(sizeof(FILE_BOTH_DIR_INFORMATION
) + Length
, 4);
463 memcpy(Info
->FileName
, Fcb
->ObjectName
, Length
);
465 /* Convert file times */
466 CdfsDateTimeToSystemTime(Fcb
,
467 &Info
->CreationTime
);
468 CdfsDateTimeToSystemTime(Fcb
,
469 &Info
->LastAccessTime
);
470 CdfsDateTimeToSystemTime(Fcb
,
471 &Info
->LastWriteTime
);
472 CdfsDateTimeToSystemTime(Fcb
,
475 /* Convert file flags */
476 CdfsFileFlagsToAttributes(Fcb
,
477 &Info
->FileAttributes
);
479 if (CdfsFCBIsDirectory(Fcb
))
481 Info
->EndOfFile
.QuadPart
= 0LL;
482 Info
->AllocationSize
.QuadPart
= 0LL;
486 Info
->EndOfFile
.QuadPart
= Fcb
->Entry
.DataLengthL
;
488 /* Make AllocSize a rounded up multiple of the sector size */
489 Info
->AllocationSize
.QuadPart
= ROUND_UP(Fcb
->Entry
.DataLengthL
, BLOCKSIZE
);
495 return(STATUS_SUCCESS
);
500 CdfsGetBothDirectoryInformation(PFCB Fcb
,
501 PDEVICE_EXTENSION DeviceExt
,
502 PFILE_BOTH_DIR_INFORMATION Info
,
507 DPRINT("CdfsGetBothDirectoryInformation() called\n");
509 Length
= wcslen(Fcb
->ObjectName
) * sizeof(WCHAR
);
510 if ((sizeof (FILE_BOTH_DIR_INFORMATION
) + Length
) > BufferLength
)
511 return(STATUS_BUFFER_OVERFLOW
);
513 Info
->FileNameLength
= Length
;
514 Info
->NextEntryOffset
=
515 ROUND_UP(sizeof(FILE_BOTH_DIR_INFORMATION
) + Length
, 4);
516 memcpy(Info
->FileName
, Fcb
->ObjectName
, Length
);
518 /* Convert file times */
519 CdfsDateTimeToSystemTime(Fcb
,
520 &Info
->CreationTime
);
521 CdfsDateTimeToSystemTime(Fcb
,
522 &Info
->LastAccessTime
);
523 CdfsDateTimeToSystemTime(Fcb
,
524 &Info
->LastWriteTime
);
525 CdfsDateTimeToSystemTime(Fcb
,
528 /* Convert file flags */
529 CdfsFileFlagsToAttributes(Fcb
,
530 &Info
->FileAttributes
);
532 if (CdfsFCBIsDirectory(Fcb
))
534 Info
->EndOfFile
.QuadPart
= 0LL;
535 Info
->AllocationSize
.QuadPart
= 0LL;
539 Info
->EndOfFile
.QuadPart
= Fcb
->Entry
.DataLengthL
;
541 /* Make AllocSize a rounded up multiple of the sector size */
542 Info
->AllocationSize
.QuadPart
= ROUND_UP(Fcb
->Entry
.DataLengthL
, BLOCKSIZE
);
548 /* Copy short name */
549 Info
->ShortNameLength
= Fcb
->ShortNameU
.Length
;
550 memcpy(Info
->ShortName
, Fcb
->ShortNameU
.Buffer
, Fcb
->ShortNameU
.Length
);
552 return(STATUS_SUCCESS
);
557 CdfsQueryDirectory(PDEVICE_OBJECT DeviceObject
,
560 PDEVICE_EXTENSION DeviceExtension
;
561 LONG BufferLength
= 0;
562 PUNICODE_STRING SearchPattern
= NULL
;
563 FILE_INFORMATION_CLASS FileInformationClass
;
565 PUCHAR Buffer
= NULL
;
566 PFILE_NAMES_INFORMATION Buffer0
= NULL
;
570 BOOLEAN First
= FALSE
;
571 PIO_STACK_LOCATION Stack
;
572 PFILE_OBJECT FileObject
;
573 NTSTATUS Status
= STATUS_SUCCESS
;
575 DPRINT("CdfsQueryDirectory() called\n");
577 DeviceExtension
= DeviceObject
->DeviceExtension
;
578 Stack
= IoGetCurrentIrpStackLocation(Irp
);
579 FileObject
= Stack
->FileObject
;
581 Ccb
= (PCCB
)FileObject
->FsContext2
;
582 Fcb
= (PFCB
)FileObject
->FsContext
;
584 /* Obtain the callers parameters */
585 BufferLength
= Stack
->Parameters
.QueryDirectory
.Length
;
586 SearchPattern
= Stack
->Parameters
.QueryDirectory
.FileName
;
587 FileInformationClass
=
588 Stack
->Parameters
.QueryDirectory
.FileInformationClass
;
589 FileIndex
= Stack
->Parameters
.QueryDirectory
.FileIndex
;
592 if (SearchPattern
!= NULL
)
594 if (Ccb
->DirectorySearchPattern
.Buffer
== NULL
)
597 Ccb
->DirectorySearchPattern
.Buffer
=
598 ExAllocatePool(NonPagedPool
, SearchPattern
->Length
+ sizeof(WCHAR
));
599 if (Ccb
->DirectorySearchPattern
.Buffer
== NULL
)
601 return STATUS_INSUFFICIENT_RESOURCES
;
604 Ccb
->DirectorySearchPattern
.Length
= SearchPattern
->Length
;
605 Ccb
->DirectorySearchPattern
.MaximumLength
= SearchPattern
->Length
+ sizeof(WCHAR
);
607 memcpy(Ccb
->DirectorySearchPattern
.Buffer
,
608 SearchPattern
->Buffer
,
609 SearchPattern
->Length
);
610 Ccb
->DirectorySearchPattern
.Buffer
[SearchPattern
->Length
/ sizeof(WCHAR
)] = 0;
613 else if (Ccb
->DirectorySearchPattern
.Buffer
== NULL
)
616 Ccb
->DirectorySearchPattern
.Buffer
= ExAllocatePool(NonPagedPool
, 2 * sizeof(WCHAR
));
617 if (Ccb
->DirectorySearchPattern
.Buffer
== NULL
)
619 return STATUS_INSUFFICIENT_RESOURCES
;
622 Ccb
->DirectorySearchPattern
.Length
= sizeof(WCHAR
);
623 Ccb
->DirectorySearchPattern
.MaximumLength
= 2 * sizeof(WCHAR
);
624 Ccb
->DirectorySearchPattern
.Buffer
[0] = L
'*';
625 Ccb
->DirectorySearchPattern
.Buffer
[1] = 0;
627 DPRINT("Search pattern '%wZ'\n", &Ccb
->DirectorySearchPattern
);
629 /* Determine directory index */
630 if (Stack
->Flags
& SL_INDEX_SPECIFIED
)
632 Ccb
->Entry
= Ccb
->CurrentByteOffset
.u
.LowPart
;
635 else if (First
|| (Stack
->Flags
& SL_RESTART_SCAN
))
641 /* Determine Buffer for result */
644 Buffer
= MmGetSystemAddressForMdl(Irp
->MdlAddress
);
648 Buffer
= Irp
->UserBuffer
;
650 DPRINT("Buffer = %p tofind = %wZ\n", Buffer
, &Ccb
->DirectorySearchPattern
);
652 TempFcb
.ObjectName
= TempFcb
.PathName
;
653 while (Status
== STATUS_SUCCESS
&& BufferLength
> 0)
655 Status
= CdfsFindFile(DeviceExtension
,
658 &Ccb
->DirectorySearchPattern
,
661 DPRINT("Found %S, Status=%x, entry %x\n", TempFcb
.ObjectName
, Status
, Ccb
->Entry
);
663 if (NT_SUCCESS(Status
))
665 switch (FileInformationClass
)
667 case FileNameInformation
:
668 Status
= CdfsGetNameInformation(&TempFcb
,
670 (PFILE_NAMES_INFORMATION
)Buffer
,
674 case FileDirectoryInformation
:
675 Status
= CdfsGetDirectoryInformation(&TempFcb
,
677 (PFILE_DIRECTORY_INFORMATION
)Buffer
,
681 case FileFullDirectoryInformation
:
682 Status
= CdfsGetFullDirectoryInformation(&TempFcb
,
684 (PFILE_FULL_DIR_INFORMATION
)Buffer
,
688 case FileBothDirectoryInformation
:
689 Status
= CdfsGetBothDirectoryInformation(&TempFcb
,
691 (PFILE_BOTH_DIR_INFORMATION
)Buffer
,
696 Status
= STATUS_INVALID_INFO_CLASS
;
699 if (Status
== STATUS_BUFFER_OVERFLOW
)
703 Buffer0
->NextEntryOffset
= 0;
712 Buffer0
->NextEntryOffset
= 0;
717 Status
= STATUS_NO_SUCH_FILE
;
721 Status
= STATUS_NO_MORE_FILES
;
726 Buffer0
= (PFILE_NAMES_INFORMATION
)Buffer
;
727 Buffer0
->FileIndex
= FileIndex
++;
730 if (Stack
->Flags
& SL_RETURN_SINGLE_ENTRY
)
734 BufferLength
-= Buffer0
->NextEntryOffset
;
735 Buffer
+= Buffer0
->NextEntryOffset
;
740 Buffer0
->NextEntryOffset
= 0;
745 Status
= STATUS_SUCCESS
;
754 CdfsDirectoryControl(PDEVICE_OBJECT DeviceObject
,
757 PIO_STACK_LOCATION Stack
;
760 DPRINT("CdfsDirectoryControl() called\n");
762 Stack
= IoGetCurrentIrpStackLocation(Irp
);
764 switch (Stack
->MinorFunction
)
766 case IRP_MN_QUERY_DIRECTORY
:
767 Status
= CdfsQueryDirectory(DeviceObject
,
771 case IRP_MN_NOTIFY_CHANGE_DIRECTORY
:
772 DPRINT1("IRP_MN_NOTIFY_CHANGE_DIRECTORY\n");
773 Status
= STATUS_NOT_IMPLEMENTED
;
777 DPRINT1("CDFS: MinorFunction %d\n", Stack
->MinorFunction
);
778 Status
= STATUS_INVALID_DEVICE_REQUEST
;
782 Irp
->IoStatus
.Status
= Status
;
783 Irp
->IoStatus
.Information
= 0;
785 IoCompleteRequest(Irp
, IO_NO_INCREMENT
);