ReactOS  0.4.14-dev-50-g13bb5e2
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 INIT_FUNCTION
180 DRIVER_INITIALIZE DriverEntry;
181 
182 VOID
183 NTAPI
186  IN PIRP Irp
187 );
188 
189 NTSTATUS
193  IN BOOLEAN FromVolume
194 );
195 
196 VOID
200 );
201 
202 NTSTATUS
204  IN PDEVICE_EXTENSION DeviceExtension,
206  IN BOOLEAN DeviceNameGiven,
207  OUT PDEVICE_INFORMATION * DeviceInformation
208 );
209 
210 VOID
212  IN PDEVICE_INFORMATION DeviceInformation
213 );
214 
215 NTSTATUS
219  OUT PMOUNTDEV_UNIQUE_ID * UniqueId OPTIONAL,
221  OUT PBOOLEAN GptDriveLetter OPTIONAL,
222  OUT PBOOLEAN HasGuid OPTIONAL,
223  IN OUT LPGUID StableGuid OPTIONAL,
224  OUT PBOOLEAN Valid OPTIONAL
225 );
226 
227 BOOLEAN
229  IN PDEVICE_INFORMATION DeviceInformation
230 );
231 
232 INIT_FUNCTION
233 BOOLEAN
236 );
237 
238 /* database.c */
239 
240 extern PWSTR DatabasePath;
241 extern PWSTR OfflinePath;
242 
243 VOID
245  IN PDEVICE_EXTENSION DeviceExtension,
246  IN PDEVICE_INFORMATION DeviceInformation
247 );
248 
249 NTSTATUS
251  IN PDEVICE_EXTENSION DeviceExtension
252 );
253 
254 VOID
256  IN PDEVICE_EXTENSION DeviceExtension
257 );
258 
259 VOID
261  IN PDEVICE_INFORMATION DeviceInformation,
262  IN PMOUNTDEV_UNIQUE_ID OldUniqueId,
263  IN PMOUNTDEV_UNIQUE_ID NewUniqueId
264 );
265 
266 VOID
268  IN PDEVICE_EXTENSION DeviceExtension
269 );
270 
271 VOID
274  IN PMOUNTDEV_UNIQUE_ID UniqueId
275 );
276 
277 VOID
279  IN PMOUNTDEV_UNIQUE_ID UniqueId
280 );
281 
282 VOID
284  IN PMOUNTDEV_UNIQUE_ID UniqueId
285 );
286 
287 NTSTATUS
290  IN PFILE_REPARSE_POINT_INFORMATION ReparsePointInformation,
294 );
295 
296 HANDLE
298  IN PDEVICE_INFORMATION DeviceInformation,
299  IN BOOLEAN MigrateDatabase
300 );
301 
306 );
307 
308 NTSTATUS
311  IN LONG Offset,
313 );
314 
315 NTSTATUS
318 );
319 
320 NTSTATUS
324 );
325 
326 NTSTATUS
330 );
331 
332 VOID
333 NTAPI
336 );
337 
338 /* device.c */
339 
341 
342 /* notify.c */
343 VOID
345  IN PUNIQUE_ID_WORK_ITEM WorkItem,
346  IN PMOUNTDEV_UNIQUE_ID UniqueId
347 );
348 
349 VOID
351  IN PDEVICE_EXTENSION DeviceExtension
352 );
353 
354 VOID
356  IN PDEVICE_EXTENSION DeviceExtension,
357  IN PDEVICE_INFORMATION DeviceInformation
358 );
359 
360 VOID
363 );
364 
365 VOID
367  IN PDEVICE_EXTENSION DeviceExtension,
369  IN PMOUNTDEV_UNIQUE_ID UniqueId
370 );
371 
372 VOID
374  IN PDEVICE_EXTENSION DeviceExtension,
376 );
377 
378 VOID
380  IN PDEVICE_EXTENSION DeviceExtension
381 );
382 
383 VOID
385  IN PDEVICE_EXTENSION DeviceExtension,
387  IN BOOLEAN ValidateVolume
388 );
389 
390 /* uniqueid.c */
391 VOID
393  IN PDEVICE_EXTENSION DeviceExtension,
394  IN PMOUNTDEV_UNIQUE_ID OldUniqueId,
395  IN PMOUNTDEV_UNIQUE_ID NewUniqueId
396 );
397 
398 VOID
400  IN PMOUNTDEV_UNIQUE_ID UniqueId
401 );
402 
403 BOOLEAN
405  IN PMOUNTDEV_UNIQUE_ID UniqueId
406 );
407 
408 VOID
410  IN PDEVICE_INFORMATION DeviceInformation,
411  IN PDATABASE_ENTRY DatabaseEntry
412 );
413 
414 BOOLEAN
416  IN PDEVICE_EXTENSION DeviceExtension,
417  IN PDATABASE_ENTRY DatabaseEntry
418 );
419 
420 /* point.c */
421 NTSTATUS
423  IN PDEVICE_EXTENSION DeviceExtension,
424  IN PUNICODE_STRING SymbolicLinkName,
426 );
427 
428 NTSTATUS
430  IN PDEVICE_EXTENSION DeviceExtension,
432  IN PIRP Irp
433 );
434 
435 NTSTATUS
437  IN PDEVICE_EXTENSION DeviceExtension,
438  IN PIRP Irp,
441 );
442 
443 /* symlink.c */
444 NTSTATUS
448 );
449 
450 NTSTATUS
453 );
454 
455 NTSTATUS
458  OUT PUNICODE_STRING SuggestedLinkName,
459  OUT PBOOLEAN UseOnlyIfThereAreNoOtherLinks
460 );
461 
462 NTSTATUS
464  IN PDEVICE_EXTENSION DeviceExtension,
465  IN PDEVICE_INFORMATION DeviceInformation,
466  IN PUNICODE_STRING SuggestedLinkName,
467  IN BOOLEAN UseOnlyIfThereAreNoOtherLinks,
468  OUT PUNICODE_STRING * SymLinks,
469  OUT PULONG SymLinkCount,
470  IN BOOLEAN HasGuid,
471  IN LPGUID Guid
472 );
473 
476  IN PDEVICE_EXTENSION DeviceExtension,
477  IN PMOUNTDEV_UNIQUE_ID UniqueId
478 );
479 
480 BOOLEAN
482  IN PSAVED_LINK_INFORMATION SavedLinkInformation,
484  IN PUNICODE_STRING NewLink
485 );
486 
487 VOID
490 );
491 
492 NTSTATUS
495  IN PGUID VolumeGuid OPTIONAL
496 );
497 
498 BOOLEAN
501 );
502 
503 VOID
505  IN PDEVICE_EXTENSION DeviceExtension,
507  IN BOOLEAN MarkOffline
508 );
509 
510 NTSTATUS
514 );
515 
516 #endif /* _MNTMGR_H_ */
struct _RECONCILE_WORK_ITEM RECONCILE_WORK_ITEM
INIT_FUNCTION BOOLEAN MountmgrReadNoAutoMount(IN PUNICODE_STRING RegistryPath)
Definition: mountmgr.c:903
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:38
struct _ASSOCIATED_DEVICE_ENTRY * PASSOCIATED_DEVICE_ENTRY
VOID IssueUniqueIdChangeNotifyWorker(IN PUNIQUE_ID_WORK_ITEM WorkItem, IN PMOUNTDEV_UNIQUE_ID UniqueId)
Definition: notify.c:590
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:1891
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:282
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
_In_ PIRP Irp
Definition: csq.h:116
struct _DEVICE_INFORMATION_ENTRY * PDEVICE_INFORMATION_ENTRY
KSEMAPHORE WorkerSemaphore
Definition: mntmgr.h:29
uint16_t * PWSTR
Definition: typedefs.h:54
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
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:1274
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
WCHAR DeviceName[]
Definition: adapter.cpp:21
_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
PIO_WORKITEM WorkItem
Definition: mntmgr.h:142
UNICODE_STRING DosGlobal
Definition: symlink.c:36
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_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
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
static GUID * Guid
Definition: apphelp.c:93
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:1641
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:194
VOID DeleteNoDriveLetterEntry(IN PMOUNTDEV_UNIQUE_ID UniqueId)
Definition: database.c:2080
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: mntmgr.h:16
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:439
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:117
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
struct _ONLINE_NOTIFICATION_WORK_ITEM * PONLINE_NOTIFICATION_WORK_ITEM
DRIVER_DISPATCH MountMgrDeviceControl
Definition: mntmgr.h:340
PDEVICE_INFORMATION DeviceInformation
Definition: mntmgr.h:105
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
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:1595
BOOLEAN Removable
Definition: mntmgr.h:54
PDEVICE_OBJECT DeviceObject
Definition: mntmgr.h:15
VOID DeleteRegistryDriveLetter(IN PMOUNTDEV_UNIQUE_ID UniqueId)
Definition: database.c:2028
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:87
LONG WorkerReferences
Definition: mntmgr.h:30
HANDLE OpenRemoteDatabase(IN PDEVICE_INFORMATION DeviceInformation, IN BOOLEAN MigrateDatabase)
Definition: database.c:1818
UNICODE_STRING DeviceName
Definition: mntmgr.h:50
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:39
LIST_ENTRY ReplicatedUniqueIdsListHead
Definition: mntmgr.h:46
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
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
PVOID TargetDeviceNotificationEntry
Definition: mntmgr.h:61
Definition: mntmgr.h:102
LIST_ENTRY WorkerQueueListEntry
Definition: mntmgr.h:123
PDEVICE_EXTENSION DeviceExtension
Definition: mntmgr.h:117
INIT_FUNCTION DRIVER_INITIALIZE DriverEntry
Definition: mntmgr.h:180
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:660
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:352
Definition: arc.h:81
NTSTATUS CloseRemoteDatabase(IN HANDLE Database)
Definition: database.c:82
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