ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
June 2005
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
22 participants
649 discussions
Start a n
N
ew thread
[navaraf] 16069: Use RTL_CONSTANT_STRING instead of ROSRTL macros.
by navaraf@svn.reactos.com
Use RTL_CONSTANT_STRING instead of ROSRTL macros. Modified: trunk/reactos/drivers/net/lan/include/precomp.h Modified: trunk/reactos/drivers/net/lan/lan/lan.c Modified: trunk/reactos/drivers/net/tcpip/include/precomp.h Modified: trunk/reactos/drivers/net/tcpip/tcpip/main.c _____ Modified: trunk/reactos/drivers/net/lan/include/precomp.h --- trunk/reactos/drivers/net/lan/include/precomp.h 2005-06-19 00:21:54 UTC (rev 16068) +++ trunk/reactos/drivers/net/lan/include/precomp.h 2005-06-19 00:28:46 UTC (rev 16069) @@ -4,7 +4,6 @@ #include <limits.h> #include <ddk/ntddk.h> #include <ddk/ndis.h> -#include <rosrtl/string.h> #include <roscfg.h> #include <debug.h> #include <pseh.h> _____ Modified: trunk/reactos/drivers/net/lan/lan/lan.c --- trunk/reactos/drivers/net/lan/lan/lan.c 2005-06-19 00:21:54 UTC (rev 16068) +++ trunk/reactos/drivers/net/lan/lan/lan.c 2005-06-19 00:28:46 UTC (rev 16069) @@ -1289,7 +1289,8 @@ PUNICODE_STRING RegsitryPath ) { PDEVICE_OBJECT DeviceObject; PLAN_DEVICE_EXT DeviceExt; - UNICODE_STRING wstrDeviceName, LanString; + UNICODE_STRING wstrDeviceName = RTL_CONSTANT_STRING(L"\\Device\\Lan"); + UNICODE_STRING LanString = RTL_CONSTANT_STRING(L"LAN"); NTSTATUS Status; InitNdisPools(); @@ -1303,9 +1304,6 @@ DriverObject->DriverUnload = LanUnload; /* create lan device */ - RtlRosInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Lan"); - RtlRosInitUnicodeStringFromLiteral(&LanString, L"LAN"); - Status = IoCreateDevice ( DriverObject, sizeof(LAN_DEVICE_EXT), _____ Modified: trunk/reactos/drivers/net/tcpip/include/precomp.h --- trunk/reactos/drivers/net/tcpip/include/precomp.h 2005-06-19 00:21:54 UTC (rev 16068) +++ trunk/reactos/drivers/net/tcpip/include/precomp.h 2005-06-19 00:28:46 UTC (rev 16069) @@ -1,7 +1,6 @@ #include <roscfg.h> #include <limits.h> #include <ddk/ntddk.h> -#include <rosrtl/string.h> #include <rosrtl/recmutex.h> #include <roscfg.h> #include <tcpip.h> _____ Modified: trunk/reactos/drivers/net/tcpip/tcpip/main.c --- trunk/reactos/drivers/net/tcpip/tcpip/main.c 2005-06-19 00:21:54 UTC (rev 16068) +++ trunk/reactos/drivers/net/tcpip/tcpip/main.c 2005-06-19 00:28:46 UTC (rev 16069) @@ -706,8 +706,11 @@ */ { NTSTATUS Status; - UNICODE_STRING strDeviceName; - UNICODE_STRING strNdisDeviceName; + UNICODE_STRING strIpDeviceName = RTL_CONSTANT_STRING(DD_IP_DEVICE_NAME); + UNICODE_STRING strRawDeviceName = RTL_CONSTANT_STRING(DD_RAWIP_DEVICE_NAME); + UNICODE_STRING strUdpDeviceName = RTL_CONSTANT_STRING(DD_UDP_DEVICE_NAME); + UNICODE_STRING strTcpDeviceName = RTL_CONSTANT_STRING(DD_TCP_DEVICE_NAME); + UNICODE_STRING strNdisDeviceName = RTL_CONSTANT_STRING(TCPIP_PROTOCOL_NAME); NDIS_STATUS NdisStatus; LARGE_INTEGER DueTime; @@ -724,8 +727,7 @@ /* FIXME: Create symbolic links in Win32 namespace */ /* Create IP device object */ - RtlRosInitUnicodeStringFromLiteral(&strDeviceName, DD_IP_DEVICE_NAME); - Status = IoCreateDevice(DriverObject, 0, &strDeviceName, + Status = IoCreateDevice(DriverObject, 0, &strIpDeviceName, FILE_DEVICE_NETWORK, 0, FALSE, &IPDeviceObject); if (!NT_SUCCESS(Status)) { TI_DbgPrint(MIN_TRACE, ("Failed to create IP device object. Status (0x%X).\n", Status)); @@ -733,8 +735,7 @@ } /* Create RawIP device object */ - RtlRosInitUnicodeStringFromLiteral(&strDeviceName, DD_RAWIP_DEVICE_NAME); - Status = IoCreateDevice(DriverObject, 0, &strDeviceName, + Status = IoCreateDevice(DriverObject, 0, &strRawDeviceName, FILE_DEVICE_NETWORK, 0, FALSE, &RawIPDeviceObject); if (!NT_SUCCESS(Status)) { TI_DbgPrint(MIN_TRACE, ("Failed to create RawIP device object. Status (0x%X).\n", Status)); @@ -743,8 +744,7 @@ } /* Create UDP device object */ - RtlRosInitUnicodeStringFromLiteral(&strDeviceName, DD_UDP_DEVICE_NAME); - Status = IoCreateDevice(DriverObject, 0, &strDeviceName, + Status = IoCreateDevice(DriverObject, 0, &strUdpDeviceName, FILE_DEVICE_NETWORK, 0, FALSE, &UDPDeviceObject); if (!NT_SUCCESS(Status)) { TI_DbgPrint(MIN_TRACE, ("Failed to create UDP device object. Status (0x%X).\n", Status)); @@ -753,8 +753,7 @@ } /* Create TCP device object */ - RtlRosInitUnicodeStringFromLiteral(&strDeviceName, DD_TCP_DEVICE_NAME); - Status = IoCreateDevice(DriverObject, 0, &strDeviceName, + Status = IoCreateDevice(DriverObject, 0, &strTcpDeviceName, FILE_DEVICE_NETWORK, 0, FALSE, &TCPDeviceObject); if (!NT_SUCCESS(Status)) { TI_DbgPrint(MIN_TRACE, ("Failed to create TCP device object. Status (0x%X).\n", Status)); @@ -823,7 +822,6 @@ /* Register protocol with NDIS */ /* This used to be IP_DEVICE_NAME but the DDK says it has to match your entry in the SCM */ - RtlInitUnicodeString(&strNdisDeviceName, TCPIP_PROTOCOL_NAME); Status = LANRegisterProtocol(&strNdisDeviceName); if (!NT_SUCCESS(Status)) { TI_DbgPrint(MIN_TRACE,("Failed to register protocol with NDIS; status 0x%x\n", Status));
19 years, 6 months
1
0
0
0
[navaraf] 16068: Use RTL_CONSTANT_STRING instead of ROSRTL macros.
by navaraf@svn.reactos.com
Use RTL_CONSTANT_STRING instead of ROSRTL macros. Modified: trunk/reactos/drivers/dd/beep/beep.c Modified: trunk/reactos/drivers/dd/blue/blue.c Modified: trunk/reactos/drivers/dd/debugout/debugout.c Modified: trunk/reactos/drivers/dd/mpu401/mpu401.c Modified: trunk/reactos/drivers/dd/null/null.c Modified: trunk/reactos/drivers/dd/parallel/parallel.c Modified: trunk/reactos/drivers/dd/sndblst/sndblst.c Modified: trunk/reactos/drivers/dd/sound/sb16.c Modified: trunk/reactos/drivers/fs/cdfs/cdfs.c Modified: trunk/reactos/drivers/fs/ext2/super.c Modified: trunk/reactos/drivers/fs/ntfs/ntfs.c Modified: trunk/reactos/drivers/fs/template/template.c Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.c Modified: trunk/reactos/drivers/input/i8042prt/keyboard.c Modified: trunk/reactos/drivers/input/i8042prt/mouse.c Modified: trunk/reactos/drivers/input/i8042prt/ps2pp.c Modified: trunk/reactos/drivers/input/i8042prt/registry.c Modified: trunk/reactos/drivers/input/kbdclass/kbdclass.c Modified: trunk/reactos/drivers/net/wshtcpip/wshtcpip.c _____ Modified: trunk/reactos/drivers/dd/beep/beep.c --- trunk/reactos/drivers/dd/beep/beep.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/dd/beep/beep.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -14,7 +14,6 @@ #include <ddk/ntddk.h> #include <ddk/ntddbeep.h> -#include <rosrtl/string.h> #define NDEBUG #include <debug.h> @@ -240,8 +239,8 @@ { 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"); + UNICODE_STRING SymlinkName = RTL_CONSTANT_STRING(L"\\??\\Beep"); NTSTATUS Status; DPRINT("Beep Device Driver 0.0.3\n"); _____ Modified: trunk/reactos/drivers/dd/blue/blue.c --- trunk/reactos/drivers/dd/blue/blue.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/dd/blue/blue.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -14,7 +14,6 @@ #include <ddk/ntddk.h> #include <ntos/halfuncs.h> #include <ddk/ntddblue.h> -#include <rosrtl/string.h> #include <string.h> #define NDEBUG @@ -659,8 +658,8 @@ DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) { PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\BlueScreen"); - UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\BlueScreen"); + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\BlueScreen"); + UNICODE_STRING SymlinkName = RTL_CONSTANT_STRING(L"\\??\\BlueScreen"); DPRINT ("Screen Driver 0.0.6\n"); _____ Modified: trunk/reactos/drivers/dd/debugout/debugout.c --- trunk/reactos/drivers/dd/debugout/debugout.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/dd/debugout/debugout.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -23,7 +23,6 @@ /* INCLUDES */ #include <ddk/ntddk.h> -#include <rosrtl/string.h> /* FUNCTIONS */ NTSTATUS STDCALL @@ -92,8 +91,8 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) { PDEVICE_OBJECT DebugOutDevice; - UNICODE_STRING DeviceName; - UNICODE_STRING DosName; + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\DebugOut"); + UNICODE_STRING DosName = RTL_CONSTANT_STRING(L"\\DosDevices\\DebugOut"); NTSTATUS Status; /* register driver routines */ @@ -105,8 +104,6 @@ DriverObject->DriverUnload = DebugOutUnload; /* create device */ - RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\DebugOut"); - Status = IoCreateDevice(DriverObject, 0, &DeviceName, FILE_DEVICE_NULL, 0, FALSE, &DebugOutDevice); if (! NT_SUCCESS(Status)) @@ -114,7 +111,6 @@ return Status; } - RtlRosInitUnicodeStringFromLiteral(&DosName, L"\\DosDevices\\DebugOut"); Status = IoCreateSymbolicLink(&DosName, &DeviceName); if (! NT_SUCCESS(Status)) { _____ Modified: trunk/reactos/drivers/dd/mpu401/mpu401.c --- trunk/reactos/drivers/dd/mpu401/mpu401.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/dd/mpu401/mpu401.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -13,7 +13,6 @@ /* INCLUDES ****************************************************************/ #include <ddk/ntddk.h> -#include <rosrtl/string.h> //#include <ddk/ntddbeep.h> //#define NDEBUG @@ -36,8 +35,8 @@ // 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; _____ Modified: trunk/reactos/drivers/dd/null/null.c --- trunk/reactos/drivers/dd/null/null.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/dd/null/null.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -14,7 +14,6 @@ /* INCLUDES */ #include <ntddk.h> -#include <rosrtl/string.h> #include <pseh.h> #include "null.h" @@ -122,7 +121,8 @@ { PDEVICE_OBJECT pdoNullDevice; PDEVICE_OBJECT pdoZeroDevice; - UNICODE_STRING wstrDeviceName; + UNICODE_STRING wstrNullDeviceName = RTL_CONSTANT_STRING(L"\\Device\\Null"); + UNICODE_STRING wstrZeroDeviceName = RTL_CONSTANT_STRING(L"\\Device\\Zero"); NTSTATUS nErrCode; /* register driver routines */ @@ -133,13 +133,11 @@ DriverObject->DriverUnload = NullUnload; /* create null device */ - RtlRosInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Null"); - nErrCode = IoCreateDevice ( DriverObject, sizeof(NULL_EXTENSION), - &wstrDeviceName, + &wstrNullDeviceName, FILE_DEVICE_NULL, 0, FALSE, @@ -155,13 +153,11 @@ pdoNullDevice->DeviceExtension = (PVOID)&nxNull; /* create zero device */ - RtlRosInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Zero"); - nErrCode = IoCreateDevice ( DriverObject, sizeof(NULL_EXTENSION), - &wstrDeviceName, + &wstrZeroDeviceName, FILE_DEVICE_NULL, FILE_READ_ONLY_DEVICE, /* zero device is read-only */ FALSE, _____ Modified: trunk/reactos/drivers/dd/parallel/parallel.c --- trunk/reactos/drivers/dd/parallel/parallel.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/dd/parallel/parallel.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -13,7 +13,6 @@ /* FUNCTIONS **************************************************************/ #include <ddk/ntddk.h> -#include <rosrtl/string.h> #include "parallel.h" @@ -128,7 +127,7 @@ */ { PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\Parallel"); + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\Parallel"); NTSTATUS Status; DPRINT("Parallel Port Driver 0.0.1\n"); _____ Modified: trunk/reactos/drivers/dd/sndblst/sndblst.c --- trunk/reactos/drivers/dd/sndblst/sndblst.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/dd/sndblst/sndblst.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -12,7 +12,6 @@ /* INCLUDES ****************************************************************/ #include <ddk/ntddk.h> -#include <rosrtl/string.h> #include "sndblst.h" @@ -30,8 +29,8 @@ // PDEVICE_INSTANCE Instance = Context; PDEVICE_OBJECT DeviceObject; // = Context; PDEVICE_EXTENSION Parameters; // = DeviceObject->DeviceExtension; - UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\WaveOut0"); // CHANGE THESE? - UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\WaveOut0"); + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\WaveOut0"); // CHANGE THESE? + UNICODE_STRING SymlinkName = RTL_CONSTANT_STRING(L"\\??\\WaveOut0"); // CONFIG Config; RTL_QUERY_REGISTRY_TABLE Table[2]; _____ Modified: trunk/reactos/drivers/dd/sound/sb16.c --- trunk/reactos/drivers/dd/sound/sb16.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/dd/sound/sb16.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -13,7 +13,6 @@ /* INCLUDES ****************************************************************/ #include <ddk/ntddk.h> -#include <rosrtl/string.h> #define NDEBUG #include <debug.h> @@ -30,8 +29,8 @@ */ { PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\SNDBLST"); - UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\SNDBLST"); + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\SNDBLST"); + UNICODE_STRING SymlinkName = RTL_CONSTANT_STRING(L"\\??\\SNDBLST"); NTSTATUS Status; DPRINT1("Sound Blaster 16 Driver 0.0.1\n"); _____ Modified: trunk/reactos/drivers/fs/cdfs/cdfs.c --- trunk/reactos/drivers/fs/cdfs/cdfs.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/fs/cdfs/cdfs.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -29,7 +29,6 @@ /* INCLUDES *****************************************************************/ #include <ddk/ntddk.h> -#include <rosrtl/string.h> #define NDEBUG #include <debug.h> @@ -57,7 +56,7 @@ { PDEVICE_OBJECT DeviceObject; NTSTATUS Status; - UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Cdfs"); + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Cdfs"); DPRINT("CDFS 0.0.3\n"); _____ Modified: trunk/reactos/drivers/fs/ext2/super.c --- trunk/reactos/drivers/fs/ext2/super.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/fs/ext2/super.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -10,7 +10,6 @@ /* INCLUDES *****************************************************************/ #include <ddk/ntddk.h> -#include <rosrtl/string.h> //#define NDEBUG #include <debug.h> @@ -155,7 +154,7 @@ { PDEVICE_OBJECT DeviceObject; NTSTATUS ret; - UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\Ext2Fsd"); + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\Ext2Fsd"); DbgPrint("Ext2 FSD 0.0.1\n"); _____ Modified: trunk/reactos/drivers/fs/ntfs/ntfs.c --- trunk/reactos/drivers/fs/ntfs/ntfs.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/fs/ntfs/ntfs.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -28,7 +28,6 @@ /* INCLUDES *****************************************************************/ #include <ddk/ntddk.h> -#include <rosrtl/string.h> #define NDEBUG #include <debug.h> @@ -56,7 +55,7 @@ { PDEVICE_OBJECT DeviceObject; NTSTATUS Status; - UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Ntfs"); + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Ntfs"); DPRINT("NTFS 0.0.1\n"); _____ Modified: trunk/reactos/drivers/fs/template/template.c --- trunk/reactos/drivers/fs/template/template.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/fs/template/template.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -29,7 +29,6 @@ /* INCLUDES *****************************************************************/ #include <ddk/ntddk.h> -#include <rosrtl/string.h> #define NDEBUG #include <debug.h> @@ -250,7 +249,7 @@ { PDEVICE_OBJECT DeviceObject; NTSTATUS Status; - UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\BareFsd"); + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\BareFsd"); DbgPrint("Bare FSD Template 0.0.1\n"); _____ Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.c --- trunk/reactos/drivers/input/i8042prt/i8042prt.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/input/i8042prt/i8042prt.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -11,11 +11,6 @@ /* INCLUDES ****************************************************************/ #include <ddk/ntddk.h> -#include <string.h> -#include <ntos/keyboard.h> -#include <ntos/minmax.h> -#include <rosrtl/string.h> - #include <ddk/ntddkbd.h> #include <ddk/ntdd8042.h> @@ -600,8 +595,8 @@ static NTSTATUS STDCALL I8042AddDevice(PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT Pdo) { - UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\KeyboardClass0"); - UNICODE_STRING MouseName = ROS_STRING_INITIALIZER(L"\\Device\\PointerClass0"); + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\KeyboardClass0"); + UNICODE_STRING MouseName = RTL_CONSTANT_STRING(L"\\Device\\PointerClass0"); ULONG MappedIrqKeyboard = 0, MappedIrqMouse = 0; KIRQL DirqlKeyboard = 0; KIRQL DirqlMouse = 0; _____ Modified: trunk/reactos/drivers/input/i8042prt/keyboard.c --- trunk/reactos/drivers/input/i8042prt/keyboard.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/input/i8042prt/keyboard.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -12,11 +12,6 @@ /* INCLUDES ****************************************************************/ #include <ddk/ntddk.h> -#include <string.h> -#include <ntos/keyboard.h> -#include <ntos/minmax.h> -#include <rosrtl/string.h> - #include <ddk/ntddkbd.h> #include <ddk/ntdd8042.h> _____ Modified: trunk/reactos/drivers/input/i8042prt/mouse.c --- trunk/reactos/drivers/input/i8042prt/mouse.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/input/i8042prt/mouse.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -12,11 +12,6 @@ /* INCLUDES ****************************************************************/ #include <ddk/ntddk.h> -#include <string.h> -#include <ntos/keyboard.h> -#include <ntos/minmax.h> -#include <rosrtl/string.h> - #include <ddk/ntddkbd.h> #include <ddk/ntdd8042.h> _____ Modified: trunk/reactos/drivers/input/i8042prt/ps2pp.c --- trunk/reactos/drivers/input/i8042prt/ps2pp.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/input/i8042prt/ps2pp.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -10,7 +10,6 @@ /* INCLUDES ****************************************************************/ #include <ddk/ntddk.h> - #include <ddk/ntddkbd.h> #include <ddk/ntdd8042.h> _____ Modified: trunk/reactos/drivers/input/i8042prt/registry.c --- trunk/reactos/drivers/input/i8042prt/registry.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/input/i8042prt/registry.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -12,11 +12,6 @@ /* INCLUDES ****************************************************************/ #include <ddk/ntddk.h> -#include <string.h> -#include <ntos/keyboard.h> -#include <ntos/minmax.h> -#include <rosrtl/string.h> - #include <ddk/ntddkbd.h> #include <ddk/ntdd8042.h> _____ Modified: trunk/reactos/drivers/input/kbdclass/kbdclass.c --- trunk/reactos/drivers/input/kbdclass/kbdclass.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/input/kbdclass/kbdclass.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -11,14 +11,7 @@ /* INCLUDES ****************************************************************/ #include <ddk/ntddk.h> -#include <string.h> -#include <ntos/keyboard.h> -#include <ntos/minmax.h> -#include <rosrtl/string.h> -#include <ddk/ntddkbd.h> -#include <ddk/ntdd8042.h> - #define NDEBUG #include <debug.h> @@ -254,9 +247,9 @@ PDEVICE_EXTENSION DevExt; PFILE_OBJECT I8042File; NTSTATUS Status; - UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\Keyboard"); - UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\Keyboard"); - UNICODE_STRING I8042Name = ROS_STRING_INITIALIZER(L"\\Device\\KeyboardClass0"); + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\Keyboard"); + UNICODE_STRING SymlinkName = RTL_CONSTANT_STRING(L"\\??\\Keyboard"); + UNICODE_STRING I8042Name = RTL_CONSTANT_STRING(L"\\Device\\KeyboardClass0"); DPRINT("Keyboard Class Driver 0.0.1\n"); _____ Modified: trunk/reactos/drivers/net/wshtcpip/wshtcpip.c --- trunk/reactos/drivers/net/wshtcpip/wshtcpip.c 2005-06-19 00:06:08 UTC (rev 16067) +++ trunk/reactos/drivers/net/wshtcpip/wshtcpip.c 2005-06-19 00:21:54 UTC (rev 16068) @@ -8,7 +8,6 @@ * CSH 01/09-2000 Created */ #include <wshtcpip.h> -#include <rosrtl/string.h> #ifdef DBG @@ -287,24 +286,27 @@ { PSOCKET_CONTEXT Context; UNICODE_STRING String; + UNICODE_STRING TcpDeviceName = RTL_CONSTANT_STRING(DD_TCP_DEVICE_NAME); + UNICODE_STRING UdpDeviceName = RTL_CONSTANT_STRING(DD_UDP_DEVICE_NAME); + UNICODE_STRING RawDeviceName = RTL_CONSTANT_STRING(DD_RAW_IP_DEVICE_NAME); NTSTATUS Status; WSH_DbgPrint(MAX_TRACE, ("\n")); switch (*SocketType) { case SOCK_STREAM: - RtlRosInitUnicodeStringFromLiteral(&String, DD_TCP_DEVICE_NAME); + String = TcpDeviceName; break; case SOCK_DGRAM: - RtlRosInitUnicodeStringFromLiteral(&String, DD_UDP_DEVICE_NAME); + String = UdpDeviceName; break; case SOCK_RAW: if ((*Protocol < 0) || (*Protocol > 255)) return WSAEINVAL; - RtlRosInitUnicodeStringFromLiteral(&String, DD_RAW_IP_DEVICE_NAME); + String = RawDeviceName; break; default:
19 years, 6 months
1
0
0
0
[navaraf] 16067: - Use regular PE structures in NTOSKRNL/NTDLL/DISKDUMP.
by navaraf@svn.reactos.com
- Use regular PE structures in NTOSKRNL/NTDLL/DISKDUMP. - Add WDMGUID library. - Get rid of few more headers. Modified: trunk/reactos/apps/utils/net/arp/arp.c Modified: trunk/reactos/drivers/storage/diskdump/diskdump.c Modified: trunk/reactos/include/ddk/ddrawint.h Deleted: trunk/reactos/include/ddk/i386/ Deleted: trunk/reactos/include/internal/ Modified: trunk/reactos/include/ntos/rtl.h Deleted: trunk/reactos/include/ole32/ Deleted: trunk/reactos/include/pe.h Deleted: trunk/reactos/include/snmp.h Modified: trunk/reactos/lib/directory.xml Modified: trunk/reactos/lib/kernel32/process/create.c Modified: trunk/reactos/lib/ntdll/ldr/startup.c Modified: trunk/reactos/lib/ntdll/ldr/utils.c Modified: trunk/reactos/lib/smlib/connect.c Added: trunk/reactos/lib/wdmguid/wdmguid.xml Modified: trunk/reactos/ntoskrnl/cc/view.c Modified: trunk/reactos/ntoskrnl/ldr/loader.c Modified: trunk/reactos/ntoskrnl/ntoskrnl.xml Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.xml Modified: trunk/reactos/subsys/system/usetup/usetup.h Modified: trunk/reactos/w32api/include/winnt.h _____ Modified: trunk/reactos/apps/utils/net/arp/arp.c --- trunk/reactos/apps/utils/net/arp/arp.c 2005-06-18 23:33:40 UTC (rev 16066) +++ trunk/reactos/apps/utils/net/arp/arp.c 2005-06-19 00:06:08 UTC (rev 16067) @@ -18,8 +18,8 @@ #include "trace.h" -VOID SNMP_FUNC_TYPE SnmpSvcInitUptime(); -DWORD SNMP_FUNC_TYPE SnmpSvcGetUptime(); +VOID WINSNMPAPI SnmpSvcInitUptime(); +DWORD WINSNMPAPI SnmpSvcGetUptime(); //////////////////////////////////////////////////////////////////////// //////// _____ Modified: trunk/reactos/drivers/storage/diskdump/diskdump.c --- trunk/reactos/drivers/storage/diskdump/diskdump.c 2005-06-18 23:33:40 UTC (rev 16066) +++ trunk/reactos/drivers/storage/diskdump/diskdump.c 2005-06-19 00:06:08 UTC (rev 16067) @@ -297,7 +297,7 @@ PIMAGE_NT_HEADERS NtHeader; PVOID ImportDirectory; ULONG ImportDirectorySize; - PIMAGE_IMPORT_MODULE_DIRECTORY ImportModuleDirectory; + PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory; PVOID DriverBase; PCH Name; ULONG i; @@ -325,12 +325,12 @@ return(STATUS_UNSUCCESSFUL); } /* Process each import module */ - ImportModuleDirectory = (PIMAGE_IMPORT_MODULE_DIRECTORY)ImportDirectory; + ImportModuleDirectory = (PIMAGE_IMPORT_DESCRIPTOR)ImportDirectory; DPRINT("Processeing import directory at %p\n", ImportModuleDirectory); - while (ImportModuleDirectory->dwRVAModuleName) + while (ImportModuleDirectory->Name) { /* Check to make sure that import lib is kernel */ - Name = (PCHAR) DriverBase + ImportModuleDirectory->dwRVAModuleName; + Name = (PCHAR) DriverBase + ImportModuleDirectory->Name; if (strcmp(Name, "scsiport.sys") != 0) { @@ -341,18 +341,18 @@ /* Get the import address list */ ImportAddressList = (PVOID *) ((PUCHAR)DriverBase + - ImportModuleDirectory->dwRVAFunctionAddressList); + (ULONG_PTR)ImportModuleDirectory->FirstThunk); /* Get the list of functions to import */ - if (ImportModuleDirectory->dwRVAFunctionNameList != 0) + if (ImportModuleDirectory->OriginalFirstThunk != 0) { FunctionNameList = (PULONG) ((PUCHAR)DriverBase + - ImportModuleDirectory->dwRVAFunctionNameList); + (ULONG_PTR)ImportModuleDirectory->OriginalFirstThunk); } else { FunctionNameList = (PULONG) ((PUCHAR)DriverBase + - ImportModuleDirectory->dwRVAFunctionAddressList); + (ULONG_PTR)ImportModuleDirectory->FirstThunk); } /* Walk through function list and fixup addresses */ while (*FunctionNameList != 0L) _____ Modified: trunk/reactos/include/ddk/ddrawint.h --- trunk/reactos/include/ddk/ddrawint.h 2005-06-18 23:33:40 UTC (rev 16066) +++ trunk/reactos/include/ddk/ddrawint.h 2005-06-19 00:06:08 UTC (rev 16067) @@ -6,7 +6,6 @@ #define __DD_INCLUDED__ #include <ddraw.h> -#include <ole32/guiddef.h> #ifdef __cplusplus extern "C" { _____ Modified: trunk/reactos/include/ntos/rtl.h --- trunk/reactos/include/ntos/rtl.h 2005-06-18 23:33:40 UTC (rev 16066) +++ trunk/reactos/include/ntos/rtl.h 2005-06-19 00:06:08 UTC (rev 16067) @@ -11,8 +11,8 @@ #endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */ -#include <pe.h> -#include <ole32/guiddef.h> +#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S)) +#define ROUND_DOWN(N, S) ((N) - ((N) % (S))) #ifndef __USE_W32API _____ Deleted: trunk/reactos/include/pe.h --- trunk/reactos/include/pe.h 2005-06-18 23:33:40 UTC (rev 16066) +++ trunk/reactos/include/pe.h 2005-06-19 00:06:08 UTC (rev 16067) @@ -1,1162 +0,0 @@ -#ifndef __INCLUDE_PE_H -#define __INCLUDE_PE_H - -//#define _ANONYMOUS_UNION __extension__ -//#define _ANONYMOUS_STRUCT __extension__ - -#ifdef __GNUC__ -#ifndef NONAMELESSUNION -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -#define _ANONYMOUS_UNION __extension__ -#define _ANONYMOUS_STRUCT __extension__ -#else -#if defined(__cplusplus) -#define _ANONYMOUS_UNION __extension__ -#endif -#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */ -#endif /* NONAMELESSUNION */ -#else -#define _ANONYMOUS_UNION -#define _ANONYMOUS_STRUCT -#endif /* __GNUC__ */ - - -#ifndef NTAPI -#define NTAPI STDCALL -#endif - -#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 -#define IMAGE_SIZEOF_SHORT_NAME 8 -#define IMAGE_SIZEOF_SYMBOL 18 - -#ifndef __USE_W32API - -#define IMAGE_DOS_SIGNATURE 0x5a4d -#define IMAGE_OS2_SIGNATURE 0x454e -#define IMAGE_OS2_SIGNATURE_LE 0x454c -#define IMAGE_VXD_SIGNATURE 0x454c - -#define IMAGE_FILE_RELOCS_STRIPPED 0x0001 // Relocation info stripped from file. -#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved externel references). -#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 // Line nunbers stripped from file. -#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 // Local symbols stripped from file. -#define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020 // Application supports addresses >2GB -#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 // Bytes of machine word are reversed. -#define IMAGE_FILE_32BIT_MACHINE 0x0100 // 32 bit word machine. -#define IMAGE_FILE_DEBUG_STRIPPED 0x0200 // Debugging info stripped from file in .DBG file -#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400 // If Image is on removable media, copy and run from the swap file. -#define IMAGE_FILE_NET_RUN_FROM_SWAP 0x0800 // If Image is on Net, copy and run from the swap file. -#define IMAGE_FILE_SYSTEM 0x1000 // System File. -#define IMAGE_FILE_DLL 0x2000 // File is a DLL. -#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000 // File should only be run on a UP machine -#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000 // Bytes of machine word are reversed. - -#define IMAGE_FILE_MACHINE_UNKNOWN 0 -#define IMAGE_FILE_MACHINE_I386 0x14c // Intel 386. -#define IMAGE_FILE_MACHINE_R3000 0x162 // MIPS little-endian, 0x160 big-endian -#define IMAGE_FILE_MACHINE_R4000 0x166 // MIPS little-endian -#define IMAGE_FILE_MACHINE_R10000 0x168 // MIPS little-endian -#define IMAGE_FILE_MACHINE_ALPHA 0x184 // Alpha_AXP -#define IMAGE_FILE_MACHINE_POWERPC 0x1F0 // IBM PowerPC Little-Endian -#define IMAGE_FILE_MACHINE_ARM 0x01c0 // ARM little-endian -#define IMAGE_FILE_MACHINE_IA64 0x0200 // Intel IA64 -#define IMAGE_FILE_MACHINE_AXP64 IMAGE_FILE_MACHINE_ALPHA64 -#define IMAGE_FILE_MACHINE_ALPHA64 0x0284 // Alpha AXP, full 64-bit support -#define IMAGE_FILE_MACHINE_AMD64 0x8664 // AMD x86-64 -#define IMAGE_FILE_MACHINE_M32R 0x9041 // M32R little-endian - -#pragma pack(push,4) -typedef struct _IMAGE_FILE_HEADER { - WORD Machine; - WORD NumberOfSections; - DWORD TimeDateStamp; - DWORD PointerToSymbolTable; - DWORD NumberOfSymbols; - WORD SizeOfOptionalHeader; - WORD Characteristics; -} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER; -typedef struct _IMAGE_DATA_DIRECTORY { - DWORD VirtualAddress; - DWORD Size; -} IMAGE_DATA_DIRECTORY,*PIMAGE_DATA_DIRECTORY; -typedef struct _IMAGE_OPTIONAL_HEADER { - WORD Magic; - BYTE MajorLinkerVersion; - BYTE MinorLinkerVersion; - DWORD SizeOfCode; - DWORD SizeOfInitializedData; - DWORD SizeOfUninitializedData; - DWORD AddressOfEntryPoint; - DWORD BaseOfCode; - DWORD BaseOfData; - DWORD ImageBase; - DWORD SectionAlignment; - DWORD FileAlignment; - WORD MajorOperatingSystemVersion; - WORD MinorOperatingSystemVersion; - WORD MajorImageVersion; - WORD MinorImageVersion; - WORD MajorSubsystemVersion; - WORD MinorSubsystemVersion; - DWORD Reserved1; - DWORD SizeOfImage; - DWORD SizeOfHeaders; - DWORD CheckSum; - WORD Subsystem; - WORD DllCharacteristics; - DWORD SizeOfStackReserve; - DWORD SizeOfStackCommit; - DWORD SizeOfHeapReserve; - DWORD SizeOfHeapCommit; - DWORD LoaderFlags; - DWORD NumberOfRvaAndSizes; - IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; -} IMAGE_OPTIONAL_HEADER32,*PIMAGE_OPTIONAL_HEADER32; -typedef struct _IMAGE_OPTIONAL_HEADER64 { - WORD Magic; - BYTE MajorLinkerVersion; - BYTE MinorLinkerVersion; - DWORD SizeOfCode; - DWORD SizeOfInitializedData; - DWORD SizeOfUninitializedData; - DWORD AddressOfEntryPoint; - DWORD BaseOfCode; - ULONGLONG ImageBase; - DWORD SectionAlignment; - DWORD FileAlignment; - WORD MajorOperatingSystemVersion; - WORD MinorOperatingSystemVersion; - WORD MajorImageVersion; - WORD MinorImageVersion; - WORD MajorSubsystemVersion; - WORD MinorSubsystemVersion; - DWORD Reserved1; - DWORD SizeOfImage; - DWORD SizeOfHeaders; - DWORD CheckSum; - WORD Subsystem; - WORD DllCharacteristics; - ULONGLONG SizeOfStackReserve; - ULONGLONG SizeOfStackCommit; - ULONGLONG SizeOfHeapReserve; - ULONGLONG SizeOfHeapCommit; - DWORD LoaderFlags; - DWORD NumberOfRvaAndSizes; - IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; -} IMAGE_OPTIONAL_HEADER64,*PIMAGE_OPTIONAL_HEADER64; -#ifdef _WIN64 -typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER; -typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER; -#else -typedef IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER; -typedef PIMAGE_OPTIONAL_HEADER32 PIMAGE_OPTIONAL_HEADER; -#endif -typedef struct _IMAGE_ROM_OPTIONAL_HEADER { - WORD Magic; - BYTE MajorLinkerVersion; - BYTE MinorLinkerVersion; - DWORD SizeOfCode; - DWORD SizeOfInitializedData; - DWORD SizeOfUninitializedData; - DWORD AddressOfEntryPoint; - DWORD BaseOfCode; - DWORD BaseOfData; - DWORD BaseOfBss; - DWORD GprMask; - DWORD CprMask[4]; - DWORD GpValue; -} IMAGE_ROM_OPTIONAL_HEADER,*PIMAGE_ROM_OPTIONAL_HEADER; -#pragma pack(pop) -#pragma pack(push,2) -typedef struct _IMAGE_DOS_HEADER { - WORD e_magic; - WORD e_cblp; - WORD e_cp; - WORD e_crlc; - WORD e_cparhdr; - WORD e_minalloc; - WORD e_maxalloc; - WORD e_ss; - WORD e_sp; - WORD e_csum; - WORD e_ip; - WORD e_cs; - WORD e_lfarlc; - WORD e_ovno; - WORD e_res[4]; - WORD e_oemid; - WORD e_oeminfo; - WORD e_res2[10]; - LONG e_lfanew; -} IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER; -typedef struct _IMAGE_OS2_HEADER { - WORD ne_magic; - CHAR ne_ver; - CHAR ne_rev; - WORD ne_enttab; - WORD ne_cbenttab; - LONG ne_crc; - WORD ne_flags; - WORD ne_autodata; - WORD ne_heap; - WORD ne_stack; - LONG ne_csip; - LONG ne_sssp; - WORD ne_cseg; - WORD ne_cmod; - WORD ne_cbnrestab; - WORD ne_segtab; - WORD ne_rsrctab; - WORD ne_restab; - WORD ne_modtab; - WORD ne_imptab; - LONG ne_nrestab; - WORD ne_cmovent; - WORD ne_align; - WORD ne_cres; - BYTE ne_exetyp; - BYTE ne_flagsothers; - WORD ne_pretthunks; - WORD ne_psegrefbytes; - WORD ne_swaparea; - WORD ne_expver; -} IMAGE_OS2_HEADER,*PIMAGE_OS2_HEADER; -#pragma pack(pop) -#pragma pack(push,4) -typedef struct _IMAGE_NT_HEADERS { - DWORD Signature; - IMAGE_FILE_HEADER FileHeader; - IMAGE_OPTIONAL_HEADER32 OptionalHeader; -} IMAGE_NT_HEADERS32,*PIMAGE_NT_HEADERS32; -typedef struct _IMAGE_NT_HEADERS64 { - DWORD Signature; - IMAGE_FILE_HEADER FileHeader; - IMAGE_OPTIONAL_HEADER64 OptionalHeader; -} IMAGE_NT_HEADERS64,*PIMAGE_NT_HEADERS64; -#ifdef _WIN64 -typedef IMAGE_NT_HEADERS64 IMAGE_NT_HEADERS; -typedef PIMAGE_NT_HEADERS64 PIMAGE_NT_HEADERS; -#else -typedef IMAGE_NT_HEADERS32 IMAGE_NT_HEADERS; -typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS; -#endif -typedef struct _IMAGE_ROM_HEADERS { - IMAGE_FILE_HEADER FileHeader; - IMAGE_ROM_OPTIONAL_HEADER OptionalHeader; -} IMAGE_ROM_HEADERS,*PIMAGE_ROM_HEADERS; -typedef struct _IMAGE_SECTION_HEADER { - BYTE Name[IMAGE_SIZEOF_SHORT_NAME]; - union { - DWORD PhysicalAddress; - DWORD VirtualSize; - } Misc; - DWORD VirtualAddress; - DWORD SizeOfRawData; - DWORD PointerToRawData; - DWORD PointerToRelocations; - DWORD PointerToLinenumbers; - WORD NumberOfRelocations; - WORD NumberOfLinenumbers; - DWORD Characteristics; -} IMAGE_SECTION_HEADER,*PIMAGE_SECTION_HEADER; -#pragma pack(pop) -#pragma pack(push,2) -typedef struct _IMAGE_SYMBOL { - union { - BYTE ShortName[8]; - struct { - DWORD Short; - DWORD Long; - } Name; - PBYTE LongName[2]; - } N; - DWORD Value; - SHORT SectionNumber; - WORD Type; - BYTE StorageClass; - BYTE NumberOfAuxSymbols; -} IMAGE_SYMBOL,*PIMAGE_SYMBOL; -typedef union _IMAGE_AUX_SYMBOL { - struct { - DWORD TagIndex; - union { - struct { - WORD Linenumber; - WORD Size; - } LnSz; - DWORD TotalSize; - } Misc; - union { - struct { - DWORD PointerToLinenumber; - DWORD PointerToNextFunction; - } Function; - struct { - WORD Dimension[4]; - } Array; - } FcnAry; - WORD TvIndex; - } Sym; - struct { - BYTE Name[IMAGE_SIZEOF_SYMBOL]; - } File; - struct { - DWORD Length; - WORD NumberOfRelocations; - WORD NumberOfLinenumbers; - DWORD CheckSum; - SHORT Number; - BYTE Selection; - } Section; -} IMAGE_AUX_SYMBOL,*PIMAGE_AUX_SYMBOL; -typedef struct _IMAGE_COFF_SYMBOLS_HEADER { - DWORD NumberOfSymbols; - DWORD LvaToFirstSymbol; - DWORD NumberOfLinenumbers; - DWORD LvaToFirstLinenumber; - DWORD RvaToFirstByteOfCode; - DWORD RvaToLastByteOfCode; - DWORD RvaToFirstByteOfData; - DWORD RvaToLastByteOfData; -} IMAGE_COFF_SYMBOLS_HEADER,*PIMAGE_COFF_SYMBOLS_HEADER; -typedef struct _IMAGE_RELOCATION { - _ANONYMOUS_UNION union { - DWORD VirtualAddress; - DWORD RelocCount; - } DUMMYUNIONNAME; - DWORD SymbolTableIndex; - WORD Type; -} IMAGE_RELOCATION,*PIMAGE_RELOCATION; -#pragma pack(pop) -#pragma pack(push,4) -typedef struct _IMAGE_BASE_RELOCATION { - DWORD VirtualAddress; - DWORD SizeOfBlock; -} IMAGE_BASE_RELOCATION,*PIMAGE_BASE_RELOCATION; -#pragma pack(pop) -#pragma pack(push,2) -typedef struct _IMAGE_LINENUMBER { - union { - DWORD SymbolTableIndex; - DWORD VirtualAddress; - } Type; - WORD Linenumber; -} IMAGE_LINENUMBER,*PIMAGE_LINENUMBER; -#pragma pack(pop) -#pragma pack(push,4) -typedef struct _IMAGE_ARCHIVE_MEMBER_HEADER { - BYTE Name[16]; - BYTE Date[12]; - BYTE UserID[6]; - BYTE GroupID[6]; - BYTE Mode[8]; - BYTE Size[10]; - BYTE EndHeader[2]; -} IMAGE_ARCHIVE_MEMBER_HEADER,*PIMAGE_ARCHIVE_MEMBER_HEADER; -typedef struct _IMAGE_EXPORT_DIRECTORY { - DWORD Characteristics; - DWORD TimeDateStamp; - WORD MajorVersion; - WORD MinorVersion; - DWORD Name; - DWORD Base; - DWORD NumberOfFunctions; - DWORD NumberOfNames; - PDWORD *AddressOfFunctions; - PDWORD *AddressOfNames; - PWORD *AddressOfNameOrdinals; -} IMAGE_EXPORT_DIRECTORY,*PIMAGE_EXPORT_DIRECTORY; -typedef struct _IMAGE_IMPORT_BY_NAME { - WORD Hint; - BYTE Name[1]; -} IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME; -typedef struct _IMAGE_THUNK_DATA { - union { - PBYTE ForwarderString; - PDWORD Function; - DWORD Ordinal; - PIMAGE_IMPORT_BY_NAME AddressOfData; - } u1; -} IMAGE_THUNK_DATA,*PIMAGE_THUNK_DATA; -typedef struct _IMAGE_IMPORT_DESCRIPTOR { - union { - DWORD Characteristics; - PIMAGE_THUNK_DATA OriginalFirstThunk; - } ; - DWORD TimeDateStamp; - DWORD ForwarderChain; - DWORD Name; - PIMAGE_THUNK_DATA FirstThunk; -} IMAGE_IMPORT_DESCRIPTOR,*PIMAGE_IMPORT_DESCRIPTOR; -typedef struct _IMAGE_BOUND_IMPORT_DESCRIPTOR { - DWORD TimeDateStamp; - WORD OffsetModuleName; - WORD NumberOfModuleForwarderRefs; -} IMAGE_BOUND_IMPORT_DESCRIPTOR,*PIMAGE_BOUND_IMPORT_DESCRIPTOR; -typedef struct _IMAGE_BOUND_FORWARDER_REF { - DWORD TimeDateStamp; - WORD OffsetModuleName; - WORD Reserved; -} IMAGE_BOUND_FORWARDER_REF,*PIMAGE_BOUND_FORWARDER_REF; -typedef void(NTAPI *PIMAGE_TLS_CALLBACK)(PVOID,DWORD,PVOID); -typedef struct _IMAGE_TLS_DIRECTORY { - DWORD StartAddressOfRawData; - DWORD EndAddressOfRawData; - PDWORD AddressOfIndex; - PIMAGE_TLS_CALLBACK *AddressOfCallBacks; - DWORD SizeOfZeroFill; - DWORD Characteristics; -} IMAGE_TLS_DIRECTORY,*PIMAGE_TLS_DIRECTORY; -typedef struct _IMAGE_RESOURCE_DIRECTORY { - DWORD Characteristics; - DWORD TimeDateStamp; - WORD MajorVersion; - WORD MinorVersion; - WORD NumberOfNamedEntries; - WORD NumberOfIdEntries; -} IMAGE_RESOURCE_DIRECTORY,*PIMAGE_RESOURCE_DIRECTORY; -/*_ANONYMOUS_STRUCT typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY { - _ANONYMOUS_UNION union { - _ANONYMOUS_STRUCT struct { - DWORD NameOffset:31; - DWORD NameIsString:1; - }DUMMYSTRUCTNAME; - DWORD Name; - WORD Id; - } DUMMYUNIONNAME; - _ANONYMOUS_UNION union { - DWORD OffsetToData; - _ANONYMOUS_STRUCT struct { - DWORD OffsetToDirectory:31; - DWORD DataIsDirectory:1; - } DUMMYSTRUCTNAME2; - } DUMMYUNIONNAME2; -} IMAGE_RESOURCE_DIRECTORY_ENTRY,*PIMAGE_RESOURCE_DIRECTORY_ENTRY; -*/ -typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING { - WORD Length; - CHAR NameString[1]; -} IMAGE_RESOURCE_DIRECTORY_STRING,*PIMAGE_RESOURCE_DIRECTORY_STRING; -typedef struct _IMAGE_RESOURCE_DIR_STRING_U { - WORD Length; - WCHAR NameString[1]; -} IMAGE_RESOURCE_DIR_STRING_U,*PIMAGE_RESOURCE_DIR_STRING_U; -typedef struct _IMAGE_RESOURCE_DATA_ENTRY { - DWORD OffsetToData; - DWORD Size; - DWORD CodePage; - DWORD Reserved; -} IMAGE_RESOURCE_DATA_ENTRY,*PIMAGE_RESOURCE_DATA_ENTRY; -typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY { - DWORD Characteristics; - DWORD TimeDateStamp; - WORD MajorVersion; - WORD MinorVersion; - DWORD GlobalFlagsClear; - DWORD GlobalFlagsSet; - DWORD CriticalSectionDefaultTimeout; - DWORD DeCommitFreeBlockThreshold; - DWORD DeCommitTotalFreeThreshold; - PVOID LockPrefixTable; - DWORD MaximumAllocationSize; - DWORD VirtualMemoryThreshold; - DWORD ProcessHeapFlags; - DWORD Reserved[4]; -} IMAGE_LOAD_CONFIG_DIRECTORY,*PIMAGE_LOAD_CONFIG_DIRECTORY; -typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY { - DWORD BeginAddress; - DWORD EndAddress; - PVOID ExceptionHandler; - PVOID HandlerData; - DWORD PrologEndAddress; -} IMAGE_RUNTIME_FUNCTION_ENTRY,*PIMAGE_RUNTIME_FUNCTION_ENTRY; -typedef struct _IMAGE_DEBUG_DIRECTORY { - DWORD Characteristics; - DWORD TimeDateStamp; - WORD MajorVersion; - WORD MinorVersion; - DWORD Type; - DWORD SizeOfData; - DWORD AddressOfRawData; - DWORD PointerToRawData; -} IMAGE_DEBUG_DIRECTORY,*PIMAGE_DEBUG_DIRECTORY; -typedef struct _FPO_DATA { - DWORD ulOffStart; - DWORD cbProcSize; - DWORD cdwLocals; - WORD cdwParams; - WORD cbProlog:8; - WORD cbRegs:3; - WORD fHasSEH:1; - WORD fUseBP:1; - WORD reserved:1; - WORD cbFrame:2; -} FPO_DATA,*PFPO_DATA; -typedef struct _IMAGE_DEBUG_MISC { - DWORD DataType; - DWORD Length; - BOOLEAN Unicode; - BYTE Reserved[3]; - BYTE Data[1]; -} IMAGE_DEBUG_MISC,*PIMAGE_DEBUG_MISC; -typedef struct _IMAGE_FUNCTION_ENTRY { - DWORD StartingAddress; - DWORD EndingAddress; - DWORD EndOfPrologue; -} IMAGE_FUNCTION_ENTRY,*PIMAGE_FUNCTION_ENTRY; -typedef struct _IMAGE_SEPARATE_DEBUG_HEADER { - WORD Signature; - WORD Flags; - WORD Machine; - WORD Characteristics; - DWORD TimeDateStamp; - DWORD CheckSum; - DWORD ImageBase; - DWORD SizeOfImage; - DWORD NumberOfSections; - DWORD ExportedNamesSize; - DWORD DebugDirectorySize; - DWORD Reserved[3]; -} IMAGE_SEPARATE_DEBUG_HEADER,*PIMAGE_SEPARATE_DEBUG_HEADER; -#pragma pack(pop) - -#define IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff) - -// -// Each directory contains the 32-bit Name of the entry and an offset, -// relative to the beginning of the resource directory of the data associated -// with this directory entry. If the name of the entry is an actual text -// string instead of an integer Id, then the high order bit of the name field -// is set to one and the low order 31-bits are an offset, relative to the -// beginning of the resource directory of the string, which is of type -// IMAGE_RESOURCE_DIRECTORY_STRING. Otherwise the high bit is clear and the -// low-order 16-bits are the integer Id that identify this resource directory -// entry. If the directory entry is yet another resource directory (i.e. a -// subdirectory), then the high order bit of the offset field will be -// set to indicate this. Otherwise the high bit is clear and the offset -// field points to a resource data entry. -// -typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY { - DWORD Name; - DWORD OffsetToData; -} IMAGE_RESOURCE_DIRECTORY_ENTRY, *PIMAGE_RESOURCE_DIRECTORY_ENTRY; -/* -typedef struct _IMAGE_RESOURCE_DIRECTORY { - DWORD Characteristics; - DWORD TimeDateStamp; - WORD MajorVersion; - WORD MinorVersion; - WORD NumberOfNamedEntries; - WORD NumberOfIdEntries; - IMAGE_RESOURCE_DIRECTORY_ENTRY DirectoryEntries[0]; -} IMAGE_RESOURCE_DIRECTORY, *PIMAGE_RESOURCE_DIRECTORY; -*/ - -#ifdef _WIN64 -#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC -#else -#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR32_MAGIC -#endif - -#endif /* !__USE_W32API */ - -#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S)) - -#define IMAGE_SECTION_CHAR_CODE 0x00000020 -#define IMAGE_SECTION_CHAR_DATA 0x00000040 -#define IMAGE_SECTION_CHAR_BSS 0x00000080 -#define IMAGE_SECTION_CHAR_NON_CACHABLE 0x04000000 -#define IMAGE_SECTION_CHAR_NON_PAGEABLE 0x08000000 -#define IMAGE_SECTION_CHAR_SHARED 0x10000000 -#define IMAGE_SECTION_CHAR_EXECUTABLE 0x20000000 -#define IMAGE_SECTION_CHAR_READABLE 0x40000000 -#define IMAGE_SECTION_CHAR_WRITABLE 0x80000000 -#define IMAGE_SECTION_NOLOAD 0x00000002 - -#define IMAGE_DOS_MAGIC 0x5a4d -#define IMAGE_PE_MAGIC 0x00004550 - -#define IMAGE_NT_SIGNATURE 0x00004550 - - -#define IMAGE_SIZEOF_FILE_HEADER 20 - - -#define IMAGE_SUBSYSTEM_UNKNOWN 0 -#define IMAGE_SUBSYSTEM_NATIVE 1 -#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2 -#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3 -#define IMAGE_SUBSYSTEM_OS2_GUI 4 -#define IMAGE_SUBSYSTEM_OS2_CUI 5 -#define IMAGE_SUBSYSTEM_POSIX_GUI 6 -#define IMAGE_SUBSYSTEM_POSIX_CUI 7 -#define IMAGE_SUBSYSTEM_NATIVE_WINDOWS 8 -#define IMAGE_SUBSYSTEM_WINDOWS_CE_GUI 9 -#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10 -#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11 -#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12 -#define IMAGE_SUBSYSTEM_EFI_ROM 13 -#define IMAGE_SUBSYSTEM_XBOX 14 - - -// Directory Entries - -#define IMAGE_DIRECTORY_ENTRY_EXPORT 0 // Export Directory -#define IMAGE_DIRECTORY_ENTRY_IMPORT 1 // Import Directory -#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2 // Resource Directory -#define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3 // Exception Directory -#define IMAGE_DIRECTORY_ENTRY_SECURITY 4 // Security Directory -#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 // Base Relocation Table -#define IMAGE_DIRECTORY_ENTRY_DEBUG 6 // Debug Directory -#define IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7 // Description String -#define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8 // Machine Value (MIPS GP) -#define IMAGE_DIRECTORY_ENTRY_TLS 9 // TLS Directory -#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10 // Load Configuration Directory -#define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11 // Bound Import Directory in headers -#define IMAGE_DIRECTORY_ENTRY_IAT 12 // Import Address -// -// Section header format. -// -#define IMAGE_SIZEOF_FILE_HEADER 20 -#define IMAGE_FILE_MACHINE_UNKNOWN 0 -#define IMAGE_NT_SIGNATURE 0x00004550 -#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b -#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b -#define IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107 -#define IMAGE_SEPARATE_DEBUG_SIGNATURE 0x4944 -#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 -#define IMAGE_SIZEOF_ROM_OPTIONAL_HEADER 56 -#define IMAGE_SIZEOF_STD_OPTIONAL_HEADER 28 -#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER 224 -#define IMAGE_SIZEOF_SECTION_HEADER 40 -#define IMAGE_SIZEOF_AUX_SYMBOL 18 -#define IMAGE_SIZEOF_RELOCATION 10 -#define IMAGE_SIZEOF_BASE_RELOCATION 8 -#define IMAGE_SIZEOF_LINENUMBER 6 -#define IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60 -#define SIZEOF_RFPO_DATA 16 -#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((DWORD)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEAD ERS)(h))->FileHeader.SizeOfOptionalHeader)) -/* Temporarily adding this here. This file will die soon. */ -#define IMAGE_SCN_TYPE_NOLOAD 0x2L -#define IMAGE_SCN_TYPE_NO_PAD 8 -#define IMAGE_SCN_CNT_CODE 32 -#define IMAGE_SCN_CNT_INITIALIZED_DATA 64 -#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 128 -#define IMAGE_SCN_LNK_OTHER 256 -#define IMAGE_SCN_LNK_INFO 512 -#define IMAGE_SCN_LNK_REMOVE 2048 -#define IMAGE_SCN_LNK_COMDAT 4096 -#define IMAGE_SCN_MEM_FARDATA 0x8000 -#define IMAGE_SCN_MEM_PURGEABLE 0x20000 -#define IMAGE_SCN_MEM_16BIT 0x20000 -#define IMAGE_SCN_MEM_LOCKED 0x40000 -#define IMAGE_SCN_MEM_PRELOAD 0x80000 -#define IMAGE_SCN_ALIGN_1BYTES 0x100000 -#define IMAGE_SCN_ALIGN_2BYTES 0x200000 -#define IMAGE_SCN_ALIGN_4BYTES 0x300000 -#define IMAGE_SCN_ALIGN_8BYTES 0x400000 -#define IMAGE_SCN_ALIGN_16BYTES 0x500000 -#define IMAGE_SCN_ALIGN_32BYTES 0x600000 -#define IMAGE_SCN_ALIGN_64BYTES 0x700000 -#define IMAGE_SCN_LNK_NRELOC_OVFL 0x1000000 -#define IMAGE_SCN_MEM_DISCARDABLE 0x2000000 -#define IMAGE_SCN_MEM_NOT_CACHED 0x4000000 -#define IMAGE_SCN_MEM_NOT_PAGED 0x8000000 -#define IMAGE_SCN_MEM_SHARED 0x10000000 -#define IMAGE_SCN_MEM_EXECUTE 0x20000000 -#define IMAGE_SCN_MEM_READ 0x40000000 -#define IMAGE_SCN_MEM_WRITE 0x80000000 -#define IMAGE_SYM_UNDEFINED 0 -#define IMAGE_SYM_ABSOLUTE (-1) -#define IMAGE_SYM_DEBUG (-2) -#define IMAGE_SYM_TYPE_NULL 0 -#define IMAGE_SYM_TYPE_VOID 1 -#define IMAGE_SYM_TYPE_CHAR 2 -#define IMAGE_SYM_TYPE_SHORT 3 -#define IMAGE_SYM_TYPE_INT 4 -#define IMAGE_SYM_TYPE_LONG 5 -#define IMAGE_SYM_TYPE_FLOAT 6 -#define IMAGE_SYM_TYPE_DOUBLE 7 -#define IMAGE_SYM_TYPE_STRUCT 8 -#define IMAGE_SYM_TYPE_UNION 9 -#define IMAGE_SYM_TYPE_ENUM 10 -#define IMAGE_SYM_TYPE_MOE 11 -#define IMAGE_SYM_TYPE_BYTE 12 -#define IMAGE_SYM_TYPE_WORD 13 -#define IMAGE_SYM_TYPE_UINT 14 -#define IMAGE_SYM_TYPE_DWORD 15 -#define IMAGE_SYM_TYPE_PCODE 32768 -#define IMAGE_SYM_DTYPE_NULL 0 -#define IMAGE_SYM_DTYPE_POINTER 1 -#define IMAGE_SYM_DTYPE_FUNCTION 2 -#define IMAGE_SYM_DTYPE_ARRAY 3 -#define IMAGE_SYM_CLASS_END_OF_FUNCTION (-1) -#define IMAGE_SYM_CLASS_NULL 0 -#define IMAGE_SYM_CLASS_AUTOMATIC 1 -#define IMAGE_SYM_CLASS_EXTERNAL 2 -#define IMAGE_SYM_CLASS_STATIC 3 -#define IMAGE_SYM_CLASS_REGISTER 4 -#define IMAGE_SYM_CLASS_EXTERNAL_DEF 5 -#define IMAGE_SYM_CLASS_LABEL 6 -#define IMAGE_SYM_CLASS_UNDEFINED_LABEL 7 -#define IMAGE_SYM_CLASS_MEMBER_OF_STRUCT 8 -#define IMAGE_SYM_CLASS_ARGUMENT 9 -#define IMAGE_SYM_CLASS_STRUCT_TAG 10 -#define IMAGE_SYM_CLASS_MEMBER_OF_UNION 11 -#define IMAGE_SYM_CLASS_UNION_TAG 12 -#define IMAGE_SYM_CLASS_TYPE_DEFINITION 13 -#define IMAGE_SYM_CLASS_UNDEFINED_STATIC 14 -#define IMAGE_SYM_CLASS_ENUM_TAG 15 -#define IMAGE_SYM_CLASS_MEMBER_OF_ENUM 16 -#define IMAGE_SYM_CLASS_REGISTER_PARAM 17 -#define IMAGE_SYM_CLASS_BIT_FIELD 18 -#define IMAGE_SYM_CLASS_FAR_EXTERNAL 68 -#define IMAGE_SYM_CLASS_BLOCK 100 -#define IMAGE_SYM_CLASS_FUNCTION 101 -#define IMAGE_SYM_CLASS_END_OF_STRUCT 102 -#define IMAGE_SYM_CLASS_FILE 103 -#define IMAGE_SYM_CLASS_SECTION 104 -#define IMAGE_SYM_CLASS_WEAK_EXTERNAL 105 -#define IMAGE_COMDAT_SELECT_NODUPLICATES 1 -#define IMAGE_COMDAT_SELECT_ANY 2 -#define IMAGE_COMDAT_SELECT_SAME_SIZE 3 -#define IMAGE_COMDAT_SELECT_EXACT_MATCH 4 -#define IMAGE_COMDAT_SELECT_ASSOCIATIVE 5 -#define IMAGE_COMDAT_SELECT_LARGEST 6 -#define IMAGE_COMDAT_SELECT_NEWEST 7 -#define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1 -#define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2 -#define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3 -#define IMAGE_REL_I386_ABSOLUTE 0 -#define IMAGE_REL_I386_DIR16 1 -#define IMAGE_REL_I386_REL16 2 -#define IMAGE_REL_I386_DIR32 6 -#define IMAGE_REL_I386_DIR32NB 7 -#define IMAGE_REL_I386_SEG12 9 -#define IMAGE_REL_I386_SECTION 10 -#define IMAGE_REL_I386_SECREL 11 -#define IMAGE_REL_I386_REL32 20 -#define IMAGE_REL_MIPS_ABSOLUTE 0 -#define IMAGE_REL_MIPS_REFHALF 1 -#define IMAGE_REL_MIPS_REFWORD 2 -#define IMAGE_REL_MIPS_JMPADDR 3 -#define IMAGE_REL_MIPS_REFHI 4 -#define IMAGE_REL_MIPS_REFLO 5 -#define IMAGE_REL_MIPS_GPREL 6 -#define IMAGE_REL_MIPS_LITERAL 7 -#define IMAGE_REL_MIPS_SECTION 10 -#define IMAGE_REL_MIPS_SECREL 11 -#define IMAGE_REL_MIPS_SECRELLO 12 -#define IMAGE_REL_MIPS_SECRELHI 13 -#define IMAGE_REL_MIPS_REFWORDNB 34 -#define IMAGE_REL_MIPS_PAIR 35 -#define IMAGE_REL_ALPHA_ABSOLUTE 0 -#define IMAGE_REL_ALPHA_REFLONG 1 -#define IMAGE_REL_ALPHA_REFQUAD 2 -#define IMAGE_REL_ALPHA_GPREL32 3 -#define IMAGE_REL_ALPHA_LITERAL 4 -#define IMAGE_REL_ALPHA_LITUSE 5 -#define IMAGE_REL_ALPHA_GPDISP 6 -#define IMAGE_REL_ALPHA_BRADDR 7 -#define IMAGE_REL_ALPHA_HINT 8 -#define IMAGE_REL_ALPHA_INLINE_REFLONG 9 -#define IMAGE_REL_ALPHA_REFHI 10 -#define IMAGE_REL_ALPHA_REFLO 11 -#define IMAGE_REL_ALPHA_PAIR 12 -#define IMAGE_REL_ALPHA_MATCH 13 -#define IMAGE_REL_ALPHA_SECTION 14 -#define IMAGE_REL_ALPHA_SECREL 15 -#define IMAGE_REL_ALPHA_REFLONGNB 16 -#define IMAGE_REL_ALPHA_SECRELLO 17 -#define IMAGE_REL_ALPHA_SECRELHI 18 -#define IMAGE_REL_PPC_ABSOLUTE 0 -#define IMAGE_REL_PPC_ADDR64 1 -#define IMAGE_REL_PPC_ADDR32 2 -#define IMAGE_REL_PPC_ADDR24 3 -#define IMAGE_REL_PPC_ADDR16 4 -#define IMAGE_REL_PPC_ADDR14 5 -#define IMAGE_REL_PPC_REL24 6 -#define IMAGE_REL_PPC_REL14 7 -#define IMAGE_REL_PPC_TOCREL16 8 -#define IMAGE_REL_PPC_TOCREL14 9 -#define IMAGE_REL_PPC_ADDR32NB 10 -#define IMAGE_REL_PPC_SECREL 11 -#define IMAGE_REL_PPC_SECTION 12 -#define IMAGE_REL_PPC_IFGLUE 13 -#define IMAGE_REL_PPC_IMGLUE 14 -#define IMAGE_REL_PPC_SECREL16 15 -#define IMAGE_REL_PPC_REFHI 16 -#define IMAGE_REL_PPC_REFLO 17 -#define IMAGE_REL_PPC_PAIR 18 -#define IMAGE_REL_PPC_TYPEMASK 255 -#define IMAGE_REL_PPC_NEG 256 -#define IMAGE_REL_PPC_BRTAKEN 512 -#define IMAGE_REL_PPC_BRNTAKEN 1024 -#define IMAGE_REL_PPC_TOCDEFN 2048 -#define IMAGE_REL_BASED_ABSOLUTE 0 -#define IMAGE_REL_BASED_HIGH 1 -#define IMAGE_REL_BASED_LOW 2 -#define IMAGE_REL_BASED_HIGHLOW 3 -#define IMAGE_REL_BASED_HIGHADJ 4 -#define IMAGE_REL_BASED_MIPS_JMPADDR 5 -#define IMAGE_ARCHIVE_START_SIZE 8 -#define IMAGE_ARCHIVE_START "!<arch>\n" -#define IMAGE_ARCHIVE_END "`\n" -#define IMAGE_ARCHIVE_PAD "\n" -#define IMAGE_ARCHIVE_LINKER_MEMBER "/ " -#define IMAGE_ARCHIVE_LONGNAMES_MEMBER "// " -#define IMAGE_ORDINAL_FLAG 0x80000000 -#define IMAGE_SNAP_BY_ORDINAL(o) ((o&IMAGE_ORDINAL_FLAG)!=0) -#define IMAGE_RESOURCE_NAME_IS_STRING 0x80000000 -#define IMAGE_RESOURCE_DATA_IS_DIRECTORY 0x80000000 -#define IMAGE_DEBUG_TYPE_UNKNOWN 0 -#define IMAGE_DEBUG_TYPE_COFF 1 -#define IMAGE_DEBUG_TYPE_CODEVIEW 2 -#define IMAGE_DEBUG_TYPE_FPO 3 -#define IMAGE_DEBUG_TYPE_MISC 4 -#define IMAGE_DEBUG_TYPE_EXCEPTION 5 -#define IMAGE_DEBUG_TYPE_FIXUP 6 -#define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7 -#define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8 - - -#define IMAGE_SIZEOF_SHORT_NAME 8 - -#define IMAGE_SIZEOF_SECTION_HEADER 40 - -#define IMAGE_SECTION_CODE (0x20) -#define IMAGE_SECTION_INITIALIZED_DATA (0x40) -#define IMAGE_SECTION_UNINITIALIZED_DATA (0x80) - -// -// Import Format -// - -#define IMAGE_ORDINAL_FLAG 0x80000000 - - -// Predefined resource types ... there may be some more, but I don't have -// the information yet. .....sang cho..... - -#define RT_NEWRESOURCE 0x2000 -#define RT_ERROR 0x7fff -#define NEWBITMAP (RT_BITMAP|RT_NEWRESOURCE) -#define NEWMENU (RT_MENU|RT_NEWRESOURCE) -#define NEWDIALOG (RT_DIALOG|RT_NEWRESOURCE) - - -// -// Resource Format. -// - -// -// Resource directory consists of two counts, following by a variable length -// array of directory entries. The first count is the number of entries at -// beginning of the array that have actual names associated with each entry. -// The entries are in ascending order, case insensitive strings. The second -// count is the number of entries that immediately follow the named entries. -// This second count identifies the number of entries that have 16-bit integer -// Ids as their name. These entries are also sorted in ascending order. -// -// This structure allows fast lookup by either name or number, but for any -// given resource entry only one form of lookup is supported, not both. -// This is consistant with the syntax of the .RC file and the .RES file. -// - - -#define IMAGE_RESOURCE_NAME_IS_STRING 0x80000000 -#define IMAGE_RESOURCE_DATA_IS_DIRECTORY 0x80000000 - - - -// -// For resource directory entries that have actual string names, the Name -// field of the directory entry points to an object of the following type. -// All of these string objects are stored together after the last resource -// directory entry and before the first resource data object. This minimizes -// the impact of these variable length objects on the alignment of the fixed -// size directory entry objects. -// -/* defined above from mingw. ei -typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING { - WORD Length; - CHAR NameString[ 1 ]; -} IMAGE_RESOURCE_DIRECTORY_STRING, *PIMAGE_RESOURCE_DIRECTORY_STRING; - - -typedef struct _IMAGE_RESOURCE_DIR_STRING_U { - WORD Length; - WCHAR NameString[ 1 ]; -} IMAGE_RESOURCE_DIR_STRING_U, *PIMAGE_RESOURCE_DIR_STRING_U; -*/ - -// -// Each resource data entry describes a leaf node in the resource directory -// tree. It contains an offset, relative to the beginning of the resource -// directory of the data for the resource, a size field that gives the number -// of bytes of data at that offset, a CodePage that should be used when -// decoding code point values within the resource data. Typically for new -// applications the code page would be the unicode code page. -// -/* ei [truncated at 1000 lines; 910 more skipped]
19 years, 6 months
1
0
0
0
[ion] 16066: Add NDK 1.00-pre. Needs some TLC in umtypes.h and a lot of fixes. Not used anywhere yet.
by ion@svn.reactos.com
Add NDK 1.00-pre. Needs some TLC in umtypes.h and a lot of fixes. Not used anywhere yet. Added: trunk/reactos/include/ndk/ Added: trunk/reactos/include/ndk/cctypes.h Added: trunk/reactos/include/ndk/extypes.h Added: trunk/reactos/include/ndk/halfuncs.h Added: trunk/reactos/include/ndk/haltypes.h Added: trunk/reactos/include/ndk/i386/ Added: trunk/reactos/include/ndk/i386/floatsave.h Added: trunk/reactos/include/ndk/i386/segment.h Added: trunk/reactos/include/ndk/inbvfuncs.h Added: trunk/reactos/include/ndk/iofuncs.h Added: trunk/reactos/include/ndk/iotypes.h Added: trunk/reactos/include/ndk/kdfuncs.h Added: trunk/reactos/include/ndk/kdtypes.h Added: trunk/reactos/include/ndk/kefuncs.h Added: trunk/reactos/include/ndk/ketypes.h Added: trunk/reactos/include/ndk/ldrfuncs.h Added: trunk/reactos/include/ndk/ldrtypes.h Added: trunk/reactos/include/ndk/lpctypes.h Added: trunk/reactos/include/ndk/mmtypes.h Added: trunk/reactos/include/ndk/ntndk.h Added: trunk/reactos/include/ndk/obfuncs.h Added: trunk/reactos/include/ndk/obtypes.h Added: trunk/reactos/include/ndk/potypes.h Added: trunk/reactos/include/ndk/psfuncs.h Added: trunk/reactos/include/ndk/pstypes.h Added: trunk/reactos/include/ndk/rtlfuncs.h Added: trunk/reactos/include/ndk/rtltypes.h Added: trunk/reactos/include/ndk/sefuncs.h Added: trunk/reactos/include/ndk/setypes.h Added: trunk/reactos/include/ndk/umtypes.h Added: trunk/reactos/include/ndk/zwfuncs.h Added: trunk/reactos/include/ndk/zwtypes.h _____ Added: trunk/reactos/include/ndk/cctypes.h --- trunk/reactos/include/ndk/cctypes.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/cctypes.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,25 @@ +/* + * PROJECT: ReactOS Native Headers + * FILE: include/ndk/cctypes.h + * PURPOSE: Definitions for exported Cache Manager Types not defined in DDK/IFS + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + * UPDATE HISTORY: + * Created 06/10/04 + */ + +#ifndef _CCTYPES_H +#define _CCTYPES_H + +/* DEPENDENCIES **************************************************************/ + +/* EXPORTED DATA *************************************************************/ +extern ULONG NTOSAPI CcFastMdlReadWait; +extern ULONG NTOSAPI CcFastReadNotPossible; +extern ULONG NTOSAPI CcFastReadWait; + +/* ENUMERATIONS **************************************************************/ + +/* TYPES *********************************************************************/ + +#endif + _____ Added: trunk/reactos/include/ndk/extypes.h --- trunk/reactos/include/ndk/extypes.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/extypes.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,49 @@ +/* + * PROJECT: ReactOS Native Headers + * FILE: include/ndk/extypes.h + * PURPOSE: Definitions for exported Executive Functions not defined in DDK/IFS + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + * UPDATE HISTORY: + * Created 06/10/04 + */ + +#ifndef _EXTYPES_H +#define _EXTYPES_H + +/* DEPENDENCIES **************************************************************/ + +/* EXPORTED DATA *************************************************************/ +extern POBJECT_TYPE NTOSAPI ExIoCompletionType; + +/* CONSTANTS *****************************************************************/ + +/* ENUMERATIONS **************************************************************/ + +typedef enum _HARDERROR_RESPONSE_OPTION +{ + OptionAbortRetryIgnore, + OptionOk, + OptionOkCancel, + OptionRetryCancel, + OptionYesNo, + OptionYesNoCancel, + OptionShutdownSystem +} HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION; + +typedef enum _HARDERROR_RESPONSE +{ + ResponseReturnToCaller, + ResponseNotHandled, + ResponseAbort, + ResponseCancel, + ResponseIgnore, + ResponseNo, + ResponseOk, + ResponseRetry, + ResponseYes +} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE; + +/* TYPES *********************************************************************/ + +#endif + _____ Added: trunk/reactos/include/ndk/halfuncs.h --- trunk/reactos/include/ndk/halfuncs.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/halfuncs.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,149 @@ +/* + * PROJECT: ReactOS Native Headers + * FILE: include/ndk/halfuncs.h + * PURPOSE: Prototypes for exported HAL Functions not defined in DDK/IFS + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + * UPDATE HISTORY: + * Created 06/10/04 + */ +#ifndef _HALFUNCS_H +#define _HALFUNCS_H + +/* DEPENDENCIES **************************************************************/ +#include "haltypes.h" + +/* FUNCTION TYPES ************************************************************/ + +/* PROTOTYPES ****************************************************************/ + +VOID +STDCALL +HalAcquireDisplayOwnership( + IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters +); + +BOOLEAN +STDCALL +HalAllProcessorsStarted(VOID); + +NTSTATUS +STDCALL +HalAllocateAdapterChannel( + IN PADAPTER_OBJECT AdapterObject, + IN PWAIT_CONTEXT_BLOCK WaitContextBlock, + IN ULONG NumberOfMapRegisters, + IN PDRIVER_CONTROL ExecutionRoutine +); + +BOOLEAN +STDCALL +HalBeginSystemInterrupt( + ULONG Vector, + KIRQL Irql, + PKIRQL OldIrql +); + +BOOLEAN +STDCALL +HalDisableSystemInterrupt( + ULONG Vector, + KIRQL Irql +); + +VOID +STDCALL +HalDisplayString ( + IN PCHAR String +); + +BOOLEAN +STDCALL +HalEnableSystemInterrupt( + ULONG Vector, + KIRQL Irql, + KINTERRUPT_MODE InterruptMode +); + +VOID +STDCALL +HalEndSystemInterrupt( + KIRQL Irql, + ULONG Vector +); + +BOOLEAN +STDCALL +HalGetEnvironmentVariable( + PCH Name, + PCH Value, + USHORT ValueLength +); + +VOID +STDCALL +HalInitializeProcessor( + ULONG ProcessorNumber, + PVOID ProcessorStack +); + +BOOLEAN +STDCALL +HalInitSystem( + ULONG BootPhase, + PLOADER_PARAMETER_BLOCK LoaderBlock +); + +BOOLEAN +STDCALL +HalQueryDisplayOwnership(VOID); + +VOID +STDCALL +HalReportResourceUsage(VOID); + +VOID +FASTCALL +HalRequestSoftwareInterrupt( + KIRQL SoftwareInterruptRequested +); + +VOID +STDCALL +HalReleaseDisplayOwnership(VOID); + +VOID +STDCALL +HalReturnToFirmware( + FIRMWARE_ENTRY Action +); + +VOID +STDCALL +HalRequestIpi( + ULONG Unknown +); + +BOOLEAN +STDCALL +HalSetEnvironmentVariable( + IN PCH Name, + IN PCH Value +); + +BOOLEAN +STDCALL +HalStartNextProcessor( + ULONG Unknown1, + ULONG Unknown2 +); + +VOID +STDCALL +IoAssignDriveLetters( + struct _LOADER_PARAMETER_BLOCK *LoaderBlock, + PSTRING NtDeviceName, + PUCHAR NtSystemPath, + PSTRING NtSystemPathString +); + +#endif _____ Added: trunk/reactos/include/ndk/haltypes.h --- trunk/reactos/include/ndk/haltypes.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/haltypes.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,72 @@ +/* + * PROJECT: ReactOS Native Headers + * FILE: include/ndk/haltypes.h + * PURPOSE: Definitions for HAL/BLDR types not defined in DDK/IFS + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + * UPDATE HISTORY: + * Created 06/10/04 + */ +#ifndef _HALTYPES_H +#define _HALTYPES_H + +/* DEPENDENCIES **************************************************************/ +#include <ddk/ntdddisk.h> + +/* EXPORTED DATA *************************************************************/ +extern ULONG NTOSAPI KdComPortInUse; + +/* CONSTANTS *****************************************************************/ + +/* Boot Flags */ +#define MB_FLAGS_MEM_INFO (0x1) +#define MB_FLAGS_BOOT_DEVICE (0x2) +#define MB_FLAGS_COMMAND_LINE (0x4) +#define MB_FLAGS_MODULE_INFO (0x8) +#define MB_FLAGS_AOUT_SYMS (0x10) +#define MB_FLAGS_ELF_SYMS (0x20) +#define MB_FLAGS_MMAP_INFO (0x40) +#define MB_FLAGS_DRIVES_INFO (0x80) +#define MB_FLAGS_CONFIG_TABLE (0x100) +#define MB_FLAGS_BOOT_LOADER_NAME (0x200) +#define MB_FLAGS_APM_TABLE (0x400) +#define MB_FLAGS_GRAPHICS_TABLE (0x800) + +/* ENUMERATIONS **************************************************************/ + +/* TYPES *********************************************************************/ + +typedef struct _LOADER_MODULE +{ + ULONG ModStart; + ULONG ModEnd; + ULONG String; + ULONG Reserved; +} LOADER_MODULE, *PLOADER_MODULE; + +typedef struct _LOADER_PARAMETER_BLOCK +{ + ULONG Flags; + ULONG MemLower; + ULONG MemHigher; + ULONG BootDevice; + ULONG CommandLine; + ULONG ModsCount; + ULONG ModsAddr; + UCHAR Syms[12]; + ULONG MmapLength; + ULONG MmapAddr; + ULONG DrivesCount; + ULONG DrivesAddr; + ULONG ConfigTable; + ULONG BootLoaderName; +} LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK; + +typedef struct _DRIVE_LAYOUT_INFORMATION +{ + DWORD PartitionCount; + DWORD Signature; + PARTITION_INFORMATION PartitionEntry[1]; +} DRIVE_LAYOUT_INFORMATION; + +#endif + _____ Added: trunk/reactos/include/ndk/i386/floatsave.h --- trunk/reactos/include/ndk/i386/floatsave.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/i386/floatsave.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,11 @@ +#ifndef __NAPI_I386_FLOATSAVE_H__ +#define __NAPI_I386_FLOATSAVE_H__ + +#define FLOAT_SAVE_CONTROL (0xFFFF037F) +#define FLOAT_SAVE_STATUS (0xFFFF0000) +#define FLOAT_SAVE_TAG (0xFFFFFFFF) +#define FLOAT_SAVE_DATA (0xFFFF0000) + +#endif /* __NAPI_I386_FLOATSAVE_H__ */ + +/* EOF */ _____ Added: trunk/reactos/include/ndk/i386/segment.h --- trunk/reactos/include/ndk/i386/segment.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/i386/segment.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,12 @@ +#ifndef _ASM_SEGMENT_H +#define _ASM_SEGMENT_H + +#define KERNEL_CS (0x8) +#define KERNEL_DS (0x10) +#define USER_CS (0x18 + 0x3) +#define USER_DS (0x20 + 0x3) +#define RESERVED_FOR_TSS (0x28) +#define PCR_SELECTOR (0x30) +#define TEB_SELECTOR (0x38 + 0x3) + +#endif /* _ASM_SEGMENT_H */ _____ Added: trunk/reactos/include/ndk/inbvfuncs.h --- trunk/reactos/include/ndk/inbvfuncs.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/inbvfuncs.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,105 @@ +/* + * PROJECT: ReactOS Native Headers + * FILE: include/ndk/haltypes.h + * PURPOSE: Prototypes for Boot Video Driver not defined in DDK/IFS + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + * UPDATE HISTORY: + * Created 06/10/04 + */ +#ifndef _INBVFUNCS_H +#define _INBVFUNCS_H + +/* DEPENDENCIES **************************************************************/ + +/* FUNCTION TYPES ************************************************************/ + +/* PROTOTYPES ****************************************************************/ + +VOID +STDCALL +InbvAcquireDisplayOwnership(VOID); + +BOOLEAN +STDCALL +InbvCheckDisplayOwnership(VOID); + +BOOLEAN +STDCALL +InbvDisplayString( + IN PCHAR String +); + +VOID +STDCALL +InbvEnableBootDriver( + IN BOOLEAN Enable +); + +BOOLEAN +STDCALL +InbvEnableDisplayString( + IN BOOLEAN Enable +); + +VOID +STDCALL +InbvInstallDisplayStringFilter( + IN PVOID Unknown +); + +BOOLEAN +STDCALL +InbvIsBootDriverInstalled(VOID); + +VOID +STDCALL +InbvNotifyDisplayOwnershipLost( + IN PVOID Callback +); + +BOOLEAN +STDCALL +InbvResetDisplay(VOID); + +VOID +STDCALL +InbvSetScrollRegion( + IN ULONG Left, + IN ULONG Top, + IN ULONG Width, + IN ULONG Height +); + +VOID +STDCALL +InbvSetTextColor( + IN ULONG Color +); + +VOID +STDCALL +InbvSolidColorFill( + IN ULONG Left, + IN ULONG Top, + IN ULONG Width, + IN ULONG Height, + IN ULONG Color +); + +VOID +STDCALL +VidCleanUp(VOID); + +BOOLEAN +STDCALL +VidInitialize(VOID); + +BOOLEAN +STDCALL +VidResetDisplay(VOID); + +BOOLEAN +STDCALL +VidIsBootDriverInstalled(VOID); + +#endif _____ Added: trunk/reactos/include/ndk/iofuncs.h --- trunk/reactos/include/ndk/iofuncs.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/iofuncs.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,20 @@ +/* + * PROJECT: ReactOS Native Headers + * FILE: include/ndk/iofuncs.h + * PURPOSE: Definitions for exported I/O Manager Functions not defined in DDK/IFS + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + * UPDATE HISTORY: + * Created 06/10/04 + */ + +#ifndef _IOFUNCS_H +#define _IOFUNCS_H + +/* DEPENDENCIES **************************************************************/ + +/* FUNCTION TYPES ************************************************************/ + +/* PROTOTYPES ****************************************************************/ + +#endif + _____ Added: trunk/reactos/include/ndk/iotypes.h --- trunk/reactos/include/ndk/iotypes.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/iotypes.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,68 @@ +/* + * PROJECT: ReactOS Native Headers + * FILE: include/ndk/iotypes.h + * PURPOSE: Definitions for exported I/O Manager Types not defined in DDK/IFS + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + * UPDATE HISTORY: + * Created 06/10/04 + */ + +#ifndef _IOTYPES_H +#define _IOTYPES_H + +/* DEPENDENCIES **************************************************************/ + +/* EXPORTED DATA *************************************************************/ +extern POBJECT_TYPE NTOSAPI IoAdapterObjectType; +extern POBJECT_TYPE NTOSAPI IoDeviceHandlerObjectType; +extern POBJECT_TYPE NTOSAPI IoDeviceObjectType; +extern POBJECT_TYPE NTOSAPI IoDriverObjectType; +extern POBJECT_TYPE NTOSAPI IoFileObjectType; +extern ULONG NTOSAPI IoReadOperationCount; +extern ULONGLONG NTOSAPI IoReadTransferCount; +extern ULONG NTOSAPI IoWriteOperationCount; +extern ULONGLONG NTOSAPI IoWriteTransferCount; +extern KSPIN_LOCK NTOSAPI IoStatisticsLock; + +/* CONSTANTS *****************************************************************/ + +/* I/O Types */ +#define IO_TYPE_DRIVER 4L +#define IO_TYPE_TIMER 9L + +/* ENUMERATIONS **************************************************************/ + +/* TYPES *********************************************************************/ + +typedef struct _MAILSLOT_CREATE_PARAMETERS +{ + ULONG MailslotQuota; + ULONG MaximumMessageSize; + LARGE_INTEGER ReadTimeout; + BOOLEAN TimeoutSpecified; +} MAILSLOT_CREATE_PARAMETERS, *PMAILSLOT_CREATE_PARAMETERS; + +typedef struct _NAMED_PIPE_CREATE_PARAMETERS +{ + ULONG NamedPipeType; + ULONG ReadMode; + ULONG CompletionMode; + ULONG MaximumInstances; + ULONG InboundQuota; + ULONG OutboundQuota; + LARGE_INTEGER DefaultTimeout; + BOOLEAN TimeoutSpecified; +} NAMED_PIPE_CREATE_PARAMETERS, *PNAMED_PIPE_CREATE_PARAMETERS; + +typedef struct _IO_TIMER +{ + USHORT Type; + USHORT TimerEnabled; + LIST_ENTRY IoTimerList; + PIO_TIMER_ROUTINE TimerRoutine; + PVOID Context; + PDEVICE_OBJECT DeviceObject; +} IO_TIMER, *PIO_TIMER; + +#endif + _____ Added: trunk/reactos/include/ndk/kdfuncs.h --- trunk/reactos/include/ndk/kdfuncs.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/kdfuncs.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,94 @@ +/* + * PROJECT: ReactOS Native Headers + * FILE: include/ndk/kdfuncs.h + * PURPOSE: Prototypes for Kernel Debugger Functions not defined in DDK/IFS + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + * UPDATE HISTORY: + * Created 06/10/04 + */ +#ifndef _KDFUNCS_H +#define _KDFUNCS_H + +/* DEPENDENCIES **************************************************************/ +#include "kdtypes.h" + +/* FUNCTION TYPES ************************************************************/ + +/* PROTOTYPES ****************************************************************/ + +BYTE +STDCALL +KdPollBreakIn(VOID); + +BOOLEAN +STDCALL +KdPortInitialize( + PKD_PORT_INFORMATION PortInformation, + DWORD Unknown1, + DWORD Unknown2 +); + +BOOLEAN +STDCALL +KdPortInitializeEx( + PKD_PORT_INFORMATION PortInformation, + DWORD Unknown1, + DWORD Unknown2 +); + +BOOLEAN +STDCALL +KdPortGetByte( + PUCHAR ByteRecieved +); + +BOOLEAN +STDCALL +KdPortGetByteEx( + PKD_PORT_INFORMATION PortInformation, + PUCHAR ByteRecieved +); + +BOOLEAN +STDCALL +KdPortPollByte( + PUCHAR ByteRecieved +); + +BOOLEAN +STDCALL +KdPortPollByteEx( + PKD_PORT_INFORMATION PortInformation, + PUCHAR ByteRecieved +); + +VOID +STDCALL +KdPortPutByte( + UCHAR ByteToSend +); + +VOID +STDCALL +KdPortPutByteEx( + PKD_PORT_INFORMATION PortInformation, + UCHAR ByteToSend +); + +VOID +STDCALL +KdPortRestore(VOID); + +VOID +STDCALL +KdPortSave (VOID); + +BOOLEAN +STDCALL +KdPortDisableInterrupts(VOID); + +BOOLEAN +STDCALL +KdPortEnableInterrupts(VOID); + +#endif _____ Added: trunk/reactos/include/ndk/kdtypes.h --- trunk/reactos/include/ndk/kdtypes.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/kdtypes.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,29 @@ +/* + * PROJECT: ReactOS Native Headers + * FILE: include/ndk/kdtypes.h + * PURPOSE: Definitions for Kernel Debugger Types not defined in DDK/IFS + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + * UPDATE HISTORY: + * Created 06/10/04 + */ +#ifndef _KDTYPES_H +#define _KDTYPES_H + +/* DEPENDENCIES **************************************************************/ + +/* EXPORTED DATA *************************************************************/ + +/* CONSTANTS *****************************************************************/ + +/* ENUMERATIONS **************************************************************/ + +/* TYPES *********************************************************************/ + +typedef struct _KD_PORT_INFORMATION +{ + ULONG ComPort; + ULONG BaudRate; + ULONG BaseAddress; +} KD_PORT_INFORMATION, *PKD_PORT_INFORMATION; + +#endif _____ Added: trunk/reactos/include/ndk/kefuncs.h --- trunk/reactos/include/ndk/kefuncs.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/kefuncs.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,280 @@ +/* + * PROJECT: ReactOS Native Headers + * FILE: include/ndk/kefuncs.h + * PURPOSE: Prototypes for Kernel Functions not defined in DDK/IFS + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + * UPDATE HISTORY: + * Created 06/10/04 + */ +#ifndef _KEFUNCS_H +#define _KEFUNCS_H + +/* DEPENDENCIES **************************************************************/ +#include "ketypes.h" + +/* FUNCTION TYPES ************************************************************/ + +/* PROTOTYPES ****************************************************************/ + +VOID +STDCALL +KeInitializeApc( + IN PKAPC Apc, + IN PKTHREAD Thread, + IN KAPC_ENVIRONMENT TargetEnvironment, + IN PKKERNEL_ROUTINE KernelRoutine, + IN PKRUNDOWN_ROUTINE RundownRoutine OPTIONAL, + IN PKNORMAL_ROUTINE NormalRoutine, + IN KPROCESSOR_MODE Mode, + IN PVOID Context +); + +VOID +STDCALL +KeEnterKernelDebugger(VOID); + +VOID +FASTCALL +KiAcquireSpinLock( + PKSPIN_LOCK SpinLock +); + +VOID +FASTCALL +KiReleaseSpinLock( + PKSPIN_LOCK SpinLock +); + +VOID +STDCALL +KiDeliverApc( + IN KPROCESSOR_MODE PreviousMode, + IN PVOID Reserved, + IN PKTRAP_FRAME TrapFrame +); + +VOID +STDCALL +KiDispatchInterrupt(VOID); + + +BOOLEAN +STDCALL +KeAreApcsDisabled( + VOID + ); + +VOID +STDCALL +KeFlushQueuedDpcs( + VOID + ); + +ULONG +STDCALL +KeGetRecommendedSharedDataAlignment( + VOID + ); + +ULONG +STDCALL +KeQueryRuntimeThread( + IN PKTHREAD Thread, + OUT PULONG UserTime + ); + +BOOLEAN +STDCALL +KeSetKernelStackSwapEnable( + IN BOOLEAN Enable + ); + +BOOLEAN +STDCALL +KeDeregisterBugCheckReasonCallback( + IN PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord + ); + +BOOLEAN +STDCALL +KeRegisterBugCheckReasonCallback( + IN PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord, + IN PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine, + IN KBUGCHECK_CALLBACK_REASON Reason, + IN PUCHAR Component + ); + +VOID +STDCALL +KeTerminateThread( + IN KPRIORITY Increment +); + +BOOLEAN +STDCALL +KeIsExecutingDpc( + VOID +); + +VOID +STDCALL +KeSetEventBoostPriority( + IN PKEVENT Event, + IN PKTHREAD *Thread OPTIONAL +); + +PVOID +STDCALL +KeFindConfigurationEntry( + IN PVOID Unknown, + IN ULONG Class, + IN CONFIGURATION_TYPE Type, + IN PULONG RegKey +); + +PVOID +STDCALL +KeFindConfigurationNextEntry( + IN PVOID Unknown, + IN ULONG Class, + IN CONFIGURATION_TYPE Type, + IN PULONG RegKey, + IN PVOID *NextLink +); + +VOID +STDCALL +KeFlushEntireTb( + IN BOOLEAN Unknown, + IN BOOLEAN CurrentCpuOnly +); + +VOID +STDCALL +KeRevertToUserAffinityThread( + VOID +); + +VOID +STDCALL +KiCoprocessorError( + VOID +); + +VOID +STDCALL +KiUnexpectedInterrupt( + VOID +); + +VOID +STDCALL +KeSetDmaIoCoherency( + IN ULONG Coherency +); + +VOID +STDCALL +KeSetProfileIrql( + IN KIRQL ProfileIrql +); + +NTSTATUS +STDCALL +KeSetAffinityThread( + PKTHREAD Thread, + KAFFINITY Affinity +); + +VOID +STDCALL +KeSetSystemAffinityThread( + IN KAFFINITY Affinity +); + +NTSTATUS +STDCALL +KeUserModeCallback( + IN ULONG FunctionID, + IN PVOID InputBuffer, + IN ULONG InputLength, + OUT PVOID *OutputBuffer, + OUT PULONG OutputLength +); + +VOID +STDCALL +KeSetTimeIncrement( + IN ULONG MaxIncrement, + IN ULONG MinIncrement +); + +VOID +STDCALL +KeInitializeInterrupt( + PKINTERRUPT InterruptObject, + PKSERVICE_ROUTINE ServiceRoutine, + PVOID ServiceContext, + PKSPIN_LOCK SpinLock, + ULONG Vector, + KIRQL Irql, + KIRQL SynchronizeIrql, + KINTERRUPT_MODE InterruptMode, + BOOLEAN ShareVector, + CHAR ProcessorNumber, + BOOLEAN FloatingSave +); + +BOOLEAN +STDCALL +KeConnectInterrupt( + PKINTERRUPT InterruptObject +); + +VOID +STDCALL +KeDisconnectInterrupt( + PKINTERRUPT InterruptObject +); + +struct _KPROCESS* +KeGetCurrentProcess( + VOID +); + +VOID +KeSetGdtSelector( + ULONG Entry, + ULONG Value1, + ULONG Value2 +); + +LONG +STDCALL +KeReadStateMutant( + IN PKMUTANT Mutant +); + +VOID +STDCALL +KeInitializeMutant( + IN PKMUTANT Mutant, + IN BOOLEAN InitialOwner +); + +LONG +STDCALL +KeReleaseMutant( + IN PKMUTANT Mutant, + IN KPRIORITY Increment, + IN BOOLEAN Abandon, + IN BOOLEAN Wait +); + +NTSTATUS +STDCALL +KeRaiseUserException( + IN NTSTATUS ExceptionCode + ); + +#endif _____ Added: trunk/reactos/include/ndk/ketypes.h --- trunk/reactos/include/ndk/ketypes.h 2005-06-18 22:54:12 UTC (rev 16065) +++ trunk/reactos/include/ndk/ketypes.h 2005-06-18 23:33:40 UTC (rev 16066) @@ -0,0 +1,129 @@ +/* + * PROJECT: ReactOS Native Headers + * FILE: include/ndk/ketypes.h + * PURPOSE: Definitions for Kernel Types not defined in DDK/IFS + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + * UPDATE HISTORY: + * Created 06/10/04 + */ +#ifndef _KETYPES_H +#define _KETYPES_H + +/* DEPENDENCIES **************************************************************/ +#include "haltypes.h" + +/* EXPORTED DATA *************************************************************/ +extern CHAR NTOSAPI KeNumberProcessors; +extern LOADER_PARAMETER_BLOCK NTOSAPI KeLoaderBlock; +extern ULONG NTOSAPI KeDcacheFlushCount; +extern ULONG NTOSAPI KeIcacheFlushCount; +extern KAFFINITY NTOSAPI KeActiveProcessors; +extern ULONG NTOSAPI KiDmaIoCoherency; /* RISC Architectures only */ [truncated at 1000 lines; 8411 more skipped]
19 years, 6 months
1
0
0
0
[greatlrd] 16065: make inline asm -O3 compatible (remove L1 and L2 label) thx blight and alex to explain how to do that.
by greatlrd@svn.reactos.com
make inline asm -O3 compatible (remove L1 and L2 label) thx blight and alex to explain how to do that. Modified: trunk/reactos/subsys/win32k/dib/dib16bpp.c Modified: trunk/reactos/subsys/win32k/dib/dib24bpp.c Modified: trunk/reactos/subsys/win32k/dib/dib32bpp.c _____ Modified: trunk/reactos/subsys/win32k/dib/dib16bpp.c --- trunk/reactos/subsys/win32k/dib/dib16bpp.c 2005-06-18 22:06:54 UTC (rev 16064) +++ trunk/reactos/subsys/win32k/dib/dib16bpp.c 2005-06-18 22:54:12 UTC (rev 16065) @@ -56,18 +56,18 @@ " or %0, %%eax\n" " mov %2, %%edi\n" " test $0x03, %%edi\n" /* Align to fullword boundary */ -" jz .L1\n" +" jz 0f\n" " stosw\n" " dec %1\n" -" jz .L2\n" -".L1:\n" +" jz 1f\n" +"0:\n" " mov %1,%%ecx\n" /* Setup count of fullwords to fill */ " shr $1,%%ecx\n" " rep stosl\n" /* The actual fill */ " test $0x01, %1\n" /* One left to do at the right side? */ -" jz .L2\n" +" jz 1f\n" " stosw\n" -".L2:\n" +"1:\n" : /* no output */ : "r"(c), "r"(Count), "m"(addr) : "%eax", "%ecx", "%edi"); _____ Modified: trunk/reactos/subsys/win32k/dib/dib24bpp.c --- trunk/reactos/subsys/win32k/dib/dib24bpp.c 2005-06-18 22:06:54 UTC (rev 16064) +++ trunk/reactos/subsys/win32k/dib/dib24bpp.c 2005-06-18 22:54:12 UTC (rev 16065) @@ -95,13 +95,13 @@ " movl %2, %%ecx\n" /* Load count */ " shr $2, %%ecx\n" " movl %3, %%edi\n" /* Load dest */ -".L1:\n" +"0:\n" " movl %%eax, (%%edi)\n" /* Store 4 pixels, 12 bytes */ " movl %%ebx, 4(%%edi)\n" " movl %%edx, 8(%%edi)\n" " addl $12, %%edi\n" " dec %%ecx\n" -" jnz .L1\n" +" jnz 0b\n" " movl %%edi, %0\n" : "=m"(addr) : "m"(c), "m"(Count), "m"(addr) _____ Modified: trunk/reactos/subsys/win32k/dib/dib32bpp.c --- trunk/reactos/subsys/win32k/dib/dib32bpp.c 2005-06-18 22:06:54 UTC (rev 16064) +++ trunk/reactos/subsys/win32k/dib/dib32bpp.c 2005-06-18 22:54:12 UTC (rev 16065) @@ -54,11 +54,11 @@ " mov %0, %%eax\n" " mov %2, %%edi\n" " test $0x03, %%edi\n" /* Align to fullword boundary */ -" jnz .L1\n" +" jnz 0f\n" " mov %1,%%ecx\n" /* Setup count of fullwords to fill */ " rep stosl\n" /* The actual fill */ -" jmp .L2\n" -".L1:\n" +" jmp 1f\n" +"0:\n" " stosw\n" " ror $0x10,%%eax\n" " mov %1,%%ecx\n" /* Setup count of fullwords to fill */ @@ -66,7 +66,7 @@ " rep stosl\n" /* The actual fill */ " shr $0x10,%%eax\n" " stosw\n" -".L2:\n" +"1:\n" : /* no output */ : "m"(c), "r"(cx), "m"(addr) : "%eax", "%ecx", "%edi");
19 years, 6 months
1
0
0
0
[navaraf] 16064: Remove duplicate definition of KdPrintEx.
by navaraf@svn.reactos.com
Remove duplicate definition of KdPrintEx. Modified: trunk/reactos/ntoskrnl/include/internal/kd.h _____ Modified: trunk/reactos/ntoskrnl/include/internal/kd.h --- trunk/reactos/ntoskrnl/include/internal/kd.h 2005-06-18 21:55:59 UTC (rev 16063) +++ trunk/reactos/ntoskrnl/include/internal/kd.h 2005-06-18 22:06:54 UTC (rev 16064) @@ -7,7 +7,6 @@ #define __INCLUDE_INTERNAL_KERNEL_DEBUGGER_H struct _KD_DISPATCH_TABLE; -#define KdPrintEx(_x_) DbgPrintEx _x_ #ifdef DBG #include "kdgdb.h"
19 years, 6 months
1
0
0
0
[greatlrd] 16063: make gcc stop nag about uninitialized value in 114: and make -O3 working
by greatlrd@svn.reactos.com
make gcc stop nag about uninitialized value in 114: and make -O3 working Modified: trunk/reactos/drivers/usb/cromwell/sys/linuxwrapper.c _____ Modified: trunk/reactos/drivers/usb/cromwell/sys/linuxwrapper.c --- trunk/reactos/drivers/usb/cromwell/sys/linuxwrapper.c 2005-06-18 21:10:48 UTC (rev 16062) +++ trunk/reactos/drivers/usb/cromwell/sys/linuxwrapper.c 2005-06-18 21:55:59 UTC (rev 16063) @@ -111,7 +111,7 @@ // ReactOS Purpose: Create real kernel thread int my_kernel_thread(int STDCALL (*handler)(void*), void* parm, int flags) { - HANDLE hThread; + HANDLE hThread = NULL; //thread_handler=handler; //thread_parm=parm; //return 42; // PID :-)
19 years, 6 months
1
0
0
0
[hyperion] 16062: Deleting in the hope SVN will merge painlessly
by hyperion@svn.reactos.com
Deleting in the hope SVN will merge painlessly Deleted: branches/rox-u/reactos/ntoskrnl/inbv/i386/
19 years, 6 months
1
0
0
0
[navaraf] 16061: Get rid of ROS DDK SCSI headers (forgot these files in r16060).
by navaraf@svn.reactos.com
Get rid of ROS DDK SCSI headers (forgot these files in r16060). Modified: trunk/reactos/drivers/storage/cdrom/cdrom.c Modified: trunk/reactos/w32api/include/ddk/scsi.h _____ Modified: trunk/reactos/drivers/storage/cdrom/cdrom.c --- trunk/reactos/drivers/storage/cdrom/cdrom.c 2005-06-18 20:55:09 UTC (rev 16060) +++ trunk/reactos/drivers/storage/cdrom/cdrom.c 2005-06-18 21:02:59 UTC (rev 16061) @@ -64,6 +64,26 @@ MODE_READ_RECOVERY_PAGE ReadRecoveryPage; } ERROR_RECOVERY_DATA10, *PERROR_RECOVERY_DATA10; +typedef struct _MODE_CAPABILITIES_PAGE2 +{ + UCHAR PageCode:6; + UCHAR Reserved1:1; + UCHAR PSBit:1; + UCHAR PageLength; + UCHAR Reserved2[2]; + UCHAR Capabilities[4]; + UCHAR MaximumSpeedSupported[2]; + UCHAR Reserved3; + UCHAR NumberVolumeLevels; + UCHAR BufferSize[2]; + UCHAR CurrentSpeed[2]; + UCHAR Reserved4; + UCHAR Reserved5:1; + UCHAR DigitalOutput:4; + UCHAR Reserved6:3; + UCHAR Reserved7[2]; +} MODE_CAPABILITIES_PAGE2, *PMODE_CAPABILITIES_PAGE2; + typedef struct _MODE_CAPABILITIES_DATA6 { MODE_PARAMETER_HEADER Header; _____ Modified: trunk/reactos/w32api/include/ddk/scsi.h --- trunk/reactos/w32api/include/ddk/scsi.h 2005-06-18 20:55:09 UTC (rev 16060) +++ trunk/reactos/w32api/include/ddk/scsi.h 2005-06-18 21:02:59 UTC (rev 16061) @@ -1285,13 +1285,16 @@ UCHAR BlockMinimumSize[2]; } READ_BLOCK_LIMITS_DATA, *PREAD_BLOCK_LIMITS_DATA; +#define MODE_BLOCK_DESC_LENGTH 8 +#define MODE_HEADER_LENGTH 4 +#define MODE_HEADER_LENGTH10 8 typedef struct _MODE_PARAMETER_HEADER { UCHAR ModeDataLength; UCHAR MediumType; UCHAR DeviceSpecificParameter; UCHAR BlockDescriptorLength; -}MODE_PARAMETER_HEADER, *PMODE_PARAMETER_HEADER; +} MODE_PARAMETER_HEADER, *PMODE_PARAMETER_HEADER; typedef struct _MODE_PARAMETER_HEADER10 { UCHAR ModeDataLength[2]; @@ -1327,7 +1330,7 @@ UCHAR MaximumBurstSize[2]; UCHAR DataTransferDisconnect : 2; UCHAR Reserved2[3]; -}MODE_DISCONNECT_PAGE, *PMODE_DISCONNECT_PAGE; +} MODE_DISCONNECT_PAGE, *PMODE_DISCONNECT_PAGE; typedef struct _MODE_CACHING_PAGE { UCHAR PageCode : 6; @@ -1344,7 +1347,7 @@ UCHAR MinimumPrefetch[2]; UCHAR MaximumPrefetch[2]; UCHAR MaximumPrefetchCeiling[2]; -}MODE_CACHING_PAGE, *PMODE_CACHING_PAGE; +} MODE_CACHING_PAGE, *PMODE_CACHING_PAGE; typedef struct _MODE_CDROM_WRITE_PARAMETERS_PAGE { UCHAR PageLength;
19 years, 6 months
1
0
0
0
[navaraf] 16060: Get rid of ROS DDK SCSI headers.
by navaraf@svn.reactos.com
Get rid of ROS DDK SCSI headers. Modified: trunk/reactos/drivers/storage/atapi/atapi.c Modified: trunk/reactos/drivers/storage/scsiport/scsiport.c Modified: trunk/reactos/drivers/storage/scsiport/scsiport.xml Deleted: trunk/reactos/include/ddk/scsi.h Deleted: trunk/reactos/include/ddk/srb.h _____ Modified: trunk/reactos/drivers/storage/atapi/atapi.c --- trunk/reactos/drivers/storage/atapi/atapi.c 2005-06-18 20:29:31 UTC (rev 16059) +++ trunk/reactos/drivers/storage/atapi/atapi.c 2005-06-18 20:55:09 UTC (rev 16060) @@ -449,9 +449,9 @@ } DevExt->Handler = NULL; DevExt->CommandPortBase = (ULONG)IoBase; - ConfigInfo->AccessRanges[0].RangeStart = IoAddress; - ConfigInfo->AccessRanges[0].RangeLength = 8; - ConfigInfo->AccessRanges[0].RangeInMemory = FALSE; + (*ConfigInfo->AccessRanges)[0].RangeStart = IoAddress; + (*ConfigInfo->AccessRanges)[0].RangeLength = 8; + (*ConfigInfo->AccessRanges)[0].RangeInMemory = FALSE; if (ControlPortBase) { @@ -469,9 +469,9 @@ return FALSE; } DevExt->ControlPortBase = (ULONG)IoBase; - ConfigInfo->AccessRanges[1].RangeStart = IoAddress; - ConfigInfo->AccessRanges[1].RangeLength = 1; - ConfigInfo->AccessRanges[1].RangeInMemory = FALSE; + (*ConfigInfo->AccessRanges)[1].RangeStart = IoAddress; + (*ConfigInfo->AccessRanges)[1].RangeLength = 1; + (*ConfigInfo->AccessRanges)[1].RangeInMemory = FALSE; } if (BusMasterPortBase) { @@ -489,9 +489,9 @@ return FALSE; } DevExt->BusMasterRegisterBase = (ULONG)IoBase; - ConfigInfo->AccessRanges[2].RangeStart = IoAddress; - ConfigInfo->AccessRanges[2].RangeLength = 8; - ConfigInfo->AccessRanges[2].RangeInMemory = FALSE; + (*ConfigInfo->AccessRanges)[2].RangeStart = IoAddress; + (*ConfigInfo->AccessRanges)[2].RangeLength = 8; + (*ConfigInfo->AccessRanges)[2].RangeInMemory = FALSE; #ifdef ENABLE_DMA // ConfigInfo->DmaChannel = SP_UNINITIALIZED_VALUE; // ConfigInfo->DmaPort = SP_UNINITIALIZED_VALUE; @@ -1094,10 +1094,10 @@ DPRINT("AtapiFindDevices() called\n"); - CommandPortBase = ScsiPortConvertPhysicalAddressToUlong(ConfigInfo->AccessRanges[0].RangeS tart); + CommandPortBase = ScsiPortConvertPhysicalAddressToUlong((*ConfigInfo->AccessRanges)[0].Ran geStart); DPRINT(" CommandPortBase: %x\n", CommandPortBase); - ControlPortBase = ScsiPortConvertPhysicalAddressToUlong(ConfigInfo->AccessRanges[1].RangeS tart); + ControlPortBase = ScsiPortConvertPhysicalAddressToUlong((*ConfigInfo->AccessRanges)[1].Ran geStart); DPRINT(" ControlPortBase: %x\n", ControlPortBase); for (UnitNumber = 0; UnitNumber < 2; UnitNumber++) _____ Modified: trunk/reactos/drivers/storage/scsiport/scsiport.c --- trunk/reactos/drivers/storage/scsiport/scsiport.c 2005-06-18 20:29:31 UTC (rev 16059) +++ trunk/reactos/drivers/storage/scsiport/scsiport.c 2005-06-18 20:55:09 UTC (rev 16060) @@ -274,6 +274,7 @@ /* * @implemented */ +#undef ScsiPortConvertPhysicalAddressToUlong ULONG STDCALL ScsiPortConvertPhysicalAddressToUlong(IN SCSI_PHYSICAL_ADDRESS Address) { @@ -925,7 +926,7 @@ PortConfig->DemandMode = FALSE; PortConfig->MapBuffers = HwInitializationData->MapBuffers; PortConfig->NeedPhysicalAddresses = HwInitializationData->NeedPhysicalAddresses; - PortConfig->TaggedQueuing = HwInitializationData->TaggedQueueing; + PortConfig->TaggedQueuing = HwInitializationData->TaggedQueuing; PortConfig->AutoRequestSense = HwInitializationData->AutoRequestSense; PortConfig->MultipleRequestPerLu = HwInitializationData->MultipleRequestPerLu; PortConfig->ReceiveEvent = HwInitializationData->ReceiveEvent; @@ -937,7 +938,7 @@ PortConfig->SrbExtensionSize = HwInitializationData->SrbExtensionSize; PortConfig->SpecificLuExtensionSize = HwInitializationData->SpecificLuExtensionSize; - PortConfig->AccessRanges = (PACCESS_RANGE)(PortConfig + 1); + PortConfig->AccessRanges = (ACCESS_RANGE(*)[])(PortConfig + 1); /* Search for matching PCI device */ if ((HwInitializationData->AdapterInterfaceType == PCIBus) && @@ -1458,9 +1459,9 @@ for (i = 0; i < PortConfig->NumberOfAccessRanges; i++) { - PortConfig->AccessRanges[i].RangeStart.QuadPart = + (*PortConfig->AccessRanges)[i].RangeStart.QuadPart = PciConfig.u.type0.BaseAddresses[i] & PCI_ADDRESS_IO_ADDRESS_MASK; - if (PortConfig->AccessRanges[i].RangeStart.QuadPart != 0) + if ((*PortConfig->AccessRanges)[i].RangeStart.QuadPart != 0) { RangeLength = (ULONG)-1; HalSetBusDataByOffset (PCIConfiguration, @@ -1485,9 +1486,9 @@ sizeof(ULONG)); if (RangeLength != 0) { - PortConfig->AccessRanges[i].RangeLength = + (*PortConfig->AccessRanges)[i].RangeLength = -(RangeLength & PCI_ADDRESS_IO_ADDRESS_MASK); - PortConfig->AccessRanges[i].RangeInMemory = + (*PortConfig->AccessRanges)[i].RangeInMemory = !(PciConfig.u.type0.BaseAddresses[i] & PCI_ADDRESS_IO_SPACE); DPRINT("RangeStart 0x%lX RangeLength 0x%lX RangeInMemory %s\n", @@ -2470,7 +2471,7 @@ } /* Set 'IOAddress' (REG_DWORD) value (NT4 only) */ - UlongData = ScsiPortConvertPhysicalAddressToUlong(DeviceExtension->PortConfig->Acces sRanges[0].RangeStart); + UlongData = ScsiPortConvertPhysicalAddressToUlong((*DeviceExtension->PortConfig->Acc essRanges)[0].RangeStart); DPRINT(" IOAddress = %lx\n", UlongData); RtlInitUnicodeString(&ValueName, L"IOAddress"); _____ Modified: trunk/reactos/drivers/storage/scsiport/scsiport.xml --- trunk/reactos/drivers/storage/scsiport/scsiport.xml 2005-06-18 20:29:31 UTC (rev 16059) +++ trunk/reactos/drivers/storage/scsiport/scsiport.xml 2005-06-18 20:55:09 UTC (rev 16060) @@ -1,6 +1,7 @@ <module name="scsiport" type="kernelmodedriver" installbase="system32/drivers" installname="scsiport.sys"> <bootstrap base="reactos" /> <define name="__USE_W32API" /> + <define name="_SCSIPORT_" /> <importlibrary definition="scsiport.def" /> <include base="scsiport">.</include> <library>ntoskrnl</library> _____ Deleted: trunk/reactos/include/ddk/scsi.h --- trunk/reactos/include/ddk/scsi.h 2005-06-18 20:29:31 UTC (rev 16059) +++ trunk/reactos/include/ddk/scsi.h 2005-06-18 20:55:09 UTC (rev 16060) @@ -1,1306 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: services/storage/include/scsi.h - * PURPOSE: SCSI class driver definitions - * PROGRAMMER: Eric Kohl (ekohl(a)rz-online.de) - */ - -#ifndef __STORAGE_INCLUDE_SCSI_H -#define __STORAGE_INCLUDE_SCSI_H - - -/* Command Descriptor Block */ - -typedef union _CDB -{ - /* Generic 6-Byte CDB */ - struct _CDB6GENERIC - { - UCHAR OperationCode; - UCHAR Immediate:1; - UCHAR CommandUniqueBits:4; - UCHAR LogicalUnitNumber:3; - UCHAR CommandUniqueBytes[3]; - UCHAR Link:1; - UCHAR Flag:1; - UCHAR Reserved:4; - UCHAR VendorUnique:2; - } CDB6GENERIC, *PCDB6GENERIC; - - /* Standard 6-byte CDB */ - struct _CDB6READWRITE - { - UCHAR OperationCode; - UCHAR LogicalBlockMsb1:5; - UCHAR LogicalUnitNumber:3; - UCHAR LogicalBlockMsb0; - UCHAR LogicalBlockLsb; - UCHAR TransferBlocks; - UCHAR Control; - } CDB6READWRITE, *PCDB6READWRITE; - - /* SCSI Inquiry CDB */ - struct _CDB6INQUIRY - { - UCHAR OperationCode; - UCHAR Reserved1:5; - UCHAR LogicalUnitNumber:3; - UCHAR PageCode; - UCHAR IReserved; - UCHAR AllocationLength; - UCHAR Control; - } CDB6INQUIRY, *PCDB6INQUIRY; - - /* SCSI Format CDB */ - struct _CDB6FORMAT - { - UCHAR OperationCode; - UCHAR FormatControl:5; - UCHAR LogicalUnitNumber:3; - UCHAR FReserved1; - UCHAR InterleaveMsb; - UCHAR InterleaveLsb; - UCHAR FReserved2; - } CDB6FORMAT, *PCDB6FORMAT; - - /* Standard 10-byte CDB */ - struct _CDB10 - { - UCHAR OperationCode; - UCHAR RelativeAddress:1; - UCHAR Reserved1:2; - UCHAR ForceUnitAccess:1; - UCHAR DisablePageOut:1; - UCHAR LogicalUnitNumber:3; - UCHAR LogicalBlockByte0; - UCHAR LogicalBlockByte1; - UCHAR LogicalBlockByte2; - UCHAR LogicalBlockByte3; - UCHAR Reserved2; - UCHAR TransferBlocksMsb; - UCHAR TransferBlocksLsb; - UCHAR Control; - } CDB10, *PCDB10; - - /* CD Rom Audio CDBs */ - struct _PAUSE_RESUME - { - UCHAR OperationCode; - UCHAR Reserved1:5; - UCHAR LogicalUnitNumber:3; - UCHAR Reserved2[6]; - UCHAR Action; - UCHAR Control; - } PAUSE_RESUME, *PPAUSE_RESUME; - - /* Read Table of Contents */ - struct _READ_TOC - { - UCHAR OperationCode; - UCHAR Reserved0:1; - UCHAR Msf:1; - UCHAR Reserved1:3; - UCHAR LogicalUnitNumber:3; - UCHAR Reserved2[4]; - UCHAR StartingTrack; - UCHAR AllocationLength[2]; - UCHAR Control:6; - UCHAR Format:2; - } READ_TOC, *PREAD_TOC; - - struct _PLAY_AUDIO_MSF - { - UCHAR OperationCode; - UCHAR Reserved1:5; - UCHAR LogicalUnitNumber:3; - UCHAR Reserved2; - UCHAR StartingM; - UCHAR StartingS; - UCHAR StartingF; - UCHAR EndingM; - UCHAR EndingS; - UCHAR EndingF; - UCHAR Control; - } PLAY_AUDIO_MSF, *PPLAY_AUDIO_MSF; - - /* Read SubChannel Data */ - struct _SUBCHANNEL - { - UCHAR OperationCode; - UCHAR Reserved0:1; - UCHAR Msf:1; - UCHAR Reserved1:3; - UCHAR LogicalUnitNumber:3; - UCHAR Reserved2:6; - UCHAR SubQ:1; - UCHAR Reserved3:1; - UCHAR Format; - UCHAR Reserved4[2]; - UCHAR TrackNumber; - UCHAR AllocationLength[2]; - UCHAR Control; - } SUBCHANNEL, *PSUBCHANNEL; - - /* Read CD. Used by Atapi for raw sector reads. */ - struct _READ_CD - { - UCHAR OperationCode; - UCHAR Reserved0:2; - UCHAR ExpectedSectorType:3; - UCHAR Reserved1:3; - UCHAR StartingLBA[4]; - UCHAR TransferBlocks[3]; - UCHAR Reserved2:1; - UCHAR ErrorFlags:2; - UCHAR IncludeEDC:1; - UCHAR IncludeUserData:1; - UCHAR HeaderCode:2; - UCHAR IncludeSyncData:1; - UCHAR SubChannelSelection:3; - UCHAR Reserved3:5; - UCHAR Reserved4; - } READ_CD, *PREAD_CD; - - /* Plextor Read CD-DA */ - struct _PLXTR_READ_CDDA - { - UCHAR OperationCode; - UCHAR Reserved0:5; - UCHAR LogicalUnitNumber:3; - UCHAR LogicalBlockByte0; - UCHAR LogicalBlockByte1; - UCHAR LogicalBlockByte2; - UCHAR LogicalBlockByte3; - UCHAR TransferBlockByte0; - UCHAR TransferBlockByte1; - UCHAR TransferBlockByte2; - UCHAR TransferBlockByte3; - UCHAR SubCode; - UCHAR Control; - } PLXTR_READ_CDDA, *PPLXTR_READ_CDDA; - - /* NEC Read CD-DA */ - struct _NEC_READ_CDDA - { - UCHAR OperationCode; - UCHAR Reserved0; - UCHAR LogicalBlockByte0; - UCHAR LogicalBlockByte1; - UCHAR LogicalBlockByte2; - UCHAR LogicalBlockByte3; - UCHAR Reserved1; - UCHAR TransferBlockByte0; - UCHAR TransferBlockByte1; - UCHAR Control; - } NEC_READ_CDDA, *PNEC_READ_CDDA; - - /* Mode sense */ - struct _MODE_SENSE - { - UCHAR OperationCode; - UCHAR Reserved1:3; - UCHAR Dbd:1; - UCHAR Reserved2:1; - UCHAR LogicalUnitNumber:3; - UCHAR PageCode:6; - UCHAR Pc:2; - UCHAR Reserved3; - UCHAR AllocationLength; - UCHAR Control; - } MODE_SENSE, *PMODE_SENSE; - - struct _MODE_SENSE10 - { - UCHAR OperationCode; - UCHAR Reserved1:3; - UCHAR Dbd:1; - UCHAR Reserved2:1; - UCHAR LogicalUnitNumber:3; - UCHAR PageCode:6; - UCHAR Pc:2; - UCHAR Reserved3[4]; - UCHAR AllocationLength[2]; - UCHAR Control; - } MODE_SENSE10, *PMODE_SENSE10; - - /* Mode select */ - struct _MODE_SELECT - { - UCHAR OperationCode; - UCHAR SPBit:1; - UCHAR Reserved1:3; - UCHAR PFBit:1; - UCHAR LogicalUnitNumber:3; - UCHAR Reserved2[2]; - UCHAR ParameterListLength; - UCHAR Control; - } MODE_SELECT, *PMODE_SELECT; - - struct _MODE_SELECT10 - { - UCHAR OperationCode; - UCHAR SPBit:1; - UCHAR Reserved1:3; - UCHAR PFBit:1; - UCHAR LogicalUnitNumber:3; - UCHAR Reserved2[5]; - UCHAR ParameterListLength[2]; - UCHAR Control; - } MODE_SELECT10, *PMODE_SELECT10; - - struct _LOCATE - { - UCHAR OperationCode; - UCHAR Immediate:1; - UCHAR CPBit:1; - UCHAR BTBit:1; - UCHAR Reserved1:2; - UCHAR LogicalUnitNumber:3; - UCHAR Reserved3; - UCHAR LogicalBlockAddress[4]; - UCHAR Reserved4; - UCHAR Partition; - UCHAR Control; - } LOCATE, *PLOCATE; - - struct _LOGSENSE - { - UCHAR OperationCode; - UCHAR SPBit:1; - UCHAR PPCBit:1; - UCHAR Reserved1:3; - UCHAR LogicalUnitNumber:3; - UCHAR PageCode:6; - UCHAR PCBit:2; - UCHAR Reserved2; - UCHAR Reserved3; - UCHAR ParameterPointer[2]; /* [0]=MSB, [1]=LSB */ - UCHAR AllocationLength[2]; /* [0]=MSB, [1]=LSB */ - UCHAR Control; - } LOGSENSE, *PLOGSENSE; - - struct _PRINT - { - UCHAR OperationCode; - UCHAR Reserved:5; - UCHAR LogicalUnitNumber:3; - UCHAR TransferLength[3]; - UCHAR Control; - } PRINT, *PPRINT; - - struct _SEEK - { - UCHAR OperationCode; - UCHAR Reserved1:5; - UCHAR LogicalUnitNumber:3; - UCHAR LogicalBlockAddress[4]; - UCHAR Reserved2[3]; - UCHAR Control; - } SEEK, *PSEEK; - - struct _ERASE - { - UCHAR OperationCode; - UCHAR Long:1; - UCHAR Immediate:1; - UCHAR Reserved1:3; - UCHAR LogicalUnitNumber:3; - UCHAR Reserved2[3]; - UCHAR Control; - } ERASE, *PERASE; - - struct _START_STOP - { - UCHAR OperationCode; - UCHAR Immediate:1; - UCHAR Reserved1:4; - UCHAR LogicalUnitNumber:3; - UCHAR Reserved2[2]; - UCHAR Start:1; - UCHAR LoadEject:1; - UCHAR Reserved3:6; - UCHAR Control; - } START_STOP, *PSTART_STOP; - - struct _MEDIA_REMOVAL - { - UCHAR OperationCode; - UCHAR Reserved1:5; - UCHAR LogicalUnitNumber:3; - UCHAR Reserved2[2]; - UCHAR Prevent; - UCHAR Control; - } MEDIA_REMOVAL, *PMEDIA_REMOVAL; - - /* Tape CDBs */ - struct _SEEK_BLOCK - { - UCHAR OperationCode; - UCHAR Immediate:1; - UCHAR Reserved1:7; - UCHAR BlockAddress[3]; - UCHAR Link:1; - UCHAR Flag:1; - UCHAR Reserved2:4; - UCHAR VendorUnique:2; - } SEEK_BLOCK, *PSEEK_BLOCK; - - struct _REQUEST_BLOCK_ADDRESS - { - UCHAR OperationCode; - UCHAR Reserved1[3]; - UCHAR AllocationLength; - UCHAR Link:1; - UCHAR Flag:1; - UCHAR Reserved2:4; - UCHAR VendorUnique:2; - } REQUEST_BLOCK_ADDRESS, *PREQUEST_BLOCK_ADDRESS; - - struct _PARTITION - { - UCHAR OperationCode; - UCHAR Immediate:1; - UCHAR Sel:1; - UCHAR PartitionSelect:6; - UCHAR Reserved1[3]; - UCHAR Control; - } PARTITION, *PPARTITION; - - struct _WRITE_TAPE_MARKS - { - UCHAR OperationCode; - UCHAR Immediate:1; - UCHAR WriteSetMarks:1; - UCHAR Reserved:3; - UCHAR LogicalUnitNumber:3; - UCHAR TransferLength[3]; - UCHAR Control; - } WRITE_TAPE_MARKS, *PWRITE_TAPE_MARKS; - - struct _SPACE_TAPE_MARKS - { - UCHAR OperationCode; - UCHAR Code:3; - UCHAR Reserved:2; - UCHAR LogicalUnitNumber:3; - UCHAR NumMarksMSB ; - UCHAR NumMarks; - UCHAR NumMarksLSB; - union - { - UCHAR value; - struct - { - UCHAR Link:1; - UCHAR Flag:1; - UCHAR Reserved:4; - UCHAR VendorUnique:2; - } Fields; - } Byte6; - } SPACE_TAPE_MARKS, *PSPACE_TAPE_MARKS; - - /* Read tape position */ - struct _READ_POSITION - { - UCHAR Operation; - UCHAR BlockType:1; - UCHAR Reserved1:4; - UCHAR Lun:3; - UCHAR Reserved2[7]; - UCHAR Control; - } READ_POSITION, *PREAD_POSITION; - - /* ReadWrite for Tape */ - struct _CDB6READWRITETAPE - { - UCHAR OperationCode; - UCHAR VendorSpecific:5; - UCHAR Reserved:3; - UCHAR TransferLenMSB; - UCHAR TransferLen; - UCHAR TransferLenLSB; - UCHAR Link:1; - UCHAR Flag:1; - UCHAR Reserved1:4; - UCHAR VendorUnique:2; - } CDB6READWRITETAPE, *PCDB6READWRITETAPE; - - /* Atapi 2.5 Changer 12-byte CDBs */ - struct _LOAD_UNLOAD - { - UCHAR OperationCode; - UCHAR Immediate:1; - UCHAR Reserved1:7; - UCHAR Reserved2[2]; - UCHAR Start:1; - UCHAR LoadEject:1; - UCHAR Reserved3:6; - UCHAR Reserved4[3]; - UCHAR Slot; - UCHAR Reserved5[3]; - } LOAD_UNLOAD, *PLOAD_UNLOAD; - - struct _MECH_STATUS - { - UCHAR OperationCode; - UCHAR Reserved1[7]; - UCHAR AllocationLength[2]; - UCHAR Reserved2[2]; - } MECH_STATUS, *PMECH_STATUS; -} CDB, *PCDB; - - -/* Command Descriptor Block constants */ - -#define CDB6GENERIC_LENGTH 6 -#define CDB10GENERIC_LENGTH 10 -#define CDB12GENERIC_LENGTH 12 - -#define SETBITON 1 -#define SETBITOFF 0 - - -/* Mode Sense/Select page constants */ - -#define MODE_PAGE_ERROR_RECOVERY 0x01 -#define MODE_PAGE_DISCONNECT 0x02 -#define MODE_PAGE_FORMAT_DEVICE 0x03 -#define MODE_PAGE_RIGID_GEOMETRY 0x04 -#define MODE_PAGE_FLEXIBILE 0x05 -#define MODE_PAGE_VERIFY_ERROR 0x07 -#define MODE_PAGE_CACHING 0x08 -#define MODE_PAGE_PERIPHERAL 0x09 -#define MODE_PAGE_CONTROL 0x0A -#define MODE_PAGE_MEDIUM_TYPES 0x0B -#define MODE_PAGE_NOTCH_PARTITION 0x0C -#define MODE_SENSE_RETURN_ALL 0x3f -#define MODE_SENSE_CURRENT_VALUES 0x00 -#define MODE_SENSE_CHANGEABLE_VALUES 0x40 -#define MODE_SENSE_DEFAULT_VAULES 0x80 -#define MODE_SENSE_SAVED_VALUES 0xc0 -#define MODE_PAGE_DEVICE_CONFIG 0x10 -#define MODE_PAGE_MEDIUM_PARTITION 0x11 -#define MODE_PAGE_DATA_COMPRESS 0x0f -#define MODE_PAGE_CAPABILITIES 0x2A - - -/* SCSI CDB operation codes */ - -#define SCSIOP_TEST_UNIT_READY 0x00 -#define SCSIOP_REZERO_UNIT 0x01 -#define SCSIOP_REWIND 0x01 -#define SCSIOP_REQUEST_BLOCK_ADDR 0x02 -#define SCSIOP_REQUEST_SENSE 0x03 -#define SCSIOP_FORMAT_UNIT 0x04 -#define SCSIOP_READ_BLOCK_LIMITS 0x05 -#define SCSIOP_REASSIGN_BLOCKS 0x07 -#define SCSIOP_READ6 0x08 -#define SCSIOP_RECEIVE 0x08 -#define SCSIOP_WRITE6 0x0A -#define SCSIOP_PRINT 0x0A -#define SCSIOP_SEND 0x0A -#define SCSIOP_SEEK6 0x0B -#define SCSIOP_TRACK_SELECT 0x0B -#define SCSIOP_SLEW_PRINT 0x0B -#define SCSIOP_SEEK_BLOCK 0x0C -#define SCSIOP_PARTITION 0x0D -#define SCSIOP_READ_REVERSE 0x0F -#define SCSIOP_WRITE_FILEMARKS 0x10 -#define SCSIOP_FLUSH_BUFFER 0x10 -#define SCSIOP_SPACE 0x11 -#define SCSIOP_INQUIRY 0x12 -#define SCSIOP_VERIFY6 0x13 -#define SCSIOP_RECOVER_BUF_DATA 0x14 -#define SCSIOP_MODE_SELECT 0x15 -#define SCSIOP_RESERVE_UNIT 0x16 -#define SCSIOP_RELEASE_UNIT 0x17 -#define SCSIOP_COPY 0x18 -#define SCSIOP_ERASE 0x19 -#define SCSIOP_MODE_SENSE 0x1A -#define SCSIOP_START_STOP_UNIT 0x1B -#define SCSIOP_STOP_PRINT 0x1B -#define SCSIOP_LOAD_UNLOAD 0x1B -#define SCSIOP_RECEIVE_DIAGNOSTIC 0x1C -#define SCSIOP_SEND_DIAGNOSTIC 0x1D -#define SCSIOP_MEDIUM_REMOVAL 0x1E -#define SCSIOP_READ_CAPACITY 0x25 -#define SCSIOP_READ 0x28 -#define SCSIOP_WRITE 0x2A -#define SCSIOP_SEEK 0x2B -#define SCSIOP_LOCATE 0x2B -#define SCSIOP_WRITE_VERIFY 0x2E -#define SCSIOP_VERIFY 0x2F -#define SCSIOP_SEARCH_DATA_HIGH 0x30 -#define SCSIOP_SEARCH_DATA_EQUAL 0x31 -#define SCSIOP_SEARCH_DATA_LOW 0x32 -#define SCSIOP_SET_LIMITS 0x33 -#define SCSIOP_READ_POSITION 0x34 -#define SCSIOP_SYNCHRONIZE_CACHE 0x35 -#define SCSIOP_COMPARE 0x39 -#define SCSIOP_COPY_COMPARE 0x3A -#define SCSIOP_WRITE_DATA_BUFF 0x3B -#define SCSIOP_READ_DATA_BUFF 0x3C -#define SCSIOP_CHANGE_DEFINITION 0x40 -#define SCSIOP_READ_SUB_CHANNEL 0x42 -#define SCSIOP_READ_TOC 0x43 -#define SCSIOP_READ_HEADER 0x44 -#define SCSIOP_PLAY_AUDIO 0x45 -#define SCSIOP_PLAY_AUDIO_MSF 0x47 -#define SCSIOP_PLAY_TRACK_INDEX 0x48 -#define SCSIOP_PLAY_TRACK_RELATIVE 0x49 -#define SCSIOP_PAUSE_RESUME 0x4B -#define SCSIOP_LOG_SELECT 0x4C -#define SCSIOP_LOG_SENSE 0x4D -#define SCSIOP_MODE_SELECT10 0x55 -#define SCSIOP_MODE_SENSE10 0x5A -#define SCSIOP_LOAD_UNLOAD_SLOT 0xA6 -#define SCSIOP_MECHANISM_STATUS 0xBD -#define SCSIOP_READ_CD 0xBE - -/* - * If the IMMED bit is 1, status is returned as soon - * as the operation is initiated. If the IMMED bit - * is 0, status is not returned until the operation - * is completed. - */ - -#define CDB_RETURN_ON_COMPLETION 0 -#define CDB_RETURN_IMMEDIATE 1 - - -/* - * CDB Force media access used in extended read and write commands. - */ - -#define CDB_FORCE_MEDIA_ACCESS 0x08 - -/* - * Denon CD ROM operation codes - */ - -#define SCSIOP_DENON_EJECT_DISC 0xE6 -#define SCSIOP_DENON_STOP_AUDIO 0xE7 -#define SCSIOP_DENON_PLAY_AUDIO 0xE8 -#define SCSIOP_DENON_READ_TOC 0xE9 -#define SCSIOP_DENON_READ_SUBCODE 0xEB - -/* - * SCSI Bus Messages - */ - -#define SCSIMESS_ABORT 0x06 -#define SCSIMESS_ABORT_WITH_TAG 0x0D -#define SCSIMESS_BUS_DEVICE_RESET 0X0C -#define SCSIMESS_CLEAR_QUEUE 0X0E -#define SCSIMESS_COMMAND_COMPLETE 0X00 -#define SCSIMESS_DISCONNECT 0X04 -#define SCSIMESS_EXTENDED_MESSAGE 0X01 -#define SCSIMESS_IDENTIFY 0X80 -#define SCSIMESS_IDENTIFY_WITH_DISCON 0XC0 -#define SCSIMESS_IGNORE_WIDE_RESIDUE 0X23 -#define SCSIMESS_INITIATE_RECOVERY 0X0F -#define SCSIMESS_INIT_DETECTED_ERROR 0X05 -#define SCSIMESS_LINK_CMD_COMP 0X0A -#define SCSIMESS_LINK_CMD_COMP_W_FLAG 0X0B -#define SCSIMESS_MESS_PARITY_ERROR 0X09 -#define SCSIMESS_MESSAGE_REJECT 0X07 -#define SCSIMESS_NO_OPERATION 0X08 -#define SCSIMESS_HEAD_OF_QUEUE_TAG 0X21 -#define SCSIMESS_ORDERED_QUEUE_TAG 0X22 -#define SCSIMESS_SIMPLE_QUEUE_TAG 0X20 -#define SCSIMESS_RELEASE_RECOVERY 0X10 -#define SCSIMESS_RESTORE_POINTERS 0X03 -#define SCSIMESS_SAVE_DATA_POINTER 0X02 -#define SCSIMESS_TERMINATE_IO_PROCESS 0X11 - -/* - * SCSI Extended Message operation codes - */ - -#define SCSIMESS_MODIFY_DATA_POINTER 0X00 -#define SCSIMESS_SYNCHRONOUS_DATA_REQ 0X01 -#define SCSIMESS_WIDE_DATA_REQUEST 0X03 - -/* - * SCSI Extended Message Lengths - */ - -#define SCSIMESS_MODIFY_DATA_LENGTH 5 -#define SCSIMESS_SYNCH_DATA_LENGTH 3 -#define SCSIMESS_WIDE_DATA_LENGTH 2 - -/* - * SCSI extended message structure - */ - -#pragma pack (1) -typedef struct _SCSI_EXTENDED_MESSAGE -{ - UCHAR InitialMessageCode; - UCHAR MessageLength; - UCHAR MessageType; - union _EXTENDED_ARGUMENTS - { - struct - { - UCHAR Modifier[4]; - } Modify; - - struct - { - UCHAR TransferPeriod; - UCHAR ReqAckOffset; - } Synchronous; - - struct - { - UCHAR Width; - } Wide; - } ExtendedArguments; -}SCSI_EXTENDED_MESSAGE, *PSCSI_EXTENDED_MESSAGE; -#pragma pack () - - -/* SCSI bus status codes */ - -#define SCSISTAT_GOOD 0x00 -#define SCSISTAT_CHECK_CONDITION 0x02 -#define SCSISTAT_CONDITION_MET 0x04 -#define SCSISTAT_BUSY 0x08 -#define SCSISTAT_INTERMEDIATE 0x10 -#define SCSISTAT_INTERMEDIATE_COND_MET 0x14 -#define SCSISTAT_RESERVATION_CONFLICT 0x18 -#define SCSISTAT_COMMAND_TERMINATED 0x22 -#define SCSISTAT_QUEUE_FULL 0x28 - -/* - * Enable Vital Product Data Flag (EVPD) - * used with INQUIRY command. - */ - -#define CDB_INQUIRY_EVPD 0x01 - -/* - * Defines for format CDB - */ - -#define LUN0_FORMAT_SAVING_DEFECT_LIST 0 -#define USE_DEFAULTMSB 0 -#define USE_DEFAULTLSB 0 - -#define START_UNIT_CODE 0x01 -#define STOP_UNIT_CODE 0x00 - - - -// -// Inquiry buffer structure. This is the data returned from the target -// after it receives an inquiry. -// -// This structure may be extended by the number of bytes specified -// in the field AdditionalLength. The defined size constant only -// includes fields through ProductRevisionLevel. -// -// The NT SCSI drivers are only interested in the first 36 bytes of data. -// - -#define INQUIRYDATABUFFERSIZE 36 - - -typedef struct _INQUIRYDATA -{ - UCHAR DeviceType:5; - UCHAR DeviceTypeQualifier:3; - UCHAR DeviceTypeModifier:7; - UCHAR RemovableMedia:1; - UCHAR Versions; - UCHAR ResponseDataFormat; - UCHAR AdditionalLength; - UCHAR Reserved[2]; - UCHAR SoftReset:1; - UCHAR CommandQueue:1; - UCHAR Reserved2:1; - UCHAR LinkedCommands:1; - UCHAR Synchronous:1; - UCHAR Wide16Bit:1; - UCHAR Wide32Bit:1; - UCHAR RelativeAddressing:1; - UCHAR VendorId[8]; - UCHAR ProductId[16]; - UCHAR ProductRevisionLevel[4]; - UCHAR VendorSpecific[20]; - UCHAR Reserved3[40]; -} INQUIRYDATA, *PINQUIRYDATA; - -// -// Inquiry defines. Used to interpret data returned from target as result -// of inquiry command. -// -// DeviceType field -// - -#define DIRECT_ACCESS_DEVICE 0x00 // disks -#define SEQUENTIAL_ACCESS_DEVICE 0x01 // tapes -#define PRINTER_DEVICE 0x02 // printers -#define PROCESSOR_DEVICE 0x03 // scanners, printers, etc -#define WRITE_ONCE_READ_MULTIPLE_DEVICE 0x04 // worms -#define READ_ONLY_DIRECT_ACCESS_DEVICE 0x05 // cdroms -#define SCANNER_DEVICE 0x06 // scanners -#define OPTICAL_DEVICE 0x07 // optical disks -#define MEDIUM_CHANGER 0x08 // jukebox -#define COMMUNICATION_DEVICE 0x09 // network -#define LOGICAL_UNIT_NOT_PRESENT_DEVICE 0x7F -#define DEVICE_QUALIFIER_NOT_SUPPORTED 0x03 - -// -// DeviceTypeQualifier field -// - -#define DEVICE_CONNECTED 0x00 - - -/* Sense Data Format */ - -typedef struct _SENSE_DATA -{ - UCHAR ErrorCode:7; - UCHAR Valid:1; - UCHAR SegmentNumber; - UCHAR SenseKey:4; - UCHAR Reserved:1; - UCHAR IncorrectLength:1; - UCHAR EndOfMedia:1; - UCHAR FileMark:1; - UCHAR Information[4]; - UCHAR AdditionalSenseLength; - UCHAR CommandSpecificInformation[4]; - UCHAR AdditionalSenseCode; - UCHAR AdditionalSenseCodeQualifier; - UCHAR FieldReplaceableUnitCode; - UCHAR SenseKeySpecific[3]; -} SENSE_DATA, *PSENSE_DATA; - - -/* Default request sense buffer size */ - -#define SENSE_BUFFER_SIZE 18 - -/* Sense codes */ - -#define SCSI_SENSE_NO_SENSE 0x00 -#define SCSI_SENSE_RECOVERED_ERROR 0x01 -#define SCSI_SENSE_NOT_READY 0x02 -#define SCSI_SENSE_MEDIUM_ERROR 0x03 -#define SCSI_SENSE_HARDWARE_ERROR 0x04 -#define SCSI_SENSE_ILLEGAL_REQUEST 0x05 -#define SCSI_SENSE_UNIT_ATTENTION 0x06 -#define SCSI_SENSE_DATA_PROTECT 0x07 -#define SCSI_SENSE_BLANK_CHECK 0x08 -#define SCSI_SENSE_UNIQUE 0x09 -#define SCSI_SENSE_COPY_ABORTED 0x0A -#define SCSI_SENSE_ABORTED_COMMAND 0x0B -#define SCSI_SENSE_EQUAL 0x0C -#define SCSI_SENSE_VOL_OVERFLOW 0x0D -#define SCSI_SENSE_MISCOMPARE 0x0E -#define SCSI_SENSE_RESERVED 0x0F - -/* Additional tape bit */ - -#define SCSI_ILLEGAL_LENGTH 0x20 -#define SCSI_EOM 0x40 -#define SCSI_FILE_MARK 0x80 - -/* Additional Sense codes */ - -#define SCSI_ADSENSE_NO_SENSE 0x00 -#define SCSI_ADSENSE_LUN_NOT_READY 0x04 -#define SCSI_ADSENSE_ILLEGAL_COMMAND 0x20 -#define SCSI_ADSENSE_ILLEGAL_BLOCK 0x21 -#define SCSI_ADSENSE_INVALID_LUN 0x25 -#define SCSI_ADSENSE_INVALID_CDB 0x24 -#define SCSI_ADSENSE_MUSIC_AREA 0xA0 -#define SCSI_ADSENSE_DATA_AREA 0xA1 -#define SCSI_ADSENSE_VOLUME_OVERFLOW 0xA7 - -#define SCSI_ADSENSE_NO_MEDIA_IN_DEVICE 0x3a -#define SCSI_ADWRITE_PROTECT 0x27 -#define SCSI_ADSENSE_MEDIUM_CHANGED 0x28 -#define SCSI_ADSENSE_BUS_RESET 0x29 -#define SCSI_ADSENSE_TRACK_ERROR 0x14 -#define SCSI_ADSENSE_SEEK_ERROR 0x15 -#define SCSI_ADSENSE_REC_DATA_NOECC 0x17 -#define SCSI_ADSENSE_REC_DATA_ECC 0x18 - -/* Additional sense code qualifier */ - -#define SCSI_SENSEQ_FORMAT_IN_PROGRESS 0x04 -#define SCSI_SENSEQ_INIT_COMMAND_REQUIRED 0x02 -#define SCSI_SENSEQ_MANUAL_INTERVENTION_REQUIRED 0x03 -#define SCSI_SENSEQ_BECOMING_READY 0x01 -#define SCSI_SENSEQ_FILEMARK_DETECTED 0x01 -#define SCSI_SENSEQ_SETMARK_DETECTED 0x03 -#define SCSI_SENSEQ_END_OF_MEDIA_DETECTED 0x02 -#define SCSI_SENSEQ_BEGINNING_OF_MEDIA_DETECTED 0x04 - -/* SCSI IO Device Control Codes */ - -#define FILE_DEVICE_SCSI 0x0000001b - -#define IOCTL_SCSI_EXECUTE_IN ((FILE_DEVICE_SCSI << 16) + 0x0011) -#define IOCTL_SCSI_EXECUTE_OUT ((FILE_DEVICE_SCSI << 16) + 0x0012) -#define IOCTL_SCSI_EXECUTE_NONE ((FILE_DEVICE_SCSI << 16) + 0x0013) - -/* SMART support in atapi */ - -#define IOCTL_SCSI_MINIPORT_SMART_VERSION ((FILE_DEVICE_SCSI << 16) + 0x0500) -#define IOCTL_SCSI_MINIPORT_IDENTIFY ((FILE_DEVICE_SCSI << 16) + 0x0501) -#define IOCTL_SCSI_MINIPORT_READ_SMART_ATTRIBS ((FILE_DEVICE_SCSI << 16) + 0x0502) -#define IOCTL_SCSI_MINIPORT_READ_SMART_THRESHOLDS ((FILE_DEVICE_SCSI << 16) + 0x0503) -#define IOCTL_SCSI_MINIPORT_ENABLE_SMART ((FILE_DEVICE_SCSI << 16) + 0x0504) -#define IOCTL_SCSI_MINIPORT_DISABLE_SMART ((FILE_DEVICE_SCSI << 16) + 0x0505) -#define IOCTL_SCSI_MINIPORT_RETURN_STATUS ((FILE_DEVICE_SCSI << 16) + 0x0506) -#define IOCTL_SCSI_MINIPORT_ENABLE_DISABLE_AUTOSAVE ((FILE_DEVICE_SCSI << 16) + 0x0507) [truncated at 1000 lines; 1126 more skipped]
19 years, 6 months
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
65
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Results per page:
10
25
50
100
200