ReactOS  0.4.15-dev-1374-g8d3e80e
mntmgr.h
Go to the documentation of this file.
1 #ifndef _MNTMGR_H_
2 #define _MNTMGR_H_
3 
4 #include <ntifs.h>
5 #include <mountdev.h>
6 #include <ntddvol.h>
7 #include <ntdddisk.h>
8 #include <wdmguid.h>
9 #include <ndk/psfuncs.h>
10 #include <ntdddisk.h>
11 #include <section_attribs.h>
12 
13 typedef struct _DEVICE_EXTENSION
14 {
24  ULONG EpicNumber; // 0x50
41 
42 typedef struct _DEVICE_INFORMATION
43 {
51  BOOLEAN KeepLinks; // 0x34
54  BOOLEAN Removable; // 0x37
59  ULONG Migrated; // 0x3C
60  LONG MountState; // 0x40
64 
65 typedef struct _SYMLINK_INFORMATION
66 {
69  BOOLEAN Online; // 0x10
71 
73 {
78 
79 typedef struct _UNIQUE_ID_REPLICATE
80 {
84 
85 typedef struct _DATABASE_ENTRY
86 {
87  ULONG EntrySize; // 0x00
94 
96 {
101 
103 {
107 
109 {
114 
116 {
120 
121 typedef struct _RECONCILE_WORK_ITEM
122 {
126  PVOID Context; // 0x10
129 
130 typedef struct _MIGRATE_WORK_ITEM
131 {
134  PKEVENT Event; // 0x8
135  NTSTATUS Status; // 0x0C
136  HANDLE Database; // 0x10
138 
139 typedef struct _UNIQUE_ID_WORK_ITEM
140 {
144  PIRP Irp; // 0x10
145  PVOID IrpBuffer; // 0x14
146  PKEVENT Event; // 0x1C
149  ULONG StackSize; // 0x2C
151 
152 /* Memory allocation helpers */
153 #define AllocatePool(Size) ExAllocatePoolWithTag(PagedPool, Size, 'AtnM')
154 #define FreePool(P) ExFreePoolWithTag(P, 'AtnM')
155 
156 /* Misc macros */
157 #define MAX(a, b) ((a > b) ? a : b)
158 
159 #define LETTER_POSITION 0xC
160 #define COLON_POSITION 0xD
161 #define DRIVE_LETTER_LENGTH 0x1C
162 
163 /* mountmgr.c */
164 
174 extern UNICODE_STRING Global;
175 extern UNICODE_STRING Volume;
176 extern KEVENT UnloadEvent;
177 extern LONG Unloading;
178 
179 DRIVER_INITIALIZE DriverEntry;
180 
181 VOID
182 NTAPI
185  IN PIRP Irp
186 );
187 
188 NTSTATUS
192  IN BOOLEAN FromVolume
193 );
194 
195 VOID
199 );
200 
201 NTSTATUS
203  IN PDEVICE_EXTENSION DeviceExtension,
205  IN BOOLEAN DeviceNameGiven,
206  OUT PDEVICE_INFORMATION * DeviceInformation
207 );
208 
209 VOID
211  IN PDEVICE_INFORMATION DeviceInformation
212 );
213 
214 NTSTATUS
218  OUT PMOUNTDEV_UNIQUE_ID * UniqueId OPTIONAL,
220  OUT PBOOLEAN GptDriveLetter OPTIONAL,
221  OUT PBOOLEAN HasGuid OPTIONAL,
222  IN OUT LPGUID StableGuid OPTIONAL,
223  OUT PBOOLEAN Valid OPTIONAL
224 );
225 
226 BOOLEAN
228  IN PDEVICE_INFORMATION DeviceInformation
229 );
230 
231 BOOLEAN
234 );
235 
236 /* database.c */
237 
238 extern PWSTR DatabasePath;
239 extern PWSTR OfflinePath;
240 
241 VOID
243  IN PDEVICE_EXTENSION DeviceExtension,
244  IN PDEVICE_INFORMATION DeviceInformation
245 );
246 
247 NTSTATUS
249  IN PDEVICE_EXTENSION DeviceExtension
250 );
251 
252 VOID
254  IN PDEVICE_EXTENSION DeviceExtension
255 );
256 
257 VOID
259  IN PDEVICE_INFORMATION DeviceInformation,
260  IN PMOUNTDEV_UNIQUE_ID OldUniqueId,
261  IN PMOUNTDEV_UNIQUE_ID NewUniqueId
262 );
263 
264 VOID
266  IN PDEVICE_EXTENSION DeviceExtension
267 );
268 
269 VOID
272  IN PMOUNTDEV_UNIQUE_ID UniqueId
273 );
274 
275 VOID
277  IN PMOUNTDEV_UNIQUE_ID UniqueId
278 );
279 
280 VOID
282  IN PMOUNTDEV_UNIQUE_ID UniqueId
283 );
284 
285 NTSTATUS
288  IN PFILE_REPARSE_POINT_INFORMATION ReparsePointInformation,
292 );
293 
294 HANDLE
296  IN PDEVICE_INFORMATION DeviceInformation,
297  IN BOOLEAN MigrateDatabase
298 );
299 
304 );
305 
306 NTSTATUS
309  IN LONG Offset,
311 );
312 
313 NTSTATUS
316 );
317 
318 NTSTATUS
322 );
323 
324 NTSTATUS
328 );
329 
330 VOID
331 NTAPI
334 );
335 
336 /* device.c */
337 
339 
340 /* notify.c */
341 VOID
344  IN PMOUNTDEV_UNIQUE_ID UniqueId
345 );
346 
347 VOID
349  IN PDEVICE_EXTENSION DeviceExtension
350 );
351 
352 VOID
354  IN PDEVICE_EXTENSION DeviceExtension,
355  IN PDEVICE_INFORMATION DeviceInformation
356 );
357 
358 VOID
361 );
362 
363 VOID
365  IN PDEVICE_EXTENSION DeviceExtension,
367  IN PMOUNTDEV_UNIQUE_ID UniqueId
368 );
369 
370 VOID
372  IN PDEVICE_EXTENSION DeviceExtension,
374 );
375 
376 VOID
378  IN PDEVICE_EXTENSION DeviceExtension
379 );
380 
381 VOID
383  IN PDEVICE_EXTENSION DeviceExtension,
385  IN BOOLEAN ValidateVolume
386 );
387 
388 /* uniqueid.c */
389 VOID
391  IN PDEVICE_EXTENSION DeviceExtension,
392  IN PMOUNTDEV_UNIQUE_ID OldUniqueId,
393  IN PMOUNTDEV_UNIQUE_ID NewUniqueId
394 );
395 
396 VOID
398  IN PMOUNTDEV_UNIQUE_ID UniqueId
399 );
400 
401 BOOLEAN
403  IN PMOUNTDEV_UNIQUE_ID UniqueId
404 );
405 
406 VOID
408  IN PDEVICE_INFORMATION DeviceInformation,
409  IN PDATABASE_ENTRY DatabaseEntry
410 );
411 
412 BOOLEAN
414  IN PDEVICE_EXTENSION DeviceExtension,
415  IN PDATABASE_ENTRY DatabaseEntry
416 );
417 
418 /* point.c */
419 NTSTATUS
421  IN PDEVICE_EXTENSION DeviceExtension,
424 );
425 
426 NTSTATUS
428  IN PDEVICE_EXTENSION DeviceExtension,
430  IN PIRP Irp
431 );
432 
433 NTSTATUS
435  IN PDEVICE_EXTENSION DeviceExtension,
436  IN PIRP Irp,
439 );
440 
441 /* symlink.c */
442 NTSTATUS
446 );
447 
448 NTSTATUS
451 );
452 
453 NTSTATUS
456  OUT PUNICODE_STRING SuggestedLinkName,
457  OUT PBOOLEAN UseOnlyIfThereAreNoOtherLinks
458 );
459 
460 NTSTATUS
462  IN PDEVICE_EXTENSION DeviceExtension,
463  IN PDEVICE_INFORMATION DeviceInformation,
464  IN PUNICODE_STRING SuggestedLinkName,
465  IN BOOLEAN UseOnlyIfThereAreNoOtherLinks,
466  OUT PUNICODE_STRING * SymLinks,
467  OUT PULONG SymLinkCount,
468  IN BOOLEAN HasGuid,
469  IN LPGUID Guid
470 );
471 
474  IN PDEVICE_EXTENSION DeviceExtension,
475  IN PMOUNTDEV_UNIQUE_ID UniqueId
476 );
477 
478 BOOLEAN
480  IN PSAVED_LINK_INFORMATION SavedLinkInformation,
482  IN PUNICODE_STRING NewLink
483 );
484 
485 VOID
488 );
489 
490 NTSTATUS
493  IN PGUID VolumeGuid OPTIONAL
494 );
495 
496 BOOLEAN
499 );
500 
501 VOID
503  IN PDEVICE_EXTENSION DeviceExtension,
505  IN BOOLEAN MarkOffline
506 );
507 
508 NTSTATUS
512 );
513 
514 #endif /* _MNTMGR_H_ */
struct _RECONCILE_WORK_ITEM RECONCILE_WORK_ITEM
KSEMAPHORE RemoteDatabaseLock
Definition: mntmgr.h:21
USHORT UniqueIdOffset
Definition: mntmgr.h:91
VOID NTAPI MountMgrCancel(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: mountmgr.c:1681
PMOUNTDEV_UNIQUE_ID UniqueId
Definition: mntmgr.h:82
#define IN
Definition: typedefs.h:39
struct _ASSOCIATED_DEVICE_ENTRY * PASSOCIATED_DEVICE_ENTRY
VOID IssueUniqueIdChangeNotifyWorker(IN PUNIQUE_ID_WORK_ITEM WorkItem, IN PMOUNTDEV_UNIQUE_ID UniqueId)
Definition: notify.c:592
UNICODE_STRING DeviceName
Definition: mntmgr.h:147
VOID ChangeRemoteDatabaseUniqueId(IN PDEVICE_INFORMATION DeviceInformation, IN PMOUNTDEV_UNIQUE_ID OldUniqueId, IN PMOUNTDEV_UNIQUE_ID NewUniqueId)
Definition: database.c:1911
struct _RECONCILE_WORK_ITEM_CONTEXT RECONCILE_WORK_ITEM_CONTEXT
UNICODE_STRING DosDevices
Definition: symlink.c:33
KEVENT OnlineNotificationEvent
Definition: mntmgr.h:39
LIST_ENTRY IrpListHead
Definition: mntmgr.h:23
struct _DEVICE_INFORMATION DEVICE_INFORMATION
struct _MIGRATE_WORK_ITEM * PMIGRATE_WORK_ITEM
WCHAR RootDirectory[MAX_PATH]
Definition: format.c:74
_In_ PFCB _In_ LONGLONG StartingOffset
Definition: cdprocs.h:290
ULONG EntryReferences
Definition: mntmgr.h:88
struct _UNIQUE_ID_WORK_ITEM * PUNIQUE_ID_WORK_ITEM
struct _DATABASE_ENTRY * PDATABASE_ENTRY
ULONG EntrySize
Definition: mntmgr.h:87
struct _UNIQUE_ID_REPLICATE * PUNIQUE_ID_REPLICATE
struct _DEVICE_INFORMATION_ENTRY * PDEVICE_INFORMATION_ENTRY
KSEMAPHORE WorkerSemaphore
Definition: mntmgr.h:29
uint16_t * PWSTR
Definition: typedefs.h:56
NTSTATUS GlobalDeleteSymbolicLink(IN PUNICODE_STRING DosName)
Definition: symlink.c:136
NTSTATUS MountMgrQuerySymbolicLink(IN PUNICODE_STRING SymbolicName, IN OUT PUNICODE_STRING LinkTarget)
Definition: symlink.c:959
LIST_ENTRY SavedLinksListHead
Definition: mntmgr.h:25
PDEVICE_INFORMATION DeviceInformation
Definition: mntmgr.h:98
VOID SendOnlineNotification(IN PUNICODE_STRING SymbolicName)
Definition: notify.c:38
_In_ PNDIS_STRING _In_ PNDIS_STRING SymbolicName
Definition: ndis.h:4676
LIST_ENTRY DeviceListHead
Definition: mntmgr.h:17
BOOLEAN LetterAssigned
Definition: mntmgr.h:55
LONG NTSTATUS
Definition: precomp.h:26
PKEVENT Event
Definition: mntmgr.h:134
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:213
BOOLEAN IsUniqueIdPresent(IN PDEVICE_EXTENSION DeviceExtension, IN PDATABASE_ENTRY DatabaseEntry)
Definition: uniqueid.c:221
BOOLEAN IsDriveLetter(PUNICODE_STRING SymbolicName)
Definition: symlink.c:922
VOID RegisterForTargetDeviceNotification(IN PDEVICE_EXTENSION DeviceExtension, IN PDEVICE_INFORMATION DeviceInformation)
Definition: notify.c:275
struct _DEVICE_EXTENSION * PDEVICE_EXTENSION
NTSTATUS QueryVolumeName(IN HANDLE RootDirectory, IN PFILE_REPARSE_POINT_INFORMATION ReparsePointInformation, IN PUNICODE_STRING FileName OPTIONAL, OUT PUNICODE_STRING SymbolicName, OUT PUNICODE_STRING VolumeName)
Definition: database.c:1292
VOID DeleteSymbolicLinkNameFromMemory(IN PDEVICE_EXTENSION DeviceExtension, IN PUNICODE_STRING SymbolicLink, IN BOOLEAN MarkOffline)
Definition: symlink.c:864
UNICODE_STRING SafeVolumes
Definition: symlink.c:38
struct _DEVICE_EXTENSION DEVICE_EXTENSION
BOOLEAN NoAutoMount
Definition: mntmgr.h:27
BOOLEAN ProcessedSuggestions
Definition: mntmgr.h:26
_In_ PVOID Parameter
Definition: ldrtypes.h:241
NTSTATUS CreateNewVolumeName(OUT PUNICODE_STRING VolumeName, IN PGUID VolumeGuid OPTIONAL)
Definition: symlink.c:462
VOID MountMgrMountedDeviceRemoval(IN PDEVICE_EXTENSION Extension, IN PUNICODE_STRING DeviceName)
Definition: mountmgr.c:1451
USHORT SymbolicNameLength
Definition: mntmgr.h:90
PDEVICE_EXTENSION DeviceExtension
Definition: mntmgr.h:143
NTSTATUS MountMgrCreatePointWorker(IN PDEVICE_EXTENSION DeviceExtension, IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
Definition: point.c:35
KSPIN_LOCK WorkerLock
Definition: mntmgr.h:31
UNICODE_STRING Global
Definition: symlink.c:37
UNICODE_STRING SymbolicName
Definition: mntmgr.h:48
struct _UNIQUE_ID_REPLICATE UNIQUE_ID_REPLICATE
LIST_ENTRY AssociatedDevicesEntry
Definition: mntmgr.h:97
PWSTR DatabasePath
Definition: database.c:31
HANDLE Database
Definition: mntmgr.h:136
PVOID NotificationEntry
Definition: mntmgr.h:19
BOOLEAN HasNoDriveLetterEntry(IN PMOUNTDEV_UNIQUE_ID UniqueId)
Definition: uniqueid.c:354
LIST_ENTRY DeviceInformationEntry
Definition: mntmgr.h:104
_Inout_ PUNICODE_STRING LinkTarget
Definition: zwfuncs.h:292
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
PIO_WORKITEM WorkItem
Definition: mntmgr.h:142
UNICODE_STRING DosGlobal
Definition: symlink.c:36
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3272
WORK_QUEUE_ITEM WorkItem
Definition: mntmgr.h:110
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_In_ PIRP Irp
Definition: csq.h:116
UNICODE_STRING RegistryPath
Definition: mntmgr.h:34
long LONG
Definition: pedump.c:60
NTSTATUS WaitForRemoteDatabaseSemaphore(IN PDEVICE_EXTENSION DeviceExtension)
Definition: database.c:371
BOOLEAN NeedsReconcile
Definition: mntmgr.h:56
NTSTATUS DeleteRemoteDatabaseEntry(IN HANDLE Database, IN LONG StartingOffset)
Definition: database.c:233
BOOLEAN NoDatabase
Definition: mntmgr.h:57
VOID NTAPI ReconcileThisDatabaseWithMasterWorker(IN PVOID Parameter)
Definition: database.c:560
PDATABASE_ENTRY GetRemoteDatabaseEntry(IN HANDLE Database, IN LONG StartingOffset)
Definition: database.c:125
struct _DEVICE_INFORMATION * PDEVICE_INFORMATION
unsigned char BOOLEAN
struct _SAVED_LINK_INFORMATION * PSAVED_LINK_INFORMATION
UNICODE_STRING DeviceMount
Definition: symlink.c:31
UNICODE_STRING DeviceFloppy
Definition: symlink.c:34
USHORT UniqueIdLength
Definition: mntmgr.h:92
PDEVICE_EXTENSION DeviceExtension
Definition: mntmgr.h:62
NTSTATUS FindDeviceInfo(IN PDEVICE_EXTENSION DeviceExtension, IN PUNICODE_STRING SymbolicName, IN BOOLEAN DeviceNameGiven, OUT PDEVICE_INFORMATION *DeviceInformation)
Definition: mountmgr.c:641
ULONG OnlineNotificationCount
Definition: mntmgr.h:38
VOID ReconcileAllDatabasesWithMaster(IN PDEVICE_EXTENSION DeviceExtension)
Definition: database.c:1659
ULONG IrpBufferLength
Definition: mntmgr.h:148
VOID ReleaseRemoteDatabaseSemaphore(IN PDEVICE_EXTENSION DeviceExtension)
Definition: database.c:391
UNICODE_STRING ReparseIndex
Definition: symlink.c:40
LIST_ENTRY OnlineNotificationListHead
Definition: mntmgr.h:36
NTSTATUS QueryDeviceInformation(IN PUNICODE_STRING SymbolicName, OUT PUNICODE_STRING DeviceName OPTIONAL, OUT PMOUNTDEV_UNIQUE_ID *UniqueId OPTIONAL, OUT PBOOLEAN Removable OPTIONAL, OUT PBOOLEAN GptDriveLetter OPTIONAL, OUT PBOOLEAN HasGuid OPTIONAL, IN OUT LPGUID StableGuid OPTIONAL, OUT PBOOLEAN Valid OPTIONAL)
Definition: mountmgr.c:195
VOID DeleteNoDriveLetterEntry(IN PMOUNTDEV_UNIQUE_ID UniqueId)
Definition: database.c:2100
PDEVICE_INFORMATION DeviceInformation
Definition: mntmgr.h:118
struct _DATABASE_ENTRY DATABASE_ENTRY
LONG WorkerThreadStatus
Definition: mntmgr.h:35
NTSTATUS AddRemoteDatabaseEntry(IN HANDLE Database, IN PDATABASE_ENTRY Entry)
Definition: database.c:64
struct _SYMLINK_INFORMATION * PSYMLINK_INFORMATION
struct _ASSOCIATED_DEVICE_ENTRY ASSOCIATED_DEVICE_ENTRY
BOOLEAN KeepLinks
Definition: mntmgr.h:51
BOOLEAN SkipNotifications
Definition: mntmgr.h:58
PDRIVER_OBJECT DriverObject
Definition: mpu401.h:86
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
Definition: wdfobject.h:760
struct _RECONCILE_WORK_ITEM_CONTEXT * PRECONCILE_WORK_ITEM_CONTEXT
PDEVICE_INFORMATION DeviceInformation
Definition: mntmgr.h:133
PIO_WORKITEM WorkItem
Definition: mntmgr.h:132
PDEVICE_EXTENSION DeviceExtension
Definition: mntmgr.h:111
Definition: mntmgr.h:95
VOID DeleteFromLocalDatabase(IN PUNICODE_STRING SymbolicLink, IN PMOUNTDEV_UNIQUE_ID UniqueId)
Definition: database.c:351
LIST_ENTRY SymbolicLinksListHead
Definition: mntmgr.h:45
struct _ONLINE_NOTIFICATION_WORK_ITEM ONLINE_NOTIFICATION_WORK_ITEM
NTSTATUS Status
Definition: mntmgr.h:135
USHORT SymbolicNameOffset
Definition: mntmgr.h:89
NTSTATUS QuerySuggestedLinkName(IN PUNICODE_STRING SymbolicName, OUT PUNICODE_STRING SuggestedLinkName, OUT PBOOLEAN UseOnlyIfThereAreNoOtherLinks)
Definition: symlink.c:684
LIST_ENTRY WorkerQueueListHead
Definition: mntmgr.h:28
NTSTATUS QueryPointsFromSymbolicLinkName(IN PDEVICE_EXTENSION DeviceExtension, IN PUNICODE_STRING SymbolicName, IN PIRP Irp)
Definition: point.c:463
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)
Definition: symlink.c:514
struct _SYMLINK_INFORMATION SYMLINK_INFORMATION
Definition: mntmgr.h:85
ULONG EpicNumber
Definition: mntmgr.h:24
LIST_ENTRY UniqueIdWorkerItemListEntry
Definition: mntmgr.h:141
unsigned char UCHAR
Definition: xmlstorage.h:181
VOID CreateNoDriveLetterEntry(IN PMOUNTDEV_UNIQUE_ID UniqueId)
Definition: uniqueid.c:269
char * PBOOLEAN
Definition: retypes.h:11
VOID MountMgrNotify(IN PDEVICE_EXTENSION DeviceExtension)
Definition: notify.c:313
UNICODE_STRING Volume
Definition: fltkernel.h:1172
struct _MIGRATE_WORK_ITEM MIGRATE_WORK_ITEM
struct _UNIQUE_ID_WORK_ITEM UNIQUE_ID_WORK_ITEM
struct _RECONCILE_WORK_ITEM * PRECONCILE_WORK_ITEM
Definition: typedefs.h:119
BOOLEAN ManuallyRegistered
Definition: mntmgr.h:53
DRIVER_DISPATCH(nfs41_FsdDispatch)
UNICODE_STRING String
Definition: mntmgr.h:99
VOID MountMgrFreeDeadDeviceInfo(IN PDEVICE_INFORMATION DeviceInformation)
Definition: mountmgr.c:706
UNICODE_STRING DosDevicesMount
Definition: symlink.c:32
VOID PostOnlineNotification(IN PDEVICE_EXTENSION DeviceExtension, IN PUNICODE_STRING SymbolicName)
Definition: notify.c:145
NTSTATUS WriteRemoteDatabaseEntry(IN HANDLE Database, IN LONG Offset, IN PDATABASE_ENTRY Entry)
Definition: database.c:200
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
struct _ONLINE_NOTIFICATION_WORK_ITEM * PONLINE_NOTIFICATION_WORK_ITEM
DRIVER_DISPATCH MountMgrDeviceControl
Definition: mntmgr.h:338
PDEVICE_INFORMATION DeviceInformation
Definition: mntmgr.h:105
PSAVED_LINK_INFORMATION RemoveSavedLinks(IN PDEVICE_EXTENSION DeviceExtension, IN PMOUNTDEV_UNIQUE_ID UniqueId)
Definition: symlink.c:640
struct _SAVED_LINK_INFORMATION SAVED_LINK_INFORMATION
struct _DEVICE_INFORMATION_ENTRY DEVICE_INFORMATION_ENTRY
unsigned short USHORT
Definition: pedump.c:61
VOID ReconcileThisDatabaseWithMaster(IN PDEVICE_EXTENSION DeviceExtension, IN PDEVICE_INFORMATION DeviceInformation)
Definition: database.c:1613
BOOLEAN Removable
Definition: mntmgr.h:54
PDEVICE_OBJECT DeviceObject
Definition: processr.h:16
VOID DeleteRegistryDriveLetter(IN PMOUNTDEV_UNIQUE_ID UniqueId)
Definition: database.c:2048
NTSTATUS GlobalCreateSymbolicLink(IN PUNICODE_STRING DosName, IN PUNICODE_STRING DeviceName)
Definition: symlink.c:111
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
_Out_ PUNICODE_STRING DosName
Definition: rtlfuncs.h:1270
LIST_ENTRY OfflineDeviceListHead
Definition: mntmgr.h:18
unsigned int * PULONG
Definition: retypes.h:1
VOID UpdateReplicatedUniqueIds(IN PDEVICE_INFORMATION DeviceInformation, IN PDATABASE_ENTRY DatabaseEntry)
Definition: uniqueid.c:376
BOOLEAN HasDriveLetter(IN PDEVICE_INFORMATION DeviceInformation)
Definition: mountmgr.c:88
LONG WorkerReferences
Definition: mntmgr.h:30
HANDLE OpenRemoteDatabase(IN PDEVICE_INFORMATION DeviceInformation, IN BOOLEAN MigrateDatabase)
Definition: database.c:1837
UNICODE_STRING DeviceName
Definition: mntmgr.h:50
BOOLEAN MountmgrReadNoAutoMount(IN PUNICODE_STRING RegistryPath)
Definition: mountmgr.c:903
PIO_WORKITEM WorkItem
Definition: mntmgr.h:124
ULONG AutomaticDriveLetter
Definition: mntmgr.h:22
_Must_inspect_result_ _Inout_opt_ PUNICODE_STRING VolumeName
Definition: fltkernel.h:1117
UNICODE_STRING SymbolicName
Definition: mntmgr.h:112
#define OUT
Definition: typedefs.h:40
LIST_ENTRY ReplicatedUniqueIdsListHead
Definition: mntmgr.h:46
DRIVER_INITIALIZE DriverEntry
Definition: mntmgr.h:179
PDEVICE_OBJECT gdeviceObject
Definition: mountmgr.c:40
LIST_ENTRY DeviceListEntry
Definition: mntmgr.h:44
unsigned int ULONG
Definition: retypes.h:1
LIST_ENTRY AssociatedDevicesHead
Definition: mntmgr.h:47
PVOID TargetDeviceNotificationEntry
Definition: mntmgr.h:61
Definition: mntmgr.h:102
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWORKITEM * WorkItem
Definition: wdfworkitem.h:110
LIST_ENTRY WorkerQueueListEntry
Definition: mntmgr.h:123
PDEVICE_EXTENSION DeviceExtension
Definition: mntmgr.h:117
VOID SendLinkCreated(IN PUNICODE_STRING SymbolicName)
Definition: symlink.c:160
PWSTR OfflinePath
Definition: database.c:32
PMOUNTDEV_UNIQUE_ID DriveLetterData
Definition: mntmgr.h:33
NTSTATUS MountMgrMountedDeviceArrival(IN PDEVICE_EXTENSION Extension, IN PUNICODE_STRING SymbolicName, IN BOOLEAN FromVolume)
Definition: mountmgr.c:936
VOID MountMgrUniqueIdChangeRoutine(IN PDEVICE_EXTENSION DeviceExtension, IN PMOUNTDEV_UNIQUE_ID OldUniqueId, IN PMOUNTDEV_UNIQUE_ID NewUniqueId)
Definition: uniqueid.c:71
PMOUNTDEV_UNIQUE_ID UniqueId
Definition: mntmgr.h:49
PWORKER_THREAD_ROUTINE WorkerRoutine
Definition: mntmgr.h:125
KSEMAPHORE DeviceLock
Definition: mntmgr.h:20
VOID IssueUniqueIdChangeNotify(IN PDEVICE_EXTENSION DeviceExtension, IN PUNICODE_STRING DeviceName, IN PMOUNTDEV_UNIQUE_ID UniqueId)
Definition: notify.c:662
LIST_ENTRY UniqueIdWorkerItemListHead
Definition: mntmgr.h:32
UCHAR SuggestedDriveLetter
Definition: mntmgr.h:52
_Inout_opt_ PUNICODE_STRING Extension
Definition: fltkernel.h:1092
LIST_ENTRY ReplicatedUniqueIdsListEntry
Definition: mntmgr.h:81
LONG Unloading
Definition: mountmgr.c:42
base of all file and directory entries
Definition: entries.h:82
ULONG OnlineNotificationWorkerActive
Definition: mntmgr.h:37
static const WCHAR SymbolicLink[]
Definition: interface.c:31
VOID MountMgrNotifyNameChange(IN PDEVICE_EXTENSION DeviceExtension, IN PUNICODE_STRING DeviceName, IN BOOLEAN ValidateVolume)
Definition: notify.c:353
Definition: arc.h:81
NTSTATUS CloseRemoteDatabase(IN HANDLE Database)
Definition: database.c:82
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING SymbolicLinkName
Definition: wdfdevice.h:3736
WORKER_THREAD_ROUTINE * PWORKER_THREAD_ROUTINE
Definition: extypes.h:200
NTSTATUS QueryPointsFromMemory(IN PDEVICE_EXTENSION DeviceExtension, IN PIRP Irp, IN PMOUNTDEV_UNIQUE_ID UniqueId OPTIONAL, IN PUNICODE_STRING SymbolicName OPTIONAL)
Definition: point.c:236
VOID WaitForOnlinesToComplete(IN PDEVICE_EXTENSION DeviceExtension)
Definition: notify.c:197
UNICODE_STRING DeviceCdRom
Definition: symlink.c:35
BOOLEAN RedirectSavedLink(IN PSAVED_LINK_INFORMATION SavedLinkInformation, IN PUNICODE_STRING DosName, IN PUNICODE_STRING NewLink)
Definition: symlink.c:827
KEVENT UnloadEvent
Definition: mountmgr.c:41
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68