- Get beep and blue to compile/link on MSVC.
[reactos.git] / reactos / drivers / dd / beep / beep.c
index b81fe90..dc5872e 100644 (file)
 
 /* INCLUDES ****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <ddk/ntddbeep.h>
-#include <rosrtl/string.h>
+#include <ntddk.h>
+#include <ntddbeep.h>
 
 #define NDEBUG
 #include <debug.h>
 
+NTSTATUS STDCALL
+DriverEntry(PDRIVER_OBJECT DriverObject,
+            PUNICODE_STRING RegistryPath);
+
 /* TYEPEDEFS ***************************************************************/
 
 typedef struct _BEEP_DEVICE_EXTENSION
@@ -178,9 +181,8 @@ BeepDeviceControl(PDEVICE_OBJECT DeviceObject,
 
   /* do the beep!! */
   DPRINT("Beep:\n  Freq: %lu Hz\n  Dur: %lu ms\n",
-        pbsp->Frequency,
-        pbsp->Duration);
-
+        BeepParam->Frequency,
+        BeepParam->Duration);
   if (BeepParam->Duration >= 0)
     {
       DueTime.QuadPart = (LONGLONG)BeepParam->Duration * -10000;
@@ -197,7 +199,7 @@ BeepDeviceControl(PDEVICE_OBJECT DeviceObject,
                            FALSE,
                            NULL);
     }
-  else if (BeepParam->Duration == (DWORD)-1)
+  else if (BeepParam->Duration == (ULONG)-1)
     {
       if (DeviceExtension->BeepOn == TRUE)
        {
@@ -240,8 +242,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
 {
   PDEVICE_EXTENSION DeviceExtension;
   PDEVICE_OBJECT DeviceObject;
-  UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\Beep");
-  UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\Beep");
+  UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\Beep");
   NTSTATUS Status;
 
   DPRINT("Beep Device Driver 0.0.3\n");
@@ -275,10 +276,6 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
                    SynchronizationEvent,
                    FALSE);
 
-  /* Create the dos device link */
-  IoCreateSymbolicLink(&SymlinkName,
-                      &DeviceName);
-
   return(STATUS_SUCCESS);
 }