- get mpu401, parallel and ramdrv to work on msvc.
[reactos.git] / reactos / drivers / dd / mpu401 / mpu401.c
index aa8c0cb..cebd2f3 100644 (file)
@@ -12,9 +12,8 @@
 
 /* INCLUDES ****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <rosrtl/string.h>
-//#include <ddk/ntddbeep.h>
+#include <ntddk.h>
+//#include <ntddbeep.h>
 
 //#define NDEBUG
 #include <debug.h>
 
 /* INTERNAL VARIABLES ******************************************************/
 
-UINT DeviceCount = 0;
+ULONG DeviceCount = 0;
 
 
 /* FUNCTIONS ***************************************************************/
 
-NTSTATUS InitDevice(
+static NTSTATUS InitDevice(
     IN PUNICODE_STRING RegistryPath,
     IN PVOID Context)
 {
 //    PDEVICE_INSTANCE Instance = Context;
     PDEVICE_OBJECT DeviceObject; // = Context;
     PDEVICE_EXTENSION Parameters; // = DeviceObject->DeviceExtension;
-    UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\MidiOut0");
-    UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\MidiOut0");
+    UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\MidiOut0");
+    UNICODE_STRING SymlinkName = RTL_CONSTANT_STRING(L"\\??\\MidiOut0");
 //    CONFIG Config;
     RTL_QUERY_REGISTRY_TABLE Table[2];
     NTSTATUS s;
@@ -206,7 +205,7 @@ MPU401Cleanup(PDEVICE_OBJECT DeviceObject,
  * RETURNS: Success or failure
  */
 {
-  UINT Channel;
+  ULONG Channel;
   DPRINT("MPU401Cleanup() called!\n");
 
     // Reset the device (should we do this?)
@@ -241,8 +240,8 @@ MPU401DeviceControl(PDEVICE_OBJECT DeviceObject,
 {
     PIO_STACK_LOCATION Stack;
     PDEVICE_EXTENSION DeviceExtension;
-    UINT ByteCount;
-    PBYTE Data;
+    ULONG ByteCount;
+    PUCHAR Data;
 
     DPRINT("MPU401DeviceControl() called!\n");
 
@@ -257,7 +256,7 @@ MPU401DeviceControl(PDEVICE_OBJECT DeviceObject,
         case IOCTL_MIDI_PLAY :
         {
             DPRINT("Received IOCTL_MIDI_PLAY\n");
-            Data = (PBYTE) Irp->AssociatedIrp.SystemBuffer;
+            Data = (PUCHAR) Irp->AssociatedIrp.SystemBuffer;
 
             DPRINT("Sending %d bytes of MIDI data to 0x%d:\n", Stack->Parameters.DeviceIoControl.InputBufferLength, DeviceExtension->Port);