disable defining ntstatus codes in windows.h/winnt.h when using ndk
[reactos.git] / rosapps / tests / diskspeed / diskspeed.c
index d19f8c0..e7e52df 100644 (file)
@@ -5,15 +5,19 @@
  * PROJECT:         ReactOS diskspeed.exe
  * FILE:            apps/tests/diskspeed/diskspeed.c
  * PURPOSE:         Determines disk transfer rates
- * PROGRAMMER:      Hartmut Birr 
+ * PROGRAMMER:      Hartmut Birr
  */
 
-#include <windows.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <ddk/ntddk.h>
-#include <ddk/ntddscsi.h>
-#include <ddk/scsi.h>
+#define WIN32_NO_STATUS
+#include <windows.h>
+#define NTOS_MODE_USER
+#include <ndk/ntndk.h>
+
+#define _NTSCSI_USER_MODE_
+#include <ntddscsi.h>
+#include <scsi.h>
 
 BOOL GetInquiryData(HANDLE hDevice, PINQUIRYDATA InquiryData)
 {
@@ -81,7 +85,7 @@ int main(void)
     HANDLE hDevice;
     OVERLAPPED ov;
 
-    PBYTE Buffer;
+    PBYTE Buffer = NULL ;
     DWORD Start;
     DWORD dwReturned;
     DWORD dwReadTotal;
@@ -93,7 +97,7 @@ int main(void)
     INQUIRYDATA InquiryData;
 
 
-    Drive = 0; 
+    Drive = 0;
     while (1)
       {
         sprintf(Name, "\\\\.\\PHYSICALDRIVE%ld", Drive);
@@ -121,7 +125,7 @@ int main(void)
             printf("Transfer Size (kB)           1     2     4     8    16    32    64   128   256\n");
             printf("Transfer Rate (MB/s)\n");
             printf("-------------------------------------------------------------------------------\n");
-            
+
            Buffer = VirtualAlloc(NULL, 512 * 1024, MEM_COMMIT, PAGE_READWRITE);
          }
         Result = GetInquiryData(hDevice, &InquiryData);