mirror of https://github.com/PCSX2/pcsx2.git
cdvdgigaherz: Use Windows SDK headers
The rosddk headers are no longer necessary and have been removed.
This commit is contained in:
parent
f1b3d7d036
commit
7f3f6e96d8
|
@ -14,14 +14,9 @@
|
|||
*/
|
||||
|
||||
#include "CDVD.h"
|
||||
#pragma warning(disable:4200)
|
||||
#pragma pack(1)
|
||||
#include <winioctl.h>
|
||||
#include "rosddk/ntddcdvd.h"
|
||||
#include "rosddk/ntddcdrm.h"
|
||||
#include "rosddk/ntddscsi.h"
|
||||
#pragma warning(default:4200)
|
||||
#include <stddef.h>
|
||||
|
||||
#include <ntddcdrm.h>
|
||||
#include <cstddef>
|
||||
|
||||
#include "ReaderModules.h"
|
||||
#include "SectorConverters.h"
|
||||
|
|
|
@ -14,15 +14,12 @@
|
|||
*/
|
||||
|
||||
#include "../CDVD.h"
|
||||
#pragma warning(disable:4200)
|
||||
#pragma pack(1)
|
||||
|
||||
#include <winioctl.h>
|
||||
#include "rosddk/ntddcdvd.h"
|
||||
#include "rosddk/ntddcdrm.h"
|
||||
#include "rosddk/ntddscsi.h"
|
||||
#pragma warning(default:4200)
|
||||
#include <stddef.h>
|
||||
#include <intrin.h>
|
||||
#include <ntddcdvd.h>
|
||||
#include <ntddcdrm.h>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
|
||||
template<class T>
|
||||
bool ApiErrorCheck(T t,T okValue,bool cmpEq)
|
||||
|
@ -336,6 +333,12 @@ struct mycrap
|
|||
{
|
||||
DWORD shit;
|
||||
DVD_LAYER_DESCRIPTOR ld;
|
||||
// The IOCTL_DVD_READ_STRUCTURE expects a size of at least 22 bytes when
|
||||
// reading the dvd physical layer descriptor
|
||||
// 4 bytes header
|
||||
// 17 bytes for the layer descriptor
|
||||
// 1 byte of the media specific data for no reason whatsoever...
|
||||
UCHAR fixup;
|
||||
};
|
||||
|
||||
DVD_READ_STRUCTURE dvdrs;
|
||||
|
|
|
@ -117,10 +117,6 @@
|
|||
<ClInclude Include="..\ReaderModules.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="..\SectorConverters.h" />
|
||||
<ClInclude Include="rosddk\ntddcdrm.h" />
|
||||
<ClInclude Include="rosddk\ntddcdvd.h" />
|
||||
<ClInclude Include="rosddk\ntddscsi.h" />
|
||||
<ClInclude Include="rosddk\ntddstor.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="cdvdGigaherz.rc" />
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
<UniqueIdentifier>{6c12b075-7b05-42ce-8628-c668f325f4ce}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\rosddk">
|
||||
<UniqueIdentifier>{48ccf9e7-ebd6-41ff-bf33-0e964046bb00}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{a80698fd-3734-41c4-b7e8-6b96b34633e0}</UniqueIdentifier>
|
||||
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
|
||||
|
@ -62,18 +59,6 @@
|
|||
<ClInclude Include="..\SectorConverters.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rosddk\ntddcdrm.h">
|
||||
<Filter>Header Files\rosddk</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rosddk\ntddcdvd.h">
|
||||
<Filter>Header Files\rosddk</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rosddk\ntddscsi.h">
|
||||
<Filter>Header Files\rosddk</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rosddk\ntddstor.h">
|
||||
<Filter>Header Files\rosddk</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="cdvdGigaherz.rc">
|
||||
|
|
|
@ -1,368 +0,0 @@
|
|||
/*
|
||||
* ntddcdrm.h
|
||||
*
|
||||
* CDROM IOCTL interface.
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* This file is in the public domain
|
||||
*/
|
||||
|
||||
#ifndef _NTDDCDRM_H_
|
||||
#define _NTDDCDRM_H_
|
||||
|
||||
#include "ntddstor.h"
|
||||
|
||||
#define _ANONYMOUS_UNION
|
||||
#define DUMMYUNIONNAME
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM
|
||||
|
||||
#define IOCTL_CDROM_CHECK_VERIFY \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_FIND_NEW_DEVICES \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_GET_CONTROL \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x000D, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_GET_DRIVE_GEOMETRY \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_GET_LAST_SESSION \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x000E, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_GET_VOLUME \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_PAUSE_AUDIO \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_PLAY_AUDIO_MSF \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_RAW_READ \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x000F, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_DISK_TYPE \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_READ_Q_CHANNEL \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_READ_TOC \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_READ_TOC_EX \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0015, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_RESUME_AUDIO \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_SEEK_AUDIO_MSF \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_SET_VOLUME \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x000A, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_SIMBAD \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x1003, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_STOP_AUDIO \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
|
||||
#define MAXIMUM_NUMBER_TRACKS 100
|
||||
#define MAXIMUM_CDROM_SIZE 804
|
||||
#define MINIMUM_CDROM_READ_TOC_EX_SIZE 2
|
||||
|
||||
typedef struct _TRACK_DATA {
|
||||
UCHAR Reserved;
|
||||
UCHAR Control : 4;
|
||||
UCHAR Adr : 4;
|
||||
UCHAR TrackNumber;
|
||||
UCHAR Reserved1;
|
||||
UCHAR Address[4];
|
||||
} TRACK_DATA, *PTRACK_DATA;
|
||||
|
||||
/* CDROM_DISK_DATA.DiskData flags */
|
||||
#define CDROM_DISK_AUDIO_TRACK 0x00000001
|
||||
#define CDROM_DISK_DATA_TRACK 0x00000002
|
||||
|
||||
typedef struct _CDROM_DISK_DATA {
|
||||
ULONG DiskData;
|
||||
} CDROM_DISK_DATA, *PCDROM_DISK_DATA;
|
||||
|
||||
typedef struct _CDROM_PLAY_AUDIO_MSF {
|
||||
UCHAR StartingM;
|
||||
UCHAR StartingS;
|
||||
UCHAR StartingF;
|
||||
UCHAR EndingM;
|
||||
UCHAR EndingS;
|
||||
UCHAR EndingF;
|
||||
} CDROM_PLAY_AUDIO_MSF, *PCDROM_PLAY_AUDIO_MSF;
|
||||
|
||||
/* CDROM_READ_TOC_EX.Format constants */
|
||||
#define CDROM_READ_TOC_EX_FORMAT_TOC 0x00
|
||||
#define CDROM_READ_TOC_EX_FORMAT_SESSION 0x01
|
||||
#define CDROM_READ_TOC_EX_FORMAT_FULL_TOC 0x02
|
||||
#define CDROM_READ_TOC_EX_FORMAT_PMA 0x03
|
||||
#define CDROM_READ_TOC_EX_FORMAT_ATIP 0x04
|
||||
#define CDROM_READ_TOC_EX_FORMAT_CDTEXT 0x05
|
||||
|
||||
typedef struct _CDROM_READ_TOC_EX {
|
||||
UCHAR Format : 4;
|
||||
UCHAR Reserved1 : 3;
|
||||
UCHAR Msf : 1;
|
||||
UCHAR SessionTrack;
|
||||
UCHAR Reserved2;
|
||||
UCHAR Reserved3;
|
||||
} CDROM_READ_TOC_EX, *PCDROM_READ_TOC_EX;
|
||||
|
||||
typedef struct _CDROM_SEEK_AUDIO_MSF {
|
||||
UCHAR M;
|
||||
UCHAR S;
|
||||
UCHAR F;
|
||||
} CDROM_SEEK_AUDIO_MSF, *PCDROM_SEEK_AUDIO_MSF;
|
||||
|
||||
/* CDROM_SUB_Q_DATA_FORMAT.Format constants */
|
||||
#define IOCTL_CDROM_SUB_Q_CHANNEL 0x00
|
||||
#define IOCTL_CDROM_CURRENT_POSITION 0x01
|
||||
#define IOCTL_CDROM_MEDIA_CATALOG 0x02
|
||||
#define IOCTL_CDROM_TRACK_ISRC 0x03
|
||||
|
||||
typedef struct _CDROM_SUB_Q_DATA_FORMAT {
|
||||
UCHAR Format;
|
||||
UCHAR Track;
|
||||
} CDROM_SUB_Q_DATA_FORMAT, *PCDROM_SUB_Q_DATA_FORMAT;
|
||||
|
||||
typedef struct _CDROM_TOC {
|
||||
UCHAR Length[2];
|
||||
UCHAR FirstTrack;
|
||||
UCHAR LastTrack;
|
||||
TRACK_DATA TrackData[MAXIMUM_NUMBER_TRACKS];
|
||||
} CDROM_TOC, *PCDROM_TOC;
|
||||
|
||||
#define CDROM_TOC_SIZE sizeof(CDROM_TOC)
|
||||
|
||||
typedef struct _CDROM_TOC_ATIP_DATA_BLOCK {
|
||||
UCHAR CdrwReferenceSpeed : 3;
|
||||
UCHAR Reserved3 : 1;
|
||||
UCHAR WritePower : 3;
|
||||
UCHAR True1 : 1;
|
||||
UCHAR Reserved4 : 6;
|
||||
UCHAR UnrestrictedUse : 1;
|
||||
UCHAR Reserved5 : 1;
|
||||
UCHAR A3Valid : 1;
|
||||
UCHAR A2Valid : 1;
|
||||
UCHAR A1Valid : 1;
|
||||
UCHAR Reserved6 : 3;
|
||||
UCHAR IsCdrw : 1;
|
||||
UCHAR True2 : 1;
|
||||
UCHAR Reserved7;
|
||||
UCHAR LeadInMsf[3];
|
||||
UCHAR Reserved8;
|
||||
UCHAR LeadOutMsf[3];
|
||||
UCHAR Reserved9;
|
||||
UCHAR A1Values[3];
|
||||
UCHAR Reserved10;
|
||||
UCHAR A2Values[3];
|
||||
UCHAR Reserved11;
|
||||
UCHAR A3Values[3];
|
||||
UCHAR Reserved12;
|
||||
} CDROM_TOC_ATIP_DATA_BLOCK, *PCDROM_TOC_ATIP_DATA_BLOCK;
|
||||
|
||||
typedef struct _CDROM_TOC_ATIP_DATA {
|
||||
UCHAR Length[2];
|
||||
UCHAR Reserved1;
|
||||
UCHAR Reserved2;
|
||||
CDROM_TOC_ATIP_DATA_BLOCK Descriptors[0];
|
||||
} CDROM_TOC_ATIP_DATA, *PCDROM_TOC_ATIP_DATA;
|
||||
|
||||
/* CDROM_TOC_CD_TEXT_DATA_BLOCK.PackType constants */
|
||||
#define CDROM_CD_TEXT_PACK_ALBUM_NAME 0x80
|
||||
#define CDROM_CD_TEXT_PACK_PERFORMER 0x81
|
||||
#define CDROM_CD_TEXT_PACK_SONGWRITER 0x82
|
||||
#define CDROM_CD_TEXT_PACK_COMPOSER 0x83
|
||||
#define CDROM_CD_TEXT_PACK_ARRANGER 0x84
|
||||
#define CDROM_CD_TEXT_PACK_MESSAGES 0x85
|
||||
#define CDROM_CD_TEXT_PACK_DISC_ID 0x86
|
||||
#define CDROM_CD_TEXT_PACK_GENRE 0x87
|
||||
#define CDROM_CD_TEXT_PACK_TOC_INFO 0x88
|
||||
#define CDROM_CD_TEXT_PACK_TOC_INFO2 0x89
|
||||
#define CDROM_CD_TEXT_PACK_UPC_EAN 0x8e
|
||||
#define CDROM_CD_TEXT_PACK_SIZE_INFO 0x8f
|
||||
|
||||
typedef struct _CDROM_TOC_CD_TEXT_DATA_BLOCK {
|
||||
UCHAR PackType;
|
||||
UCHAR TrackNumber : 7;
|
||||
UCHAR ExtensionFlag : 1;
|
||||
UCHAR SequenceNumber;
|
||||
UCHAR CharacterPosition : 4;
|
||||
UCHAR BlockNumber : 3;
|
||||
UCHAR Unicode : 1;
|
||||
_ANONYMOUS_UNION union {
|
||||
UCHAR Text[12];
|
||||
WCHAR WText[6];
|
||||
} DUMMYUNIONNAME;
|
||||
UCHAR CRC[2];
|
||||
} CDROM_TOC_CD_TEXT_DATA_BLOCK, *PCDROM_TOC_CD_TEXT_DATA_BLOCK;
|
||||
|
||||
typedef struct _CDROM_TOC_CD_TEXT_DATA {
|
||||
UCHAR Length[2];
|
||||
UCHAR Reserved1;
|
||||
UCHAR Reserved2;
|
||||
CDROM_TOC_CD_TEXT_DATA_BLOCK Descriptors[0];
|
||||
} CDROM_TOC_CD_TEXT_DATA, *PCDROM_TOC_CD_TEXT_DATA;
|
||||
|
||||
/* CDROM_TOC_FULL_TOC_DATA_BLOCK.Adr constants */
|
||||
#define ADR_NO_MODE_INFORMATION 0x0
|
||||
#define ADR_ENCODES_CURRENT_POSITION 0x1
|
||||
#define ADR_ENCODES_MEDIA_CATALOG 0x2
|
||||
#define ADR_ENCODES_ISRC 0x3
|
||||
|
||||
typedef struct _CDROM_TOC_FULL_TOC_DATA_BLOCK {
|
||||
UCHAR SessionNumber;
|
||||
UCHAR Control : 4;
|
||||
UCHAR Adr : 4;
|
||||
UCHAR Reserved1;
|
||||
UCHAR Point;
|
||||
UCHAR MsfExtra[3];
|
||||
UCHAR Zero;
|
||||
UCHAR Msf[3];
|
||||
} CDROM_TOC_FULL_TOC_DATA_BLOCK, *PCDROM_TOC_FULL_TOC_DATA_BLOCK;
|
||||
|
||||
typedef struct _CDROM_TOC_FULL_TOC_DATA {
|
||||
UCHAR Length[2];
|
||||
UCHAR FirstCompleteSession;
|
||||
UCHAR LastCompleteSession;
|
||||
CDROM_TOC_FULL_TOC_DATA_BLOCK Descriptors[0];
|
||||
} CDROM_TOC_FULL_TOC_DATA, *PCDROM_TOC_FULL_TOC_DATA;
|
||||
|
||||
typedef struct _CDROM_TOC_PMA_DATA {
|
||||
UCHAR Length[2];
|
||||
UCHAR Reserved1;
|
||||
UCHAR Reserved2;
|
||||
CDROM_TOC_FULL_TOC_DATA_BLOCK Descriptors[0];
|
||||
} CDROM_TOC_PMA_DATA, *PCDROM_TOC_PMA_DATA;
|
||||
|
||||
/* SUB_Q_HEADER.AudioStatus constants */
|
||||
#define AUDIO_STATUS_NOT_SUPPORTED 0x00
|
||||
#define AUDIO_STATUS_IN_PROGRESS 0x11
|
||||
#define AUDIO_STATUS_PAUSED 0x12
|
||||
#define AUDIO_STATUS_PLAY_COMPLETE 0x13
|
||||
#define AUDIO_STATUS_PLAY_ERROR 0x14
|
||||
#define AUDIO_STATUS_NO_STATUS 0x15
|
||||
|
||||
typedef struct _SUB_Q_HEADER {
|
||||
UCHAR Reserved;
|
||||
UCHAR AudioStatus;
|
||||
UCHAR DataLength[2];
|
||||
} SUB_Q_HEADER, *PSUB_Q_HEADER;
|
||||
|
||||
typedef struct _SUB_Q_MEDIA_CATALOG_NUMBER {
|
||||
SUB_Q_HEADER Header;
|
||||
UCHAR FormatCode;
|
||||
UCHAR Reserved[3];
|
||||
UCHAR Reserved1 : 7;
|
||||
UCHAR Mcval :1;
|
||||
UCHAR MediaCatalog[15];
|
||||
} SUB_Q_MEDIA_CATALOG_NUMBER, *PSUB_Q_MEDIA_CATALOG_NUMBER;
|
||||
|
||||
typedef struct _SUB_Q_TRACK_ISRC {
|
||||
SUB_Q_HEADER Header;
|
||||
UCHAR FormatCode;
|
||||
UCHAR Reserved0;
|
||||
UCHAR Track;
|
||||
UCHAR Reserved1;
|
||||
UCHAR Reserved2 : 7;
|
||||
UCHAR Tcval : 1;
|
||||
UCHAR TrackIsrc[15];
|
||||
} SUB_Q_TRACK_ISRC, *PSUB_Q_TRACK_ISRC;
|
||||
|
||||
typedef struct _SUB_Q_CURRENT_POSITION {
|
||||
SUB_Q_HEADER Header;
|
||||
UCHAR FormatCode;
|
||||
UCHAR Control : 4;
|
||||
UCHAR ADR : 4;
|
||||
UCHAR TrackNumber;
|
||||
UCHAR IndexNumber;
|
||||
UCHAR AbsoluteAddress[4];
|
||||
UCHAR TrackRelativeAddress[4];
|
||||
} SUB_Q_CURRENT_POSITION, *PSUB_Q_CURRENT_POSITION;
|
||||
|
||||
typedef union _SUB_Q_CHANNEL_DATA {
|
||||
SUB_Q_CURRENT_POSITION CurrentPosition;
|
||||
SUB_Q_MEDIA_CATALOG_NUMBER MediaCatalog;
|
||||
SUB_Q_TRACK_ISRC TrackIsrc;
|
||||
} SUB_Q_CHANNEL_DATA, *PSUB_Q_CHANNEL_DATA;
|
||||
|
||||
/* CDROM_AUDIO_CONTROL.LbaFormat constants */
|
||||
#define AUDIO_WITH_PREEMPHASIS 0x1
|
||||
#define DIGITAL_COPY_PERMITTED 0x2
|
||||
#define AUDIO_DATA_TRACK 0x4
|
||||
#define TWO_FOUR_CHANNEL_AUDIO 0x8
|
||||
|
||||
typedef struct _CDROM_AUDIO_CONTROL {
|
||||
UCHAR LbaFormat;
|
||||
USHORT LogicalBlocksPerSecond;
|
||||
} CDROM_AUDIO_CONTROL, *PCDROM_AUDIO_CONTROL;
|
||||
|
||||
typedef struct _VOLUME_CONTROL {
|
||||
UCHAR PortVolume[4];
|
||||
} VOLUME_CONTROL, *PVOLUME_CONTROL;
|
||||
|
||||
typedef enum _TRACK_MODE_TYPE {
|
||||
YellowMode2,
|
||||
XAForm2,
|
||||
CDDA
|
||||
} TRACK_MODE_TYPE, *PTRACK_MODE_TYPE;
|
||||
|
||||
typedef struct __RAW_READ_INFO {
|
||||
LARGE_INTEGER DiskOffset;
|
||||
ULONG SectorCount;
|
||||
TRACK_MODE_TYPE TrackMode;
|
||||
} RAW_READ_INFO, *PRAW_READ_INFO;
|
||||
|
||||
typedef enum _CDROM_SPEED_REQUEST {
|
||||
CdromSetSpeed,
|
||||
CdromSetStreaming
|
||||
} CDROM_SPEED_REQUEST, *PCDROM_SPEED_REQUEST;
|
||||
|
||||
typedef enum _WRITE_ROTATION {
|
||||
CdromDefaultRotation,
|
||||
CdromCAVRotation
|
||||
} WRITE_ROTATION, *PWRITE_ROTATION;
|
||||
|
||||
typedef struct _CDROM_SET_SPEED {
|
||||
CDROM_SPEED_REQUEST RequestType;
|
||||
USHORT ReadSpeed;
|
||||
USHORT WriteSpeed;
|
||||
WRITE_ROTATION RotationControl;
|
||||
} CDROM_SET_SPEED, *PCDROM_SET_SPEED;
|
||||
|
||||
#define IOCTL_CDROM_SET_SPEED CTL_CODE(IOCTL_CDROM_BASE, 0x0018, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDCDRM_H_ */
|
|
@ -1,209 +0,0 @@
|
|||
/*
|
||||
* ntddcdvd.h
|
||||
*
|
||||
* DVD IOCTL interface.
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* This file is in the public domain
|
||||
*/
|
||||
|
||||
#ifndef _NTDDCDVD_H_
|
||||
#define _NTDDCDVD_H_
|
||||
|
||||
#include "ntddstor.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define IOCTL_DVD_BASE FILE_DEVICE_DVD
|
||||
|
||||
#define IOCTL_DVD_END_SESSION \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0403, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DVD_GET_REGION \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DVD_READ_KEY \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DVD_READ_STRUCTURE \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0450, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DVD_SEND_KEY \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DVD_START_SESSION \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DVD_SET_READ_AHEAD \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0404, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
|
||||
typedef ULONG DVD_SESSION_ID, *PDVD_SESSION_ID;
|
||||
|
||||
typedef struct _STORAGE_SET_READ_AHEAD {
|
||||
LARGE_INTEGER TriggerAddress;
|
||||
LARGE_INTEGER TargetAddress;
|
||||
} STORAGE_SET_READ_AHEAD, *PSTORAGE_SET_READ_AHEAD;
|
||||
|
||||
typedef enum DVD_STRUCTURE_FORMAT {
|
||||
DvdPhysicalDescriptor,
|
||||
DvdCopyrightDescriptor,
|
||||
DvdDiskKeyDescriptor,
|
||||
DvdBCADescriptor,
|
||||
DvdManufacturerDescriptor,
|
||||
DvdMaxDescriptor
|
||||
} DVD_STRUCTURE_FORMAT, *PDVD_STRUCTURE_FORMAT;
|
||||
|
||||
#include <pshpack1.h>
|
||||
typedef struct DVD_READ_STRUCTURE {
|
||||
LARGE_INTEGER BlockByteOffset;
|
||||
DVD_STRUCTURE_FORMAT Format;
|
||||
DVD_SESSION_ID SessionId;
|
||||
UCHAR LayerNumber;
|
||||
} DVD_READ_STRUCTURE, *PDVD_READ_STRUCTURE;
|
||||
#include <poppack.h>
|
||||
|
||||
typedef struct _DVD_DESCRIPTOR_HEADER {
|
||||
USHORT Length;
|
||||
UCHAR Reserved[2];
|
||||
UCHAR Data[0];
|
||||
} DVD_DESCRIPTOR_HEADER, *PDVD_DESCRIPTOR_HEADER;
|
||||
|
||||
#include <pshpack1.h>
|
||||
typedef struct _DVD_LAYER_DESCRIPTOR {
|
||||
UCHAR BookVersion : 4;
|
||||
UCHAR BookType : 4;
|
||||
UCHAR MinimumRate : 4;
|
||||
UCHAR DiskSize : 4;
|
||||
UCHAR LayerType : 4;
|
||||
UCHAR TrackPath : 1;
|
||||
UCHAR NumberOfLayers : 2;
|
||||
UCHAR Reserved1 : 1;
|
||||
UCHAR TrackDensity : 4;
|
||||
UCHAR LinearDensity : 4;
|
||||
ULONG StartingDataSector;
|
||||
ULONG EndDataSector;
|
||||
ULONG EndLayerZeroSector;
|
||||
UCHAR Reserved5 : 7;
|
||||
UCHAR BCAFlag : 1;
|
||||
UCHAR Reserved6;
|
||||
} DVD_LAYER_DESCRIPTOR, *PDVD_LAYER_DESCRIPTOR;
|
||||
#include <poppack.h>
|
||||
|
||||
typedef struct _DVD_COPYRIGHT_DESCRIPTOR {
|
||||
UCHAR CopyrightProtectionType;
|
||||
UCHAR RegionManagementInformation;
|
||||
USHORT Reserved;
|
||||
} DVD_COPYRIGHT_DESCRIPTOR, *PDVD_COPYRIGHT_DESCRIPTOR;
|
||||
|
||||
typedef struct _DVD_DISK_KEY_DESCRIPTOR {
|
||||
UCHAR DiskKeyData[2048];
|
||||
} DVD_DISK_KEY_DESCRIPTOR, *PDVD_DISK_KEY_DESCRIPTOR;
|
||||
|
||||
typedef enum _DVD_KEY_TYPE {
|
||||
DvdChallengeKey = 0x01,
|
||||
DvdBusKey1,
|
||||
DvdBusKey2,
|
||||
DvdTitleKey,
|
||||
DvdAsf,
|
||||
DvdSetRpcKey = 0x6,
|
||||
DvdGetRpcKey = 0x8,
|
||||
DvdDiskKey = 0x80,
|
||||
DvdInvalidateAGID = 0x3f
|
||||
} DVD_KEY_TYPE;
|
||||
|
||||
typedef struct _DVD_COPY_PROTECT_KEY {
|
||||
ULONG KeyLength;
|
||||
DVD_SESSION_ID SessionId;
|
||||
DVD_KEY_TYPE KeyType;
|
||||
ULONG KeyFlags;
|
||||
union {
|
||||
HANDLE FileHandle;
|
||||
LARGE_INTEGER TitleOffset;
|
||||
} Parameters;
|
||||
UCHAR KeyData[0];
|
||||
} DVD_COPY_PROTECT_KEY, *PDVD_COPY_PROTECT_KEY;
|
||||
|
||||
#define DVD_CHALLENGE_KEY_LENGTH (12 + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
#define DVD_BUS_KEY_LENGTH (8 + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
#define DVD_TITLE_KEY_LENGTH (8 + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
#define DVD_DISK_KEY_LENGTH (2048 + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
#define DVD_RPC_KEY_LENGTH (sizeof(DVD_RPC_KEY) + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
#define DVD_SET_RPC_KEY_LENGTH (sizeof(DVD_SET_RPC_KEY) + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
#define DVD_ASF_LENGTH (sizeof(DVD_ASF) + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
|
||||
#define DVD_END_ALL_SESSIONS ((DVD_SESSION_ID) 0xffffffff)
|
||||
|
||||
|
||||
#define DVD_CGMS_RESERVED_MASK 0x00000078
|
||||
|
||||
#define DVD_CGMS_COPY_PROTECT_MASK 0x00000018
|
||||
#define DVD_CGMS_COPY_PERMITTED 0x00000000
|
||||
#define DVD_CGMS_COPY_ONCE 0x00000010
|
||||
#define DVD_CGMS_NO_COPY 0x00000018
|
||||
|
||||
#define DVD_COPYRIGHT_MASK 0x00000040
|
||||
#define DVD_NOT_COPYRIGHTED 0x00000000
|
||||
#define DVD_COPYRIGHTED 0x00000040
|
||||
|
||||
#define DVD_SECTOR_PROTECT_MASK 0x00000020
|
||||
#define DVD_SECTOR_NOT_PROTECTED 0x00000000
|
||||
#define DVD_SECTOR_PROTECTED 0x00000020
|
||||
|
||||
|
||||
typedef struct _DVD_BCA_DESCRIPTOR {
|
||||
UCHAR BCAInformation[0];
|
||||
} DVD_BCA_DESCRIPTOR, *PDVD_BCA_DESCRIPTOR;
|
||||
|
||||
typedef struct _DVD_MANUFACTURER_DESCRIPTOR {
|
||||
UCHAR ManufacturingInformation[2048];
|
||||
} DVD_MANUFACTURER_DESCRIPTOR, *PDVD_MANUFACTURER_DESCRIPTOR;
|
||||
|
||||
typedef struct _DVD_RPC_KEY {
|
||||
UCHAR UserResetsAvailable : 3;
|
||||
UCHAR ManufacturerResetsAvailable : 3;
|
||||
UCHAR TypeCode : 2;
|
||||
UCHAR RegionMask;
|
||||
UCHAR RpcScheme;
|
||||
UCHAR Reserved2[1];
|
||||
} DVD_RPC_KEY, *PDVD_RPC_KEY;
|
||||
|
||||
typedef struct _DVD_SET_RPC_KEY {
|
||||
UCHAR PreferredDriveRegionCode;
|
||||
UCHAR Reserved[3];
|
||||
} DVD_SET_RPC_KEY, *PDVD_SET_RPC_KEY;
|
||||
|
||||
typedef struct _DVD_ASF {
|
||||
UCHAR Reserved0[3];
|
||||
UCHAR SuccessFlag : 1;
|
||||
UCHAR Reserved1 : 7;
|
||||
} DVD_ASF, *PDVD_ASF;
|
||||
|
||||
typedef struct _DVD_REGION {
|
||||
UCHAR CopySystem;
|
||||
UCHAR RegionData;
|
||||
UCHAR SystemRegion;
|
||||
UCHAR ResetCount;
|
||||
} DVD_REGION, *PDVD_REGION;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDCDVD_H_ */
|
|
@ -1,172 +0,0 @@
|
|||
/*
|
||||
* ntddscsi.h
|
||||
*
|
||||
* SCSI port IOCTL interface.
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* This file is in the public domain
|
||||
*/
|
||||
|
||||
#ifndef __NTDDSCSI_H
|
||||
#define __NTDDSCSI_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DD_SCSI_DEVICE_NAME "\\Device\\ScsiPort"
|
||||
#define DD_SCSI_DEVICE_NAME_U L"\\Device\\ScsiPort"
|
||||
|
||||
#define IOCTL_SCSI_BASE FILE_DEVICE_CONTROLLER
|
||||
|
||||
#define IOCTL_SCSI_FREE_DUMP_POINTERS \
|
||||
CTL_CODE(IOCTL_SCSI_BASE, 0x0409, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_SCSI_GET_INQUIRY_DATA \
|
||||
CTL_CODE(IOCTL_SCSI_BASE, 0x0403, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_SCSI_GET_CAPABILITIES \
|
||||
CTL_CODE(IOCTL_SCSI_BASE, 0x0404, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_SCSI_GET_ADDRESS \
|
||||
CTL_CODE(IOCTL_SCSI_BASE, 0x0406, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_SCSI_GET_DUMP_POINTERS \
|
||||
CTL_CODE(IOCTL_SCSI_BASE, 0x0408, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_SCSI_MINIPORT \
|
||||
CTL_CODE(IOCTL_SCSI_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_SCSI_PASS_THROUGH \
|
||||
CTL_CODE(IOCTL_SCSI_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_SCSI_PASS_THROUGH_DIRECT \
|
||||
CTL_CODE(IOCTL_SCSI_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_SCSI_RESCAN_BUS \
|
||||
CTL_CODE(IOCTL_SCSI_BASE, 0x0407, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
|
||||
DEFINE_GUID(ScsiRawInterfaceGuid, \
|
||||
0x53f56309L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
||||
|
||||
DEFINE_GUID(WmiScsiAddressGuid, \
|
||||
0x53f5630fL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
||||
|
||||
typedef struct _SCSI_PASS_THROUGH {
|
||||
USHORT Length;
|
||||
UCHAR ScsiStatus;
|
||||
UCHAR PathId;
|
||||
UCHAR TargetId;
|
||||
UCHAR Lun;
|
||||
UCHAR CdbLength;
|
||||
UCHAR SenseInfoLength;
|
||||
UCHAR DataIn;
|
||||
ULONG DataTransferLength;
|
||||
ULONG TimeOutValue;
|
||||
ULONG_PTR DataBufferOffset;
|
||||
ULONG SenseInfoOffset;
|
||||
UCHAR Cdb[16];
|
||||
} SCSI_PASS_THROUGH, *PSCSI_PASS_THROUGH;
|
||||
|
||||
typedef struct _SCSI_PASS_THROUGH_DIRECT {
|
||||
USHORT Length;
|
||||
UCHAR ScsiStatus;
|
||||
UCHAR PathId;
|
||||
UCHAR TargetId;
|
||||
UCHAR Lun;
|
||||
UCHAR CdbLength;
|
||||
UCHAR SenseInfoLength;
|
||||
UCHAR DataIn;
|
||||
ULONG DataTransferLength;
|
||||
ULONG TimeOutValue;
|
||||
PVOID DataBuffer;
|
||||
ULONG SenseInfoOffset;
|
||||
UCHAR Cdb[16];
|
||||
} SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT;
|
||||
|
||||
typedef struct _SRB_IO_CONTROL {
|
||||
ULONG HeaderLength;
|
||||
UCHAR Signature[8];
|
||||
ULONG Timeout;
|
||||
ULONG ControlCode;
|
||||
ULONG ReturnCode;
|
||||
ULONG Length;
|
||||
} SRB_IO_CONTROL, *PSRB_IO_CONTROL;
|
||||
|
||||
typedef struct _SCSI_ADDRESS {
|
||||
ULONG Length;
|
||||
UCHAR PortNumber;
|
||||
UCHAR PathId;
|
||||
UCHAR TargetId;
|
||||
UCHAR Lun;
|
||||
} SCSI_ADDRESS, *PSCSI_ADDRESS;
|
||||
|
||||
typedef struct _SCSI_BUS_DATA {
|
||||
UCHAR NumberOfLogicalUnits;
|
||||
UCHAR InitiatorBusId;
|
||||
ULONG InquiryDataOffset;
|
||||
}SCSI_BUS_DATA, *PSCSI_BUS_DATA;
|
||||
|
||||
typedef struct _SCSI_ADAPTER_BUS_INFO {
|
||||
UCHAR NumberOfBuses;
|
||||
SCSI_BUS_DATA BusData[1];
|
||||
} SCSI_ADAPTER_BUS_INFO, *PSCSI_ADAPTER_BUS_INFO;
|
||||
|
||||
typedef struct _IO_SCSI_CAPABILITIES {
|
||||
ULONG Length;
|
||||
ULONG MaximumTransferLength;
|
||||
ULONG MaximumPhysicalPages;
|
||||
ULONG SupportedAsynchronousEvents;
|
||||
ULONG AlignmentMask;
|
||||
BOOLEAN TaggedQueuing;
|
||||
BOOLEAN AdapterScansDown;
|
||||
BOOLEAN AdapterUsesPio;
|
||||
} IO_SCSI_CAPABILITIES, *PIO_SCSI_CAPABILITIES;
|
||||
|
||||
typedef struct _SCSI_INQUIRY_DATA {
|
||||
UCHAR PathId;
|
||||
UCHAR TargetId;
|
||||
UCHAR Lun;
|
||||
BOOLEAN DeviceClaimed;
|
||||
ULONG InquiryDataLength;
|
||||
ULONG NextInquiryDataOffset;
|
||||
UCHAR InquiryData[1];
|
||||
} SCSI_INQUIRY_DATA, *PSCSI_INQUIRY_DATA;
|
||||
|
||||
#define SCSI_IOCTL_DATA_OUT 0
|
||||
#define SCSI_IOCTL_DATA_IN 1
|
||||
#define SCSI_IOCTL_DATA_UNSPECIFIED 2
|
||||
|
||||
typedef struct _DUMP_POINTERS {
|
||||
struct _ADAPTER_OBJECT *AdapterObject;
|
||||
PVOID MappedRegisterBase;
|
||||
PVOID DumpData;
|
||||
PVOID CommonBufferVa;
|
||||
LARGE_INTEGER CommonBufferPa;
|
||||
ULONG CommonBufferSize;
|
||||
BOOLEAN AllocateCommonBuffers;
|
||||
BOOLEAN UseDiskDump;
|
||||
UCHAR Spare1[2];
|
||||
PVOID DeviceObject;
|
||||
} DUMP_POINTERS, *PDUMP_POINTERS;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NTDDSCSI_H */
|
|
@ -1,357 +0,0 @@
|
|||
/*
|
||||
* ntddstor.h
|
||||
*
|
||||
* Storage class IOCTL interface.
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* This file is in the public domain
|
||||
*/
|
||||
|
||||
#ifndef _NTDDSTOR_H_
|
||||
#define _NTDDSTOR_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define IOCTL_STORAGE_BASE FILE_DEVICE_MASS_STORAGE
|
||||
|
||||
#define IOCTL_STORAGE_CHECK_VERIFY \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_CHECK_VERIFY2 \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0200, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_EJECT_MEDIA \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_EJECTION_CONTROL \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0250, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_FIND_NEW_DEVICES \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_GET_DEVICE_NUMBER \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0420, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0304, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_GET_MEDIA_TYPES \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_GET_MEDIA_TYPES_EX \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0301, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_LOAD_MEDIA \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_LOAD_MEDIA2 \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_MCN_CONTROL \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0251, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_MEDIA_REMOVAL \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_PREDICT_FAILURE \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0440, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_QUERY_PROPERTY \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0500, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_RELEASE \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_RESERVE \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_GET_HOTPLUG_INFO \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0305, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_SET_HOTPLUG_INFO \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0306, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_RESET_BUS \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_STORAGE_RESET_DEVICE \
|
||||
CTL_CODE(IOCTL_STORAGE_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_DISK,
|
||||
0x53f56307L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_CDROM,
|
||||
0x53f56308L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_PARTITION,
|
||||
0x53f5630aL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_TAPE,
|
||||
0x53f5630bL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_WRITEONCEDISK,
|
||||
0x53f5630cL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_VOLUME,
|
||||
0x53f5630dL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_MEDIUMCHANGER,
|
||||
0x53f56310L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_FLOPPY,
|
||||
0x53f56311L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_CDCHANGER,
|
||||
0x53f56312L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_STORAGEPORT,
|
||||
0x2accfe60L, 0xc130, 0x11d2, 0xb0, 0x82, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_HIDDEN_VOLUME,
|
||||
0x7f108a28L, 0x9833, 0x4b3b, 0xb7, 0x80, 0x2c, 0x6b, 0x5f, 0xa5, 0xc0, 0x62);
|
||||
|
||||
/* Aliases for storage guids */
|
||||
#define DiskClassGuid GUID_DEVINTERFACE_DISK
|
||||
#define CdRomClassGuid GUID_DEVINTERFACE_CDROM
|
||||
#define PartitionClassGuid GUID_DEVINTERFACE_PARTITION
|
||||
#define TapeClassGuid GUID_DEVINTERFACE_TAPE
|
||||
#define WriteOnceDiskClassGuid GUID_DEVINTERFACE_WRITEONCEDISK
|
||||
#define VolumeClassGuid GUID_DEVINTERFACE_VOLUME
|
||||
#define MediumChangerClassGuid GUID_DEVINTERFACE_MEDIUMCHANGER
|
||||
#define FloppyClassGuid GUID_DEVINTERFACE_FLOPPY
|
||||
#define CdChangerClassGuid GUID_DEVINTERFACE_CDCHANGER
|
||||
#define StoragePortClassGuid GUID_DEVINTERFACE_STORAGEPORT
|
||||
#define HiddenVolumeClassGuid GUID_DEVINTERFACE_HIDDEN_VOLUME
|
||||
|
||||
typedef enum _STORAGE_MEDIA_TYPE {
|
||||
DDS_4mm = 0x20,
|
||||
MiniQic,
|
||||
Travan,
|
||||
QIC,
|
||||
MP_8mm,
|
||||
AME_8mm,
|
||||
AIT1_8mm,
|
||||
DLT,
|
||||
NCTP,
|
||||
IBM_3480,
|
||||
IBM_3490E,
|
||||
IBM_Magstar_3590,
|
||||
IBM_Magstar_MP,
|
||||
STK_DATA_D3,
|
||||
SONY_DTF,
|
||||
DV_6mm,
|
||||
DMI,
|
||||
SONY_D2,
|
||||
CLEANER_CARTRIDGE,
|
||||
CD_ROM,
|
||||
CD_R,
|
||||
CD_RW,
|
||||
DVD_ROM,
|
||||
DVD_R,
|
||||
DVD_RW,
|
||||
MO_3_RW,
|
||||
MO_5_WO,
|
||||
MO_5_RW,
|
||||
MO_5_LIMDOW,
|
||||
PC_5_WO,
|
||||
PC_5_RW,
|
||||
PD_5_RW,
|
||||
ABL_5_WO,
|
||||
PINNACLE_APEX_5_RW,
|
||||
SONY_12_WO,
|
||||
PHILIPS_12_WO,
|
||||
HITACHI_12_WO,
|
||||
CYGNET_12_WO,
|
||||
KODAK_14_WO,
|
||||
MO_NFR_525,
|
||||
NIKON_12_RW,
|
||||
IOMEGA_ZIP,
|
||||
IOMEGA_JAZ,
|
||||
SYQUEST_EZ135,
|
||||
SYQUEST_EZFLYER,
|
||||
SYQUEST_SYJET,
|
||||
AVATAR_F2,
|
||||
MP2_8mm,
|
||||
DST_S,
|
||||
DST_M,
|
||||
DST_L,
|
||||
VXATape_1,
|
||||
VXATape_2,
|
||||
STK_9840,
|
||||
LTO_Ultrium,
|
||||
LTO_Accelis,
|
||||
DVD_RAM,
|
||||
AIT_8mm,
|
||||
ADR_1,
|
||||
ADR_2
|
||||
} STORAGE_MEDIA_TYPE, *PSTORAGE_MEDIA_TYPE;
|
||||
|
||||
typedef enum _STORAGE_BUS_TYPE {
|
||||
BusTypeUnknown = 0x00,
|
||||
BusTypeScsi,
|
||||
BusTypeAtapi,
|
||||
BusTypeAta,
|
||||
BusType1394,
|
||||
BusTypeSsa,
|
||||
BusTypeFibre,
|
||||
BusTypeUsb,
|
||||
BusTypeRAID,
|
||||
BusTypeMaxReserved = 0x7F
|
||||
} STORAGE_BUS_TYPE, *PSTORAGE_BUS_TYPE;
|
||||
|
||||
/* DEVICE_MEDIA_INFO.DeviceSpecific.DiskInfo.MediaCharacteristics constants */
|
||||
#define MEDIA_ERASEABLE 0x00000001
|
||||
#define MEDIA_WRITE_ONCE 0x00000002
|
||||
#define MEDIA_READ_ONLY 0x00000004
|
||||
#define MEDIA_READ_WRITE 0x00000008
|
||||
#define MEDIA_WRITE_PROTECTED 0x00000100
|
||||
#define MEDIA_CURRENTLY_MOUNTED 0x80000000
|
||||
|
||||
typedef struct _DEVICE_MEDIA_INFO {
|
||||
union {
|
||||
struct {
|
||||
LARGE_INTEGER Cylinders;
|
||||
STORAGE_MEDIA_TYPE MediaType;
|
||||
ULONG TracksPerCylinder;
|
||||
ULONG SectorsPerTrack;
|
||||
ULONG BytesPerSector;
|
||||
ULONG NumberMediaSides;
|
||||
ULONG MediaCharacteristics;
|
||||
} DiskInfo;
|
||||
struct {
|
||||
LARGE_INTEGER Cylinders;
|
||||
STORAGE_MEDIA_TYPE MediaType;
|
||||
ULONG TracksPerCylinder;
|
||||
ULONG SectorsPerTrack;
|
||||
ULONG BytesPerSector;
|
||||
ULONG NumberMediaSides;
|
||||
ULONG MediaCharacteristics;
|
||||
} RemovableDiskInfo;
|
||||
struct {
|
||||
STORAGE_MEDIA_TYPE MediaType;
|
||||
ULONG MediaCharacteristics;
|
||||
ULONG CurrentBlockSize;
|
||||
STORAGE_BUS_TYPE BusType;
|
||||
union {
|
||||
struct {
|
||||
UCHAR MediumType;
|
||||
UCHAR DensityCode;
|
||||
} ScsiInformation;
|
||||
} BusSpecificData;
|
||||
} TapeInfo;
|
||||
} DeviceSpecific;
|
||||
} DEVICE_MEDIA_INFO, *PDEVICE_MEDIA_INFO;
|
||||
|
||||
typedef struct _GET_MEDIA_TYPES {
|
||||
ULONG DeviceType;
|
||||
ULONG MediaInfoCount;
|
||||
DEVICE_MEDIA_INFO MediaInfo[1];
|
||||
} GET_MEDIA_TYPES, *PGET_MEDIA_TYPES;
|
||||
|
||||
typedef struct _STORAGE_ADAPTER_DESCRIPTOR {
|
||||
ULONG Version;
|
||||
ULONG Size;
|
||||
ULONG MaximumTransferLength;
|
||||
ULONG MaximumPhysicalPages;
|
||||
ULONG AlignmentMask;
|
||||
BOOLEAN AdapterUsesPio;
|
||||
BOOLEAN AdapterScansDown;
|
||||
BOOLEAN CommandQueueing;
|
||||
BOOLEAN AcceleratedTransfer;
|
||||
STORAGE_BUS_TYPE BusType;
|
||||
USHORT BusMajorVersion;
|
||||
USHORT BusMinorVersion;
|
||||
} STORAGE_ADAPTER_DESCRIPTOR, *PSTORAGE_ADAPTER_DESCRIPTOR;
|
||||
|
||||
typedef struct _STORAGE_BUS_RESET_REQUEST {
|
||||
UCHAR PathId;
|
||||
} STORAGE_BUS_RESET_REQUEST, *PSTORAGE_BUS_RESET_REQUEST;
|
||||
|
||||
typedef struct _STORAGE_DESCRIPTOR_HEADER {
|
||||
ULONG Version;
|
||||
ULONG Size;
|
||||
} STORAGE_DESCRIPTOR_HEADER, *PSTORAGE_DESCRIPTOR_HEADER;
|
||||
|
||||
typedef struct _STORAGE_DEVICE_DESCRIPTOR {
|
||||
ULONG Version;
|
||||
ULONG Size;
|
||||
UCHAR DeviceType;
|
||||
UCHAR DeviceTypeModifier;
|
||||
BOOLEAN RemovableMedia;
|
||||
BOOLEAN CommandQueueing;
|
||||
ULONG VendorIdOffset;
|
||||
ULONG ProductIdOffset;
|
||||
ULONG ProductRevisionOffset;
|
||||
ULONG SerialNumberOffset;
|
||||
STORAGE_BUS_TYPE BusType;
|
||||
ULONG RawPropertiesLength;
|
||||
UCHAR RawDeviceProperties[1];
|
||||
} STORAGE_DEVICE_DESCRIPTOR, *PSTORAGE_DEVICE_DESCRIPTOR;
|
||||
|
||||
typedef struct _STORAGE_DEVICE_ID_DESCRIPTOR {
|
||||
ULONG Version;
|
||||
ULONG Size;
|
||||
ULONG NumberOfIdentifiers;
|
||||
UCHAR Identifiers[1];
|
||||
} STORAGE_DEVICE_ID_DESCRIPTOR, *PSTORAGE_DEVICE_ID_DESCRIPTOR;
|
||||
|
||||
typedef struct _STORAGE_DEVICE_NUMBER {
|
||||
DEVICE_TYPE DeviceType;
|
||||
ULONG DeviceNumber;
|
||||
ULONG PartitionNumber;
|
||||
} STORAGE_DEVICE_NUMBER, *PSTORAGE_DEVICE_NUMBER;
|
||||
|
||||
typedef struct _STORAGE_PREDICT_FAILURE {
|
||||
ULONG PredictFailure;
|
||||
UCHAR VendorSpecific[512];
|
||||
} STORAGE_PREDICT_FAILURE, *PSTORAGE_PREDICT_FAILURE;
|
||||
|
||||
typedef enum _STORAGE_PROPERTY_ID {
|
||||
StorageDeviceProperty = 0,
|
||||
StorageAdapterProperty,
|
||||
StorageDeviceIdProperty,
|
||||
StorageDeviceUniqueIdProperty,
|
||||
StorageDeviceWriteCacheProperty,
|
||||
StorageMiniportProperty,
|
||||
StorageAccessAlignmentProperty
|
||||
} STORAGE_PROPERTY_ID, *PSTORAGE_PROPERTY_ID;
|
||||
|
||||
typedef enum _STORAGE_QUERY_TYPE {
|
||||
PropertyStandardQuery = 0,
|
||||
PropertyExistsQuery,
|
||||
PropertyMaskQuery,
|
||||
PropertyQueryMaxDefined
|
||||
} STORAGE_QUERY_TYPE, *PSTORAGE_QUERY_TYPE;
|
||||
|
||||
typedef struct _STORAGE_PROPERTY_QUERY {
|
||||
STORAGE_PROPERTY_ID PropertyId;
|
||||
STORAGE_QUERY_TYPE QueryType;
|
||||
UCHAR AdditionalParameters[1];
|
||||
} STORAGE_PROPERTY_QUERY, *PSTORAGE_PROPERTY_QUERY;
|
||||
|
||||
typedef struct _PREVENT_MEDIA_REMOVAL {
|
||||
BOOLEAN PreventMediaRemoval;
|
||||
} PREVENT_MEDIA_REMOVAL, *PPREVENT_MEDIA_REMOVAL;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDSTOR_H_ */
|
Loading…
Reference in New Issue