32{
36
39
40 Irp->IoStatus.Information = 0;
41
42 VFDTRACE(VFDINFO, (
"[VFD] %-40s %ws\n",
45
46#ifdef VFD_PNP
48
51 (
"Acquire RemoveLock failed %s\n", NtStatusToStr(
status)));
52
56 }
57#endif
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
80
81
82
83
88
90 break;
91 }
92
93
95 break;
96
100
101
102
103
107 break;
108 }
109
110
112 break;
113
115
116
121 &
Irp->IoStatus.Information);
122
123 break;
124
126
127
128
131 break;
132 }
133
134#ifdef VFD_MOUNT_MANAGER
136
137
138
140 *(
PCHAR)
Irp->AssociatedIrp.SystemBuffer);
141
142
143
144
145 }
146 else
147#else
148 {
149
150
151
153 *(
PCHAR)
Irp->AssociatedIrp.SystemBuffer);
154
156
158 }
159 }
160#endif
161 break;
162
164
165
168 break;
169 }
170
171 *(
PCHAR)
Irp->AssociatedIrp.SystemBuffer =
173
174 Irp->IoStatus.Information =
sizeof(
CHAR);
176 break;
177
179
180
184 break;
185 }
186
189 break;
190
192
193
197 break;
198 }
199
202 break;
203
205
206
210 break;
211 }
212
215 break;
216
218
219
222 break;
223 }
224
225 *(
PULONG)
Irp->AssociatedIrp.SystemBuffer=
227
228 Irp->IoStatus.Information =
sizeof(
ULONG);
230 break;
231
233
234
235
238 break;
239 }
240
241 {
243
245
247
248 Irp->IoStatus.Information =
sizeof(
USHORT);
250 break;
251 }
252
254
255 Irp->IoStatus.Information =
sizeof(
USHORT) + *
p;
256 }
257
259 break;
260
262
263
266 break;
267 }
268
269 *(
PULONG)
Irp->AssociatedIrp.SystemBuffer =
271
272 Irp->IoStatus.Information =
sizeof(
ULONG);
274 break;
275
276
277
278
279
283
285
286 *(
PULONG)
Irp->AssociatedIrp.SystemBuffer =
288
289 Irp->IoStatus.Information =
sizeof(
ULONG);
290 }
291
293 break;
294
297
298
299
305
307 break;
308 }
309
310
312 break;
313
315
316
320 break;
321 }
322
323
326
327
328
329
330
333 }
334
335
336
339 Irp->AssociatedIrp.SystemBuffer,
342 }
343 else {
344
346 Irp->AssociatedIrp.SystemBuffer,
349 }
351
353 break;
354
356
357
358
362 break;
363 }
364
367 break;
368 }
369
372
374
376 break;
377
379
380
384 }
387 }
388 else {
390 }
391 break;
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424#ifdef VFD_MOUNT_MANAGER
425
426
427
428
429
431
432 status = VfdMountDevUniqueId(
434 Irp->AssociatedIrp.SystemBuffer,
437 break;
438
439
440
442
443 status = VfdMountDevDeviceName(
445 Irp->AssociatedIrp.SystemBuffer,
448 break;
449
451
452
453
454
455 status = VfdMountDevSuggestedLink(
457 Irp->AssociatedIrp.SystemBuffer,
460 break;
461
464
465 status = VfdMountDevLinkModified(
467 Irp->AssociatedIrp.SystemBuffer,
470 break;
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492#endif
493
494 default:
495
497 break;
498 }
499
500#if DBG
502 (TraceFlags & VFDWARN) == VFDWARN) {
506 }
507#endif
508
510
511
513
516 &
Irp->Tail.Overlay.ListEntry,
518
523 }
524 else {
525
526
529
530#ifdef VFD_PNP
532#endif
533 }
534
536}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
struct _device_extension device_extension
#define IOCTL_DISK_CHECK_VERIFY
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
#define IOCTL_DISK_FORMAT_TRACKS_EX
#define IOCTL_DISK_EJECT_MEDIA
#define IOCTL_DISK_GET_MEDIA_TYPES
#define IOCTL_DISK_IS_WRITABLE
#define IOCTL_DISK_FORMAT_TRACKS
#define NT_SUCCESS(StatCode)
struct _BEEP_DEVICE_EXTENSION * PDEVICE_EXTENSION
#define KeSetEvent(pEvt, foo, foo2)
#define IOCTL_STORAGE_CHECK_VERIFY2
PLIST_ENTRY NTAPI ExInterlockedInsertTailList(IN OUT PLIST_ENTRY ListHead, IN OUT PLIST_ENTRY ListEntry, IN OUT PKSPIN_LOCK Lock)
struct _GET_LENGTH_INFORMATION * PGET_LENGTH_INFORMATION
#define IOCTL_MOUNTDEV_LINK_CREATED
#define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME
struct _GET_LENGTH_INFORMATION GET_LENGTH_INFORMATION
#define IOCTL_MOUNTDEV_QUERY_SUGGESTED_LINK_NAME
#define IOCTL_DISK_GET_LENGTH_INFO
#define IOCTL_MOUNTDEV_QUERY_UNIQUE_ID
#define IOCTL_MOUNTDEV_LINK_DELETED
struct _DISK_GEOMETRY DISK_GEOMETRY
#define IOCTL_STORAGE_CHECK_VERIFY
#define IOCTL_STORAGE_GET_MEDIA_TYPES
#define IOCTL_STORAGE_EJECT_MEDIA
#define IoCompleteRequest
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_MEDIA_WRITE_PROTECTED
#define STATUS_INVALID_PARAMETER
#define STATUS_NO_MEDIA_IN_DEVICE
#define VFDTRACE(LEVEL, STRING)
NTSTATUS VfdFormatCheck(IN PDEVICE_EXTENSION DeviceExtension, IN PFORMAT_PARAMETERS FormatParams, IN ULONG InputLength, IN ULONG ControlCode)
NTSTATUS VfdQueryImage(IN PDEVICE_EXTENSION DeviceExtension, OUT PVFD_IMAGE_INFO ImageInfo, IN ULONG BufferLength, OUT PULONG ReturnLength)
const DISK_GEOMETRY geom_tbl[VFD_MEDIA_MAX]
NTSTATUS VfdStoreLink(IN PDEVICE_EXTENSION DeviceExtension)
NTSTATUS VfdSetLink(IN PDEVICE_EXTENSION DeviceExtension, IN CHAR DriveLetter)
NTSTATUS VfdOpenCheck(IN PDEVICE_EXTENSION DeviceExtension, IN PVFD_IMAGE_INFO ImageInfo, IN ULONG InputLength)
#define IOCTL_VFD_RESET_MODIFY
#define IOCTL_VFD_QUERY_IMAGE
#define IOCTL_VFD_SET_LINK
#define IOCTL_VFD_CLOSE_IMAGE
#define IOCTL_VFD_SET_PROTECT
#define IOCTL_VFD_QUERY_LINK
#define IOCTL_VFD_QUERY_VERSION
#define IOCTL_VFD_CLEAR_PROTECT
#define IOCTL_VFD_QUERY_NAME
#define IOCTL_VFD_QUERY_NUMBER
#define VFD_SECTOR_TO_BYTE(s)
#define IOCTL_VFD_OPEN_IMAGE
#define VFD_FLAG_WRITE_PROTECTED
_In_ PDEVICE_OBJECT DeviceObject
#define IoAcquireRemoveLock(RemoveLock, Tag)
#define IoReleaseRemoveLock(_RemoveLock, _Tag)