Don't create the media change event as named object.
Modified: trunk/reactos/drivers/storage/cdrom/cdrom.c
Modified: trunk/reactos/drivers/storage/disk/disk.c

Modified: trunk/reactos/drivers/storage/cdrom/cdrom.c
--- trunk/reactos/drivers/storage/cdrom/cdrom.c	2005-05-22 16:10:10 UTC (rev 15468)
+++ trunk/reactos/drivers/storage/cdrom/cdrom.c	2005-05-22 16:44:36 UTC (rev 15469)
@@ -391,17 +391,10 @@
 CdromClassCreateMediaChangeEvent(IN PDEVICE_EXTENSION DeviceExtension,
 				 IN ULONG DeviceNumber)
 {
-  WCHAR NameBuffer[MAX_PATH];
-  UNICODE_STRING Name;
 
-  swprintf (NameBuffer,
-	    L"\\Device\\MediaChangeEvent%lu",
-	    DeviceNumber);
-  RtlInitUnicodeString (&Name,
-			NameBuffer);
 
   DeviceExtension->MediaChangeEvent =
-    IoCreateSynchronizationEvent (&Name,
+    IoCreateSynchronizationEvent (NULL,
 				  &DeviceExtension->MediaChangeEventHandle);
 
   KeClearEvent (DeviceExtension->MediaChangeEvent);

Modified: trunk/reactos/drivers/storage/disk/disk.c
--- trunk/reactos/drivers/storage/disk/disk.c	2005-05-22 16:10:10 UTC (rev 15468)
+++ trunk/reactos/drivers/storage/disk/disk.c	2005-05-22 16:44:36 UTC (rev 15469)
@@ -315,17 +315,8 @@
 DiskClassCreateMediaChangeEvent(IN PDEVICE_EXTENSION DeviceExtension,
 				 IN ULONG DeviceNumber)
 {
-  WCHAR NameBuffer[MAX_PATH];
-  UNICODE_STRING Name;
-
-  swprintf (NameBuffer,
-	    L"\\Device\\MediaChangeEvent%lu",
-	    DeviceNumber);
-  RtlInitUnicodeString (&Name,
-			NameBuffer);
-
   DeviceExtension->MediaChangeEvent =
-    IoCreateSynchronizationEvent (&Name,
+    IoCreateSynchronizationEvent (NULL,
 				  &DeviceExtension->MediaChangeEventHandle);
 
   KeClearEvent (DeviceExtension->MediaChangeEvent);