Use W32API.
Modified: trunk/reactos/drivers/bus/acpi/acpi.xml
Modified: trunk/reactos/drivers/storage/atapi/atapi.c
Modified: trunk/reactos/drivers/storage/atapi/atapi.xml
Modified: trunk/reactos/drivers/storage/cdrom/cdrom.c
Modified: trunk/reactos/drivers/storage/cdrom/cdrom.xml
Modified: trunk/reactos/drivers/storage/class2/class2.c
Modified: trunk/reactos/drivers/storage/class2/class2.xml
Modified: trunk/reactos/drivers/storage/disk/disk.c
Modified: trunk/reactos/drivers/storage/disk/disk.xml
Modified: trunk/reactos/drivers/storage/diskdump/diskdump.c
Modified: trunk/reactos/drivers/storage/diskdump/diskdump.xml
Modified: trunk/reactos/drivers/storage/floppy/floppy.h
Modified: trunk/reactos/drivers/storage/floppy/floppy.xml
Modified: trunk/reactos/drivers/storage/scsiport/scsiport.c
Modified: trunk/reactos/drivers/storage/scsiport/scsiport.xml
Modified: trunk/reactos/drivers/storage/scsiport/scsiport_int.h
_____
Modified: trunk/reactos/drivers/bus/acpi/acpi.xml
--- trunk/reactos/drivers/bus/acpi/acpi.xml 2005-06-17 17:14:57 UTC
(rev 15994)
+++ trunk/reactos/drivers/bus/acpi/acpi.xml 2005-06-17 17:15:55 UTC
(rev 15995)
@@ -1,7 +1,7 @@
<module name="acpi" type="kernelmodedriver"
installbase="system32/drivers" installname="acpi.sys"
warnings="true">
<include base="acpi">include</include>
<include base="acpi">ospm/include</include>
- <define name="__USE_W32API" />
+ <define name="__USE_W32API" />
<library>ntoskrnl</library>
<library>hal</library>
<directory name="dispatcher">
_____
Modified: trunk/reactos/drivers/storage/atapi/atapi.c
--- trunk/reactos/drivers/storage/atapi/atapi.c 2005-06-17 17:14:57 UTC
(rev 15994)
+++ trunk/reactos/drivers/storage/atapi/atapi.c 2005-06-17 17:15:55 UTC
(rev 15995)
@@ -52,7 +52,6 @@
#include <ddk/srb.h>
#include <ddk/scsi.h>
#include <ddk/ntddscsi.h>
-#include <ntos/kefuncs.h>
#include "atapi.h"
_____
Modified: trunk/reactos/drivers/storage/atapi/atapi.xml
--- trunk/reactos/drivers/storage/atapi/atapi.xml 2005-06-17
17:14:57 UTC (rev 15994)
+++ trunk/reactos/drivers/storage/atapi/atapi.xml 2005-06-17
17:15:55 UTC (rev 15995)
@@ -1,5 +1,6 @@
<module name="atapi" type="kernelmodedriver"
installbase="system32/drivers" installname="atapi.sys">
<bootstrap base="reactos" />
+ <define name="__USE_W32API" />
<include base="atapi">.</include>
<library>ntoskrnl</library>
<library>hal</library>
_____
Modified: trunk/reactos/drivers/storage/cdrom/cdrom.c
--- trunk/reactos/drivers/storage/cdrom/cdrom.c 2005-06-17 17:14:57 UTC
(rev 15994)
+++ trunk/reactos/drivers/storage/cdrom/cdrom.c 2005-06-17 17:15:55 UTC
(rev 15995)
@@ -35,9 +35,12 @@
#include <ddk/ntddk.h>
#include <ddk/scsi.h>
+#include <ddk/ntddscsi.h>
+#include <ddk/ntdddisk.h>
+#include <ddk/ntddcdrm.h>
#include <ddk/class2.h>
-#include <ddk/ntddscsi.h>
#include <ntos/minmax.h>
+#include <stdio.h>
#define NDEBUG
#include <debug.h>
@@ -134,7 +137,7 @@
CdromTimerRoutine(IN PDEVICE_OBJECT DeviceObject,
IN PVOID Context);
-VOID
+VOID STDCALL
CdromWorkItem(IN PDEVICE_OBJECT DeviceObject,
IN PVOID Context);
@@ -1633,7 +1636,7 @@
}
-VOID
+VOID STDCALL
CdromWorkItem(IN PDEVICE_OBJECT DeviceObject,
IN PVOID Context)
{
_____
Modified: trunk/reactos/drivers/storage/cdrom/cdrom.xml
--- trunk/reactos/drivers/storage/cdrom/cdrom.xml 2005-06-17
17:14:57 UTC (rev 15994)
+++ trunk/reactos/drivers/storage/cdrom/cdrom.xml 2005-06-17
17:15:55 UTC (rev 15995)
@@ -1,5 +1,6 @@
<module name="cdrom" type="kernelmodedriver"
installbase="system32/drivers" installname="cdrom.sys">
<bootstrap base="reactos" />
+ <define name="__USE_W32API" />
<library>ntoskrnl</library>
<library>hal</library>
<library>class2</library>
_____
Modified: trunk/reactos/drivers/storage/class2/class2.c
--- trunk/reactos/drivers/storage/class2/class2.c 2005-06-17
17:14:57 UTC (rev 15994)
+++ trunk/reactos/drivers/storage/class2/class2.c 2005-06-17
17:15:55 UTC (rev 15995)
@@ -33,12 +33,15 @@
/* INCLUDES
*****************************************************************/
#include <ddk/ntddk.h>
+#include <ddk/ntdddisk.h>
#include <ddk/scsi.h>
#include <ddk/class2.h>
+#include <stdio.h>
#define NDEBUG
#include <debug.h>
+#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
#define VERSION "0.0.2"
_____
Modified: trunk/reactos/drivers/storage/class2/class2.xml
--- trunk/reactos/drivers/storage/class2/class2.xml 2005-06-17
17:14:57 UTC (rev 15994)
+++ trunk/reactos/drivers/storage/class2/class2.xml 2005-06-17
17:15:55 UTC (rev 15995)
@@ -1,5 +1,6 @@
<module name="class2" type="kernelmodedriver"
installbase="system32/drivers" installname="class2.sys">
<bootstrap base="reactos" />
+ <define name="__USE_W32API" />
<importlibrary definition="class2.def" />
<library>ntoskrnl</library>
<library>hal</library>
_____
Modified: trunk/reactos/drivers/storage/disk/disk.c
--- trunk/reactos/drivers/storage/disk/disk.c 2005-06-17 17:14:57 UTC
(rev 15994)
+++ trunk/reactos/drivers/storage/disk/disk.c 2005-06-17 17:15:55 UTC
(rev 15995)
@@ -28,9 +28,11 @@
/* INCLUDES
*****************************************************************/
#include <ddk/ntddk.h>
+#include <ddk/ntdddisk.h>
#include <ddk/scsi.h>
#include <ddk/class2.h>
#include <ddk/ntddscsi.h>
+#include <stdio.h>
#define NDEBUG
#include <debug.h>
_____
Modified: trunk/reactos/drivers/storage/disk/disk.xml
--- trunk/reactos/drivers/storage/disk/disk.xml 2005-06-17 17:14:57 UTC
(rev 15994)
+++ trunk/reactos/drivers/storage/disk/disk.xml 2005-06-17 17:15:55 UTC
(rev 15995)
@@ -1,5 +1,6 @@
<module name="disk" type="kernelmodedriver"
installbase="system32/drivers" installname="disk.sys"
warnings="true">
<bootstrap base="reactos" />
+ <define name="__USE_W32API" />
<linkerflag>-lgcc</linkerflag>
<library>ntoskrnl</library>
<library>hal</library>
_____
Modified: trunk/reactos/drivers/storage/diskdump/diskdump.c
--- trunk/reactos/drivers/storage/diskdump/diskdump.c 2005-06-17
17:14:57 UTC (rev 15994)
+++ trunk/reactos/drivers/storage/diskdump/diskdump.c 2005-06-17
17:15:55 UTC (rev 15995)
@@ -29,8 +29,10 @@
#include <ddk/ntddk.h>
#include <ddk/scsi.h>
+#include <ddk/ntdddisk.h>
+#include <ddk/ntddscsi.h>
#include <ddk/class2.h>
-#include <ddk/ntddscsi.h>
+#include <ntos.h>
#include <napi/core.h>
#include "../scsiport/scsiport_int.h"
_____
Modified: trunk/reactos/drivers/storage/diskdump/diskdump.xml
--- trunk/reactos/drivers/storage/diskdump/diskdump.xml 2005-06-17
17:14:57 UTC (rev 15994)
+++ trunk/reactos/drivers/storage/diskdump/diskdump.xml 2005-06-17
17:15:55 UTC (rev 15995)
@@ -1,5 +1,6 @@
<module name="diskdump" type="kernelmodedriver"
installbase="system32/drivers" installname="diskdump.sys">
<bootstrap base="reactos" />
+ <define name="__USE_W32API" />
<library definition="diskdump.def" />
<library>ntoskrnl</library>
<library>hal</library>
_____
Modified: trunk/reactos/drivers/storage/floppy/floppy.h
--- trunk/reactos/drivers/storage/floppy/floppy.h 2005-06-17
17:14:57 UTC (rev 15994)
+++ trunk/reactos/drivers/storage/floppy/floppy.h 2005-06-17
17:15:55 UTC (rev 15995)
@@ -29,13 +29,11 @@
#define MAX_DRIVES_PER_CONTROLLER 4
#define MAX_CONTROLLERS 4
-#ifdef _MSC_VER
/* MS doesn't prototype this but the w2k kernel exports it */
int _cdecl swprintf(const WCHAR *, ...);
/* need ioctls in ddk build mode */
#include <ntdddisk.h>
-#endif
/* missing from ros headers */
/* TODO: fix this right */
_____
Modified: trunk/reactos/drivers/storage/floppy/floppy.xml
--- trunk/reactos/drivers/storage/floppy/floppy.xml 2005-06-17
17:14:57 UTC (rev 15994)
+++ trunk/reactos/drivers/storage/floppy/floppy.xml 2005-06-17
17:15:55 UTC (rev 15995)
@@ -1,5 +1,6 @@
<module name="floppy" type="kernelmodedriver"
installbase="system32/drivers" installname="floppy.sys">
<bootstrap base="reactos" />
+ <define name="__USE_W32API" />
<include base="floppy">.</include>
<library>ntoskrnl</library>
<library>hal</library>
_____
Modified: trunk/reactos/drivers/storage/scsiport/scsiport.c
--- trunk/reactos/drivers/storage/scsiport/scsiport.c 2005-06-17
17:14:57 UTC (rev 15994)
+++ trunk/reactos/drivers/storage/scsiport/scsiport.c 2005-06-17
17:15:55 UTC (rev 15995)
@@ -33,7 +33,7 @@
#include <ddk/scsi.h>
#include <ddk/ntddscsi.h>
#include <ntos/minmax.h>
-#include <rosrtl/string.h>
+#include <stdio.h>
#define NDEBUG
#include <debug.h>
@@ -2337,7 +2337,8 @@
{
PSCSI_PORT_LUN_EXTENSION LunExtension;
OBJECT_ATTRIBUTES ObjectAttributes;
- UNICODE_STRING KeyName;
+ UNICODE_STRING KeyName =
+
RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Hardware\\DeviceMap\\Scsi");
UNICODE_STRING ValueName;
WCHAR NameBuffer[64];
ULONG Disposition;
@@ -2365,8 +2366,6 @@
}
/* Open or create the 'Scsi' subkey */
- RtlRosInitUnicodeStringFromLiteral(&KeyName,
-
L"\\Registry\\Machine\\Hardware\\DeviceMap\\Scsi");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
OBJ_CASE_INSENSITIVE | OBJ_OPENIF,
_____
Modified: trunk/reactos/drivers/storage/scsiport/scsiport.xml
--- trunk/reactos/drivers/storage/scsiport/scsiport.xml 2005-06-17
17:14:57 UTC (rev 15994)
+++ trunk/reactos/drivers/storage/scsiport/scsiport.xml 2005-06-17
17:15:55 UTC (rev 15995)
@@ -1,5 +1,6 @@
<module name="scsiport" type="kernelmodedriver"
installbase="system32/drivers" installname="scsiport.sys">
<bootstrap base="reactos" />
+ <define name="__USE_W32API" />
<importlibrary definition="scsiport.def" />
<include base="scsiport">.</include>
<library>ntoskrnl</library>
_____
Modified: trunk/reactos/drivers/storage/scsiport/scsiport_int.h
--- trunk/reactos/drivers/storage/scsiport/scsiport_int.h
2005-06-17 17:14:57 UTC (rev 15994)
+++ trunk/reactos/drivers/storage/scsiport/scsiport_int.h
2005-06-17 17:15:55 UTC (rev 15995)
@@ -7,6 +7,9 @@
#define VERSION "0.0.3"
+#define PAGE_ROUND_UP(x) ( (((ULONG_PTR)x)%PAGE_SIZE) ?
((((ULONG_PTR)x)&(~(PAGE_SIZE-1)))+PAGE_SIZE) : ((ULONG_PTR)x) )
+#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
+
typedef enum _SCSI_PORT_TIMER_STATES
{
IDETimerIdle,