81 PLIST_ENTRY ListHead, NextEntry, ReplicatedHead, NextReplicated;
101 ListHead = &(DeviceExtension->DeviceListHead);
102 NextEntry = ListHead->
Flink;
103 while (ListHead != NextEntry)
112 OldUniqueId->UniqueIdLength) == OldUniqueId->UniqueIdLength)
117 NextEntry = NextEntry->
Flink;
121 if (ListHead == NextEntry)
156 DeviceInformation->
UniqueId = UniqueId;
161 ListHead = &(DeviceExtension->DeviceListHead);
162 NextEntry = ListHead->
Flink;
163 while (ListHead != NextEntry)
168 ResyncNeeded =
FALSE;
171 NextReplicated = ReplicatedHead->
Flink;
172 while (ReplicatedHead != NextReplicated)
176 ReplicatedUniqueIdsListEntry);
181 OldUniqueId->UniqueId,
182 OldUniqueId->UniqueIdLength) == OldUniqueId->UniqueIdLength)
192 DuplicateId->
UniqueId = NewDuplicateId;
199 NextReplicated = NextReplicated->
Flink;
208 NextEntry = NextEntry->
Flink;
233 if (
IsListEmpty(&(DeviceExtension->DeviceListHead)))
239 for (NextEntry = DeviceExtension->DeviceListHead.
Flink;
240 NextEntry != &(DeviceExtension->DeviceListHead);
241 NextEntry = NextEntry->
Flink)
255 DatabaseEntry->UniqueIdLength) == DatabaseEntry->UniqueIdLength)
312 UniqueId->UniqueIdLength);
344 *EntryPresent =
TRUE;
382 for (NextEntry = DeviceInformation->ReplicatedUniqueIdsListHead.
Flink;
383 NextEntry != &(DeviceInformation->ReplicatedUniqueIdsListHead);
384 NextEntry = NextEntry->
Flink)
388 ReplicatedUniqueIdsListEntry);
397 (
PVOID)((
ULONG_PTR)DatabaseEntry + DatabaseEntry->UniqueIdOffset),
405 if (NextEntry != &(DeviceInformation->ReplicatedUniqueIdsListHead))
428 (
PVOID)((
ULONG_PTR)DatabaseEntry + DatabaseEntry->UniqueIdOffset),
429 DatabaseEntry->UniqueIdLength);
#define NT_SUCCESS(StatCode)
NTSTATUS WaitForRemoteDatabaseSemaphore(IN PDEVICE_EXTENSION DeviceExtension)
VOID ReconcileThisDatabaseWithMaster(IN PDEVICE_EXTENSION DeviceExtension, IN PDEVICE_INFORMATION DeviceInformation)
VOID ReleaseRemoteDatabaseSemaphore(IN PDEVICE_EXTENSION DeviceExtension)
VOID ChangeRemoteDatabaseUniqueId(IN PDEVICE_INFORMATION DeviceInformation, IN PMOUNTDEV_UNIQUE_ID OldUniqueId, IN PMOUNTDEV_UNIQUE_ID NewUniqueId)
NTSTATUS NTAPI ChangeUniqueIdRoutine(IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
VOID UpdateReplicatedUniqueIds(IN PDEVICE_INFORMATION DeviceInformation, IN PDATABASE_ENTRY DatabaseEntry)
BOOLEAN IsUniqueIdPresent(IN PDEVICE_EXTENSION DeviceExtension, IN PDATABASE_ENTRY DatabaseEntry)
VOID MountMgrUniqueIdChangeRoutine(IN PDEVICE_EXTENSION DeviceExtension, IN PMOUNTDEV_UNIQUE_ID OldUniqueId, IN PMOUNTDEV_UNIQUE_ID NewUniqueId)
VOID CreateNoDriveLetterEntry(IN PMOUNTDEV_UNIQUE_ID UniqueId)
BOOLEAN HasNoDriveLetterEntry(IN PMOUNTDEV_UNIQUE_ID UniqueId)
NTSTATUS NTAPI CheckForNoDriveLetterEntry(IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define RtlCompareMemory(s1, s2, l)
_In_ GUID _In_ PVOID ValueData
NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG, PCWSTR, PCWSTR, ULONG, PVOID, ULONG)
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
#define AllocatePool(Size)
NTKERNELAPI NTSTATUS ExUuidCreate(OUT UUID *Uuid)
#define ExFreePoolWithTag(_P, _T)
_In_ PCWSTR _Inout_ _At_ QueryTable EntryContext
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
#define RTL_REGISTRY_ABSOLUTE
LONG NTAPI KeReleaseSemaphore(IN PKSEMAPHORE Semaphore, IN KPRIORITY Increment, IN LONG Adjustment, IN BOOLEAN Wait)
struct _LIST_ENTRY * Flink
PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine
PMOUNTDEV_UNIQUE_ID UniqueId
LIST_ENTRY ReplicatedUniqueIdsListEntry
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_opt_ PULONG _Out_opt_ PULONG ValueType
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength