33GUID MountedDevicesGuid = {0x53F5630D, 0xB6BF, 0x11D0, {0x94, 0xF2, 0x00, 0xA0, 0xC9, 0x1E, 0xFB, 0x8B}};
40#define Cunc_LETTER_POSITION 4
77MountMgrSendSyncDeviceIoCtl(
173 for (NextEntry = DeviceInformation->SymbolicLinksListHead.
Flink;
174 NextEntry != &DeviceInformation->SymbolicLinksListHead;
175 NextEntry = NextEntry->
Flink)
201 DriveLetter->Buffer =
AllocatePool(DriveLetter->MaximumLength);
202 if (!DriveLetter->Buffer)
326 *GptDriveLetter =
TRUE;
336 sizeof(GptAttributes),
344 else if (GptAttributes.
GptAttributes & GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER)
346 *GptDriveLetter =
FALSE;
389 &StorageDeviceNumber,
390 sizeof(StorageDeviceNumber),
592 for (NextEntry = DeviceExtension->DeviceListHead.
Flink;
593 NextEntry != &(DeviceExtension->DeviceListHead);
594 NextEntry = NextEntry->
Flink)
607 if (!DeviceNameGiven)
613 if (NextEntry == &(DeviceExtension->DeviceListHead))
628 FreePool(DeviceInformation->SymbolicName.Buffer);
644 while (!
IsListEmpty(&(DeviceInformation->SymbolicLinksListHead)))
646 NextEntry =
RemoveHeadList(&(DeviceInformation->SymbolicLinksListHead));
654 while (!
IsListEmpty(&(DeviceInformation->ReplicatedUniqueIdsListHead)))
656 NextEntry =
RemoveHeadList(&(DeviceInformation->ReplicatedUniqueIdsListHead));
663 while (!
IsListEmpty(&(DeviceInformation->AssociatedDevicesHead)))
665 NextEntry =
RemoveHeadList(&(DeviceInformation->AssociatedDevicesHead));
673 FreePool(DeviceInformation->SymbolicName.Buffer);
674 if (DeviceInformation->KeepLinks)
676 FreePool(DeviceInformation->UniqueId);
678 FreePool(DeviceInformation->DeviceName.Buffer);
681 if (DeviceInformation->TargetDeviceNotificationEntry)
697 while (!
IsListEmpty(&(SavedLinkInformation->SymbolicLinksListHead)))
699 NextEntry =
RemoveHeadList(&(SavedLinkInformation->SymbolicLinksListHead));
709 FreePool(SavedLinkInformation->UniqueId);
734 if (DeviceExtension->RegistryPath.Buffer)
736 FreePool(DeviceExtension->RegistryPath.Buffer);
737 DeviceExtension->RegistryPath.Buffer =
NULL;
765 while (!
IsListEmpty(&(DeviceExtension->OfflineDeviceListHead)))
767 NextEntry =
RemoveHeadList(&(DeviceExtension->OfflineDeviceListHead));
773 while (!
IsListEmpty(&(DeviceExtension->SavedLinksListHead)))
775 NextEntry =
RemoveHeadList(&(DeviceExtension->SavedLinksListHead));
781 while (!
IsListEmpty(&(DeviceExtension->UniqueIdWorkerItemListHead)))
783 NextEntry =
RemoveHeadList(&(DeviceExtension->UniqueIdWorkerItemListHead));
805 if (DeviceExtension->DriveLetterData)
807 FreePool(DeviceExtension->DriveLetterData);
808 DeviceExtension->DriveLetterData =
NULL;
873 BOOLEAN HasGuid, HasGptDriveLetter, IsFT, UseOnlyIfThereAreNoOtherLinks;
874 BOOLEAN IsDrvLetter, IsOff, IsVolumeName, SetOnline;
878 if (!DeviceInformation)
916 for (NextEntry = DeviceExtension->OfflineDeviceListHead.
Flink;
917 NextEntry != &(DeviceExtension->OfflineDeviceListHead);
918 NextEntry = NextEntry->
Flink)
928 if (NextEntry != &(DeviceExtension->OfflineDeviceListHead))
943 DeviceInformation->
UniqueId = UniqueId;
944 DeviceInformation->
DeviceName = TargetDeviceName;
948 if (DeviceExtension->DriveLetterData && UniqueId->
UniqueIdLength == DeviceExtension->DriveLetterData->UniqueIdLength)
960 &UseOnlyIfThereAreNoOtherLinks);
976 for (NextEntry = DeviceExtension->DeviceListHead.
Flink;
977 NextEntry != &(DeviceExtension->DeviceListHead);
978 NextEntry = NextEntry->
Flink)
989 if (NextEntry != &(DeviceExtension->DeviceListHead))
991 if (SuggestedLinkName.
Buffer)
1009 (SuggestedLinkName.
Buffer) ? &SuggestedLinkName :
NULL,
1010 UseOnlyIfThereAreNoOtherLinks,
1070 for (
i = 0;
i < SymLinkCount;
i++)
1091 if (SuggestedLinkName.
Buffer)
1106 IsDrvLetter =
FALSE;
1108 IsVolumeName =
FALSE;
1110 for (
i = 0;
i < SymLinkCount;
i++)
1115 IsVolumeName =
TRUE;
1137 if ((SavedLinkInformation && !
RedirectSavedLink(SavedLinkInformation, &(SymLinks[
i]), &TargetDeviceName)) ||
1138 !SavedLinkInformation)
1151 IsDrvLetter =
FALSE;
1169 if (!SymlinkInformation)
1176 SymlinkInformation->
Name = SymLinks[
i];
1186 NextEntry = NextEntry->
Flink)
1194 if (SavedLinkInformation)
1218 if (!SymlinkInformation)
1241 else if ((!DeviceExtension->NoAutoMount || DeviceInformation->
Removable) &&
1242 DeviceExtension->AutomaticDriveLetter &&
1266 if (!SymlinkInformation)
1272 SymlinkInformation->
Name = DriveLetter;
1283 if (!ManuallyRegistered)
1305 if (!DeviceExtension->NoAutoMount || IsDrvLetter)
1333 if (DeviceExtension->AutomaticDriveLetter)
1339 NextEntry = DeviceExtension->DeviceListHead.
Flink;
1341 while (CurrentDevice != DeviceInformation)
1348 NextEntry = NextEntry->
Flink;
1376 for (NextEntry = DeviceExtension->DeviceListHead.
Flink;
1377 NextEntry != &(DeviceExtension->DeviceListHead);
1378 NextEntry = NextEntry->
Flink)
1389 if (NextEntry != &(DeviceExtension->DeviceListHead))
1395 if (!SavedLinkInformation)
1456 for (NextEntry = DeviceExtension->DeviceListHead.
Flink;
1457 NextEntry != &(DeviceExtension->DeviceListHead);
1458 NextEntry = NextEntry->
Flink)
1467 DeviceEntry = DeviceEntry->
Flink;
1501 for (NextEntry = DeviceExtension->OfflineDeviceListHead.
Flink;
1502 NextEntry != &(DeviceExtension->OfflineDeviceListHead);
1503 NextEntry = NextEntry->
Flink)
1582 Irp->IoStatus.Information = 0;
1601 Irp->IoStatus.Information = 0;
1633 Irp->IoStatus.Information = 0;
1640 NextEntry = DeviceExtension->IrpListHead.Flink;
1646 ListIrp->Cancel =
TRUE;
1647 ListIrp->CancelIrql =
OldIrql;
1648 ListIrp->CancelRoutine =
NULL;
1654 NextEntry = NextEntry->
Flink;
1656 while (NextEntry != &(DeviceExtension->IrpListHead));
1661 Irp->IoStatus.Information = 0;
1698 Irp->IoStatus.Information = 0;
1744 DeviceExtension->EpicNumber = 1;
1750 DeviceExtension->WorkerReferences = -1;
1755 DeviceExtension->OnlineNotificationCount = 1;
1757 DeviceExtension->RegistryPath.Length =
RegistryPath->Length;
1758 DeviceExtension->RegistryPath.MaximumLength =
RegistryPath->Length +
sizeof(
WCHAR);
1759 DeviceExtension->RegistryPath.Buffer =
AllocatePool(DeviceExtension->RegistryPath.MaximumLength);
1760 if (!DeviceExtension->RegistryPath.Buffer)
1781 &(DeviceExtension->NotificationEntry));
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define InterlockedIncrement
#define InterlockedExchange
#define InterlockedDecrement
#define FILE_DIRECTORY_FILE
#define FILE_DEVICE_SECURE_OPEN
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
DRIVER_INITIALIZE DriverEntry
#define ASSERT_IRQL_EQUAL(x)
VOID ReconcileThisDatabaseWithMaster(IN PDEVICE_EXTENSION DeviceExtension, IN PDEVICE_INFORMATION DeviceInformation)
VOID DeleteFromLocalDatabase(IN PUNICODE_STRING SymbolicLink, IN PMOUNTDEV_UNIQUE_ID UniqueId)
const GUID GUID_DEVICE_INTERFACE_ARRIVAL
const GUID GUID_DEVICE_INTERFACE_REMOVAL
#define _IRQL_requires_(irql)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define PsGetCurrentThread()
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define RtlCompareMemory(s1, s2, l)
#define KeInitializeEvent(pEvt, foo, foo2)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define KeInitializeSpinLock(sl)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
#define IOCTL_DISK_GET_PARTITION_INFO_EX
_Must_inspect_result_ _Inout_opt_ PUNICODE_STRING VolumeName
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG, PCWSTR, PCWSTR, ULONG, PVOID, ULONG)
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
NTSTATUS QuerySymbolicLinkNamesFromStorage(IN PDEVICE_EXTENSION DeviceExtension, IN PDEVICE_INFORMATION DeviceInformation, IN PUNICODE_STRING SuggestedLinkName, IN BOOLEAN UseOnlyIfThereAreNoOtherLinks, OUT PUNICODE_STRING *SymLinks, OUT PULONG SymLinkCount, IN BOOLEAN HasGuid, IN LPGUID Guid)
VOID SendLinkCreated(IN PUNICODE_STRING SymbolicName)
VOID SendOnlineNotification(IN PUNICODE_STRING SymbolicName)
NTSTATUS GlobalCreateSymbolicLink(IN PUNICODE_STRING DosName, IN PUNICODE_STRING DeviceName)
NTSTATUS GlobalDeleteSymbolicLink(IN PUNICODE_STRING DosName)
DRIVER_DISPATCH MountMgrDeviceControl
UNICODE_STRING DeviceFloppy
UNICODE_STRING DosDevicesMount
BOOLEAN IsDriveLetter(PUNICODE_STRING SymbolicName)
UNICODE_STRING DeviceMount
NTSTATUS CreateNewVolumeName(OUT PUNICODE_STRING VolumeName, IN PGUID VolumeGuid OPTIONAL)
UNICODE_STRING DeviceCdRom
VOID RegisterForTargetDeviceNotification(IN PDEVICE_EXTENSION DeviceExtension, IN PDEVICE_INFORMATION DeviceInformation)
VOID IssueUniqueIdChangeNotify(IN PDEVICE_EXTENSION DeviceExtension, IN PUNICODE_STRING DeviceName, IN PMOUNTDEV_UNIQUE_ID UniqueId)
NTSTATUS QuerySuggestedLinkName(IN PUNICODE_STRING SymbolicName, OUT PUNICODE_STRING SuggestedLinkName, OUT PBOOLEAN UseOnlyIfThereAreNoOtherLinks)
PSAVED_LINK_INFORMATION RemoveSavedLinks(IN PDEVICE_EXTENSION DeviceExtension, IN PMOUNTDEV_UNIQUE_ID UniqueId)
#define AllocatePool(Size)
UNICODE_STRING DosDevices
VOID CreateNoDriveLetterEntry(IN PMOUNTDEV_UNIQUE_ID UniqueId)
BOOLEAN HasNoDriveLetterEntry(IN PMOUNTDEV_UNIQUE_ID UniqueId)
BOOLEAN RedirectSavedLink(IN PSAVED_LINK_INFORMATION SavedLinkInformation, IN PUNICODE_STRING DosName, IN PUNICODE_STRING NewLink)
struct _MOUNTDEV_NAME MOUNTDEV_NAME
struct _MOUNTDEV_UNIQUE_ID MOUNTDEV_UNIQUE_ID
#define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME
#define IOCTL_MOUNTDEV_QUERY_STABLE_GUID
#define IOCTL_MOUNTDEV_QUERY_UNIQUE_ID
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
NTSTATUS NTAPI MountMgrShutdown(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
BOOLEAN IsOffline(PUNICODE_STRING SymbolicName)
NTSTATUS NTAPI MountMgrMountedDeviceNotification(IN PVOID NotificationStructure, IN PVOID Context)
NTSTATUS QueryDeviceInformation(_In_ PUNICODE_STRING SymbolicName, _Out_opt_ PUNICODE_STRING DeviceName, _Out_opt_ PMOUNTDEV_UNIQUE_ID *UniqueId, _Out_opt_ PBOOLEAN Removable, _Out_opt_ PBOOLEAN GptDriveLetter, _Out_opt_ PBOOLEAN HasGuid, _Inout_opt_ LPGUID StableGuid, _Out_opt_ PBOOLEAN IsFT)
VOID NTAPI MountMgrUnload(IN PDRIVER_OBJECT DriverObject)
NTSTATUS MountMgrMountedDeviceArrival(IN PDEVICE_EXTENSION DeviceExtension, IN PUNICODE_STRING SymbolicName, IN BOOLEAN ManuallyRegistered)
NTSTATUS FindDeviceInfo(IN PDEVICE_EXTENSION DeviceExtension, IN PUNICODE_STRING SymbolicName, IN BOOLEAN DeviceNameGiven, OUT PDEVICE_INFORMATION *DeviceInformation)
VOID MountMgrFreeMountedDeviceInfo(IN PDEVICE_INFORMATION DeviceInformation)
static const WCHAR Cunc[]
PDEVICE_OBJECT gdeviceObject
NTSTATUS NTAPI MountMgrCleanup(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
#define Cunc_LETTER_POSITION
VOID NTAPI MountMgrCancel(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS CreateNewDriveLetterName(OUT PUNICODE_STRING DriveLetter, IN PUNICODE_STRING DeviceName, IN UCHAR Letter, IN PMOUNTDEV_UNIQUE_ID UniqueId OPTIONAL)
BOOLEAN MountmgrReadNoAutoMount(_In_ PUNICODE_STRING RegistryPath)
Retrieves the "NoAutoMount" setting.
VOID MountMgrFreeDeadDeviceInfo(IN PDEVICE_INFORMATION DeviceInformation)
BOOLEAN HasDriveLetter(IN PDEVICE_INFORMATION DeviceInformation)
VOID MountMgrMountedDeviceRemoval(IN PDEVICE_EXTENSION DeviceExtension, IN PUNICODE_STRING DeviceName)
VOID MountMgrFreeSavedLink(IN PSAVED_LINK_INFORMATION SavedLinkInformation)
NTSTATUS NTAPI MountMgrCreateClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
#define MOUNTMGR_IS_VOLUME_NAME(s)
#define _In_reads_bytes_opt_(size)
#define _Out_writes_bytes_opt_(size)
_In_ PNDIS_STRING _In_ PNDIS_STRING SymbolicName
NTSYSAPI NTSTATUS NTAPI ZwOpenSymbolicLinkObject(_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
NTSYSAPI NTSTATUS NTAPI RtlCreateRegistryKey(_In_ ULONG RelativeTo, _In_ PWSTR Path)
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
#define SYMBOLIC_LINK_QUERY
#define FILE_READ_ATTRIBUTES
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
#define RTL_REGISTRY_ABSOLUTE
#define RTL_QUERY_REGISTRY_DIRECT
NTSYSAPI BOOLEAN NTAPI RtlPrefixUnicodeString(IN PUNICODE_STRING String1, IN PUNICODE_STRING String2, IN BOOLEAN CaseInSensitive)
#define FILE_REMOVABLE_MEDIA
#define UNREFERENCED_PARAMETER(P)
#define IsFTPartition(PartitionType)
#define IOCTL_STORAGE_GET_DEVICE_NUMBER
#define IOCTL_VOLUME_GET_GPT_ATTRIBUTES
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
NTSTATUS NTAPI IoRegisterShutdownNotification(PDEVICE_OBJECT DeviceObject)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
NTSTATUS NTAPI IoGetDeviceObjectPointer(IN PUNICODE_STRING ObjectName, IN ACCESS_MASK DesiredAccess, OUT PFILE_OBJECT *FileObject, OUT PDEVICE_OBJECT *DeviceObject)
PDEVICE_OBJECT NTAPI IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject)
VOID NTAPI IoUnregisterShutdownNotification(PDEVICE_OBJECT DeviceObject)
#define IoCompleteRequest
BOOLEAN NTAPI IoCancelIrp(IN PIRP Irp)
PIRP NTAPI IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
VOID NTAPI IoFreeIrp(IN PIRP Irp)
NTSTATUS NTAPI IoDeleteSymbolicLink(IN PUNICODE_STRING SymbolicLinkName)
VOID NTAPI IoReleaseCancelSpinLock(IN KIRQL Irql)
VOID NTAPI IoAcquireCancelSpinLock(OUT PKIRQL Irql)
NTSTATUS NTAPI IoSetSystemPartition(IN PUNICODE_STRING VolumeNameString)
BOOLEAN NTAPI KeAreAllApcsDisabled(VOID)
VOID NTAPI PsSetThreadHardErrorsAreDisabled(IN PETHREAD Thread, IN BOOLEAN HardErrorsAreDisabled)
BOOLEAN NTAPI PsGetThreadHardErrorsAreDisabled(IN PETHREAD Thread)
NTSTATUS NTAPI IoRegisterPlugPlayNotification(_In_ IO_NOTIFICATION_EVENT_CATEGORY EventCategory, _In_ ULONG EventCategoryFlags, _In_opt_ PVOID EventCategoryData, _In_ PDRIVER_OBJECT DriverObject, _In_ PDRIVER_NOTIFICATION_CALLBACK_ROUTINE CallbackRoutine, _Inout_opt_ PVOID Context, _Out_ PVOID *NotificationEntry)
NTSTATUS NTAPI IoUnregisterPlugPlayNotification(_In_ PVOID NotificationEntry)
#define IsEqualGUID(rguid1, rguid2)
#define FILE_DEVICE_NETWORK
#define IRP_MJ_DEVICE_CONTROL
VOID NTAPI KeInitializeSemaphore(IN PKSEMAPHORE Semaphore, IN LONG Count, IN LONG Limit)
LONG NTAPI KeReleaseSemaphore(IN PKSEMAPHORE Semaphore, IN KPRIORITY Increment, IN LONG Adjustment, IN BOOLEAN Wait)
#define STATUS_BUFFER_OVERFLOW
PULONG MinorVersion OPTIONAL
struct _LIST_ENTRY * Flink
PMOUNTDEV_UNIQUE_ID UniqueId
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_NOT_A_DIRECTORY
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
#define STATUS_OBJECT_NAME_NOT_FOUND
_In_ PWDFDEVICE_INIT _In_ PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION Notification
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_In_ WDFDEVICE AssociatedDevice
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
_In_ WDFREQUEST _In_ size_t OutputBufferLength
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWORKITEM * WorkItem
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
_In_ ULONG _In_ struct _SET_PARTITION_INFORMATION_EX * PartitionInfo
_In_ PVOID NotificationStructure
@ EventCategoryDeviceInterfaceChange
#define PNPNOTIFY_DEVICE_INTERFACE_INCLUDE_EXISTING_INTERFACES
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
#define ObDereferenceObject
_Inout_ PUNICODE_STRING LinkTarget