mirror of
https://github.com/reactos/reactos.git
synced 2025-04-04 04:26:32 +00:00
[DDK]
- De-duplicate __GNU_EXTENSION. - Apply a consistent formatting. svn path=/trunk/; revision=48514
This commit is contained in:
parent
94c9f4008f
commit
da140c1ba3
31 changed files with 2859 additions and 3158 deletions
|
@ -65,7 +65,7 @@ typedef struct _D3DDeviceDesc_V1 {
|
|||
DWORD dwDeviceZBufferBitDepth;
|
||||
DWORD dwMaxBufferSize;
|
||||
DWORD dwMaxVertexCount;
|
||||
} D3DDEVICEDESC_V1,*LPD3DDEVICEDESC_V1;
|
||||
} D3DDEVICEDESC_V1, *LPD3DDEVICEDESC_V1;
|
||||
|
||||
/* this is to allow keeping the bulk of our OpenGL code out of x11drv */
|
||||
#define D3DDD_WINE_OPENGL_DEVICE 0x00008000
|
||||
|
@ -115,7 +115,7 @@ typedef struct _D3DHAL_D3DEXTENDEDCAPS {
|
|||
DWORD dwReserved2;
|
||||
DWORD dwReserved3;
|
||||
DWORD dwReserved4;
|
||||
} D3DHAL_D3DEXTENDEDCAPS,*LPD3DHAL_D3DEXTENDEDCAPS;
|
||||
} D3DHAL_D3DEXTENDEDCAPS, *LPD3DHAL_D3DEXTENDEDCAPS;
|
||||
|
||||
/*****************************************************************************
|
||||
* d3d->driver callbacks
|
||||
|
@ -209,7 +209,7 @@ typedef struct _D3DHAL_CALLBACKS2 {
|
|||
LPD3DHAL_DRAWONEPRIMITIVECB DrawOnePrimitive;
|
||||
LPD3DHAL_DRAWONEINDEXEDPRIMITIVECB DrawOneIndexedPrimitive;
|
||||
LPD3DHAL_DRAWPRIMITIVESCB DrawPrimitives;
|
||||
} D3DHAL_CALLBACKS2,*LPD3DHAL_CALLBACKS2;
|
||||
} D3DHAL_CALLBACKS2, *LPD3DHAL_CALLBACKS2;
|
||||
|
||||
typedef struct _D3DHAL_CLEAR2DATA *LPD3DHAL_CLEAR2DATA;
|
||||
typedef struct _D3DHAL_VALIDATETEXTURESTAGESTATEDATA *LPD3DHAL_VALIDATETEXTURESTAGESTATEDATA;
|
||||
|
@ -226,7 +226,7 @@ typedef struct _D3DHAL_CALLBACKS3 {
|
|||
LPVOID lpvReserved;
|
||||
LPD3DHAL_VALIDATETEXTURESTAGESTATECB ValidateTextureStageState;
|
||||
LPD3DHAL_DRAWPRIMITIVES2CB DrawPrimitives2;
|
||||
} D3DHAL_CALLBACKS3,*LPD3DHAL_CALLBACKS3;
|
||||
} D3DHAL_CALLBACKS3, *LPD3DHAL_CALLBACKS3;
|
||||
|
||||
/*****************************************************************************
|
||||
* parameter structures
|
||||
|
@ -326,7 +326,7 @@ typedef struct _D3DHAL_DP2COMMAND {
|
|||
WORD wPrimitiveCount;
|
||||
WORD wStateCount;
|
||||
} DUMMYUNIONNAME;
|
||||
} D3DHAL_DP2COMMAND,*LPD3DHAL_DP2COMMAND;
|
||||
} D3DHAL_DP2COMMAND, *LPD3DHAL_DP2COMMAND;
|
||||
|
||||
typedef enum _D3DHAL_DP2OPERATION {
|
||||
D3DDP2OP_POINTS = 1,
|
||||
|
@ -424,69 +424,69 @@ typedef enum _D3DHAL_DP2OPERATION {
|
|||
typedef struct _D3DHAL_POINTS {
|
||||
WORD wCount;
|
||||
WORD wVStart;
|
||||
} D3DHAL_DP2POINTS,*LPD3DHAL_DP2POINTS;
|
||||
} D3DHAL_DP2POINTS, *LPD3DHAL_DP2POINTS;
|
||||
|
||||
/* line primitives */
|
||||
|
||||
typedef struct _D3DHAL_DP2STARTVERTEX {
|
||||
WORD wVStart;
|
||||
} D3DHAL_DP2STARTVERTEX,*LPD3DHAL_DP2STARTVERTEX;
|
||||
} D3DHAL_DP2STARTVERTEX, *LPD3DHAL_DP2STARTVERTEX;
|
||||
|
||||
typedef struct _D3DHAL_DP2LINELIST {
|
||||
WORD wVStart;
|
||||
} D3DHAL_DP2LINELIST,*LPD3DHAL_DP2LINELIST;
|
||||
} D3DHAL_DP2LINELIST, *LPD3DHAL_DP2LINELIST;
|
||||
|
||||
typedef struct _D3DHAL_DP2INDEXEDLINELIST {
|
||||
WORD wV1;
|
||||
WORD wV2;
|
||||
} D3DHAL_DP2INDEXEDLINELIST,*LPD3DHAL_DP2INDEXEDLINELIST;
|
||||
} D3DHAL_DP2INDEXEDLINELIST, *LPD3DHAL_DP2INDEXEDLINELIST;
|
||||
|
||||
typedef struct _D3DHAL_DP2LINESTRIP {
|
||||
WORD wVStart;
|
||||
} D3DHAL_DP2LINESTRIP,*LPD3DHAL_DP2LINESTRIP;
|
||||
} D3DHAL_DP2LINESTRIP, *LPD3DHAL_DP2LINESTRIP;
|
||||
|
||||
typedef struct _D3DHAL_DP2INDEXEDLINESTRIP {
|
||||
WORD wV[2];
|
||||
} D3DHAL_DP2INDEXEDLINESTRIP,*LPD3DHAL_DP2INDEXEDLINESTRIP;
|
||||
} D3DHAL_DP2INDEXEDLINESTRIP, *LPD3DHAL_DP2INDEXEDLINESTRIP;
|
||||
|
||||
/* triangle primitives */
|
||||
|
||||
typedef struct _D3DHAL_DP2TRIANGLELIST {
|
||||
WORD wVStart;
|
||||
} D3DHAL_DP2TRIANGLELIST,*LPD3DHAL_DP2TRIANGLELIST;
|
||||
} D3DHAL_DP2TRIANGLELIST, *LPD3DHAL_DP2TRIANGLELIST;
|
||||
|
||||
typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST {
|
||||
WORD wV1;
|
||||
WORD wV2;
|
||||
WORD wV3;
|
||||
WORD wFlags;
|
||||
} D3DHAL_DP2INDEXEDTRIANGLELIST,*LPD3DHAL_DP2INDEXEDTRIANGLELIST;
|
||||
} D3DHAL_DP2INDEXEDTRIANGLELIST, *LPD3DHAL_DP2INDEXEDTRIANGLELIST;
|
||||
|
||||
typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST2 {
|
||||
WORD wV1;
|
||||
WORD wV2;
|
||||
WORD wV3;
|
||||
} D3DHAL_DP2INDEXEDTRIANGLELIST2,*LPD3DHAL_DP2INDEXEDTRIANGLELIST2;
|
||||
} D3DHAL_DP2INDEXEDTRIANGLELIST2, *LPD3DHAL_DP2INDEXEDTRIANGLELIST2;
|
||||
|
||||
typedef struct _D3DHAL_DP2TRIANGLESTRIP {
|
||||
WORD wVStart;
|
||||
} D3DHAL_DP2TRIANGLESTRIP,*LPD3DHAL_DP2TRIANGLESTRIP;
|
||||
} D3DHAL_DP2TRIANGLESTRIP, *LPD3DHAL_DP2TRIANGLESTRIP;
|
||||
|
||||
typedef struct _D3DHAL_DP2INDEXEDTRIANGLESTRIP {
|
||||
WORD wV[3];
|
||||
} D3DHAL_DP2INDEXEDTRIANGLESTRIP,*LPD3DHAL_DP2INDEXEDTRIANGLESTRIP;
|
||||
} D3DHAL_DP2INDEXEDTRIANGLESTRIP, *LPD3DHAL_DP2INDEXEDTRIANGLESTRIP;
|
||||
|
||||
typedef struct _D3DHAL_DP2TRIANGLEFAN {
|
||||
WORD wVStart;
|
||||
} D3DHAL_DP2TRIANGLEFAN,*LPD3DHAL_DP2TRIANGLEFAN;
|
||||
} D3DHAL_DP2TRIANGLEFAN, *LPD3DHAL_DP2TRIANGLEFAN;
|
||||
|
||||
typedef struct _D3DHAL_DP2INDEXEDTRIANGLEFAN {
|
||||
WORD wV[3];
|
||||
} D3DHAL_DP2INDEXEDTRIANGLEFAN,*LPD3DHAL_DP2INDEXEDTRIANGLEFAN;
|
||||
} D3DHAL_DP2INDEXEDTRIANGLEFAN, *LPD3DHAL_DP2INDEXEDTRIANGLEFAN;
|
||||
|
||||
typedef struct _D3DHAL_DP2TRIANGLEFAN_IMM {
|
||||
DWORD dwEdgeFlags;
|
||||
} D3DHAL_DP2TRIANGLEFAN_IMM,*LPD3DHAL_DP2TRIANGLEFAN_IMM;
|
||||
} D3DHAL_DP2TRIANGLEFAN_IMM, *LPD3DHAL_DP2TRIANGLEFAN_IMM;
|
||||
|
||||
/* render states */
|
||||
typedef struct _D3DHAL_DP2RENDERSTATE {
|
||||
|
@ -495,13 +495,13 @@ typedef struct _D3DHAL_DP2RENDERSTATE {
|
|||
D3DVALUE dvState;
|
||||
DWORD dwState;
|
||||
} DUMMYUNIONNAME;
|
||||
} D3DHAL_DP2RENDERSTATE,*LPD3DHAL_DP2RENDERSTATE;
|
||||
} D3DHAL_DP2RENDERSTATE, *LPD3DHAL_DP2RENDERSTATE;
|
||||
|
||||
typedef struct _D3DHAL_DP2TEXTURESTAGESTATE {
|
||||
WORD wStage;
|
||||
WORD TSState;
|
||||
DWORD dwValue;
|
||||
} D3DHAL_DP2TEXTURESTAGESTATE,*LPD3DHAL_DP2TEXTURESTAGESTATE;
|
||||
} D3DHAL_DP2TEXTURESTAGESTATE, *LPD3DHAL_DP2TEXTURESTAGESTATE;
|
||||
|
||||
#define D3DTSS_TEXTUREMAP 0
|
||||
|
||||
|
@ -510,36 +510,36 @@ typedef struct _D3DHAL_DP2VIEWPORTINFO {
|
|||
DWORD dwY;
|
||||
DWORD dwWidth;
|
||||
DWORD dwHeight;
|
||||
} D3DHAL_DP2VIEWPORTINFO,*LPD3DHAL_DP2VIEWPORTINFO;
|
||||
} D3DHAL_DP2VIEWPORTINFO, *LPD3DHAL_DP2VIEWPORTINFO;
|
||||
|
||||
typedef struct _D3DHAL_DP2WINFO {
|
||||
D3DVALUE dwWNear;
|
||||
D3DVALUE dwWFar;
|
||||
} D3DHAL_DP2WINFO,*LPD3DHAL_DP2WINFO;
|
||||
} D3DHAL_DP2WINFO, *LPD3DHAL_DP2WINFO;
|
||||
|
||||
typedef struct _D3DHAL_DP2SETPALETTE {
|
||||
DWORD dwPaletteHandle;
|
||||
DWORD dwPaletteFlags;
|
||||
DWORD dwSurfaceHandle;
|
||||
} D3DHAL_DP2SETPALETTE,*LPD3DHAL_DP2SETPALETTE;
|
||||
} D3DHAL_DP2SETPALETTE, *LPD3DHAL_DP2SETPALETTE;
|
||||
|
||||
typedef struct _D3DHAL_DP2UPDATEPALETTE {
|
||||
DWORD dwPaletteHandle;
|
||||
WORD wStartIndex;
|
||||
WORD wNumEntries;
|
||||
} D3DHAL_DP2UPDATEPALETTE,*LPD3DHAL_DP2UPDATEPALETTE;
|
||||
} D3DHAL_DP2UPDATEPALETTE, *LPD3DHAL_DP2UPDATEPALETTE;
|
||||
|
||||
typedef struct _D3DHAL_DP2ZRANGE {
|
||||
D3DVALUE dvMinZ;
|
||||
D3DVALUE dvMaxZ;
|
||||
} D3DHAL_DP2ZRANGE,*LPD3DHAL_DP2ZRANGE;
|
||||
} D3DHAL_DP2ZRANGE, *LPD3DHAL_DP2ZRANGE;
|
||||
|
||||
typedef D3DMATERIAL7 D3DHAL_DP2SETMATERIAL,*LPD3DHAL_DP2SETMATERIAL;
|
||||
|
||||
typedef struct _D3DHAL_DP2SETLIGHT {
|
||||
DWORD dwIndex;
|
||||
DWORD dwDataType;
|
||||
} D3DHAL_DP2SETLIGHT,*LPD3DHAL_DP2SETLIGHT;
|
||||
} D3DHAL_DP2SETLIGHT, *LPD3DHAL_DP2SETLIGHT;
|
||||
|
||||
#define D3DHAL_SETLIGHT_ENABLE 0
|
||||
#define D3DHAL_SETLIGHT_DISABLE 1
|
||||
|
@ -547,12 +547,12 @@ typedef struct _D3DHAL_DP2SETLIGHT {
|
|||
|
||||
typedef struct _D3DHAL_DP2CREATELIGHT {
|
||||
DWORD dwIndex;
|
||||
} D3DHAL_DP2CREATELIGHT,*LPD3DHAL_DP2CREATELIGHT;
|
||||
} D3DHAL_DP2CREATELIGHT, *LPD3DHAL_DP2CREATELIGHT;
|
||||
|
||||
typedef struct _D3DHAL_DP2SETTRANSFORM {
|
||||
D3DTRANSFORMSTATETYPE xfrmType;
|
||||
D3DMATRIX matrix;
|
||||
} D3DHAL_DP2SETTRANSFORM,*LPD3DHAL_DP2SETTRANSFORM;
|
||||
} D3DHAL_DP2SETTRANSFORM, *LPD3DHAL_DP2SETTRANSFORM;
|
||||
|
||||
typedef struct _D3DHAL_DP2TEXBLT {
|
||||
DWORD dwDDDestSurface;
|
||||
|
@ -560,13 +560,13 @@ typedef struct _D3DHAL_DP2TEXBLT {
|
|||
POINT pDest;
|
||||
RECTL rSrc;
|
||||
DWORD dwFlags;
|
||||
} D3DHAL_DP2TEXBLT,*LPD3DHAL_DP2TEXBLT;
|
||||
} D3DHAL_DP2TEXBLT, *LPD3DHAL_DP2TEXBLT;
|
||||
|
||||
typedef struct _D3DHAL_DP2STATESET {
|
||||
DWORD dwOperation;
|
||||
DWORD dwParam;
|
||||
D3DSTATEBLOCKTYPE sbType;
|
||||
} D3DHAL_DP2STATESET,*LPD3DHAL_DP2STATESET;
|
||||
} D3DHAL_DP2STATESET, *LPD3DHAL_DP2STATESET;
|
||||
|
||||
#define D3DHAL_STATESETBEGIN 0
|
||||
#define D3DHAL_STATESETEND 1
|
||||
|
@ -577,12 +577,12 @@ typedef struct _D3DHAL_DP2STATESET {
|
|||
typedef struct _D3DHAL_DP2SETPRIORITY {
|
||||
DWORD dwDDSurface;
|
||||
DWORD dwPriority;
|
||||
} D3DHAL_DP2SETPRIORITY,*LPD3DHAL_DP2SETPRIORITY;
|
||||
} D3DHAL_DP2SETPRIORITY, *LPD3DHAL_DP2SETPRIORITY;
|
||||
|
||||
typedef struct _D3DHAL_DP2SETRENDERTARGET {
|
||||
DWORD hRenderTarget;
|
||||
DWORD hZBuffer;
|
||||
} D3DHAL_DP2SETRENDERTARGET,*LPD3DHAL_DP2SETRENDERTARGET;
|
||||
} D3DHAL_DP2SETRENDERTARGET, *LPD3DHAL_DP2SETRENDERTARGET;
|
||||
|
||||
typedef struct _D3DHAL_DP2CLEAR {
|
||||
DWORD dwFlags;
|
||||
|
@ -590,12 +590,12 @@ typedef struct _D3DHAL_DP2CLEAR {
|
|||
D3DVALUE dvFillDepth;
|
||||
DWORD dwFillStencil;
|
||||
RECT Rects[1];
|
||||
} D3DHAL_DP2CLEAR,*LPD3DHAL_DP2CLEAR;
|
||||
} D3DHAL_DP2CLEAR, *LPD3DHAL_DP2CLEAR;
|
||||
|
||||
typedef struct _D3DHAL_DP2SETTEXLOD {
|
||||
DWORD dwDDSurface;
|
||||
DWORD dwLOD;
|
||||
} D3DHAL_DP2SETTEXLOD,*LPD3DHAL_DP2SETTEXLOD;
|
||||
} D3DHAL_DP2SETTEXLOD, *LPD3DHAL_DP2SETTEXLOD;
|
||||
|
||||
#if (DIRECT3D_VERSION >= 0x0900)
|
||||
|
||||
|
|
|
@ -7,33 +7,30 @@
|
|||
typedef LONGLONG REFERENCE_TIME;
|
||||
#endif
|
||||
|
||||
typedef struct _DMUS_KERNEL_EVENT
|
||||
{
|
||||
BYTE bReserved;
|
||||
BYTE cbStruct;
|
||||
USHORT cbEvent;
|
||||
USHORT usChannelGroup;
|
||||
USHORT usFlags;
|
||||
REFERENCE_TIME ullPresTime100ns;
|
||||
ULONGLONG ullBytePosition;
|
||||
struct _DMUS_KERNEL_EVENT *pNextEvt;
|
||||
union
|
||||
{
|
||||
BYTE abData[sizeof(PBYTE)];
|
||||
PBYTE pbData;
|
||||
struct _DMUS_KERNEL_EVENT *pPackageEvt;
|
||||
}uData;
|
||||
}DMUS_KERNEL_EVENT, *PDMUS_KERNEL_EVENT;
|
||||
typedef struct _DMUS_KERNEL_EVENT {
|
||||
BYTE bReserved;
|
||||
BYTE cbStruct;
|
||||
USHORT cbEvent;
|
||||
USHORT usChannelGroup;
|
||||
USHORT usFlags;
|
||||
REFERENCE_TIME ullPresTime100ns;
|
||||
ULONGLONG ullBytePosition;
|
||||
struct _DMUS_KERNEL_EVENT *pNextEvt;
|
||||
union {
|
||||
BYTE abData[sizeof(PBYTE)];
|
||||
PBYTE pbData;
|
||||
struct _DMUS_KERNEL_EVENT *pPackageEvt;
|
||||
} uData;
|
||||
} DMUS_KERNEL_EVENT, *PDMUS_KERNEL_EVENT;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DMUS_STREAM_MIDI_INVALID = -1,
|
||||
DMUS_STREAM_MIDI_RENDER = 0,
|
||||
DMUS_STREAM_MIDI_CAPTURE,
|
||||
DMUS_STREAM_WAVE_SINK
|
||||
}DMUS_STREAM_TYPE;
|
||||
typedef enum {
|
||||
DMUS_STREAM_MIDI_INVALID = -1,
|
||||
DMUS_STREAM_MIDI_RENDER = 0,
|
||||
DMUS_STREAM_MIDI_CAPTURE,
|
||||
DMUS_STREAM_WAVE_SINK
|
||||
} DMUS_STREAM_TYPE;
|
||||
|
||||
DEFINE_GUID(CLSID_MiniportDriverDMusUART, 0xd3f0ce1c, 0xFFFC, 0x11D1, 0x81, 0xB0, 0x00, 0x60, 0x08, 0x33, 0x16, 0xC1);
|
||||
DEFINE_GUID(CLSID_MiniportDriverDMusUART, 0xd3f0ce1c, 0xFFFC, 0x11D1, 0x81, 0xB0, 0x00, 0x60, 0x08, 0x33, 0x16, 0xC1);
|
||||
DEFINE_GUID(CLSID_MiniportDriverDMusUARTCapture, 0xD3F0CE1D, 0xFFFC, 0x11D1, 0x81, 0xB0, 0x00, 0x60, 0x08, 0x33, 0x16, 0xC1);
|
||||
|
||||
/* ===============================================================
|
||||
|
@ -43,21 +40,20 @@ DEFINE_GUID(CLSID_MiniportDriverDMusUARTCapture, 0xD3F0CE1D, 0xFFFC, 0x11D1, 0x8
|
|||
#undef INTERFACE
|
||||
#define INTERFACE IMasterClock
|
||||
|
||||
DECLARE_INTERFACE_(IMasterClock,IUnknown)
|
||||
{
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
DECLARE_INTERFACE_(IMasterClock,IUnknown) {
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
|
||||
STDMETHOD_(NTSTATUS,GetTime)( THIS_
|
||||
OUT REFERENCE_TIME * pTime
|
||||
) PURE;
|
||||
STDMETHOD_(NTSTATUS,GetTime)( THIS_
|
||||
OUT REFERENCE_TIME *pTime
|
||||
) PURE;
|
||||
};
|
||||
|
||||
typedef IMasterClock *PMASTERCLOCK;
|
||||
|
||||
#define IMP_IMasterClock \
|
||||
STDMETHODIMP_(NTSTATUS) GetTime( \
|
||||
OUT REFERENCE_TIME * pTime \
|
||||
)
|
||||
#define IMP_IMasterClock \
|
||||
STDMETHODIMP_(NTSTATUS) GetTime( \
|
||||
OUT REFERENCE_TIME *pTime \
|
||||
)
|
||||
|
||||
/* ===============================================================
|
||||
IMXF Interface
|
||||
|
@ -70,46 +66,32 @@ struct IMXF;
|
|||
typedef struct IMXF *PMXF;
|
||||
|
||||
#define DEFINE_ABSTRACT_IMXF() \
|
||||
STDMETHOD_(NTSTATUS,SetState)(THIS_ \
|
||||
IN KSSTATE State \
|
||||
) PURE; \
|
||||
STDMETHOD_(NTSTATUS,PutMessage) \
|
||||
( THIS_ \
|
||||
IN PDMUS_KERNEL_EVENT pDMKEvt \
|
||||
) PURE; \
|
||||
STDMETHOD_(NTSTATUS,ConnectOutput) \
|
||||
( THIS_ \
|
||||
IN PMXF sinkMXF \
|
||||
) PURE; \
|
||||
STDMETHOD_(NTSTATUS,DisconnectOutput) \
|
||||
( THIS_ \
|
||||
IN PMXF sinkMXF \
|
||||
) PURE;
|
||||
STDMETHOD_(NTSTATUS,SetState)(THIS_ \
|
||||
IN KSSTATE State \
|
||||
) PURE; \
|
||||
STDMETHOD_(NTSTATUS,PutMessage)(THIS_ \
|
||||
IN PDMUS_KERNEL_EVENT pDMKEvt \
|
||||
) PURE; \
|
||||
STDMETHOD_(NTSTATUS,ConnectOutput)(THIS_ \
|
||||
IN PMXF sinkMXF \
|
||||
) PURE; \
|
||||
STDMETHOD_(NTSTATUS,DisconnectOutput)(THIS_ \
|
||||
IN PMXF sinkMXF \
|
||||
) PURE;
|
||||
|
||||
#define IMP_IMXF \
|
||||
STDMETHODIMP_(NTSTATUS) SetState \
|
||||
( \
|
||||
IN KSSTATE State \
|
||||
); \
|
||||
STDMETHODIMP_(NTSTATUS) PutMessage \
|
||||
( THIS_ \
|
||||
IN PDMUS_KERNEL_EVENT pDMKEvt \
|
||||
); \
|
||||
STDMETHODIMP_(NTSTATUS) ConnectOutput \
|
||||
( THIS_ \
|
||||
IN PMXF sinkMXF \
|
||||
); \
|
||||
STDMETHODIMP_(NTSTATUS) DisconnectOutput \
|
||||
( THIS_ \
|
||||
IN PMXF sinkMXF \
|
||||
)
|
||||
#define IMP_IMXF \
|
||||
STDMETHODIMP_(NTSTATUS) SetState ( \
|
||||
IN KSSTATE State); \
|
||||
STDMETHODIMP_(NTSTATUS) PutMessage (THIS_ \
|
||||
IN PDMUS_KERNEL_EVENT pDMKEvt); \
|
||||
STDMETHODIMP_(NTSTATUS) ConnectOutput (THIS_ \
|
||||
IN PMXF sinkMXF); \
|
||||
STDMETHODIMP_(NTSTATUS) DisconnectOutput (THIS_ \
|
||||
IN PMXF sinkMXF)
|
||||
|
||||
|
||||
DECLARE_INTERFACE_(IMXF,IUnknown)
|
||||
{
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
|
||||
DEFINE_ABSTRACT_IMXF()
|
||||
DECLARE_INTERFACE_(IMXF,IUnknown) {
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
DEFINE_ABSTRACT_IMXF()
|
||||
};
|
||||
|
||||
/* ===============================================================
|
||||
|
@ -123,47 +105,43 @@ struct IAllocatorMXF;
|
|||
typedef struct IAllocatorMXF *PAllocatorMXF;
|
||||
|
||||
#define STATIC_IID_IAllocatorMXF\
|
||||
0xa5f0d62c, 0xb30f, 0x11d2, 0xb7, 0xa3, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1
|
||||
0xa5f0d62c, 0xb30f, 0x11d2, 0xb7, 0xa3, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1
|
||||
DEFINE_GUIDSTRUCT("a5f0d62c-b30f-11d2-b7a3-0060083316c1", IID_IAllocatorMXF);
|
||||
#define IID_IAllocatorMXF DEFINE_GUIDNAMED(IID_IAllocatorMXF)
|
||||
|
||||
|
||||
DECLARE_INTERFACE_(IAllocatorMXF, IMXF)
|
||||
{
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
DECLARE_INTERFACE_(IAllocatorMXF, IMXF) {
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
|
||||
DEFINE_ABSTRACT_IMXF()
|
||||
DEFINE_ABSTRACT_IMXF()
|
||||
|
||||
STDMETHOD_(NTSTATUS,GetMessage)(THIS_
|
||||
OUT PDMUS_KERNEL_EVENT * ppDMKEvt
|
||||
) PURE;
|
||||
STDMETHOD_(NTSTATUS,GetMessage)(THIS_
|
||||
OUT PDMUS_KERNEL_EVENT *ppDMKEvt
|
||||
) PURE;
|
||||
|
||||
STDMETHOD_(USHORT,GetBufferSize)(THIS) PURE;
|
||||
STDMETHOD_(USHORT,GetBufferSize)(THIS) PURE;
|
||||
|
||||
STDMETHOD_(NTSTATUS,GetBuffer)(THIS_
|
||||
OUT PBYTE * ppBuffer
|
||||
)PURE;
|
||||
STDMETHOD_(NTSTATUS,GetBuffer)(THIS_
|
||||
OUT PBYTE *ppBuffer
|
||||
)PURE;
|
||||
|
||||
STDMETHOD_(NTSTATUS,PutBuffer)(THIS_
|
||||
IN PBYTE pBuffer
|
||||
) PURE;
|
||||
STDMETHOD_(NTSTATUS,PutBuffer)(THIS_
|
||||
IN PBYTE pBuffer
|
||||
) PURE;
|
||||
};
|
||||
|
||||
#define IMP_IAllocatorMXF \
|
||||
IMP_IMXF; \
|
||||
STDMETHODIMP_(NTSTATUS) GetMessage( \
|
||||
OUT PDMUS_KERNEL_EVENT * ppDMKEvt \
|
||||
); \
|
||||
\
|
||||
STDMETHODIMP_(USHORT) GetBufferSize(void); \
|
||||
\
|
||||
STDMETHODIMP_(NTSTATUS) GetBuffer( \
|
||||
OUT PBYTE * ppBuffer \
|
||||
); \
|
||||
\
|
||||
STDMETHODIMP_(NTSTATUS) PutBuffer( \
|
||||
IN PBYTE pBuffer \
|
||||
)
|
||||
#define IMP_IAllocatorMXF \
|
||||
IMP_IMXF; \
|
||||
STDMETHODIMP_(NTSTATUS) GetMessage( \
|
||||
OUT PDMUS_KERNEL_EVENT *ppDMKEvt); \
|
||||
\
|
||||
STDMETHODIMP_(USHORT) GetBufferSize(void); \
|
||||
\
|
||||
STDMETHODIMP_(NTSTATUS) GetBuffer( \
|
||||
OUT PBYTE *ppBuffer); \
|
||||
\
|
||||
STDMETHODIMP_(NTSTATUS) PutBuffer( \
|
||||
IN PBYTE pBuffer)
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IPortDMus
|
||||
|
@ -171,91 +149,85 @@ DECLARE_INTERFACE_(IAllocatorMXF, IMXF)
|
|||
DEFINE_GUID(IID_IPortDMus, 0xc096df9c, 0xfb09, 0x11d1, 0x81, 0xb0, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1);
|
||||
DEFINE_GUID(CLSID_PortDMus, 0xb7902fe9, 0xfb0a, 0x11d1, 0x81, 0xb0, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1);
|
||||
|
||||
DECLARE_INTERFACE_(IPortDMus, IPort)
|
||||
{
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
DECLARE_INTERFACE_(IPortDMus, IPort) {
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
|
||||
DEFINE_ABSTRACT_PORT()
|
||||
DEFINE_ABSTRACT_PORT()
|
||||
|
||||
STDMETHOD_(void,Notify)(THIS_
|
||||
IN PSERVICEGROUP ServiceGroup OPTIONAL
|
||||
)PURE;
|
||||
STDMETHOD_(void,Notify)(THIS_
|
||||
IN PSERVICEGROUP ServiceGroup OPTIONAL
|
||||
) PURE;
|
||||
|
||||
STDMETHOD_(void,RegisterServiceGroup)(THIS_
|
||||
IN PSERVICEGROUP ServiceGroup
|
||||
) PURE;
|
||||
STDMETHOD_(void,RegisterServiceGroup)(THIS_
|
||||
IN PSERVICEGROUP ServiceGroup
|
||||
) PURE;
|
||||
};
|
||||
typedef IPortDMus *PPORTDMUS;
|
||||
|
||||
#define IMP_IPortDMus \
|
||||
IMP_IPort; \
|
||||
STDMETHODIMP_(void) Notify( \
|
||||
IN PSERVICEGROUP ServiceGroup OPTIONAL \
|
||||
); \
|
||||
\
|
||||
STDMETHODIMP_(void) RegisterServiceGroup( \
|
||||
IN PSERVICEGROUP ServiceGroup \
|
||||
)
|
||||
#define IMP_IPortDMus \
|
||||
IMP_IPort; \
|
||||
STDMETHODIMP_(void) Notify( \
|
||||
IN PSERVICEGROUP ServiceGroup OPTIONAL); \
|
||||
\
|
||||
STDMETHODIMP_(void) RegisterServiceGroup( \
|
||||
IN PSERVICEGROUP ServiceGroup)
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IMiniportDMus
|
||||
|
||||
DEFINE_GUID(IID_IMiniportDMus, 0xc096df9d, 0xfb09, 0x11d1, 0x81, 0xb0, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1);
|
||||
DECLARE_INTERFACE_(IMiniportDMus, IMiniport)
|
||||
{
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
|
||||
DEFINE_ABSTRACT_MINIPORT()
|
||||
|
||||
DECLARE_INTERFACE_(IMiniportDMus, IMiniport) {
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
|
||||
STDMETHOD_(NTSTATUS,Init)(THIS_
|
||||
IN PUNKNOWN UnknownAdapter,
|
||||
IN PRESOURCELIST ResourceList,
|
||||
IN PPORTDMUS Port,
|
||||
OUT PSERVICEGROUP * ServiceGroup
|
||||
) PURE;
|
||||
DEFINE_ABSTRACT_MINIPORT()
|
||||
|
||||
STDMETHOD_(void,Service)(THIS) PURE;
|
||||
STDMETHOD_(NTSTATUS,Init)(THIS_
|
||||
IN PUNKNOWN UnknownAdapter,
|
||||
IN PRESOURCELIST ResourceList,
|
||||
IN PPORTDMUS Port,
|
||||
OUT PSERVICEGROUP *ServiceGroup
|
||||
) PURE;
|
||||
|
||||
STDMETHOD_(NTSTATUS,NewStream)(THIS_
|
||||
OUT PMXF * MXF,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL,
|
||||
IN POOL_TYPE PoolType,
|
||||
IN ULONG PinID,
|
||||
IN DMUS_STREAM_TYPE StreamType,
|
||||
IN PKSDATAFORMAT DataFormat,
|
||||
OUT PSERVICEGROUP * ServiceGroup,
|
||||
IN PAllocatorMXF AllocatorMXF,
|
||||
IN PMASTERCLOCK MasterClock,
|
||||
OUT PULONGLONG SchedulePreFetch
|
||||
) PURE;
|
||||
STDMETHOD_(void,Service)(THIS) PURE;
|
||||
|
||||
STDMETHOD_(NTSTATUS,NewStream)(THIS_
|
||||
OUT PMXF *MXF,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL,
|
||||
IN POOL_TYPE PoolType,
|
||||
IN ULONG PinID,
|
||||
IN DMUS_STREAM_TYPE StreamType,
|
||||
IN PKSDATAFORMAT DataFormat,
|
||||
OUT PSERVICEGROUP *ServiceGroup,
|
||||
IN PAllocatorMXF AllocatorMXF,
|
||||
IN PMASTERCLOCK MasterClock,
|
||||
OUT PULONGLONG SchedulePreFetch
|
||||
) PURE;
|
||||
};
|
||||
|
||||
typedef IMiniportDMus *PMINIPORTDMUS;
|
||||
#undef INTERFACE
|
||||
|
||||
#define IMP_IMiniportDMus \
|
||||
IMP_IMiniport; \
|
||||
STDMETHODIMP_(NTSTATUS) Init( \
|
||||
IN PUNKNOWN UnknownAdapter, \
|
||||
IN PRESOURCELIST ResourceList, \
|
||||
IN PPORTDMUS Port, \
|
||||
OUT PSERVICEGROUP * ServiceGroup \
|
||||
); \
|
||||
\
|
||||
STDMETHODIMP_(void) Service(THIS); \
|
||||
\
|
||||
STDMETHODIMP_(NTSTATUS) NewStream( \
|
||||
OUT PMXF * MXF, \
|
||||
IN PUNKNOWN OuterUnknown, \
|
||||
IN POOL_TYPE PoolType, \
|
||||
IN ULONG PinID, \
|
||||
IN DMUS_STREAM_TYPE StreamType, \
|
||||
IN PKSDATAFORMAT DataFormat, \
|
||||
OUT PSERVICEGROUP * ServiceGroup, \
|
||||
IN PAllocatorMXF AllocatorMXF, \
|
||||
IN PMASTERCLOCK MasterClock, \
|
||||
OUT PULONGLONG SchedulePreFetch \
|
||||
)
|
||||
#define IMP_IMiniportDMus \
|
||||
IMP_IMiniport; \
|
||||
STDMETHODIMP_(NTSTATUS) Init( \
|
||||
IN PUNKNOWN UnknownAdapter, \
|
||||
IN PRESOURCELIST ResourceList, \
|
||||
IN PPORTDMUS Port, \
|
||||
OUT PSERVICEGROUP *ServiceGroup); \
|
||||
\
|
||||
STDMETHODIMP_(void) Service(THIS); \
|
||||
\
|
||||
STDMETHODIMP_(NTSTATUS) NewStream( \
|
||||
OUT PMXF *MXF, \
|
||||
IN PUNKNOWN OuterUnknown, \
|
||||
IN POOL_TYPE PoolType, \
|
||||
IN ULONG PinID, \
|
||||
IN DMUS_STREAM_TYPE StreamType, \
|
||||
IN PKSDATAFORMAT DataFormat, \
|
||||
OUT PSERVICEGROUP *ServiceGroup, \
|
||||
IN PAllocatorMXF AllocatorMXF, \
|
||||
IN PMASTERCLOCK MasterClock, \
|
||||
OUT PULONGLONG SchedulePreFetch)
|
||||
|
||||
#endif
|
||||
#endif /* _DMUSICKS_ */
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
|
||||
/* This are empty and is left for be compatible with building some older windows nt4/2000/2003/XP drivers */
|
||||
|
||||
|
||||
|
|
|
@ -8,19 +8,17 @@
|
|||
#ifndef DRMK_H
|
||||
#define DRMK_H
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD Flags;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
PFILE_OBJECT FileObject;
|
||||
PVOID Context;
|
||||
typedef struct {
|
||||
DWORD Flags;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
PFILE_OBJECT FileObject;
|
||||
PVOID Context;
|
||||
} DRMFORWARD, *PDRMFORWARD, *PCDRMFORWARD;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BOOL CopyProtect;
|
||||
ULONG Reserved;
|
||||
BOOL DigitalOutputDisable;
|
||||
typedef struct {
|
||||
BOOL CopyProtect;
|
||||
ULONG Reserved;
|
||||
BOOL DigitalOutputDisable;
|
||||
} DRMRIGHTS, *PDRMRIGHTS;
|
||||
|
||||
typedef const DRMRIGHTS *PCDRMRIGHTS;
|
||||
|
@ -31,87 +29,82 @@ typedef const DRMRIGHTS *PCDRMRIGHTS;
|
|||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DrmAddContentHandlers(
|
||||
IN ULONG ContentId,
|
||||
IN PVOID *paHandlers,
|
||||
IN ULONG NumHandlers);
|
||||
IN ULONG ContentId,
|
||||
IN PVOID *paHandlers,
|
||||
IN ULONG NumHandlers);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DrmCreateContentMixed(
|
||||
IN PULONG paContentId,
|
||||
IN ULONG cContentId,
|
||||
OUT PULONG pMixedContentId);
|
||||
IN PULONG paContentId,
|
||||
IN ULONG cContentId,
|
||||
OUT PULONG pMixedContentId);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DrmDestroyContent(
|
||||
IN ULONG ContentId);
|
||||
IN ULONG ContentId);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DrmForwardContentToDeviceObject(
|
||||
IN ULONG ContentId,
|
||||
IN PVOID Reserved,
|
||||
IN PCDRMFORWARD DrmForward);
|
||||
IN ULONG ContentId,
|
||||
IN PVOID Reserved,
|
||||
IN PCDRMFORWARD DrmForward);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DrmForwardContentToFileObject(
|
||||
IN ULONG ContentId,
|
||||
IN PFILE_OBJECT FileObject);
|
||||
IN ULONG ContentId,
|
||||
IN PFILE_OBJECT FileObject);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DrmForwardContentToInterface(
|
||||
IN ULONG ContentId,
|
||||
IN PUNKNOWN pUnknown,
|
||||
IN ULONG NumMethods);
|
||||
IN ULONG ContentId,
|
||||
IN PUNKNOWN pUnknown,
|
||||
IN ULONG NumMethods);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DrmGetContentRights(
|
||||
IN ULONG ContentId,
|
||||
OUT PDRMRIGHTS DrmRights);
|
||||
IN ULONG ContentId,
|
||||
OUT PDRMRIGHTS DrmRights);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
DEFINE_GUID(IID_IDrmAudioStream,
|
||||
0x1915c967, 0x3299, 0x48cb, 0xa3, 0xe4, 0x69, 0xfd, 0x1d, 0x1b, 0x30, 0x6e);
|
||||
0x1915c967, 0x3299, 0x48cb, 0xa3, 0xe4, 0x69, 0xfd, 0x1d, 0x1b, 0x30, 0x6e);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDrmAudioStream
|
||||
|
||||
DECLARE_INTERFACE_(IDrmAudioStream, IUnknown)
|
||||
{
|
||||
STDMETHOD_(NTSTATUS, QueryInterface)(THIS_
|
||||
REFIID InterfaceId,
|
||||
PVOID* Interface
|
||||
) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
STDMETHOD_(NTSTATUS,SetContentId)(THIS_
|
||||
IN ULONG ContentId,
|
||||
IN PCDRMRIGHTS DrmRights) PURE;
|
||||
DECLARE_INTERFACE_(IDrmAudioStream, IUnknown) {
|
||||
STDMETHOD_(NTSTATUS, QueryInterface)(THIS_
|
||||
REFIID InterfaceId,
|
||||
PVOID* Interface
|
||||
) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
STDMETHOD_(NTSTATUS,SetContentId)(THIS_
|
||||
IN ULONG ContentId,
|
||||
IN PCDRMRIGHTS DrmRights
|
||||
) PURE;
|
||||
};
|
||||
|
||||
typedef IDrmAudioStream *PDRMAUDIOSTREAM;
|
||||
|
||||
#define IMP_IDrmAudioStream \
|
||||
STDMETHODIMP_(NTSTATUS) SetContentId \
|
||||
( IN ULONG ContentId, \
|
||||
IN PCDRMRIGHTS DrmRights \
|
||||
);
|
||||
#define IMP_IDrmAudioStream \
|
||||
STDMETHODIMP_(NTSTATUS) SetContentId( \
|
||||
IN ULONG ContentId, \
|
||||
IN PCDRMRIGHTS DrmRights);
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* DRMK_H */
|
||||
|
|
|
@ -22,15 +22,15 @@ typedef struct _ROOTHUB_PDO_EXTENSION {
|
|||
#define USB_BUSIFFN __stdcall
|
||||
#endif
|
||||
|
||||
#define CD_ERR_V1 0x00000001
|
||||
#define CD_ERR_V1 0x00000001
|
||||
|
||||
#define ID_ERR_V1 0x00000001
|
||||
#define ID_ERR_V1 0x00000001
|
||||
|
||||
#define USBD_KEEP_DEVICE_DATA 0x00000001
|
||||
#define USBD_MARK_DEVICE_BUSY 0x00000002
|
||||
|
||||
#define USB_IDLE_NOT_READY 0
|
||||
#define USB_IDLE_READY 1
|
||||
#define USB_IDLE_NOT_READY 0
|
||||
#define USB_IDLE_READY 1
|
||||
|
||||
typedef
|
||||
NTSTATUS
|
||||
|
@ -41,7 +41,6 @@ USB_BUSIFFN_CREATE_USB_DEVICE (
|
|||
IN PUSB_DEVICE_HANDLE HubDeviceHandle,
|
||||
IN USHORT PortStatus,
|
||||
IN USHORT PortNumber);
|
||||
|
||||
typedef USB_BUSIFFN_CREATE_USB_DEVICE *PUSB_BUSIFFN_CREATE_USB_DEVICE;
|
||||
|
||||
typedef enum _USBPORT_CREATEDEV_ERROR {
|
||||
|
@ -56,47 +55,45 @@ typedef enum _USBPORT_CREATEDEV_ERROR {
|
|||
} USBPORT_CREATEDEV_ERROR;
|
||||
|
||||
typedef struct _USB_CD_ERROR_INFORMATION {
|
||||
ULONG Version;
|
||||
USBPORT_CREATEDEV_ERROR PathError;
|
||||
ULONG UlongArg1;
|
||||
ULONG UlongArg2;
|
||||
NTSTATUS NtStatus;
|
||||
UCHAR XtraInfo[64];
|
||||
ULONG Version;
|
||||
USBPORT_CREATEDEV_ERROR PathError;
|
||||
ULONG UlongArg1;
|
||||
ULONG UlongArg2;
|
||||
NTSTATUS NtStatus;
|
||||
UCHAR XtraInfo[64];
|
||||
} USB_CD_ERROR_INFORMATION, *PUSB_CD_ERROR_INFORMATION;
|
||||
|
||||
typedef
|
||||
NTSTATUS
|
||||
USB_BUSIFFN
|
||||
USB_BUSIFFN_CREATE_USB_DEVICE_EX (
|
||||
IN PVOID BusContext,
|
||||
OUT PUSB_DEVICE_HANDLE *NewDeviceHandle,
|
||||
IN PUSB_DEVICE_HANDLE HsHubDeviceHandle,
|
||||
IN USHORT PortStatus,
|
||||
IN USHORT PortNumber,
|
||||
OUT PUSB_CD_ERROR_INFORMATION CdErrorInfo,
|
||||
IN PVOID BusContext,
|
||||
OUT PUSB_DEVICE_HANDLE *NewDeviceHandle,
|
||||
IN PUSB_DEVICE_HANDLE HsHubDeviceHandle,
|
||||
IN USHORT PortStatus,
|
||||
IN USHORT PortNumber,
|
||||
OUT PUSB_CD_ERROR_INFORMATION CdErrorInfo,
|
||||
IN USHORT TtPortNumber);
|
||||
|
||||
typedef USB_BUSIFFN_CREATE_USB_DEVICE_EX *PUSB_BUSIFFN_CREATE_USB_DEVICE_EX;
|
||||
|
||||
typedef struct _USB_PORT_PATH {
|
||||
ULONG PortPathDepth;
|
||||
ULONG PortPath[6];
|
||||
ULONG PortPathDepth;
|
||||
ULONG PortPath[6];
|
||||
} USB_PORT_PATH, *PUSB_PORT_PATH;
|
||||
|
||||
typedef
|
||||
NTSTATUS
|
||||
USB_BUSIFFN
|
||||
USB_BUSIFFN_CREATE_USB_DEVICE_V7 (
|
||||
IN PVOID BusContext,
|
||||
OUT PUSB_DEVICE_HANDLE *NewDeviceHandle,
|
||||
IN PUSB_DEVICE_HANDLE HsHubDeviceHandle,
|
||||
IN USHORT PortStatus,
|
||||
IN PUSB_PORT_PATH PortPath,
|
||||
OUT PUSB_CD_ERROR_INFORMATION CdErrorInfo,
|
||||
IN USHORT TtPortNumber,
|
||||
IN PDEVICE_OBJECT PdoDeviceObject,
|
||||
IN PUNICODE_STRING PhysicalDeviceObjectName);
|
||||
|
||||
IN PVOID BusContext,
|
||||
OUT PUSB_DEVICE_HANDLE *NewDeviceHandle,
|
||||
IN PUSB_DEVICE_HANDLE HsHubDeviceHandle,
|
||||
IN USHORT PortStatus,
|
||||
IN PUSB_PORT_PATH PortPath,
|
||||
OUT PUSB_CD_ERROR_INFORMATION CdErrorInfo,
|
||||
IN USHORT TtPortNumber,
|
||||
IN PDEVICE_OBJECT PdoDeviceObject,
|
||||
IN PUNICODE_STRING PhysicalDeviceObjectName);
|
||||
typedef USB_BUSIFFN_CREATE_USB_DEVICE_V7 *PUSB_BUSIFFN_CREATE_USB_DEVICE_V7;
|
||||
|
||||
typedef enum _USBPORT_INITDEV_ERROR {
|
||||
|
@ -120,29 +117,26 @@ typedef
|
|||
NTSTATUS
|
||||
USB_BUSIFFN
|
||||
USB_BUSIFFN_INITIALIZE_USB_DEVICE (
|
||||
IN PVOID BusContext,
|
||||
IN OUT PUSB_DEVICE_HANDLE DeviceHandle);
|
||||
|
||||
IN PVOID BusContext,
|
||||
IN OUT PUSB_DEVICE_HANDLE DeviceHandle);
|
||||
typedef USB_BUSIFFN_INITIALIZE_USB_DEVICE *PUSB_BUSIFFN_INITIALIZE_USB_DEVICE;
|
||||
|
||||
typedef
|
||||
NTSTATUS
|
||||
USB_BUSIFFN
|
||||
USB_BUSIFFN_INITIALIZE_USB_DEVICE_EX (
|
||||
IN PVOID BusContext,
|
||||
IN OUT PUSB_DEVICE_HANDLE DeviceHandle,
|
||||
OUT PUSB_ID_ERROR_INFORMATION IdErrInfo);
|
||||
|
||||
IN PVOID BusContext,
|
||||
IN OUT PUSB_DEVICE_HANDLE DeviceHandle,
|
||||
OUT PUSB_ID_ERROR_INFORMATION IdErrInfo);
|
||||
typedef USB_BUSIFFN_INITIALIZE_USB_DEVICE_EX *PUSB_BUSIFFN_INITIALIZE_USB_DEVICE_EX;
|
||||
|
||||
typedef
|
||||
NTSTATUS
|
||||
USB_BUSIFFN
|
||||
USB_BUSIFFN_REMOVE_USB_DEVICE (
|
||||
IN PVOID BusContext,
|
||||
IN OUT PUSB_DEVICE_HANDLE DeviceHandle,
|
||||
IN ULONG Flags);
|
||||
|
||||
IN PVOID BusContext,
|
||||
IN OUT PUSB_DEVICE_HANDLE DeviceHandle,
|
||||
IN ULONG Flags);
|
||||
typedef USB_BUSIFFN_REMOVE_USB_DEVICE *PUSB_BUSIFFN_REMOVE_USB_DEVICE;
|
||||
|
||||
typedef
|
||||
|
@ -155,7 +149,6 @@ USB_BUSIFFN_GET_USB_DESCRIPTORS (
|
|||
IN OUT PULONG DeviceDescriptorBufferLength,
|
||||
OUT PUCHAR ConfigDescriptorBuffer,
|
||||
IN OUT PULONG ConfigDescriptorBufferLength);
|
||||
|
||||
typedef USB_BUSIFFN_GET_USB_DESCRIPTORS *PUSB_BUSIFFN_GET_USB_DESCRIPTORS;
|
||||
|
||||
typedef
|
||||
|
@ -165,7 +158,6 @@ USB_BUSIFFN_RESTORE_DEVICE (
|
|||
IN PVOID BusContext,
|
||||
IN OUT PUSB_DEVICE_HANDLE OldDeviceHandle,
|
||||
IN OUT PUSB_DEVICE_HANDLE NewDeviceHandle);
|
||||
|
||||
typedef USB_BUSIFFN_RESTORE_DEVICE *PUSB_BUSIFFN_RESTORE_DEVICE;
|
||||
|
||||
typedef
|
||||
|
@ -174,7 +166,6 @@ USB_BUSIFFN
|
|||
USB_BUSIFFN_GET_POTRTHACK_FLAGS (
|
||||
IN PVOID BusContext,
|
||||
IN OUT PULONG Flags);
|
||||
|
||||
typedef USB_BUSIFFN_GET_POTRTHACK_FLAGS *PUSB_BUSIFFN_GET_POTRTHACK_FLAGS;
|
||||
|
||||
typedef
|
||||
|
@ -186,7 +177,6 @@ USB_BUSIFFN_GET_DEVICE_INFORMATION (
|
|||
OUT PVOID DeviceInformationBuffer,
|
||||
IN ULONG DeviceInformationBufferLength,
|
||||
IN OUT PULONG LengthOfDataCopied);
|
||||
|
||||
typedef USB_BUSIFFN_GET_DEVICE_INFORMATION *PUSB_BUSIFFN_GET_DEVICE_INFORMATION;
|
||||
|
||||
typedef
|
||||
|
@ -197,7 +187,6 @@ USB_BUSIFFN_GET_CONTROLLER_INFORMATION (
|
|||
IN OUT PVOID ControllerInformationBuffer,
|
||||
IN ULONG ControllerInformationBufferLength,
|
||||
IN OUT PULONG LengthOfDataCopied);
|
||||
|
||||
typedef USB_BUSIFFN_GET_CONTROLLER_INFORMATION *PUSB_BUSIFFN_GET_CONTROLLER_INFORMATION;
|
||||
|
||||
typedef
|
||||
|
@ -206,7 +195,6 @@ USB_BUSIFFN
|
|||
USB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND (
|
||||
IN PVOID BusContext,
|
||||
IN BOOLEAN Enable);
|
||||
|
||||
typedef USB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND *PUSB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND;
|
||||
|
||||
typedef
|
||||
|
@ -218,7 +206,6 @@ USB_BUSIFFN_GET_EXTENDED_HUB_INFO (
|
|||
IN PVOID HubInformationBuffer,
|
||||
IN ULONG HubInformationBufferLength,
|
||||
OUT PULONG LengthOfDataCopied);
|
||||
|
||||
typedef USB_BUSIFFN_GET_EXTENDED_HUB_INFO *PUSB_BUSIFFN_GET_EXTENDED_HUB_INFO;
|
||||
|
||||
typedef
|
||||
|
@ -229,7 +216,6 @@ USB_BUSIFFN_GET_ROOTHUB_SYM_NAME (
|
|||
IN PVOID HubSymNameBuffer,
|
||||
IN ULONG HubSymNameBufferLength,
|
||||
OUT PULONG HubSymNameActualLength);
|
||||
|
||||
typedef USB_BUSIFFN_GET_ROOTHUB_SYM_NAME *PUSB_BUSIFFN_GET_ROOTHUB_SYM_NAME;
|
||||
|
||||
typedef
|
||||
|
@ -238,7 +224,6 @@ USB_BUSIFFN
|
|||
USB_BUSIFFN_GET_DEVICE_BUSCONTEXT (
|
||||
IN PVOID HubBusContext,
|
||||
IN PVOID DeviceHandle);
|
||||
|
||||
typedef USB_BUSIFFN_GET_DEVICE_BUSCONTEXT *PUSB_BUSIFFN_GET_DEVICE_BUSCONTEXT;
|
||||
|
||||
typedef
|
||||
|
@ -248,7 +233,6 @@ USB_BUSIFFN_INITIALIZE_20HUB (
|
|||
IN PVOID BusContext,
|
||||
IN PUSB_DEVICE_HANDLE HubDeviceHandle,
|
||||
IN ULONG TtCount);
|
||||
|
||||
typedef USB_BUSIFFN_INITIALIZE_20HUB *PUSB_BUSIFFN_INITIALIZE_20HUB;
|
||||
|
||||
typedef
|
||||
|
@ -257,7 +241,6 @@ USB_BUSIFFN
|
|||
USB_BUSIFFN_IS_ROOT (
|
||||
IN PVOID BusContext,
|
||||
IN PVOID DeviceObject);
|
||||
|
||||
typedef USB_BUSIFFN_IS_ROOT *PUSB_BUSIFFN_IS_ROOT;
|
||||
|
||||
typedef
|
||||
|
@ -265,7 +248,6 @@ VOID
|
|||
USB_BUSIFFN
|
||||
USB_BUSIFFN_ACQUIRE_SEMAPHORE (
|
||||
IN PVOID BusContext);
|
||||
|
||||
typedef USB_BUSIFFN_ACQUIRE_SEMAPHORE *PUSB_BUSIFFN_ACQUIRE_SEMAPHORE;
|
||||
|
||||
typedef
|
||||
|
@ -273,7 +255,6 @@ VOID
|
|||
USB_BUSIFFN
|
||||
USB_BUSIFFN_RELEASE_SEMAPHORE (
|
||||
IN PVOID BusContext);
|
||||
|
||||
typedef USB_BUSIFFN_RELEASE_SEMAPHORE *PUSB_BUSIFFN_RELEASE_SEMAPHORE;
|
||||
|
||||
typedef
|
||||
|
@ -281,7 +262,6 @@ VOID
|
|||
__stdcall
|
||||
RH_INIT_CALLBACK (
|
||||
IN PVOID CallBackContext);
|
||||
|
||||
typedef RH_INIT_CALLBACK *PRH_INIT_CALLBACK;
|
||||
|
||||
typedef
|
||||
|
@ -291,7 +271,6 @@ USB_BUSIFFN_ROOTHUB_INIT_NOTIFY (
|
|||
IN PVOID BusContext,
|
||||
IN PVOID CallbackContext,
|
||||
IN PRH_INIT_CALLBACK CallbackRoutine);
|
||||
|
||||
typedef USB_BUSIFFN_ROOTHUB_INIT_NOTIFY *PUSB_BUSIFFN_ROOTHUB_INIT_NOTIFY;
|
||||
|
||||
typedef
|
||||
|
@ -300,7 +279,6 @@ USB_BUSIFFN
|
|||
USB_BUSIFFN_FLUSH_TRANSFERS (
|
||||
IN PVOID BusContext,
|
||||
IN PVOID DeviceHandle);
|
||||
|
||||
typedef USB_BUSIFFN_FLUSH_TRANSFERS *PUSB_BUSIFFN_FLUSH_TRANSFERS;
|
||||
|
||||
typedef
|
||||
|
@ -310,7 +288,6 @@ USB_BUSIFFN_CALC_PIPE_BANDWIDTH (
|
|||
IN PVOID BusContext,
|
||||
IN PUSBD_PIPE_INFORMATION PipeInfo,
|
||||
IN USB_DEVICE_SPEED DeviceSpeed);
|
||||
|
||||
typedef USB_BUSIFFN_CALC_PIPE_BANDWIDTH *PUSB_BUSIFFN_CALC_PIPE_BANDWIDTH;
|
||||
|
||||
typedef
|
||||
|
@ -319,7 +296,6 @@ USB_BUSIFFN
|
|||
USB_BUSIFFN_SET_BUS_WAKE_MODE (
|
||||
IN PVOID BusContext,
|
||||
IN ULONG Mode);
|
||||
|
||||
typedef USB_BUSIFFN_SET_BUS_WAKE_MODE *PUSB_BUSIFFN_SET_BUS_WAKE_MODE;
|
||||
|
||||
typedef
|
||||
|
@ -330,7 +306,6 @@ USB_BUSIFFN_SET_DEVICE_FLAG (
|
|||
IN GUID *DeviceFlagGuid,
|
||||
IN PVOID ValueData,
|
||||
IN ULONG ValueLength);
|
||||
|
||||
typedef USB_BUSIFFN_SET_DEVICE_FLAG *PUSB_BUSIFFN_SET_DEVICE_FLAG;
|
||||
|
||||
typedef
|
||||
|
@ -340,7 +315,6 @@ USB_BUSIFFN_SET_DEVHANDLE_DATA (
|
|||
IN PVOID BusContext,
|
||||
IN PVOID DeviceHandle,
|
||||
IN PDEVICE_OBJECT UsbDevicePdo);
|
||||
|
||||
typedef USB_BUSIFFN_SET_DEVHANDLE_DATA *PUSB_BUSIFFN_SET_DEVHANDLE_DATA;
|
||||
|
||||
typedef
|
||||
|
@ -351,7 +325,6 @@ USB_BUSIFFN_TEST_POINT (
|
|||
IN PVOID DeviceHandle,
|
||||
IN ULONG Opcode,
|
||||
IN PVOID TestData);
|
||||
|
||||
typedef USB_BUSIFFN_TEST_POINT *PUSB_BUSIFFN_TEST_POINT;
|
||||
|
||||
typedef
|
||||
|
@ -363,7 +336,6 @@ USB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO (
|
|||
OUT PVOID DeviceInformationBuffer,
|
||||
IN ULONG DeviceInformationBufferLength,
|
||||
IN OUT PULONG LengthOfDataCopied);
|
||||
|
||||
typedef USB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO *PUSB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO;
|
||||
|
||||
typedef
|
||||
|
@ -371,7 +343,6 @@ NTSTATUS
|
|||
USB_BUSIFFN
|
||||
USB_BUSIFFN_WAIT_ASYNC_POWERUP (
|
||||
IN PVOID BusContext);
|
||||
|
||||
typedef USB_BUSIFFN_WAIT_ASYNC_POWERUP *PUSB_BUSIFFN_WAIT_ASYNC_POWERUP;
|
||||
|
||||
typedef
|
||||
|
@ -381,7 +352,6 @@ USB_BUSIFFN_GET_DEVICE_ADDRESS (
|
|||
IN PVOID BusContext,
|
||||
IN PUSB_DEVICE_HANDLE DeviceHandle,
|
||||
OUT PUSHORT DeviceAddress);
|
||||
|
||||
typedef USB_BUSIFFN_GET_DEVICE_ADDRESS *PUSB_BUSIFFN_GET_DEVICE_ADDRESS;
|
||||
|
||||
typedef
|
||||
|
@ -392,7 +362,6 @@ USB_BUSIFFN_DEREF_DEVICE_HANDLE (
|
|||
IN PUSB_DEVICE_HANDLE DeviceHandle,
|
||||
IN PVOID Object,
|
||||
IN ULONG Tag);
|
||||
|
||||
typedef USB_BUSIFFN_DEREF_DEVICE_HANDLE *PUSB_BUSIFFN_DEREF_DEVICE_HANDLE;
|
||||
|
||||
typedef
|
||||
|
@ -403,7 +372,6 @@ USB_BUSIFFN_REF_DEVICE_HANDLE (
|
|||
IN PUSB_DEVICE_HANDLE DeviceHandle,
|
||||
IN PVOID Object,
|
||||
IN ULONG Tag);
|
||||
|
||||
typedef USB_BUSIFFN_REF_DEVICE_HANDLE *PUSB_BUSIFFN_REF_DEVICE_HANDLE;
|
||||
|
||||
typedef
|
||||
|
@ -413,7 +381,6 @@ USB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE (
|
|||
IN PVOID BusContext,
|
||||
IN PUSB_DEVICE_HANDLE DeviceHandle,
|
||||
IN ULONG NewIdleReadyState);
|
||||
|
||||
typedef USB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE *PUSB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE;
|
||||
|
||||
typedef
|
||||
|
@ -423,7 +390,6 @@ USB_BUSIFFN_GET_CONTAINER_ID_FOR_PORT (
|
|||
IN PVOID BusContext,
|
||||
IN USHORT PortNumber,
|
||||
OUT LPGUID ContainerId);
|
||||
|
||||
typedef USB_BUSIFFN_GET_CONTAINER_ID_FOR_PORT *PUSB_BUSIFFN_GET_CONTAINER_ID_FOR_PORT;
|
||||
|
||||
typedef
|
||||
|
@ -433,7 +399,6 @@ USB_BUSIFFN_SET_CONTAINER_ID_FOR_PORT (
|
|||
IN PVOID BusContext,
|
||||
IN USHORT PortNumber,
|
||||
IN LPGUID ContainerId);
|
||||
|
||||
typedef USB_BUSIFFN_SET_CONTAINER_ID_FOR_PORT *PUSB_BUSIFFN_SET_CONTAINER_ID_FOR_PORT;
|
||||
|
||||
typedef
|
||||
|
@ -442,7 +407,6 @@ USB_BUSIFFN
|
|||
USB_BUSIFFN_ABORT_ALL_DEVICE_PIPES (
|
||||
IN PVOID BusContext,
|
||||
IN PUSB_DEVICE_HANDLE DeviceHandle);
|
||||
|
||||
typedef USB_BUSIFFN_ABORT_ALL_DEVICE_PIPES *PUSB_BUSIFFN_ABORT_ALL_DEVICE_PIPES;
|
||||
|
||||
#define ERRATA_FLAG_RESET_TT_ON_CANCEL 1
|
||||
|
@ -468,11 +432,10 @@ USB_BUSIFFN_SET_DEVICE_ERRATA_FLAG (
|
|||
IN PVOID BusContext,
|
||||
IN PUSB_DEVICE_HANDLE DeviceHandle,
|
||||
IN ULONG DeviceErrataFlag);
|
||||
|
||||
typedef USB_BUSIFFN_SET_DEVICE_ERRATA_FLAG *PUSB_BUSIFFN_SET_DEVICE_ERRATA_FLAG;
|
||||
|
||||
DEFINE_GUID(USB_BUS_INTERFACE_HUB_GUID,
|
||||
0xb2bb8c0a, 0x5ab4, 0x11d3, 0xa8, 0xcd, 0x0, 0xc0, 0x4f, 0x68, 0x74, 0x7a);
|
||||
0xb2bb8c0a, 0x5ab4, 0x11d3, 0xa8, 0xcd, 0x0, 0xc0, 0x4f, 0x68, 0x74, 0x7a);
|
||||
|
||||
typedef struct _USB_BUS_INTERFACE_HUB_V0 {
|
||||
USHORT Size;
|
||||
|
@ -667,7 +630,7 @@ typedef struct _USB_BUS_INTERFACE_HUB_V7 {
|
|||
} USB_BUS_INTERFACE_HUB_V7, *PUSB_BUS_INTERFACE_HUB_V7;
|
||||
|
||||
DEFINE_GUID(USB_BUS_INTERFACE_HUB_MINIDUMP_GUID,
|
||||
0xc5485f21, 0x4e81, 0x4a23, 0xa8, 0xf9, 0xd8, 0x51, 0x8a, 0xf4, 0x5c, 0x38);
|
||||
0xc5485f21, 0x4e81, 0x4a23, 0xa8, 0xf9, 0xd8, 0x51, 0x8a, 0xf4, 0x5c, 0x38);
|
||||
|
||||
typedef VOID
|
||||
(USB_BUSIFFN *PUSB_BUSIFFN_SET_MINIDUMP_FLAGS) (
|
||||
|
@ -683,7 +646,7 @@ typedef struct _USB_BUS_INTERFACE_HUB_MINIDUMP {
|
|||
} USB_BUS_INTERFACE_HUB_MINIDUMP, *PUSB_BUS_INTERFACE_HUB_MINIDUMP;
|
||||
|
||||
DEFINE_GUID(USB_BUS_INTERFACE_HUB_SS_GUID,
|
||||
0xbfc3f363, 0x8ba1, 0x4c7b, 0x97, 0xba, 0x9b, 0x12, 0xb1, 0xca, 0x13, 0x2f);
|
||||
0xbfc3f363, 0x8ba1, 0x4c7b, 0x97, 0xba, 0x9b, 0x12, 0xb1, 0xca, 0x13, 0x2f);
|
||||
|
||||
typedef NTSTATUS
|
||||
(USB_BUSIFFN *PUSB_BUSIFFN_SUSPEND_HUB) (
|
||||
|
@ -694,95 +657,95 @@ typedef NTSTATUS
|
|||
PDEVICE_OBJECT Pdo);
|
||||
|
||||
typedef struct _USB_BUS_INTERFACE_HUB_SELECTIVE_SUSPEND {
|
||||
USHORT Size;
|
||||
USHORT Version;
|
||||
PVOID BusContext;
|
||||
PINTERFACE_REFERENCE InterfaceReference;
|
||||
PINTERFACE_DEREFERENCE InterfaceDereference;
|
||||
PUSB_BUSIFFN_SUSPEND_HUB SuspendHub;
|
||||
PUSB_BUSIFFN_RESUME_HUB ResumeHub;
|
||||
USHORT Size;
|
||||
USHORT Version;
|
||||
PVOID BusContext;
|
||||
PINTERFACE_REFERENCE InterfaceReference;
|
||||
PINTERFACE_DEREFERENCE InterfaceDereference;
|
||||
PUSB_BUSIFFN_SUSPEND_HUB SuspendHub;
|
||||
PUSB_BUSIFFN_RESUME_HUB ResumeHub;
|
||||
} USB_BUS_INTERFACE_HUB_SELECTIVE_SUSPEND, *PUSB_BUS_INTERFACE_HUB_SELECTIVE_SUSPEND;
|
||||
|
||||
#include <pshpack1.h>
|
||||
|
||||
typedef struct _USB_PIPE_INFORMATION_0 {
|
||||
USB_ENDPOINT_DESCRIPTOR EndpointDescriptor;
|
||||
UCHAR ED_Pad[1];
|
||||
ULONG ScheduleOffset;
|
||||
USB_ENDPOINT_DESCRIPTOR EndpointDescriptor;
|
||||
UCHAR ED_Pad[1];
|
||||
ULONG ScheduleOffset;
|
||||
} USB_PIPE_INFORMATION_0, *PUSB_PIPE_INFORMATION_0;
|
||||
|
||||
typedef struct _USB_LEVEL_INFORMATION {
|
||||
ULONG InformationLevel;
|
||||
ULONG ActualLength;
|
||||
ULONG InformationLevel;
|
||||
ULONG ActualLength;
|
||||
} USB_LEVEL_INFORMATION, *PUSB_LEVEL_INFORMATION;
|
||||
|
||||
typedef struct _USB_DEVICE_INFORMATION_0 {
|
||||
ULONG InformationLevel;
|
||||
ULONG ActualLength;
|
||||
ULONG PortNumber;
|
||||
USB_DEVICE_DESCRIPTOR DeviceDescriptor;
|
||||
UCHAR DD_pad[2];
|
||||
UCHAR CurrentConfigurationValue;
|
||||
UCHAR ReservedMBZ;
|
||||
USHORT DeviceAddress;
|
||||
ULONG HubAddress;
|
||||
USB_DEVICE_SPEED DeviceSpeed;
|
||||
USB_DEVICE_TYPE DeviceType;
|
||||
ULONG NumberOfOpenPipes;
|
||||
USB_PIPE_INFORMATION_0 PipeList[1];
|
||||
ULONG InformationLevel;
|
||||
ULONG ActualLength;
|
||||
ULONG PortNumber;
|
||||
USB_DEVICE_DESCRIPTOR DeviceDescriptor;
|
||||
UCHAR DD_pad[2];
|
||||
UCHAR CurrentConfigurationValue;
|
||||
UCHAR ReservedMBZ;
|
||||
USHORT DeviceAddress;
|
||||
ULONG HubAddress;
|
||||
USB_DEVICE_SPEED DeviceSpeed;
|
||||
USB_DEVICE_TYPE DeviceType;
|
||||
ULONG NumberOfOpenPipes;
|
||||
USB_PIPE_INFORMATION_0 PipeList[1];
|
||||
} USB_DEVICE_INFORMATION_0, *PUSB_DEVICE_INFORMATION_0;
|
||||
|
||||
typedef struct _USB_CONTROLLER_INFORMATION_0 {
|
||||
ULONG InformationLevel;
|
||||
ULONG ActualLength;
|
||||
BOOLEAN SelectiveSuspendEnabled;
|
||||
BOOLEAN IsHighSpeedController;
|
||||
ULONG InformationLevel;
|
||||
ULONG ActualLength;
|
||||
BOOLEAN SelectiveSuspendEnabled;
|
||||
BOOLEAN IsHighSpeedController;
|
||||
} USB_CONTROLLER_INFORMATION_0, *PUSB_CONTROLLER_INFORMATION_0;
|
||||
|
||||
typedef struct _USB_CONTROLLER_INFORMATION_1 {
|
||||
ULONG InformationLevel;
|
||||
ULONG ActualLength;
|
||||
BOOLEAN SelectiveSuspendEnabled;
|
||||
BOOLEAN IsHighSpeedController;
|
||||
ULONG HcBusNumber;
|
||||
ULONG HcBusDevice;
|
||||
ULONG HcBusFunction;
|
||||
ULONG InformationLevel;
|
||||
ULONG ActualLength;
|
||||
BOOLEAN SelectiveSuspendEnabled;
|
||||
BOOLEAN IsHighSpeedController;
|
||||
ULONG HcBusNumber;
|
||||
ULONG HcBusDevice;
|
||||
ULONG HcBusFunction;
|
||||
} USB_CONTROLLER_INFORMATION_1, *PUSB_CONTROLLER_INFORMATION_1;
|
||||
|
||||
typedef struct _USB_EXTPORT_INFORMATION_0 {
|
||||
ULONG PhysicalPortNumber;
|
||||
ULONG PortLabelNumber;
|
||||
USHORT VidOverride;
|
||||
USHORT PidOverride;
|
||||
ULONG PortAttributes;
|
||||
ULONG PhysicalPortNumber;
|
||||
ULONG PortLabelNumber;
|
||||
USHORT VidOverride;
|
||||
USHORT PidOverride;
|
||||
ULONG PortAttributes;
|
||||
} USB_EXTPORT_INFORMATION_0, *PUSB_EXTPORT_INFORMATION;
|
||||
|
||||
typedef struct _USB_EXTHUB_INFORMATION_0 {
|
||||
ULONG InformationLevel;
|
||||
ULONG NumberOfPorts;
|
||||
USB_EXTPORT_INFORMATION_0 Port[255];
|
||||
ULONG InformationLevel;
|
||||
ULONG NumberOfPorts;
|
||||
USB_EXTPORT_INFORMATION_0 Port[255];
|
||||
} USB_EXTHUB_INFORMATION_0, *PUSB_EXTHUB_INFORMATION_0;
|
||||
|
||||
typedef struct _USB_DEVICE_PERFORMANCE_INFO_0 {
|
||||
ULONG InformationLevel;
|
||||
ULONG ActualLength;
|
||||
ULONG BulkBytes;
|
||||
ULONG BulkUrbCount;
|
||||
ULONG ControlDataBytes;
|
||||
ULONG ControlUrbCount;
|
||||
ULONG IsoBytes;
|
||||
ULONG IsoUrbCount;
|
||||
ULONG InterruptBytes;
|
||||
ULONG InterruptUrbCount;
|
||||
ULONG AllocedInterrupt[6];
|
||||
ULONG AllocedIso;
|
||||
ULONG Total32secBandwidth;
|
||||
ULONG TotalTtBandwidth;
|
||||
ULONG TotalIsoLatency;
|
||||
ULONG DroppedIsoPackets;
|
||||
ULONG TransferErrors;
|
||||
ULONG InformationLevel;
|
||||
ULONG ActualLength;
|
||||
ULONG BulkBytes;
|
||||
ULONG BulkUrbCount;
|
||||
ULONG ControlDataBytes;
|
||||
ULONG ControlUrbCount;
|
||||
ULONG IsoBytes;
|
||||
ULONG IsoUrbCount;
|
||||
ULONG InterruptBytes;
|
||||
ULONG InterruptUrbCount;
|
||||
ULONG AllocedInterrupt[6];
|
||||
ULONG AllocedIso;
|
||||
ULONG Total32secBandwidth;
|
||||
ULONG TotalTtBandwidth;
|
||||
ULONG TotalIsoLatency;
|
||||
ULONG DroppedIsoPackets;
|
||||
ULONG TransferErrors;
|
||||
} USB_DEVICE_PERFORMANCE_INFO_0, *PUSB_DEVICE_PERFORMANCE_INFO_0;
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
#endif
|
||||
#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
|
||||
|
|
|
@ -23,15 +23,6 @@
|
|||
#ifndef __IDE_H
|
||||
#define __IDE_H
|
||||
|
||||
/* Helper macro to enable gcc's extension. */
|
||||
#ifndef __GNU_EXTENSION
|
||||
#ifdef __GNUC__
|
||||
#define __GNU_EXTENSION __extension__
|
||||
#else
|
||||
#define __GNU_EXTENSION
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -32,9 +32,9 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#if defined(_MCD_)
|
||||
#define CHANGERAPI
|
||||
#define CHANGERAPI
|
||||
#else
|
||||
#define CHANGERAPI DECLSPEC_IMPORT
|
||||
#define CHANGERAPI DECLSPEC_IMPORT
|
||||
#endif
|
||||
|
||||
#ifdef DebugPrint
|
||||
|
@ -47,41 +47,41 @@ extern "C" {
|
|||
#define DebugPrint(x)
|
||||
#endif
|
||||
|
||||
#define MAXIMUM_CHANGER_INQUIRY_DATA 252
|
||||
#define MAXIMUM_CHANGER_INQUIRY_DATA 252
|
||||
|
||||
CHANGERAPI
|
||||
PVOID
|
||||
NTAPI
|
||||
ChangerClassAllocatePool(
|
||||
IN POOL_TYPE PoolType,
|
||||
IN ULONG NumberOfBytes);
|
||||
IN POOL_TYPE PoolType,
|
||||
IN ULONG NumberOfBytes);
|
||||
|
||||
VOID
|
||||
ChangerClassDebugPrint(
|
||||
ULONG DebugPrintLevel,
|
||||
PCCHAR DebugMessage,
|
||||
ULONG DebugPrintLevel,
|
||||
PCCHAR DebugMessage,
|
||||
...);
|
||||
|
||||
CHANGERAPI
|
||||
PVOID
|
||||
NTAPI
|
||||
ChangerClassFreePool(
|
||||
IN PVOID PoolToFree);
|
||||
IN PVOID PoolToFree);
|
||||
|
||||
CHANGERAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ChangerClassSendSrbSynchronous(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PSCSI_REQUEST_BLOCK Srb,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG BufferSize,
|
||||
IN BOOLEAN WriteToDevice);
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PSCSI_REQUEST_BLOCK Srb,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG BufferSize,
|
||||
IN BOOLEAN WriteToDevice);
|
||||
|
||||
|
||||
typedef NTSTATUS NTAPI
|
||||
(*CHANGER_INITIALIZE)(
|
||||
IN PDEVICE_OBJECT DeviceObject);
|
||||
IN PDEVICE_OBJECT DeviceObject);
|
||||
|
||||
typedef ULONG NTAPI
|
||||
(*CHANGER_EXTENSION_SIZE)(
|
||||
|
@ -89,47 +89,47 @@ typedef ULONG NTAPI
|
|||
|
||||
typedef VOID NTAPI
|
||||
(*CHANGER_ERROR_ROUTINE)(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PSCSI_REQUEST_BLOCK Srb,
|
||||
NTSTATUS *Status,
|
||||
BOOLEAN *Retry);
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PSCSI_REQUEST_BLOCK Srb,
|
||||
NTSTATUS *Status,
|
||||
BOOLEAN *Retry);
|
||||
|
||||
typedef NTSTATUS NTAPI
|
||||
(*CHANGER_COMMAND_ROUTINE)(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
|
||||
typedef NTSTATUS NTAPI
|
||||
(*CHANGER_PERFORM_DIAGNOSTICS)(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
OUT PWMI_CHANGER_PROBLEM_DEVICE_ERROR ChangerDeviceError);
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
OUT PWMI_CHANGER_PROBLEM_DEVICE_ERROR ChangerDeviceError);
|
||||
|
||||
typedef struct _MCD_INIT_DATA {
|
||||
ULONG InitDataSize;
|
||||
CHANGER_EXTENSION_SIZE ChangerAdditionalExtensionSize;
|
||||
CHANGER_INITIALIZE ChangerInitialize;
|
||||
CHANGER_ERROR_ROUTINE ChangerError;
|
||||
CHANGER_PERFORM_DIAGNOSTICS ChangerPerformDiagnostics;
|
||||
CHANGER_COMMAND_ROUTINE ChangerGetParameters;
|
||||
CHANGER_COMMAND_ROUTINE ChangerGetStatus;
|
||||
CHANGER_COMMAND_ROUTINE ChangerGetProductData;
|
||||
CHANGER_COMMAND_ROUTINE ChangerSetAccess;
|
||||
CHANGER_COMMAND_ROUTINE ChangerGetElementStatus;
|
||||
CHANGER_COMMAND_ROUTINE ChangerInitializeElementStatus;
|
||||
CHANGER_COMMAND_ROUTINE ChangerSetPosition;
|
||||
CHANGER_COMMAND_ROUTINE ChangerExchangeMedium;
|
||||
CHANGER_COMMAND_ROUTINE ChangerMoveMedium;
|
||||
CHANGER_COMMAND_ROUTINE ChangerReinitializeUnit;
|
||||
CHANGER_COMMAND_ROUTINE ChangerQueryVolumeTags;
|
||||
ULONG InitDataSize;
|
||||
CHANGER_EXTENSION_SIZE ChangerAdditionalExtensionSize;
|
||||
CHANGER_INITIALIZE ChangerInitialize;
|
||||
CHANGER_ERROR_ROUTINE ChangerError;
|
||||
CHANGER_PERFORM_DIAGNOSTICS ChangerPerformDiagnostics;
|
||||
CHANGER_COMMAND_ROUTINE ChangerGetParameters;
|
||||
CHANGER_COMMAND_ROUTINE ChangerGetStatus;
|
||||
CHANGER_COMMAND_ROUTINE ChangerGetProductData;
|
||||
CHANGER_COMMAND_ROUTINE ChangerSetAccess;
|
||||
CHANGER_COMMAND_ROUTINE ChangerGetElementStatus;
|
||||
CHANGER_COMMAND_ROUTINE ChangerInitializeElementStatus;
|
||||
CHANGER_COMMAND_ROUTINE ChangerSetPosition;
|
||||
CHANGER_COMMAND_ROUTINE ChangerExchangeMedium;
|
||||
CHANGER_COMMAND_ROUTINE ChangerMoveMedium;
|
||||
CHANGER_COMMAND_ROUTINE ChangerReinitializeUnit;
|
||||
CHANGER_COMMAND_ROUTINE ChangerQueryVolumeTags;
|
||||
} MCD_INIT_DATA, *PMCD_INIT_DATA;
|
||||
|
||||
CHANGERAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ChangerClassInitialize(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN PUNICODE_STRING RegistryPath,
|
||||
IN PMCD_INIT_DATA MCDInitData);
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN PUNICODE_STRING RegistryPath,
|
||||
IN PMCD_INIT_DATA MCDInitData);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -31,213 +31,197 @@ extern "C" {
|
|||
#define EMULATOR_WRITE_ACCESS 0x02
|
||||
|
||||
typedef enum _EMULATOR_PORT_ACCESS_TYPE {
|
||||
Uchar,
|
||||
Ushort,
|
||||
Ulong
|
||||
Uchar,
|
||||
Ushort,
|
||||
Ulong
|
||||
} EMULATOR_PORT_ACCESS_TYPE, *PEMULATOR_PORT_ACCESS_TYPE;
|
||||
|
||||
|
||||
typedef struct _EMULATOR_ACCESS_ENTRY {
|
||||
ULONG BasePort;
|
||||
ULONG NumConsecutivePorts;
|
||||
EMULATOR_PORT_ACCESS_TYPE AccessType;
|
||||
UCHAR AccessMode;
|
||||
UCHAR StringSupport;
|
||||
PVOID Routine;
|
||||
ULONG BasePort;
|
||||
ULONG NumConsecutivePorts;
|
||||
EMULATOR_PORT_ACCESS_TYPE AccessType;
|
||||
UCHAR AccessMode;
|
||||
UCHAR StringSupport;
|
||||
PVOID Routine;
|
||||
} EMULATOR_ACCESS_ENTRY, *PEMULATOR_ACCESS_ENTRY;
|
||||
|
||||
typedef VOID
|
||||
(NTAPI *PBANKED_SECTION_ROUTINE)(
|
||||
IN ULONG ReadBank,
|
||||
IN ULONG WriteBank,
|
||||
IN PVOID Context);
|
||||
|
||||
IN ULONG ReadBank,
|
||||
IN ULONG WriteBank,
|
||||
IN PVOID Context);
|
||||
|
||||
#ifndef __BROKEN__
|
||||
|
||||
typedef enum _INTERFACE_TYPE {
|
||||
InterfaceTypeUndefined = -1,
|
||||
Internal,
|
||||
Isa,
|
||||
Eisa,
|
||||
MicroChannel,
|
||||
TurboChannel,
|
||||
PCIBus,
|
||||
VMEBus,
|
||||
NuBus,
|
||||
PCMCIABus,
|
||||
CBus,
|
||||
MPIBus,
|
||||
MPSABus,
|
||||
ProcessorInternal,
|
||||
InternalPowerBus,
|
||||
PNPISABus,
|
||||
PNPBus,
|
||||
Vmcs,
|
||||
MaximumInterfaceType
|
||||
}INTERFACE_TYPE, *PINTERFACE_TYPE;
|
||||
InterfaceTypeUndefined = -1,
|
||||
Internal,
|
||||
Isa,
|
||||
Eisa,
|
||||
MicroChannel,
|
||||
TurboChannel,
|
||||
PCIBus,
|
||||
VMEBus,
|
||||
NuBus,
|
||||
PCMCIABus,
|
||||
CBus,
|
||||
MPIBus,
|
||||
MPSABus,
|
||||
ProcessorInternal,
|
||||
InternalPowerBus,
|
||||
PNPISABus,
|
||||
PNPBus,
|
||||
Vmcs,
|
||||
MaximumInterfaceType
|
||||
} INTERFACE_TYPE, *PINTERFACE_TYPE;
|
||||
|
||||
typedef enum _KINTERRUPT_MODE {
|
||||
LevelSensitive,
|
||||
Latched
|
||||
LevelSensitive,
|
||||
Latched
|
||||
} KINTERRUPT_MODE;
|
||||
|
||||
typedef VOID (*PINTERFACE_REFERENCE)(PVOID Context);
|
||||
typedef VOID (*PINTERFACE_DEREFERENCE)(PVOID Context);
|
||||
|
||||
typedef enum _BUS_DATA_TYPE {
|
||||
ConfigurationSpaceUndefined = -1,
|
||||
Cmos,
|
||||
EisaConfiguration,
|
||||
Pos,
|
||||
CbusConfiguration,
|
||||
PCIConfiguration,
|
||||
VMEConfiguration,
|
||||
NuBusConfiguration,
|
||||
PCMCIAConfiguration,
|
||||
MPIConfiguration,
|
||||
MPSAConfiguration,
|
||||
PNPISAConfiguration,
|
||||
SgiInternalConfiguration,
|
||||
MaximumBusDataType
|
||||
ConfigurationSpaceUndefined = -1,
|
||||
Cmos,
|
||||
EisaConfiguration,
|
||||
Pos,
|
||||
CbusConfiguration,
|
||||
PCIConfiguration,
|
||||
VMEConfiguration,
|
||||
NuBusConfiguration,
|
||||
PCMCIAConfiguration,
|
||||
MPIConfiguration,
|
||||
MPSAConfiguration,
|
||||
PNPISAConfiguration,
|
||||
SgiInternalConfiguration,
|
||||
MaximumBusDataType
|
||||
} BUS_DATA_TYPE, *PBUS_DATA_TYPE;
|
||||
|
||||
typedef enum _DMA_WIDTH {
|
||||
Width8Bits,
|
||||
Width16Bits,
|
||||
Width32Bits,
|
||||
MaximumDmaWidth
|
||||
}DMA_WIDTH, *PDMA_WIDTH;
|
||||
Width8Bits,
|
||||
Width16Bits,
|
||||
Width32Bits,
|
||||
MaximumDmaWidth
|
||||
} DMA_WIDTH, *PDMA_WIDTH;
|
||||
|
||||
typedef enum _DMA_SPEED {
|
||||
Compatible,
|
||||
TypeA,
|
||||
TypeB,
|
||||
TypeC,
|
||||
TypeF,
|
||||
MaximumDmaSpeed
|
||||
}DMA_SPEED, *PDMA_SPEED;
|
||||
Compatible,
|
||||
TypeA,
|
||||
TypeB,
|
||||
TypeC,
|
||||
TypeF,
|
||||
MaximumDmaSpeed
|
||||
} DMA_SPEED, *PDMA_SPEED;
|
||||
|
||||
typedef struct _INTERFACE {
|
||||
USHORT Size;
|
||||
USHORT Version;
|
||||
PVOID Context;
|
||||
PINTERFACE_REFERENCE InterfaceReference;
|
||||
PINTERFACE_DEREFERENCE InterfaceDereference;
|
||||
USHORT Size;
|
||||
USHORT Version;
|
||||
PVOID Context;
|
||||
PINTERFACE_REFERENCE InterfaceReference;
|
||||
PINTERFACE_DEREFERENCE InterfaceDereference;
|
||||
} INTERFACE, *PINTERFACE;
|
||||
|
||||
typedef enum _IRQ_DEVICE_POLICY {
|
||||
IrqPolicyMachineDefault = 0,
|
||||
IrqPolicyAllCloseProcessors,
|
||||
IrqPolicyOneCloseProcessor,
|
||||
IrqPolicyAllProcessorsInMachine,
|
||||
IrqPolicySpecifiedProcessors,
|
||||
IrqPolicySpreadMessagesAcrossAllProcessors
|
||||
IrqPolicyMachineDefault = 0,
|
||||
IrqPolicyAllCloseProcessors,
|
||||
IrqPolicyOneCloseProcessor,
|
||||
IrqPolicyAllProcessorsInMachine,
|
||||
IrqPolicySpecifiedProcessors,
|
||||
IrqPolicySpreadMessagesAcrossAllProcessors
|
||||
} IRQ_DEVICE_POLICY, *PIRQ_DEVICE_POLICY;
|
||||
|
||||
typedef enum _IRQ_PRIORITY {
|
||||
IrqPriorityUndefined = 0,
|
||||
IrqPriorityLow,
|
||||
IrqPriorityNormal,
|
||||
IrqPriorityHigh
|
||||
IrqPriorityUndefined = 0,
|
||||
IrqPriorityLow,
|
||||
IrqPriorityNormal,
|
||||
IrqPriorityHigh
|
||||
} IRQ_PRIORITY, *PIRQ_PRIORITY;
|
||||
|
||||
typedef struct _IO_RESOURCE_DESCRIPTOR {
|
||||
UCHAR Option;
|
||||
UCHAR Type; // use CM_RESOURCE_TYPE
|
||||
UCHAR ShareDisposition; // use CM_SHARE_DISPOSITION
|
||||
UCHAR Spare1;
|
||||
USHORT Flags; // use CM resource flag defines
|
||||
USHORT Spare2; // align
|
||||
|
||||
union {
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Port;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Memory;
|
||||
|
||||
struct {
|
||||
ULONG MinimumVector;
|
||||
ULONG MaximumVector;
|
||||
IRQ_DEVICE_POLICY AffinityPolicy;
|
||||
IRQ_PRIORITY PriorityPolicy;
|
||||
KAFFINITY TargetedProcessors;
|
||||
} Interrupt;
|
||||
|
||||
struct {
|
||||
ULONG MinimumChannel;
|
||||
ULONG MaximumChannel;
|
||||
} Dma;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Generic;
|
||||
|
||||
struct {
|
||||
ULONG Data[3];
|
||||
} DevicePrivate;
|
||||
|
||||
//
|
||||
// Bus Number information.
|
||||
//
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG MinBusNumber;
|
||||
ULONG MaxBusNumber;
|
||||
ULONG Reserved;
|
||||
} BusNumber;
|
||||
|
||||
struct {
|
||||
ULONG Priority; // use LCPRI_Xxx values in cfg.h
|
||||
ULONG Reserved1;
|
||||
ULONG Reserved2;
|
||||
} ConfigData;
|
||||
|
||||
//
|
||||
// The following structures provide descriptions
|
||||
// for memory resource requirement greater than MAXULONG
|
||||
//
|
||||
|
||||
struct {
|
||||
ULONG Length40;
|
||||
ULONG Alignment40;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Memory40;
|
||||
|
||||
struct {
|
||||
ULONG Length48;
|
||||
ULONG Alignment48;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Memory48;
|
||||
|
||||
struct {
|
||||
ULONG Length64;
|
||||
ULONG Alignment64;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Memory64;
|
||||
|
||||
|
||||
} u;
|
||||
|
||||
UCHAR Option;
|
||||
UCHAR Type; // use CM_RESOURCE_TYPE
|
||||
UCHAR ShareDisposition; // use CM_SHARE_DISPOSITION
|
||||
UCHAR Spare1;
|
||||
USHORT Flags; // use CM resource flag defines
|
||||
USHORT Spare2; // align
|
||||
union {
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Port;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Memory;
|
||||
struct {
|
||||
ULONG MinimumVector;
|
||||
ULONG MaximumVector;
|
||||
IRQ_DEVICE_POLICY AffinityPolicy;
|
||||
IRQ_PRIORITY PriorityPolicy;
|
||||
KAFFINITY TargetedProcessors;
|
||||
} Interrupt;
|
||||
struct {
|
||||
ULONG MinimumChannel;
|
||||
ULONG MaximumChannel;
|
||||
} Dma;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Generic;
|
||||
struct {
|
||||
ULONG Data[3];
|
||||
} DevicePrivate;
|
||||
//
|
||||
// Bus Number information.
|
||||
//
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG MinBusNumber;
|
||||
ULONG MaxBusNumber;
|
||||
ULONG Reserved;
|
||||
} BusNumber;
|
||||
struct {
|
||||
ULONG Priority; // use LCPRI_Xxx values in cfg.h
|
||||
ULONG Reserved1;
|
||||
ULONG Reserved2;
|
||||
} ConfigData;
|
||||
//
|
||||
// The following structures provide descriptions
|
||||
// for memory resource requirement greater than MAXULONG
|
||||
//
|
||||
struct {
|
||||
ULONG Length40;
|
||||
ULONG Alignment40;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Memory40;
|
||||
struct {
|
||||
ULONG Length48;
|
||||
ULONG Alignment48;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Memory48;
|
||||
struct {
|
||||
ULONG Length64;
|
||||
ULONG Alignment64;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Memory64;
|
||||
} u;
|
||||
} IO_RESOURCE_DESCRIPTOR, *PIO_RESOURCE_DESCRIPTOR;
|
||||
|
||||
#include <guiddef.h>
|
||||
#endif
|
||||
#endif /* ! __BROKEN__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,15 +22,6 @@
|
|||
#ifndef __MINITAPE_H
|
||||
#define __MINITAPE_H
|
||||
|
||||
/* Helper macro to enable gcc's extension. */
|
||||
#ifndef __GNU_EXTENSION
|
||||
#ifdef __GNUC__
|
||||
#define __GNU_EXTENSION __extension__
|
||||
#else
|
||||
#define __GNU_EXTENSION
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -45,176 +36,179 @@ extern "C" {
|
|||
#define MEDIA_CURRENTLY_MOUNTED 0x80000000
|
||||
|
||||
typedef enum _TAPE_STATUS {
|
||||
TAPE_STATUS_SEND_SRB_AND_CALLBACK,
|
||||
TAPE_STATUS_CALLBACK,
|
||||
TAPE_STATUS_CHECK_TEST_UNIT_READY,
|
||||
TAPE_STATUS_SUCCESS,
|
||||
TAPE_STATUS_INSUFFICIENT_RESOURCES,
|
||||
TAPE_STATUS_NOT_IMPLEMENTED,
|
||||
TAPE_STATUS_INVALID_DEVICE_REQUEST,
|
||||
TAPE_STATUS_INVALID_PARAMETER,
|
||||
TAPE_STATUS_MEDIA_CHANGED,
|
||||
TAPE_STATUS_BUS_RESET,
|
||||
TAPE_STATUS_SETMARK_DETECTED,
|
||||
TAPE_STATUS_FILEMARK_DETECTED,
|
||||
TAPE_STATUS_BEGINNING_OF_MEDIA,
|
||||
TAPE_STATUS_END_OF_MEDIA,
|
||||
TAPE_STATUS_BUFFER_OVERFLOW,
|
||||
TAPE_STATUS_NO_DATA_DETECTED,
|
||||
TAPE_STATUS_EOM_OVERFLOW,
|
||||
TAPE_STATUS_NO_MEDIA,
|
||||
TAPE_STATUS_IO_DEVICE_ERROR,
|
||||
TAPE_STATUS_UNRECOGNIZED_MEDIA,
|
||||
TAPE_STATUS_DEVICE_NOT_READY,
|
||||
TAPE_STATUS_MEDIA_WRITE_PROTECTED,
|
||||
TAPE_STATUS_DEVICE_DATA_ERROR,
|
||||
TAPE_STATUS_NO_SUCH_DEVICE,
|
||||
TAPE_STATUS_INVALID_BLOCK_LENGTH,
|
||||
TAPE_STATUS_IO_TIMEOUT,
|
||||
TAPE_STATUS_DEVICE_NOT_CONNECTED,
|
||||
TAPE_STATUS_DATA_OVERRUN,
|
||||
TAPE_STATUS_DEVICE_BUSY,
|
||||
TAPE_STATUS_REQUIRES_CLEANING,
|
||||
TAPE_STATUS_CLEANER_CARTRIDGE_INSTALLED
|
||||
TAPE_STATUS_SEND_SRB_AND_CALLBACK,
|
||||
TAPE_STATUS_CALLBACK,
|
||||
TAPE_STATUS_CHECK_TEST_UNIT_READY,
|
||||
TAPE_STATUS_SUCCESS,
|
||||
TAPE_STATUS_INSUFFICIENT_RESOURCES,
|
||||
TAPE_STATUS_NOT_IMPLEMENTED,
|
||||
TAPE_STATUS_INVALID_DEVICE_REQUEST,
|
||||
TAPE_STATUS_INVALID_PARAMETER,
|
||||
TAPE_STATUS_MEDIA_CHANGED,
|
||||
TAPE_STATUS_BUS_RESET,
|
||||
TAPE_STATUS_SETMARK_DETECTED,
|
||||
TAPE_STATUS_FILEMARK_DETECTED,
|
||||
TAPE_STATUS_BEGINNING_OF_MEDIA,
|
||||
TAPE_STATUS_END_OF_MEDIA,
|
||||
TAPE_STATUS_BUFFER_OVERFLOW,
|
||||
TAPE_STATUS_NO_DATA_DETECTED,
|
||||
TAPE_STATUS_EOM_OVERFLOW,
|
||||
TAPE_STATUS_NO_MEDIA,
|
||||
TAPE_STATUS_IO_DEVICE_ERROR,
|
||||
TAPE_STATUS_UNRECOGNIZED_MEDIA,
|
||||
TAPE_STATUS_DEVICE_NOT_READY,
|
||||
TAPE_STATUS_MEDIA_WRITE_PROTECTED,
|
||||
TAPE_STATUS_DEVICE_DATA_ERROR,
|
||||
TAPE_STATUS_NO_SUCH_DEVICE,
|
||||
TAPE_STATUS_INVALID_BLOCK_LENGTH,
|
||||
TAPE_STATUS_IO_TIMEOUT,
|
||||
TAPE_STATUS_DEVICE_NOT_CONNECTED,
|
||||
TAPE_STATUS_DATA_OVERRUN,
|
||||
TAPE_STATUS_DEVICE_BUSY,
|
||||
TAPE_STATUS_REQUIRES_CLEANING,
|
||||
TAPE_STATUS_CLEANER_CARTRIDGE_INSTALLED
|
||||
} TAPE_STATUS, *PTAPE_STATUS;
|
||||
|
||||
#define INQUIRYDATABUFFERSIZE 36
|
||||
|
||||
#ifndef _INQUIRYDATA_DEFINED /* also in scsi.h */
|
||||
#define _INQUIRYDATA_DEFINED
|
||||
|
||||
typedef struct _INQUIRYDATA {
|
||||
UCHAR DeviceType : 5;
|
||||
UCHAR DeviceTypeQualifier : 3;
|
||||
UCHAR DeviceTypeModifier : 7;
|
||||
UCHAR RemovableMedia : 1;
|
||||
__GNU_EXTENSION union {
|
||||
UCHAR Versions;
|
||||
__GNU_EXTENSION struct {
|
||||
UCHAR ANSIVersion : 3;
|
||||
UCHAR ECMAVersion : 3;
|
||||
UCHAR ISOVersion : 2;
|
||||
};
|
||||
};
|
||||
UCHAR ResponseDataFormat : 4;
|
||||
UCHAR HiSupport : 1;
|
||||
UCHAR NormACA : 1;
|
||||
UCHAR TerminateTask : 1;
|
||||
UCHAR AERC : 1;
|
||||
UCHAR AdditionalLength;
|
||||
UCHAR Reserved;
|
||||
UCHAR Addr16 : 1;
|
||||
UCHAR Addr32 : 1;
|
||||
UCHAR AckReqQ: 1;
|
||||
UCHAR MediumChanger : 1;
|
||||
UCHAR MultiPort : 1;
|
||||
UCHAR ReservedBit2 : 1;
|
||||
UCHAR EnclosureServices : 1;
|
||||
UCHAR ReservedBit3 : 1;
|
||||
UCHAR SoftReset : 1;
|
||||
UCHAR CommandQueue : 1;
|
||||
UCHAR TransferDisable : 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];
|
||||
UCHAR DeviceType:5;
|
||||
UCHAR DeviceTypeQualifier:3;
|
||||
UCHAR DeviceTypeModifier:7;
|
||||
UCHAR RemovableMedia:1;
|
||||
__GNU_EXTENSION union {
|
||||
UCHAR Versions;
|
||||
__GNU_EXTENSION struct {
|
||||
UCHAR ANSIVersion:3;
|
||||
UCHAR ECMAVersion:3;
|
||||
UCHAR ISOVersion:2;
|
||||
};
|
||||
};
|
||||
UCHAR ResponseDataFormat:4;
|
||||
UCHAR HiSupport:1;
|
||||
UCHAR NormACA:1;
|
||||
UCHAR TerminateTask:1;
|
||||
UCHAR AERC:1;
|
||||
UCHAR AdditionalLength;
|
||||
UCHAR Reserved;
|
||||
UCHAR Addr16:1;
|
||||
UCHAR Addr32:1;
|
||||
UCHAR AckReqQ:1;
|
||||
UCHAR MediumChanger:1;
|
||||
UCHAR MultiPort:1;
|
||||
UCHAR ReservedBit2:1;
|
||||
UCHAR EnclosureServices:1;
|
||||
UCHAR ReservedBit3:1;
|
||||
UCHAR SoftReset:1;
|
||||
UCHAR CommandQueue:1;
|
||||
UCHAR TransferDisable: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;
|
||||
#endif
|
||||
|
||||
#endif /* _INQUIRYDATA_DEFINED */
|
||||
|
||||
typedef struct _MODE_CAPABILITIES_PAGE {
|
||||
UCHAR PageCode : 6;
|
||||
UCHAR Reserved1 : 2;
|
||||
UCHAR PageLength;
|
||||
UCHAR Reserved2[2];
|
||||
UCHAR RO : 1;
|
||||
UCHAR Reserved3 : 4;
|
||||
UCHAR SPREV : 1;
|
||||
UCHAR Reserved4 : 2;
|
||||
UCHAR Reserved5 : 3;
|
||||
UCHAR EFMT : 1;
|
||||
UCHAR Reserved6 : 1;
|
||||
UCHAR QFA : 1;
|
||||
UCHAR Reserved7 : 2;
|
||||
UCHAR LOCK : 1;
|
||||
UCHAR LOCKED : 1;
|
||||
UCHAR PREVENT : 1;
|
||||
UCHAR UNLOAD : 1;
|
||||
UCHAR Reserved8 : 2;
|
||||
UCHAR ECC : 1;
|
||||
UCHAR CMPRS : 1;
|
||||
UCHAR Reserved9 : 1;
|
||||
UCHAR BLK512 : 1;
|
||||
UCHAR BLK1024 : 1;
|
||||
UCHAR Reserved10 : 4;
|
||||
UCHAR SLOWB : 1;
|
||||
UCHAR MaximumSpeedSupported[2];
|
||||
UCHAR MaximumStoredDefectedListEntries[2];
|
||||
UCHAR ContinuousTransferLimit[2];
|
||||
UCHAR CurrentSpeedSelected[2];
|
||||
UCHAR BufferSize[2];
|
||||
UCHAR Reserved11[2];
|
||||
UCHAR PageCode:6;
|
||||
UCHAR Reserved1:2;
|
||||
UCHAR PageLength;
|
||||
UCHAR Reserved2[2];
|
||||
UCHAR RO:1;
|
||||
UCHAR Reserved3:4;
|
||||
UCHAR SPREV:1;
|
||||
UCHAR Reserved4:2;
|
||||
UCHAR Reserved5:3;
|
||||
UCHAR EFMT:1;
|
||||
UCHAR Reserved6:1;
|
||||
UCHAR QFA:1;
|
||||
UCHAR Reserved7:2;
|
||||
UCHAR LOCK:1;
|
||||
UCHAR LOCKED:1;
|
||||
UCHAR PREVENT:1;
|
||||
UCHAR UNLOAD:1;
|
||||
UCHAR Reserved8:2;
|
||||
UCHAR ECC:1;
|
||||
UCHAR CMPRS:1;
|
||||
UCHAR Reserved9:1;
|
||||
UCHAR BLK512:1;
|
||||
UCHAR BLK1024:1;
|
||||
UCHAR Reserved10:4;
|
||||
UCHAR SLOWB:1;
|
||||
UCHAR MaximumSpeedSupported[2];
|
||||
UCHAR MaximumStoredDefectedListEntries[2];
|
||||
UCHAR ContinuousTransferLimit[2];
|
||||
UCHAR CurrentSpeedSelected[2];
|
||||
UCHAR BufferSize[2];
|
||||
UCHAR Reserved11[2];
|
||||
} MODE_CAPABILITIES_PAGE, *PMODE_CAPABILITIES_PAGE;
|
||||
|
||||
typedef BOOLEAN NTAPI
|
||||
(*TAPE_VERIFY_INQUIRY_ROUTINE)(
|
||||
IN PINQUIRYDATA InquiryData,
|
||||
IN PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage);
|
||||
IN PINQUIRYDATA InquiryData,
|
||||
IN PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage);
|
||||
|
||||
typedef VOID NTAPI
|
||||
(*TAPE_EXTENSION_INIT_ROUTINE)(
|
||||
IN PVOID MinitapeExtension,
|
||||
IN PINQUIRYDATA InquiryData,
|
||||
IN PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage);
|
||||
IN PVOID MinitapeExtension,
|
||||
IN PINQUIRYDATA InquiryData,
|
||||
IN PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage);
|
||||
|
||||
typedef VOID NTAPI
|
||||
(*TAPE_ERROR_ROUTINE)(
|
||||
IN PVOID MinitapeExtension,
|
||||
IN PSCSI_REQUEST_BLOCK Srb,
|
||||
IN OUT PTAPE_STATUS TapeStatus);
|
||||
IN PVOID MinitapeExtension,
|
||||
IN PSCSI_REQUEST_BLOCK Srb,
|
||||
IN OUT PTAPE_STATUS TapeStatus);
|
||||
|
||||
typedef TAPE_STATUS NTAPI
|
||||
(*TAPE_PROCESS_COMMAND_ROUTINE)(
|
||||
IN OUT PVOID MinitapeExtension,
|
||||
IN OUT PVOID CommandExtension,
|
||||
IN OUT PVOID CommandParameters,
|
||||
IN OUT PSCSI_REQUEST_BLOCK Srb,
|
||||
IN ULONG CallNumber,
|
||||
IN TAPE_STATUS StatusOfLastCommand,
|
||||
IN OUT PULONG RetryFlags);
|
||||
IN OUT PVOID MinitapeExtension,
|
||||
IN OUT PVOID CommandExtension,
|
||||
IN OUT PVOID CommandParameters,
|
||||
IN OUT PSCSI_REQUEST_BLOCK Srb,
|
||||
IN ULONG CallNumber,
|
||||
IN TAPE_STATUS StatusOfLastCommand,
|
||||
IN OUT PULONG RetryFlags);
|
||||
|
||||
#define TAPE_RETRY_MASK 0x0000FFFF
|
||||
#define IGNORE_ERRORS 0x00010000
|
||||
#define RETURN_ERRORS 0x00020000
|
||||
|
||||
typedef struct _TAPE_INIT_DATA {
|
||||
TAPE_VERIFY_INQUIRY_ROUTINE VerifyInquiry;
|
||||
BOOLEAN QueryModeCapabilitiesPage;
|
||||
ULONG MinitapeExtensionSize;
|
||||
TAPE_EXTENSION_INIT_ROUTINE ExtensionInit;
|
||||
ULONG DefaultTimeOutValue;
|
||||
TAPE_ERROR_ROUTINE TapeError;
|
||||
ULONG CommandExtensionSize;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE CreatePartition;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE Erase;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE GetDriveParameters;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE GetMediaParameters;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE GetPosition;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE GetStatus;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE Prepare;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE SetDriveParameters;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE SetMediaParameters;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE SetPosition;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE WriteMarks;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE PreProcessReadWrite; /* optional */
|
||||
TAPE_VERIFY_INQUIRY_ROUTINE VerifyInquiry;
|
||||
BOOLEAN QueryModeCapabilitiesPage;
|
||||
ULONG MinitapeExtensionSize;
|
||||
TAPE_EXTENSION_INIT_ROUTINE ExtensionInit;
|
||||
ULONG DefaultTimeOutValue;
|
||||
TAPE_ERROR_ROUTINE TapeError;
|
||||
ULONG CommandExtensionSize;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE CreatePartition;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE Erase;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE GetDriveParameters;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE GetMediaParameters;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE GetPosition;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE GetStatus;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE Prepare;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE SetDriveParameters;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE SetMediaParameters;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE SetPosition;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE WriteMarks;
|
||||
TAPE_PROCESS_COMMAND_ROUTINE PreProcessReadWrite; /* optional */
|
||||
} TAPE_INIT_DATA, *PTAPE_INIT_DATA;
|
||||
|
||||
typedef struct _TAPE_PHYS_POSITION {
|
||||
ULONG SeekBlockAddress;
|
||||
ULONG SpaceBlockCount;
|
||||
ULONG SeekBlockAddress;
|
||||
ULONG SpaceBlockCount;
|
||||
} TAPE_PHYS_POSITION, PTAPE_PHYS_POSITION;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
|
|
@ -15,13 +15,12 @@ DEFINE_GUID(MOUNTDEV_MOUNTED_DEVICE_GUID, 0x53F5630D, 0xB6BF, 0x11D0, 0x94, 0xF2
|
|||
#define IOCTL_MOUNTMGR_DEFINE_UNIX_DRIVE CTL_CODE(MOUNTMGRCONTROLTYPE, 32, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
#define IOCTL_MOUNTMGR_QUERY_UNIX_DRIVE CTL_CODE(MOUNTMGRCONTROLTYPE, 33, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
struct mountmgr_unix_drive
|
||||
{
|
||||
ULONG size;
|
||||
ULONG type;
|
||||
WCHAR letter;
|
||||
USHORT mount_point_offset;
|
||||
USHORT device_offset;
|
||||
struct mountmgr_unix_drive {
|
||||
ULONG size;
|
||||
ULONG type;
|
||||
WCHAR letter;
|
||||
USHORT mount_point_offset;
|
||||
USHORT device_offset;
|
||||
};
|
||||
|
||||
#define IOCTL_MOUNTMGR_CREATE_POINT \
|
||||
|
@ -51,20 +50,22 @@ struct mountmgr_unix_drive
|
|||
#define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME \
|
||||
CTL_CODE(MOUNTDEVCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define MOUNTMGR_IS_DRIVE_LETTER(s) ((s)->Length == 28 && (s)->Buffer[0] == '\\' && (s)->Buffer[1] == 'D' && \
|
||||
(s)->Buffer[2] == 'o' && (s)->Buffer[3] == 's' && (s)->Buffer[4] == 'D' && \
|
||||
(s)->Buffer[5] == 'e' && \ (s)->Buffer[6] == 'v' && (s)->Buffer[7] == 'i' && \
|
||||
(s)->Buffer[8] == 'c' && (s)->Buffer[9] == 'e' && (s)->Buffer[10] == 's' && \
|
||||
(s)->Buffer[11] == '\\' && (s)->Buffer[12] >= 'A' && \
|
||||
(s)->Buffer[12] <= 'Z' && (s)->Buffer[13] == ':')
|
||||
#define MOUNTMGR_IS_DRIVE_LETTER(s) \
|
||||
((s)->Length == 28 && (s)->Buffer[0] == '\\' && (s)->Buffer[1] == 'D' && \
|
||||
(s)->Buffer[2] == 'o' && (s)->Buffer[3] == 's' && (s)->Buffer[4] == 'D' && \
|
||||
(s)->Buffer[5] == 'e' && \ (s)->Buffer[6] == 'v' && (s)->Buffer[7] == 'i' && \
|
||||
(s)->Buffer[8] == 'c' && (s)->Buffer[9] == 'e' && (s)->Buffer[10] == 's' && \
|
||||
(s)->Buffer[11] == '\\' && (s)->Buffer[12] >= 'A' && \
|
||||
(s)->Buffer[12] <= 'Z' && (s)->Buffer[13] == ':')
|
||||
|
||||
#define MOUNTMGR_IS_VOLUME_NAME(s) (((s)->Length == 96 || ((s)->Length == 98 && (s)->Buffer[48] == '\\')) && \
|
||||
(s)->Buffer[0] == '\\'&& ((s)->Buffer[1] == '?' || (s)->Buffer[1] == '\\') && \
|
||||
(s)->Buffer[2] == '?' && (s)->Buffer[3] == '\\' && (s)->Buffer[4] == 'V' && \
|
||||
(s)->Buffer[5] == 'o' && (s)->Buffer[6] == 'l' && (s)->Buffer[7] == 'u' && \
|
||||
(s)->Buffer[8] == 'm' && (s)->Buffer[9] == 'e' && (s)->Buffer[10] == '{' && \
|
||||
(s)->Buffer[19] == '-' && (s)->Buffer[24] == '-' && (s)->Buffer[29] == '-' && \
|
||||
(s)->Buffer[34] == '-' && (s)->Buffer[47] == '}')
|
||||
#define MOUNTMGR_IS_VOLUME_NAME(s) \
|
||||
(((s)->Length == 96 || ((s)->Length == 98 && (s)->Buffer[48] == '\\')) && \
|
||||
(s)->Buffer[0] == '\\'&& ((s)->Buffer[1] == '?' || (s)->Buffer[1] == '\\') && \
|
||||
(s)->Buffer[2] == '?' && (s)->Buffer[3] == '\\' && (s)->Buffer[4] == 'V' && \
|
||||
(s)->Buffer[5] == 'o' && (s)->Buffer[6] == 'l' && (s)->Buffer[7] == 'u' && \
|
||||
(s)->Buffer[8] == 'm' && (s)->Buffer[9] == 'e' && (s)->Buffer[10] == '{' && \
|
||||
(s)->Buffer[19] == '-' && (s)->Buffer[24] == '-' && (s)->Buffer[29] == '-' && \
|
||||
(s)->Buffer[34] == '-' && (s)->Buffer[47] == '}')
|
||||
|
||||
typedef struct _MOUNTMGR_CREATE_POINT_INPUT {
|
||||
USHORT SymbolicLinkNameOffset;
|
||||
|
@ -128,10 +129,14 @@ typedef struct _MOUNTDEV_NAME {
|
|||
#define IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATHS \
|
||||
CTL_CODE(MOUNTMGRCONTROLTYPE, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define MOUNTMGR_IS_DOS_VOLUME_NAME(s) (MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 96 && (s)->Buffer[1] == '\\')
|
||||
#define MOUNTMGR_IS_DOS_VOLUME_NAME_WB(s) (MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 98 && (s)->Buffer[1] == '\\')
|
||||
#define MOUNTMGR_IS_NT_VOLUME_NAME(s) ( MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 96 && (s)->Buffer[1] == '?')
|
||||
#define MOUNTMGR_IS_NT_VOLUME_NAME_WB(s) (MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 98 && (s)->Buffer[1] == '?')
|
||||
#define MOUNTMGR_IS_DOS_VOLUME_NAME(s) \
|
||||
(MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 96 && (s)->Buffer[1] == '\\')
|
||||
#define MOUNTMGR_IS_DOS_VOLUME_NAME_WB(s) \
|
||||
(MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 98 && (s)->Buffer[1] == '\\')
|
||||
#define MOUNTMGR_IS_NT_VOLUME_NAME(s) \
|
||||
( MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 96 && (s)->Buffer[1] == '?')
|
||||
#define MOUNTMGR_IS_NT_VOLUME_NAME_WB(s) \
|
||||
(MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 98 && (s)->Buffer[1] == '?')
|
||||
|
||||
typedef struct _MOUNTMGR_VOLUME_PATHS {
|
||||
ULONG MultiSzLength;
|
||||
|
@ -171,7 +176,7 @@ typedef struct _MOUNTMGR_SET_AUTO_MOUNT {
|
|||
#define IOCTL_MOUNTMGR_TRACELOG_CACHE \
|
||||
CTL_CODE(MOUNTMGRCONTROLTYPE, 18, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#endif
|
||||
#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
|
||||
|
||||
#endif /* _MOUNTMGR_ */
|
||||
|
||||
|
|
|
@ -36,15 +36,6 @@
|
|||
#define NDIS_WDM 0
|
||||
#endif
|
||||
|
||||
/* Helper macro to enable gcc's extension. */
|
||||
#ifndef __GNU_EXTENSION
|
||||
#ifdef __GNUC__
|
||||
#define __GNU_EXTENSION __extension__
|
||||
#else
|
||||
#define __GNU_EXTENSION
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "ntddk.h"
|
||||
#include "netpnp.h"
|
||||
#include "ntstatus.h"
|
||||
|
@ -280,7 +271,7 @@ typedef struct _NET_PNP_EVENT {
|
|||
#else
|
||||
#define NDIS_SUPPORT_NDIS61 0
|
||||
#endif
|
||||
#endif // !defined(NDIS_SUPPORT_NDIS61)
|
||||
#endif /* !defined(NDIS_SUPPORT_NDIS61) */
|
||||
|
||||
#if !defined(NDIS_SUPPORT_NDIS620)
|
||||
|
||||
|
@ -312,9 +303,9 @@ typedef struct _NET_PNP_EVENT {
|
|||
#endif
|
||||
|
||||
#if defined(NDIS_WRAPPER)
|
||||
#define NDISAPI
|
||||
#define NDISAPI
|
||||
#else
|
||||
#define NDISAPI DECLSPEC_IMPORT
|
||||
#define NDISAPI DECLSPEC_IMPORT
|
||||
#endif
|
||||
|
||||
typedef PVOID QUEUED_CLOSE; //FIXME : Doesn't exist in public headers
|
||||
|
@ -695,7 +686,7 @@ typedef CM_PARTIAL_RESOURCE_LIST NDIS_RESOURCE_LIST, *PNDIS_RESOURCE_LIST;
|
|||
#define NDIS_GUID_TO_STATUS 0x00000002
|
||||
#define NDIS_GUID_ANSI_STRING 0x00000004
|
||||
#define NDIS_GUID_UNICODE_STRING 0x00000008
|
||||
#define NDIS_GUID_ARRAY 0x00000010
|
||||
#define NDIS_GUID_ARRAY 0x00000010
|
||||
|
||||
#if NDIS_LEGACY_DRIVER
|
||||
|
||||
|
@ -1002,7 +993,7 @@ typedef enum _NDIS_PNP_DEVICE_STATE {
|
|||
|
||||
#define NDIS_DEVICE_NOT_STOPPABLE 0x00000001
|
||||
#define NDIS_DEVICE_NOT_REMOVEABLE 0x00000002
|
||||
#define NDIS_DEVICE_NOT_SUSPENDABLE 0x00000004
|
||||
#define NDIS_DEVICE_NOT_SUSPENDABLE 0x00000004
|
||||
#define NDIS_DEVICE_DISABLE_PM 0x00000008
|
||||
#define NDIS_DEVICE_DISABLE_WAKE_UP 0x00000010
|
||||
#define NDIS_DEVICE_DISABLE_WAKE_ON_RECONNECT 0x00000020
|
||||
|
@ -1053,12 +1044,12 @@ typedef struct _CO_CALL_MANAGER_PARAMETERS {
|
|||
/* CO_MEDIA_PARAMETERS.Flags constants */
|
||||
#define RECEIVE_TIME_INDICATION 0x00000001
|
||||
#define USE_TIME_STAMPS 0x00000002
|
||||
#define TRANSMIT_VC 0x00000004
|
||||
#define TRANSMIT_VC 0x00000004
|
||||
#define RECEIVE_VC 0x00000008
|
||||
#define INDICATE_ERRED_PACKETS 0x00000010
|
||||
#define INDICATE_END_OF_TX 0x00000020
|
||||
#define RESERVE_RESOURCES_VC 0x00000040
|
||||
#define ROUND_DOWN_FLOW 0x00000080
|
||||
#define ROUND_DOWN_FLOW 0x00000080
|
||||
#define ROUND_UP_FLOW 0x00000100
|
||||
|
||||
typedef struct _CO_MEDIA_PARAMETERS {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -32,7 +32,6 @@
|
|||
#define SOUND_MAX_DEVICES 100
|
||||
#define SOUND_MAX_DEVICE_NAME 80
|
||||
|
||||
|
||||
/*
|
||||
Base control codes
|
||||
*/
|
||||
|
@ -43,80 +42,78 @@
|
|||
#define IOCTL_AUX_BASE 0x0100
|
||||
#define IOCTL_MIX_BASE 0x0180
|
||||
|
||||
|
||||
/*
|
||||
Helper macros for defining control codes
|
||||
*/
|
||||
|
||||
#define WAVE_CTL_CODE(subcode, iomethod, access) \
|
||||
CTL_CODE(FILE_DEVICE_SOUND, IOCTL_WAVE_BASE + subcode, iomethod, access)
|
||||
CTL_CODE(FILE_DEVICE_SOUND, IOCTL_WAVE_BASE + subcode, iomethod, access)
|
||||
|
||||
#define MIDI_CTL_CODE(subcode, iomethod, access) \
|
||||
CTL_CODE(FILE_DEVICE_SOUND, IOCTL_MIDI_BASE + subcode, iomethod, access)
|
||||
CTL_CODE(FILE_DEVICE_SOUND, IOCTL_MIDI_BASE + subcode, iomethod, access)
|
||||
|
||||
#define MIX_CTL_CODE(subcode, iomethod, access) \
|
||||
CTL_CODE(FILE_DEVICE_SOUND, IOCTL_MIX_BASE + subcode, iomethod, access)
|
||||
CTL_CODE(FILE_DEVICE_SOUND, IOCTL_MIX_BASE + subcode, iomethod, access)
|
||||
|
||||
#define AUX_CTL_CODE(subcode, iomethod, access) \
|
||||
CTL_CODE(FILE_DEVICE_SOUND, IOCTL_AUX_BASE + subcode, iomethod, access)
|
||||
|
||||
CTL_CODE(FILE_DEVICE_SOUND, IOCTL_AUX_BASE + subcode, iomethod, access)
|
||||
|
||||
/*
|
||||
Wave device control codes
|
||||
*/
|
||||
|
||||
#define IOCTL_WAVE_QUERY_FORMAT \
|
||||
WAVE_CTL_CODE(0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
WAVE_CTL_CODE(0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_SET_FORMAT \
|
||||
WAVE_CTL_CODE(0x0002, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
WAVE_CTL_CODE(0x0002, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_GET_CAPABILITIES \
|
||||
WAVE_CTL_CODE(0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
WAVE_CTL_CODE(0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_SET_STATE \
|
||||
WAVE_CTL_CODE(0x0004, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
WAVE_CTL_CODE(0x0004, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_GET_STATE \
|
||||
WAVE_CTL_CODE(0x0005, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
WAVE_CTL_CODE(0x0005, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_GET_POSITION \
|
||||
WAVE_CTL_CODE(0x0006, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
WAVE_CTL_CODE(0x0006, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_SET_VOLUME \
|
||||
WAVE_CTL_CODE(0x0007, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
WAVE_CTL_CODE(0x0007, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_GET_VOLUME \
|
||||
WAVE_CTL_CODE(0x0008, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
WAVE_CTL_CODE(0x0008, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_SET_PITCH \
|
||||
WAVE_CTL_CODE(0x0009, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
WAVE_CTL_CODE(0x0009, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_GET_PITCH \
|
||||
WAVE_CTL_CODE(0x000A, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
WAVE_CTL_CODE(0x000A, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_SET_PLAYBACK_RATE \
|
||||
WAVE_CTL_CODE(0x000B, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
WAVE_CTL_CODE(0x000B, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_GET_PLAYBACK_RATE \
|
||||
WAVE_CTL_CODE(0x000C, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
WAVE_CTL_CODE(0x000C, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_PLAY \
|
||||
WAVE_CTL_CODE(0x000D, METHOD_IN_DIRECT, FILE_WRITE_ACCESS)
|
||||
WAVE_CTL_CODE(0x000D, METHOD_IN_DIRECT, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_RECORD \
|
||||
WAVE_CTL_CODE(0x000E, METHOD_OUT_DIRECT, FILE_WRITE_ACCESS)
|
||||
WAVE_CTL_CODE(0x000E, METHOD_OUT_DIRECT, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_BREAK_LOOP \
|
||||
WAVE_CTL_CODE(0x000F, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
WAVE_CTL_CODE(0x000F, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_WAVE_SET_LOW_PRIORITY \
|
||||
WAVE_CTL_CODE(0x0010, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
WAVE_CTL_CODE(0x0010, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#if DBG
|
||||
/* Debug-only control code */
|
||||
#define IOCTL_WAVE_SET_DEBUG_LEVEL \
|
||||
WAVE_CTL_CODE(0x0040, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
/* Debug-only control code */
|
||||
#define IOCTL_WAVE_SET_DEBUG_LEVEL \
|
||||
WAVE_CTL_CODE(0x0040, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -125,72 +122,69 @@
|
|||
*/
|
||||
|
||||
#define IOCTL_MIDI_GET_CAPABILITIES \
|
||||
MIDI_CTL_CODE(0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
MIDI_CTL_CODE(0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_MIDI_SET_STATE \
|
||||
MIDI_CTL_CODE(0x0002, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
MIDI_CTL_CODE(0x0002, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_MIDI_GET_STATE \
|
||||
MIDI_CTL_CODE(0x0003, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
MIDI_CTL_CODE(0x0003, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_MIDI_SET_VOLUME \
|
||||
MIDI_CTL_CODE(0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
MIDI_CTL_CODE(0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_MIDI_GET_VOLUME \
|
||||
MIDI_CTL_CODE(0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
MIDI_CTL_CODE(0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_MIDI_PLAY \
|
||||
MIDI_CTL_CODE(0x0006, METHOD_NEITHER, FILE_WRITE_ACCESS)
|
||||
MIDI_CTL_CODE(0x0006, METHOD_NEITHER, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_MIDI_RECORD \
|
||||
MIDI_CTL_CODE(0x0007, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
MIDI_CTL_CODE(0x0007, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_MIDI_CACHE_PATCHES \
|
||||
MIDI_CTL_CODE(0x0008, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
MIDI_CTL_CODE(0x0008, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_MIDI_CACHE_DRUM_PATCHES \
|
||||
MIDI_CTL_CODE(0x0009, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
MIDI_CTL_CODE(0x0009, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
#if DBG
|
||||
/* Debug-only control code */
|
||||
#define IOCTL_MIDI_SET_DEBUG_LEVEL \
|
||||
WAVE_CTL_CODE(0x0040, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
/* Debug-only control code */
|
||||
#define IOCTL_MIDI_SET_DEBUG_LEVEL \
|
||||
WAVE_CTL_CODE(0x0040, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
Mixer device control codes
|
||||
*/
|
||||
|
||||
#define IOCTL_MIX_GET_CONFIGURATION \
|
||||
MIX_CTL_CODE(0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
MIX_CTL_CODE(0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_MIX_GET_CONTROL_DATA \
|
||||
MIX_CTL_CODE(0x0002, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
MIX_CTL_CODE(0x0002, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_MIX_GET_LINE_DATA \
|
||||
MIX_CTL_CODE(0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
MIX_CTL_CODE(0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_MIX_REQUEST_NOTIFY \
|
||||
MIX_CTL_CODE(0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
MIX_CTL_CODE(0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
/*
|
||||
Auxiliary device control codes
|
||||
*/
|
||||
|
||||
#define IOCTL_AUX_GET_CAPABILITIES \
|
||||
AUX_CTL_CODE(0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
AUX_CTL_CODE(0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_AUX_SET_VOLUME \
|
||||
AUX_CTL_CODE(0x0002, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
AUX_CTL_CODE(0x0002, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_AUX_GET_VOLUME \
|
||||
AUX_CTL_CODE(0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
AUX_CTL_CODE(0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_SOUND_GET_CHANGED_VOLUME \
|
||||
AUX_CTL_CODE(0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
AUX_CTL_CODE(0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
/*
|
||||
Wave structures & states
|
||||
|
@ -198,20 +192,17 @@
|
|||
|
||||
#define WAVE_DD_MAX_VOLUME 0xFFFFFFFF
|
||||
|
||||
typedef struct _WAVE_DD_VOLUME
|
||||
{
|
||||
ULONG Left;
|
||||
ULONG Right;
|
||||
typedef struct _WAVE_DD_VOLUME {
|
||||
ULONG Left;
|
||||
ULONG Right;
|
||||
} WAVE_DD_VOLUME, *PWAVE_DD_VOLUME;
|
||||
|
||||
typedef struct _WAVE_DD_PITCH
|
||||
{
|
||||
ULONG Pitch;
|
||||
typedef struct _WAVE_DD_PITCH {
|
||||
ULONG Pitch;
|
||||
} WAVE_DD_PITCH, *PWAVE_DD_PITCH;
|
||||
|
||||
typedef struct _WAVE_DD_PLAYBACK_RATE
|
||||
{
|
||||
ULONG Rate;
|
||||
typedef struct _WAVE_DD_PLAYBACK_RATE {
|
||||
ULONG Rate;
|
||||
} WAVE_DD_PLAYBACK_RATE, *PWAVE_DD_PLAYBACK_RATE;
|
||||
|
||||
/* IOCTL_WAVE_SET_STATE commands */
|
||||
|
@ -226,35 +217,30 @@ typedef struct _WAVE_DD_PLAYBACK_RATE
|
|||
#define WAVE_DD_PLAYING 0x0002
|
||||
#define WAVE_DD_RECORDING 0x0003
|
||||
|
||||
|
||||
/*
|
||||
MIDI structures & states
|
||||
*/
|
||||
|
||||
typedef struct _MIDI_DD_INPUT_DATA
|
||||
{
|
||||
LARGE_INTEGER Time;
|
||||
UCHAR Data[sizeof(ULONG)];
|
||||
typedef struct _MIDI_DD_INPUT_DATA {
|
||||
LARGE_INTEGER Time;
|
||||
UCHAR Data[sizeof(ULONG)];
|
||||
} MIDI_DD_INPUT_DATA, *PMIDI_DD_INPUT_DATA;
|
||||
|
||||
typedef struct _MIDI_DD_VOLUME
|
||||
{
|
||||
ULONG Left;
|
||||
ULONG Right;
|
||||
typedef struct _MIDI_DD_VOLUME {
|
||||
ULONG Left;
|
||||
ULONG Right;
|
||||
} MIDI_DD_VOLUME, *PMIDI_DD_VOLUME;
|
||||
|
||||
typedef struct _MIDI_DD_CACHE_PATCHES
|
||||
{
|
||||
ULONG Bank;
|
||||
ULONG Flags;
|
||||
ULONG Patches[128];
|
||||
typedef struct _MIDI_DD_CACHE_PATCHES {
|
||||
ULONG Bank;
|
||||
ULONG Flags;
|
||||
ULONG Patches[128];
|
||||
} MIDI_DD_CACHE_PATCHES, *PMIDI_DD_CACHE_PATCHES;
|
||||
|
||||
typedef struct _MIDI_DD_CACHE_DRUM_PATCHES
|
||||
{
|
||||
ULONG Patch;
|
||||
ULONG Flags;
|
||||
ULONG DrumPatches[128];
|
||||
typedef struct _MIDI_DD_CACHE_DRUM_PATCHES {
|
||||
ULONG Patch;
|
||||
ULONG Flags;
|
||||
ULONG DrumPatches[128];
|
||||
} MIDI_DD_CACHE_DRUM_PATCHES, *PMIDI_DD_CACHE_DRUM_PATCHES;
|
||||
|
||||
/* IOCTL_MIDI_SET_STATE commands */
|
||||
|
@ -269,34 +255,29 @@ typedef struct _MIDI_DD_CACHE_DRUM_PATCHES
|
|||
#define MIDI_DD_PLAYING 0x0002
|
||||
#define MIDI_DD_RECORDING 0x0003
|
||||
|
||||
|
||||
/*
|
||||
Mixer structures
|
||||
TODO: This is incomplete (see NTDDMIX.H in NT4 DDK)
|
||||
*/
|
||||
|
||||
typedef struct _MIXER_DD_READ_DATA
|
||||
{
|
||||
ULONG Id;
|
||||
typedef struct _MIXER_DD_READ_DATA {
|
||||
ULONG Id;
|
||||
} MIXER_DD_READ_DATA, *PMIXER_DD_READ_DATA;
|
||||
|
||||
typedef struct _MIXER_DD_LINE_DATA
|
||||
{
|
||||
ULONG fdwLine;
|
||||
typedef struct _MIXER_DD_LINE_DATA {
|
||||
ULONG fdwLine;
|
||||
} MIXER_DD_LINE_DATA, *PMIXER_DD_LINE_DATA;
|
||||
|
||||
|
||||
/*
|
||||
Auxiliary structures
|
||||
*/
|
||||
|
||||
#define AUX_DD_MAX_VOLUME 0xFFFFFFFF
|
||||
|
||||
typedef struct _AUX_DD_VOLUME
|
||||
{
|
||||
ULONG Left;
|
||||
ULONG Right;
|
||||
typedef struct _AUX_DD_VOLUME {
|
||||
ULONG Left;
|
||||
ULONG Right;
|
||||
} AUX_DD_VOLUME, *PAUX_DD_VOLUME;
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* NTDDSND_H */
|
||||
|
|
|
@ -43,115 +43,108 @@
|
|||
#define IMAGE_FILE_MACHINE_CEF 0x0CEF
|
||||
|
||||
|
||||
|
||||
//
|
||||
// DOS Image Header Format
|
||||
//
|
||||
#include <pshpack2.h>
|
||||
typedef struct _IMAGE_DOS_HEADER {
|
||||
USHORT e_magic;
|
||||
USHORT e_cblp;
|
||||
USHORT e_cp;
|
||||
USHORT e_crlc;
|
||||
USHORT e_cparhdr;
|
||||
USHORT e_minalloc;
|
||||
USHORT e_maxalloc;
|
||||
USHORT e_ss;
|
||||
USHORT e_sp;
|
||||
USHORT e_csum;
|
||||
USHORT e_ip;
|
||||
USHORT e_cs;
|
||||
USHORT e_lfarlc;
|
||||
USHORT e_ovno;
|
||||
USHORT e_res[4];
|
||||
USHORT e_oemid;
|
||||
USHORT e_oeminfo;
|
||||
USHORT e_res2[10];
|
||||
LONG e_lfanew;
|
||||
USHORT e_magic;
|
||||
USHORT e_cblp;
|
||||
USHORT e_cp;
|
||||
USHORT e_crlc;
|
||||
USHORT e_cparhdr;
|
||||
USHORT e_minalloc;
|
||||
USHORT e_maxalloc;
|
||||
USHORT e_ss;
|
||||
USHORT e_sp;
|
||||
USHORT e_csum;
|
||||
USHORT e_ip;
|
||||
USHORT e_cs;
|
||||
USHORT e_lfarlc;
|
||||
USHORT e_ovno;
|
||||
USHORT e_res[4];
|
||||
USHORT e_oemid;
|
||||
USHORT e_oeminfo;
|
||||
USHORT e_res2[10];
|
||||
LONG e_lfanew;
|
||||
} IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
|
||||
#include <poppack.h>
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Export/Import Format
|
||||
//
|
||||
#include <pshpack4.h>
|
||||
typedef struct _IMAGE_EXPORT_DIRECTORY {
|
||||
ULONG Characteristics;
|
||||
ULONG TimeDateStamp;
|
||||
USHORT MajorVersion;
|
||||
USHORT MinorVersion;
|
||||
ULONG Name;
|
||||
ULONG Base;
|
||||
ULONG NumberOfFunctions;
|
||||
ULONG NumberOfNames;
|
||||
ULONG AddressOfFunctions;
|
||||
ULONG AddressOfNames;
|
||||
ULONG AddressOfNameOrdinals;
|
||||
ULONG Characteristics;
|
||||
ULONG TimeDateStamp;
|
||||
USHORT MajorVersion;
|
||||
USHORT MinorVersion;
|
||||
ULONG Name;
|
||||
ULONG Base;
|
||||
ULONG NumberOfFunctions;
|
||||
ULONG NumberOfNames;
|
||||
ULONG AddressOfFunctions;
|
||||
ULONG AddressOfNames;
|
||||
ULONG AddressOfNameOrdinals;
|
||||
} IMAGE_EXPORT_DIRECTORY, *PIMAGE_EXPORT_DIRECTORY;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Resource Data Entry Format
|
||||
//
|
||||
typedef struct _IMAGE_RESOURCE_DATA_ENTRY {
|
||||
ULONG OffsetToData;
|
||||
ULONG Size;
|
||||
ULONG CodePage;
|
||||
ULONG Reserved;
|
||||
ULONG OffsetToData;
|
||||
ULONG Size;
|
||||
ULONG CodePage;
|
||||
ULONG Reserved;
|
||||
} IMAGE_RESOURCE_DATA_ENTRY, *PIMAGE_RESOURCE_DATA_ENTRY;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Load Configuration Directory Entry Format
|
||||
//
|
||||
typedef struct {
|
||||
ULONG Size;
|
||||
ULONG TimeDateStamp;
|
||||
USHORT MajorVersion;
|
||||
USHORT MinorVersion;
|
||||
ULONG GlobalFlagsClear;
|
||||
ULONG GlobalFlagsSet;
|
||||
ULONG CriticalSectionDefaultTimeout;
|
||||
ULONG DeCommitFreeBlockThreshold;
|
||||
ULONG DeCommitTotalFreeThreshold;
|
||||
ULONG LockPrefixTable;
|
||||
ULONG MaximumAllocationSize;
|
||||
ULONG VirtualMemoryThreshold;
|
||||
ULONG ProcessHeapFlags;
|
||||
ULONG ProcessAffinityMask;
|
||||
USHORT CSDVersion;
|
||||
USHORT Reserved1;
|
||||
ULONG EditList;
|
||||
ULONG SecurityCookie;
|
||||
ULONG SEHandlerTable;
|
||||
ULONG SEHandlerCount;
|
||||
ULONG Size;
|
||||
ULONG TimeDateStamp;
|
||||
USHORT MajorVersion;
|
||||
USHORT MinorVersion;
|
||||
ULONG GlobalFlagsClear;
|
||||
ULONG GlobalFlagsSet;
|
||||
ULONG CriticalSectionDefaultTimeout;
|
||||
ULONG DeCommitFreeBlockThreshold;
|
||||
ULONG DeCommitTotalFreeThreshold;
|
||||
ULONG LockPrefixTable;
|
||||
ULONG MaximumAllocationSize;
|
||||
ULONG VirtualMemoryThreshold;
|
||||
ULONG ProcessHeapFlags;
|
||||
ULONG ProcessAffinityMask;
|
||||
USHORT CSDVersion;
|
||||
USHORT Reserved1;
|
||||
ULONG EditList;
|
||||
ULONG SecurityCookie;
|
||||
ULONG SEHandlerTable;
|
||||
ULONG SEHandlerCount;
|
||||
} IMAGE_LOAD_CONFIG_DIRECTORY32, *PIMAGE_LOAD_CONFIG_DIRECTORY32;
|
||||
|
||||
typedef struct {
|
||||
ULONG Size;
|
||||
ULONG TimeDateStamp;
|
||||
USHORT MajorVersion;
|
||||
USHORT MinorVersion;
|
||||
ULONG GlobalFlagsClear;
|
||||
ULONG GlobalFlagsSet;
|
||||
ULONG CriticalSectionDefaultTimeout;
|
||||
ULONGLONG DeCommitFreeBlockThreshold;
|
||||
ULONGLONG DeCommitTotalFreeThreshold;
|
||||
ULONGLONG LockPrefixTable;
|
||||
ULONGLONG MaximumAllocationSize;
|
||||
ULONGLONG VirtualMemoryThreshold;
|
||||
ULONGLONG ProcessAffinityMask;
|
||||
ULONG ProcessHeapFlags;
|
||||
USHORT CSDVersion;
|
||||
USHORT Reserved1;
|
||||
ULONGLONG EditList;
|
||||
ULONGLONG SecurityCookie;
|
||||
ULONGLONG SEHandlerTable;
|
||||
ULONGLONG SEHandlerCount;
|
||||
ULONG Size;
|
||||
ULONG TimeDateStamp;
|
||||
USHORT MajorVersion;
|
||||
USHORT MinorVersion;
|
||||
ULONG GlobalFlagsClear;
|
||||
ULONG GlobalFlagsSet;
|
||||
ULONG CriticalSectionDefaultTimeout;
|
||||
ULONGLONG DeCommitFreeBlockThreshold;
|
||||
ULONGLONG DeCommitTotalFreeThreshold;
|
||||
ULONGLONG LockPrefixTable;
|
||||
ULONGLONG MaximumAllocationSize;
|
||||
ULONGLONG VirtualMemoryThreshold;
|
||||
ULONGLONG ProcessAffinityMask;
|
||||
ULONG ProcessHeapFlags;
|
||||
USHORT CSDVersion;
|
||||
USHORT Reserved1;
|
||||
ULONGLONG EditList;
|
||||
ULONGLONG SecurityCookie;
|
||||
ULONGLONG SEHandlerTable;
|
||||
ULONGLONG SEHandlerCount;
|
||||
} IMAGE_LOAD_CONFIG_DIRECTORY64, *PIMAGE_LOAD_CONFIG_DIRECTORY64;
|
||||
|
||||
#ifdef _WIN64
|
||||
|
@ -162,36 +155,31 @@ typedef IMAGE_LOAD_CONFIG_DIRECTORY32 IMAGE_LOAD_CONFIG_DIRECTORY;
|
|||
typedef PIMAGE_LOAD_CONFIG_DIRECTORY32 PIMAGE_LOAD_CONFIG_DIRECTORY;
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Base Relocation Format
|
||||
//
|
||||
typedef struct _IMAGE_BASE_RELOCATION {
|
||||
ULONG VirtualAddress;
|
||||
ULONG SizeOfBlock;
|
||||
ULONG VirtualAddress;
|
||||
ULONG SizeOfBlock;
|
||||
} IMAGE_BASE_RELOCATION, *PIMAGE_BASE_RELOCATION;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Resource Format
|
||||
//
|
||||
typedef struct _IMAGE_RESOURCE_DIRECTORY {
|
||||
ULONG Characteristics;
|
||||
ULONG TimeDateStamp;
|
||||
USHORT MajorVersion;
|
||||
USHORT MinorVersion;
|
||||
USHORT NumberOfNamedEntries;
|
||||
USHORT NumberOfIdEntries;
|
||||
ULONG Characteristics;
|
||||
ULONG TimeDateStamp;
|
||||
USHORT MajorVersion;
|
||||
USHORT MinorVersion;
|
||||
USHORT NumberOfNamedEntries;
|
||||
USHORT NumberOfIdEntries;
|
||||
} IMAGE_RESOURCE_DIRECTORY, *PIMAGE_RESOURCE_DIRECTORY;
|
||||
|
||||
typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING {
|
||||
USHORT Length;
|
||||
CHAR NameString[ANYSIZE_ARRAY];
|
||||
USHORT Length;
|
||||
CHAR NameString[ANYSIZE_ARRAY];
|
||||
} IMAGE_RESOURCE_DIRECTORY_STRING, *PIMAGE_RESOURCE_DIRECTORY_STRING;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Section Header Format
|
||||
//
|
||||
|
@ -199,20 +187,19 @@ typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING {
|
|||
#define IMAGE_SIZEOF_SECTION_HEADER 40
|
||||
|
||||
typedef struct _IMAGE_SECTION_HEADER {
|
||||
UCHAR Name[IMAGE_SIZEOF_SHORT_NAME];
|
||||
union
|
||||
{
|
||||
ULONG PhysicalAddress;
|
||||
ULONG VirtualSize;
|
||||
} Misc;
|
||||
ULONG VirtualAddress;
|
||||
ULONG SizeOfRawData;
|
||||
ULONG PointerToRawData;
|
||||
ULONG PointerToRelocations;
|
||||
ULONG PointerToLinenumbers;
|
||||
USHORT NumberOfRelocations;
|
||||
USHORT NumberOfLinenumbers;
|
||||
ULONG Characteristics;
|
||||
UCHAR Name[IMAGE_SIZEOF_SHORT_NAME];
|
||||
union {
|
||||
ULONG PhysicalAddress;
|
||||
ULONG VirtualSize;
|
||||
} Misc;
|
||||
ULONG VirtualAddress;
|
||||
ULONG SizeOfRawData;
|
||||
ULONG PointerToRawData;
|
||||
ULONG PointerToRelocations;
|
||||
ULONG PointerToLinenumbers;
|
||||
USHORT NumberOfRelocations;
|
||||
USHORT NumberOfLinenumbers;
|
||||
ULONG Characteristics;
|
||||
} IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;
|
||||
|
||||
//
|
||||
|
@ -231,21 +218,19 @@ typedef struct _IMAGE_SECTION_HEADER {
|
|||
#define IMAGE_SCN_MEM_READ 0x40000000
|
||||
#define IMAGE_SCN_MEM_WRITE 0x80000000
|
||||
|
||||
|
||||
|
||||
//
|
||||
// File Header Format
|
||||
//
|
||||
#define IMAGE_SIZEOF_FILE_HEADER 20
|
||||
|
||||
typedef struct _IMAGE_FILE_HEADER {
|
||||
USHORT Machine;
|
||||
USHORT NumberOfSections;
|
||||
ULONG TimeDateStamp;
|
||||
ULONG PointerToSymbolTable;
|
||||
ULONG NumberOfSymbols;
|
||||
USHORT SizeOfOptionalHeader;
|
||||
USHORT Characteristics;
|
||||
USHORT Machine;
|
||||
USHORT NumberOfSections;
|
||||
ULONG TimeDateStamp;
|
||||
ULONG PointerToSymbolTable;
|
||||
ULONG NumberOfSymbols;
|
||||
USHORT SizeOfOptionalHeader;
|
||||
USHORT Characteristics;
|
||||
} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
|
||||
|
||||
//
|
||||
|
@ -267,104 +252,100 @@ typedef struct _IMAGE_FILE_HEADER {
|
|||
#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000
|
||||
#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Directory format.
|
||||
//
|
||||
#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
|
||||
|
||||
typedef struct _IMAGE_DATA_DIRECTORY {
|
||||
ULONG VirtualAddress;
|
||||
ULONG Size;
|
||||
ULONG VirtualAddress;
|
||||
ULONG Size;
|
||||
} IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Optional Header Formats
|
||||
//
|
||||
typedef struct _IMAGE_OPTIONAL_HEADER {
|
||||
USHORT Magic;
|
||||
UCHAR MajorLinkerVersion;
|
||||
UCHAR MinorLinkerVersion;
|
||||
ULONG SizeOfCode;
|
||||
ULONG SizeOfInitializedData;
|
||||
ULONG SizeOfUninitializedData;
|
||||
ULONG AddressOfEntryPoint;
|
||||
ULONG BaseOfCode;
|
||||
ULONG BaseOfData;
|
||||
ULONG ImageBase;
|
||||
ULONG SectionAlignment;
|
||||
ULONG FileAlignment;
|
||||
USHORT MajorOperatingSystemVersion;
|
||||
USHORT MinorOperatingSystemVersion;
|
||||
USHORT MajorImageVersion;
|
||||
USHORT MinorImageVersion;
|
||||
USHORT MajorSubsystemVersion;
|
||||
USHORT MinorSubsystemVersion;
|
||||
ULONG Win32VersionValue;
|
||||
ULONG SizeOfImage;
|
||||
ULONG SizeOfHeaders;
|
||||
ULONG CheckSum;
|
||||
USHORT Subsystem;
|
||||
USHORT DllCharacteristics;
|
||||
ULONG SizeOfStackReserve;
|
||||
ULONG SizeOfStackCommit;
|
||||
ULONG SizeOfHeapReserve;
|
||||
ULONG SizeOfHeapCommit;
|
||||
ULONG LoaderFlags;
|
||||
ULONG NumberOfRvaAndSizes;
|
||||
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
|
||||
USHORT Magic;
|
||||
UCHAR MajorLinkerVersion;
|
||||
UCHAR MinorLinkerVersion;
|
||||
ULONG SizeOfCode;
|
||||
ULONG SizeOfInitializedData;
|
||||
ULONG SizeOfUninitializedData;
|
||||
ULONG AddressOfEntryPoint;
|
||||
ULONG BaseOfCode;
|
||||
ULONG BaseOfData;
|
||||
ULONG ImageBase;
|
||||
ULONG SectionAlignment;
|
||||
ULONG FileAlignment;
|
||||
USHORT MajorOperatingSystemVersion;
|
||||
USHORT MinorOperatingSystemVersion;
|
||||
USHORT MajorImageVersion;
|
||||
USHORT MinorImageVersion;
|
||||
USHORT MajorSubsystemVersion;
|
||||
USHORT MinorSubsystemVersion;
|
||||
ULONG Win32VersionValue;
|
||||
ULONG SizeOfImage;
|
||||
ULONG SizeOfHeaders;
|
||||
ULONG CheckSum;
|
||||
USHORT Subsystem;
|
||||
USHORT DllCharacteristics;
|
||||
ULONG SizeOfStackReserve;
|
||||
ULONG SizeOfStackCommit;
|
||||
ULONG SizeOfHeapReserve;
|
||||
ULONG SizeOfHeapCommit;
|
||||
ULONG LoaderFlags;
|
||||
ULONG NumberOfRvaAndSizes;
|
||||
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
|
||||
} IMAGE_OPTIONAL_HEADER32, *PIMAGE_OPTIONAL_HEADER32;
|
||||
|
||||
typedef struct _IMAGE_ROM_OPTIONAL_HEADER {
|
||||
USHORT Magic;
|
||||
UCHAR MajorLinkerVersion;
|
||||
UCHAR MinorLinkerVersion;
|
||||
ULONG SizeOfCode;
|
||||
ULONG SizeOfInitializedData;
|
||||
ULONG SizeOfUninitializedData;
|
||||
ULONG AddressOfEntryPoint;
|
||||
ULONG BaseOfCode;
|
||||
ULONG BaseOfData;
|
||||
ULONG BaseOfBss;
|
||||
ULONG GprMask;
|
||||
ULONG CprMask[4];
|
||||
ULONG GpValue;
|
||||
USHORT Magic;
|
||||
UCHAR MajorLinkerVersion;
|
||||
UCHAR MinorLinkerVersion;
|
||||
ULONG SizeOfCode;
|
||||
ULONG SizeOfInitializedData;
|
||||
ULONG SizeOfUninitializedData;
|
||||
ULONG AddressOfEntryPoint;
|
||||
ULONG BaseOfCode;
|
||||
ULONG BaseOfData;
|
||||
ULONG BaseOfBss;
|
||||
ULONG GprMask;
|
||||
ULONG CprMask[4];
|
||||
ULONG GpValue;
|
||||
} IMAGE_ROM_OPTIONAL_HEADER, *PIMAGE_ROM_OPTIONAL_HEADER;
|
||||
|
||||
typedef struct _IMAGE_OPTIONAL_HEADER64 {
|
||||
USHORT Magic;
|
||||
UCHAR MajorLinkerVersion;
|
||||
UCHAR MinorLinkerVersion;
|
||||
ULONG SizeOfCode;
|
||||
ULONG SizeOfInitializedData;
|
||||
ULONG SizeOfUninitializedData;
|
||||
ULONG AddressOfEntryPoint;
|
||||
ULONG BaseOfCode;
|
||||
ULONGLONG ImageBase;
|
||||
ULONG SectionAlignment;
|
||||
ULONG FileAlignment;
|
||||
USHORT MajorOperatingSystemVersion;
|
||||
USHORT MinorOperatingSystemVersion;
|
||||
USHORT MajorImageVersion;
|
||||
USHORT MinorImageVersion;
|
||||
USHORT MajorSubsystemVersion;
|
||||
USHORT MinorSubsystemVersion;
|
||||
ULONG Win32VersionValue;
|
||||
ULONG SizeOfImage;
|
||||
ULONG SizeOfHeaders;
|
||||
ULONG CheckSum;
|
||||
USHORT Subsystem;
|
||||
USHORT DllCharacteristics;
|
||||
ULONGLONG SizeOfStackReserve;
|
||||
ULONGLONG SizeOfStackCommit;
|
||||
ULONGLONG SizeOfHeapReserve;
|
||||
ULONGLONG SizeOfHeapCommit;
|
||||
ULONG LoaderFlags;
|
||||
ULONG NumberOfRvaAndSizes;
|
||||
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
|
||||
USHORT Magic;
|
||||
UCHAR MajorLinkerVersion;
|
||||
UCHAR MinorLinkerVersion;
|
||||
ULONG SizeOfCode;
|
||||
ULONG SizeOfInitializedData;
|
||||
ULONG SizeOfUninitializedData;
|
||||
ULONG AddressOfEntryPoint;
|
||||
ULONG BaseOfCode;
|
||||
ULONGLONG ImageBase;
|
||||
ULONG SectionAlignment;
|
||||
ULONG FileAlignment;
|
||||
USHORT MajorOperatingSystemVersion;
|
||||
USHORT MinorOperatingSystemVersion;
|
||||
USHORT MajorImageVersion;
|
||||
USHORT MinorImageVersion;
|
||||
USHORT MajorSubsystemVersion;
|
||||
USHORT MinorSubsystemVersion;
|
||||
ULONG Win32VersionValue;
|
||||
ULONG SizeOfImage;
|
||||
ULONG SizeOfHeaders;
|
||||
ULONG CheckSum;
|
||||
USHORT Subsystem;
|
||||
USHORT DllCharacteristics;
|
||||
ULONGLONG SizeOfStackReserve;
|
||||
ULONGLONG SizeOfStackCommit;
|
||||
ULONGLONG SizeOfHeapReserve;
|
||||
ULONGLONG SizeOfHeapCommit;
|
||||
ULONG LoaderFlags;
|
||||
ULONG NumberOfRvaAndSizes;
|
||||
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
|
||||
} IMAGE_OPTIONAL_HEADER64, *PIMAGE_OPTIONAL_HEADER64;
|
||||
|
||||
//
|
||||
|
@ -374,7 +355,6 @@ typedef struct _IMAGE_OPTIONAL_HEADER64 {
|
|||
#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
|
||||
#define IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
|
||||
|
||||
|
||||
#ifdef _WIN64
|
||||
typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER;
|
||||
typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER;
|
||||
|
@ -385,21 +365,19 @@ typedef PIMAGE_OPTIONAL_HEADER32 PIMAGE_OPTIONAL_HEADER;
|
|||
#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR32_MAGIC
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Nt Header Formats
|
||||
//
|
||||
typedef struct _IMAGE_NT_HEADERS64 {
|
||||
ULONG Signature;
|
||||
IMAGE_FILE_HEADER FileHeader;
|
||||
IMAGE_OPTIONAL_HEADER64 OptionalHeader;
|
||||
ULONG Signature;
|
||||
IMAGE_FILE_HEADER FileHeader;
|
||||
IMAGE_OPTIONAL_HEADER64 OptionalHeader;
|
||||
} IMAGE_NT_HEADERS64;
|
||||
|
||||
typedef struct _IMAGE_NT_HEADERS {
|
||||
ULONG Signature;
|
||||
IMAGE_FILE_HEADER FileHeader;
|
||||
IMAGE_OPTIONAL_HEADER32 OptionalHeader;
|
||||
ULONG Signature;
|
||||
IMAGE_FILE_HEADER FileHeader;
|
||||
IMAGE_OPTIONAL_HEADER32 OptionalHeader;
|
||||
} IMAGE_NT_HEADERS32;
|
||||
|
||||
#ifdef _WIN64
|
||||
|
@ -424,11 +402,10 @@ typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS;
|
|||
//
|
||||
// Retreives the first image section header from the Nt Header
|
||||
//
|
||||
#define IMAGE_FIRST_SECTION( NtHeader ) ((PIMAGE_SECTION_HEADER) \
|
||||
((ULONG_PTR)(NtHeader) + \
|
||||
FIELD_OFFSET( IMAGE_NT_HEADERS, OptionalHeader ) + \
|
||||
((NtHeader))->FileHeader.SizeOfOptionalHeader \
|
||||
))
|
||||
#define IMAGE_FIRST_SECTION( NtHeader ) \
|
||||
((PIMAGE_SECTION_HEADER) ((ULONG_PTR)(NtHeader) + \
|
||||
FIELD_OFFSET( IMAGE_NT_HEADERS, OptionalHeader ) + \
|
||||
((NtHeader))->FileHeader.SizeOfOptionalHeader))
|
||||
|
||||
//
|
||||
// Dll Characteristics
|
||||
|
@ -461,34 +438,32 @@ typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS;
|
|||
#define IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT 13
|
||||
#define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR 14
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Import Formats
|
||||
//
|
||||
typedef struct _IMAGE_IMPORT_BY_NAME {
|
||||
USHORT Hint;
|
||||
UCHAR Name[1];
|
||||
USHORT Hint;
|
||||
UCHAR Name[1];
|
||||
} IMAGE_IMPORT_BY_NAME, *PIMAGE_IMPORT_BY_NAME;
|
||||
|
||||
#include <pshpack8.h>
|
||||
typedef struct _IMAGE_THUNK_DATA64 {
|
||||
union {
|
||||
ULONGLONG ForwarderString;
|
||||
ULONGLONG Function;
|
||||
ULONGLONG Ordinal;
|
||||
ULONGLONG AddressOfData;
|
||||
} u1;
|
||||
union {
|
||||
ULONGLONG ForwarderString;
|
||||
ULONGLONG Function;
|
||||
ULONGLONG Ordinal;
|
||||
ULONGLONG AddressOfData;
|
||||
} u1;
|
||||
} IMAGE_THUNK_DATA64, *PIMAGE_THUNK_DATA64;
|
||||
#include <poppack.h>
|
||||
|
||||
typedef struct _IMAGE_THUNK_DATA32 {
|
||||
union {
|
||||
ULONG ForwarderString;
|
||||
ULONG Function;
|
||||
ULONG Ordinal;
|
||||
ULONG AddressOfData;
|
||||
} u1;
|
||||
union {
|
||||
ULONG ForwarderString;
|
||||
ULONG Function;
|
||||
ULONG Ordinal;
|
||||
ULONG AddressOfData;
|
||||
} u1;
|
||||
} IMAGE_THUNK_DATA32, *PIMAGE_THUNK_DATA32;
|
||||
|
||||
#define IMAGE_ORDINAL_FLAG64 0x8000000000000000ULL
|
||||
|
@ -498,35 +473,32 @@ typedef struct _IMAGE_THUNK_DATA32 {
|
|||
#define IMAGE_SNAP_BY_ORDINAL64(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG64) != 0)
|
||||
#define IMAGE_SNAP_BY_ORDINAL32(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG32) != 0)
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Thread Local Storage (TLS)
|
||||
//
|
||||
typedef
|
||||
VOID
|
||||
(NTAPI *PIMAGE_TLS_CALLBACK) (
|
||||
PVOID DllHandle,
|
||||
ULONG Reason,
|
||||
PVOID Reserved
|
||||
);
|
||||
PVOID DllHandle,
|
||||
ULONG Reason,
|
||||
PVOID Reserved);
|
||||
|
||||
typedef struct _IMAGE_TLS_DIRECTORY64 {
|
||||
ULONGLONG StartAddressOfRawData;
|
||||
ULONGLONG EndAddressOfRawData;
|
||||
ULONGLONG AddressOfIndex;
|
||||
ULONGLONG AddressOfCallBacks;
|
||||
ULONG SizeOfZeroFill;
|
||||
ULONG Characteristics;
|
||||
ULONGLONG StartAddressOfRawData;
|
||||
ULONGLONG EndAddressOfRawData;
|
||||
ULONGLONG AddressOfIndex;
|
||||
ULONGLONG AddressOfCallBacks;
|
||||
ULONG SizeOfZeroFill;
|
||||
ULONG Characteristics;
|
||||
} IMAGE_TLS_DIRECTORY64, *PIMAGE_TLS_DIRECTORY64;
|
||||
|
||||
typedef struct _IMAGE_TLS_DIRECTORY32 {
|
||||
ULONG StartAddressOfRawData;
|
||||
ULONG EndAddressOfRawData;
|
||||
ULONG AddressOfIndex;
|
||||
ULONG AddressOfCallBacks;
|
||||
ULONG SizeOfZeroFill;
|
||||
ULONG Characteristics;
|
||||
ULONG StartAddressOfRawData;
|
||||
ULONG EndAddressOfRawData;
|
||||
ULONG AddressOfIndex;
|
||||
ULONG AddressOfCallBacks;
|
||||
ULONG SizeOfZeroFill;
|
||||
ULONG Characteristics;
|
||||
} IMAGE_TLS_DIRECTORY32, *PIMAGE_TLS_DIRECTORY32;
|
||||
|
||||
#ifdef _WIN64
|
||||
|
@ -548,18 +520,16 @@ typedef PIMAGE_TLS_DIRECTORY32 PIMAGE_TLS_DIRECTORY;
|
|||
#endif
|
||||
|
||||
typedef struct _IMAGE_IMPORT_DESCRIPTOR {
|
||||
_ANONYMOUS_UNION union {
|
||||
ULONG Characteristics;
|
||||
ULONG OriginalFirstThunk;
|
||||
} DUMMYUNIONNAME;
|
||||
ULONG TimeDateStamp;
|
||||
ULONG ForwarderChain;
|
||||
ULONG Name;
|
||||
ULONG FirstThunk;
|
||||
_ANONYMOUS_UNION union {
|
||||
ULONG Characteristics;
|
||||
ULONG OriginalFirstThunk;
|
||||
} DUMMYUNIONNAME;
|
||||
ULONG TimeDateStamp;
|
||||
ULONG ForwarderChain;
|
||||
ULONG Name;
|
||||
ULONG FirstThunk;
|
||||
} IMAGE_IMPORT_DESCRIPTOR, *PIMAGE_IMPORT_DESCRIPTOR;
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* _NTIMAGE_ */
|
||||
|
|
|
@ -2,38 +2,37 @@
|
|||
#ifndef _NTNLS_
|
||||
#define _NTNLS_
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MAXIMUM_LEADBYTES 12
|
||||
|
||||
/* Some documentation can be found here: http://www.ping.uio.no/~ovehk/nls/ */
|
||||
typedef struct _CPTABLEINFO
|
||||
{
|
||||
USHORT CodePage;
|
||||
USHORT MaximumCharacterSize; /* 1 = SBCS, 2 = DBCS */
|
||||
USHORT DefaultChar; /* Default MultiByte Character for the CP->Unicode conversion */
|
||||
USHORT UniDefaultChar; /* Default Unicode Character for the CP->Unicode conversion */
|
||||
USHORT TransDefaultChar; /* Default MultiByte Character for the Unicode->CP conversion */
|
||||
USHORT TransUniDefaultChar; /* Default Unicode Character for the Unicode->CP conversion */
|
||||
USHORT DBCSCodePage;
|
||||
UCHAR LeadByte[MAXIMUM_LEADBYTES];
|
||||
PUSHORT MultiByteTable; /* Table for CP->Unicode conversion */
|
||||
PVOID WideCharTable; /* Table for Unicode->CP conversion */
|
||||
PUSHORT DBCSRanges;
|
||||
PUSHORT DBCSOffsets;
|
||||
typedef struct _CPTABLEINFO {
|
||||
USHORT CodePage;
|
||||
USHORT MaximumCharacterSize; /* 1 = SBCS, 2 = DBCS */
|
||||
USHORT DefaultChar; /* Default MultiByte Character for the CP->Unicode conversion */
|
||||
USHORT UniDefaultChar; /* Default Unicode Character for the CP->Unicode conversion */
|
||||
USHORT TransDefaultChar; /* Default MultiByte Character for the Unicode->CP conversion */
|
||||
USHORT TransUniDefaultChar; /* Default Unicode Character for the Unicode->CP conversion */
|
||||
USHORT DBCSCodePage;
|
||||
UCHAR LeadByte[MAXIMUM_LEADBYTES];
|
||||
PUSHORT MultiByteTable; /* Table for CP->Unicode conversion */
|
||||
PVOID WideCharTable; /* Table for Unicode->CP conversion */
|
||||
PUSHORT DBCSRanges;
|
||||
PUSHORT DBCSOffsets;
|
||||
} CPTABLEINFO, *PCPTABLEINFO;
|
||||
|
||||
typedef struct _NLSTABLEINFO
|
||||
{
|
||||
CPTABLEINFO OemTableInfo;
|
||||
CPTABLEINFO AnsiTableInfo;
|
||||
PUSHORT UpperCaseTable;
|
||||
PUSHORT LowerCaseTable;
|
||||
typedef struct _NLSTABLEINFO {
|
||||
CPTABLEINFO OemTableInfo;
|
||||
CPTABLEINFO AnsiTableInfo;
|
||||
PUSHORT UpperCaseTable;
|
||||
PUSHORT LowerCaseTable;
|
||||
} NLSTABLEINFO, *PNLSTABLEINFO;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _NTNLS_ */
|
||||
|
|
|
@ -32,29 +32,30 @@ extern "C" {
|
|||
|
||||
/* Power States/Levels */
|
||||
typedef enum _SYSTEM_POWER_STATE {
|
||||
PowerSystemUnspecified,
|
||||
PowerSystemWorking,
|
||||
PowerSystemSleeping1,
|
||||
PowerSystemSleeping2,
|
||||
PowerSystemSleeping3,
|
||||
PowerSystemHibernate,
|
||||
PowerSystemShutdown,
|
||||
PowerSystemMaximum
|
||||
PowerSystemUnspecified,
|
||||
PowerSystemWorking,
|
||||
PowerSystemSleeping1,
|
||||
PowerSystemSleeping2,
|
||||
PowerSystemSleeping3,
|
||||
PowerSystemHibernate,
|
||||
PowerSystemShutdown,
|
||||
PowerSystemMaximum
|
||||
} SYSTEM_POWER_STATE, *PSYSTEM_POWER_STATE;
|
||||
|
||||
#define POWER_SYSTEM_MAXIMUM PowerSystemMaximum
|
||||
|
||||
typedef enum _DEVICE_POWER_STATE {
|
||||
PowerDeviceUnspecified,
|
||||
PowerDeviceD0,
|
||||
PowerDeviceD1,
|
||||
PowerDeviceD2,
|
||||
PowerDeviceD3,
|
||||
PowerDeviceMaximum
|
||||
PowerDeviceUnspecified,
|
||||
PowerDeviceD0,
|
||||
PowerDeviceD1,
|
||||
PowerDeviceD2,
|
||||
PowerDeviceD3,
|
||||
PowerDeviceMaximum
|
||||
} DEVICE_POWER_STATE, *PDEVICE_POWER_STATE;
|
||||
|
||||
typedef union _POWER_STATE {
|
||||
SYSTEM_POWER_STATE SystemState;
|
||||
DEVICE_POWER_STATE DeviceState;
|
||||
SYSTEM_POWER_STATE SystemState;
|
||||
DEVICE_POWER_STATE DeviceState;
|
||||
} POWER_STATE, *PPOWER_STATE;
|
||||
|
||||
typedef enum _POWER_STATE_TYPE {
|
||||
|
@ -63,76 +64,76 @@ typedef enum _POWER_STATE_TYPE {
|
|||
} POWER_STATE_TYPE, *PPOWER_STATE_TYPE;
|
||||
|
||||
typedef enum _POWER_INFORMATION_LEVEL {
|
||||
SystemPowerPolicyAc,
|
||||
SystemPowerPolicyDc,
|
||||
VerifySystemPolicyAc,
|
||||
VerifySystemPolicyDc,
|
||||
SystemPowerCapabilities,
|
||||
SystemBatteryState,
|
||||
SystemPowerStateHandler,
|
||||
ProcessorStateHandler,
|
||||
SystemPowerPolicyCurrent,
|
||||
AdministratorPowerPolicy,
|
||||
SystemReserveHiberFile,
|
||||
ProcessorInformation,
|
||||
SystemPowerInformation,
|
||||
ProcessorStateHandler2,
|
||||
LastWakeTime,
|
||||
LastSleepTime,
|
||||
SystemExecutionState,
|
||||
SystemPowerStateNotifyHandler,
|
||||
ProcessorPowerPolicyAc,
|
||||
ProcessorPowerPolicyDc,
|
||||
VerifyProcessorPowerPolicyAc,
|
||||
VerifyProcessorPowerPolicyDc,
|
||||
ProcessorPowerPolicyCurrent,
|
||||
SystemPowerStateLogging,
|
||||
SystemPowerLoggingEntry,
|
||||
SetPowerSettingValue,
|
||||
NotifyUserPowerSetting,
|
||||
PowerInformationLevelUnused0,
|
||||
PowerInformationLevelUnused1,
|
||||
SystemVideoState,
|
||||
TraceApplicationPowerMessage,
|
||||
TraceApplicationPowerMessageEnd,
|
||||
ProcessorPerfStates,
|
||||
ProcessorIdleStates,
|
||||
ProcessorCap,
|
||||
SystemWakeSource,
|
||||
SystemHiberFileInformation,
|
||||
TraceServicePowerMessage,
|
||||
ProcessorLoad,
|
||||
PowerShutdownNotification,
|
||||
MonitorCapabilities,
|
||||
SessionPowerInit,
|
||||
SessionDisplayState,
|
||||
PowerRequestCreate,
|
||||
PowerRequestAction,
|
||||
GetPowerRequestList,
|
||||
ProcessorInformationEx,
|
||||
NotifyUserModeLegacyPowerEvent,
|
||||
GroupPark,
|
||||
ProcessorIdleDomains,
|
||||
WakeTimerList,
|
||||
SystemHiberFileSize,
|
||||
PowerInformationLevelMaximum
|
||||
SystemPowerPolicyAc,
|
||||
SystemPowerPolicyDc,
|
||||
VerifySystemPolicyAc,
|
||||
VerifySystemPolicyDc,
|
||||
SystemPowerCapabilities,
|
||||
SystemBatteryState,
|
||||
SystemPowerStateHandler,
|
||||
ProcessorStateHandler,
|
||||
SystemPowerPolicyCurrent,
|
||||
AdministratorPowerPolicy,
|
||||
SystemReserveHiberFile,
|
||||
ProcessorInformation,
|
||||
SystemPowerInformation,
|
||||
ProcessorStateHandler2,
|
||||
LastWakeTime,
|
||||
LastSleepTime,
|
||||
SystemExecutionState,
|
||||
SystemPowerStateNotifyHandler,
|
||||
ProcessorPowerPolicyAc,
|
||||
ProcessorPowerPolicyDc,
|
||||
VerifyProcessorPowerPolicyAc,
|
||||
VerifyProcessorPowerPolicyDc,
|
||||
ProcessorPowerPolicyCurrent,
|
||||
SystemPowerStateLogging,
|
||||
SystemPowerLoggingEntry,
|
||||
SetPowerSettingValue,
|
||||
NotifyUserPowerSetting,
|
||||
PowerInformationLevelUnused0,
|
||||
PowerInformationLevelUnused1,
|
||||
SystemVideoState,
|
||||
TraceApplicationPowerMessage,
|
||||
TraceApplicationPowerMessageEnd,
|
||||
ProcessorPerfStates,
|
||||
ProcessorIdleStates,
|
||||
ProcessorCap,
|
||||
SystemWakeSource,
|
||||
SystemHiberFileInformation,
|
||||
TraceServicePowerMessage,
|
||||
ProcessorLoad,
|
||||
PowerShutdownNotification,
|
||||
MonitorCapabilities,
|
||||
SessionPowerInit,
|
||||
SessionDisplayState,
|
||||
PowerRequestCreate,
|
||||
PowerRequestAction,
|
||||
GetPowerRequestList,
|
||||
ProcessorInformationEx,
|
||||
NotifyUserModeLegacyPowerEvent,
|
||||
GroupPark,
|
||||
ProcessorIdleDomains,
|
||||
WakeTimerList,
|
||||
SystemHiberFileSize,
|
||||
PowerInformationLevelMaximum
|
||||
} POWER_INFORMATION_LEVEL;
|
||||
|
||||
typedef enum {
|
||||
PowerActionNone,
|
||||
PowerActionReserved,
|
||||
PowerActionSleep,
|
||||
PowerActionHibernate,
|
||||
PowerActionShutdown,
|
||||
PowerActionShutdownReset,
|
||||
PowerActionShutdownOff,
|
||||
PowerActionWarmEject
|
||||
PowerActionNone,
|
||||
PowerActionReserved,
|
||||
PowerActionSleep,
|
||||
PowerActionHibernate,
|
||||
PowerActionShutdown,
|
||||
PowerActionShutdownReset,
|
||||
PowerActionShutdownOff,
|
||||
PowerActionWarmEject
|
||||
} POWER_ACTION, *PPOWER_ACTION;
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP) || !defined(_BATCLASS_)
|
||||
typedef struct {
|
||||
ULONG Granularity;
|
||||
ULONG Capacity;
|
||||
ULONG Granularity;
|
||||
ULONG Capacity;
|
||||
} BATTERY_REPORTING_SCALE, *PBATTERY_REPORTING_SCALE;
|
||||
#endif /* (NTDDI_VERSION >= NTDDI_WINXP) || !defined(_BATCLASS_) */
|
||||
|
||||
|
@ -144,9 +145,9 @@ typedef struct {
|
|||
#define PERCENT_TO_PERF_LEVEL(x) (((x) * POWER_PERF_SCALE * 10) / 1000)
|
||||
|
||||
typedef struct _PROCESSOR_IDLE_TIMES {
|
||||
ULONGLONG StartTime;
|
||||
ULONGLONG EndTime;
|
||||
ULONG IdleHandlerReserved[4];
|
||||
ULONGLONG StartTime;
|
||||
ULONGLONG EndTime;
|
||||
ULONG IdleHandlerReserved[4];
|
||||
} PROCESSOR_IDLE_TIMES, *PPROCESSOR_IDLE_TIMES;
|
||||
|
||||
typedef BOOLEAN
|
||||
|
@ -154,133 +155,133 @@ typedef BOOLEAN
|
|||
IN OUT PPROCESSOR_IDLE_TIMES IdleTimes);
|
||||
|
||||
typedef struct _PROCESSOR_IDLE_HANDLER_INFO {
|
||||
ULONG HardwareLatency;
|
||||
PPROCESSOR_IDLE_HANDLER Handler;
|
||||
ULONG HardwareLatency;
|
||||
PPROCESSOR_IDLE_HANDLER Handler;
|
||||
} PROCESSOR_IDLE_HANDLER_INFO, *PPROCESSOR_IDLE_HANDLER_INFO;
|
||||
|
||||
typedef VOID
|
||||
(FASTCALL*PSET_PROCESSOR_THROTTLE)(
|
||||
IN UCHAR Throttle);
|
||||
IN UCHAR Throttle);
|
||||
|
||||
typedef NTSTATUS
|
||||
(FASTCALL*PSET_PROCESSOR_THROTTLE2)(
|
||||
IN UCHAR Throttle);
|
||||
IN UCHAR Throttle);
|
||||
|
||||
#define MAX_IDLE_HANDLERS 3
|
||||
|
||||
typedef struct _PROCESSOR_STATE_HANDLER {
|
||||
UCHAR ThrottleScale;
|
||||
BOOLEAN ThrottleOnIdle;
|
||||
PSET_PROCESSOR_THROTTLE SetThrottle;
|
||||
ULONG NumIdleHandlers;
|
||||
PROCESSOR_IDLE_HANDLER_INFO IdleHandler[MAX_IDLE_HANDLERS];
|
||||
UCHAR ThrottleScale;
|
||||
BOOLEAN ThrottleOnIdle;
|
||||
PSET_PROCESSOR_THROTTLE SetThrottle;
|
||||
ULONG NumIdleHandlers;
|
||||
PROCESSOR_IDLE_HANDLER_INFO IdleHandler[MAX_IDLE_HANDLERS];
|
||||
} PROCESSOR_STATE_HANDLER, *PPROCESSOR_STATE_HANDLER;
|
||||
|
||||
typedef enum _POWER_STATE_HANDLER_TYPE {
|
||||
PowerStateSleeping1,
|
||||
PowerStateSleeping2,
|
||||
PowerStateSleeping3,
|
||||
PowerStateSleeping4,
|
||||
PowerStateSleeping4Firmware,
|
||||
PowerStateShutdownReset,
|
||||
PowerStateShutdownOff,
|
||||
PowerStateMaximum
|
||||
PowerStateSleeping1,
|
||||
PowerStateSleeping2,
|
||||
PowerStateSleeping3,
|
||||
PowerStateSleeping4,
|
||||
PowerStateSleeping4Firmware,
|
||||
PowerStateShutdownReset,
|
||||
PowerStateShutdownOff,
|
||||
PowerStateMaximum
|
||||
} POWER_STATE_HANDLER_TYPE, *PPOWER_STATE_HANDLER_TYPE;
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI*PENTER_STATE_SYSTEM_HANDLER)(
|
||||
IN PVOID SystemContext);
|
||||
IN PVOID SystemContext);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI*PENTER_STATE_HANDLER)(
|
||||
IN PVOID Context,
|
||||
IN PENTER_STATE_SYSTEM_HANDLER SystemHandler OPTIONAL,
|
||||
IN PVOID SystemContext,
|
||||
IN LONG NumberProcessors,
|
||||
IN PVOID Context,
|
||||
IN PENTER_STATE_SYSTEM_HANDLER SystemHandler OPTIONAL,
|
||||
IN PVOID SystemContext,
|
||||
IN LONG NumberProcessors,
|
||||
IN LONG volatile *Number);
|
||||
|
||||
typedef struct _POWER_STATE_HANDLER {
|
||||
POWER_STATE_HANDLER_TYPE Type;
|
||||
BOOLEAN RtcWake;
|
||||
UCHAR Spare[3];
|
||||
PENTER_STATE_HANDLER Handler;
|
||||
PVOID Context;
|
||||
POWER_STATE_HANDLER_TYPE Type;
|
||||
BOOLEAN RtcWake;
|
||||
UCHAR Spare[3];
|
||||
PENTER_STATE_HANDLER Handler;
|
||||
PVOID Context;
|
||||
} POWER_STATE_HANDLER, *PPOWER_STATE_HANDLER;
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI*PENTER_STATE_NOTIFY_HANDLER)(
|
||||
IN POWER_STATE_HANDLER_TYPE State,
|
||||
IN PVOID Context,
|
||||
IN BOOLEAN Entering);
|
||||
IN POWER_STATE_HANDLER_TYPE State,
|
||||
IN PVOID Context,
|
||||
IN BOOLEAN Entering);
|
||||
|
||||
typedef struct _POWER_STATE_NOTIFY_HANDLER {
|
||||
PENTER_STATE_NOTIFY_HANDLER Handler;
|
||||
PVOID Context;
|
||||
PENTER_STATE_NOTIFY_HANDLER Handler;
|
||||
PVOID Context;
|
||||
} POWER_STATE_NOTIFY_HANDLER, *PPOWER_STATE_NOTIFY_HANDLER;
|
||||
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtPowerInformation(
|
||||
IN POWER_INFORMATION_LEVEL InformationLevel,
|
||||
IN PVOID InputBuffer OPTIONAL,
|
||||
IN ULONG InputBufferLength,
|
||||
OUT PVOID OutputBuffer OPTIONAL,
|
||||
IN ULONG OutputBufferLength);
|
||||
IN POWER_INFORMATION_LEVEL InformationLevel,
|
||||
IN PVOID InputBuffer OPTIONAL,
|
||||
IN ULONG InputBufferLength,
|
||||
OUT PVOID OutputBuffer OPTIONAL,
|
||||
IN ULONG OutputBufferLength);
|
||||
|
||||
#define PROCESSOR_STATE_TYPE_PERFORMANCE 1
|
||||
#define PROCESSOR_STATE_TYPE_THROTTLE 2
|
||||
|
||||
typedef struct _PROCESSOR_PERF_LEVEL {
|
||||
UCHAR PercentFrequency;
|
||||
UCHAR Reserved;
|
||||
USHORT Flags;
|
||||
UCHAR PercentFrequency;
|
||||
UCHAR Reserved;
|
||||
USHORT Flags;
|
||||
} PROCESSOR_PERF_LEVEL, *PPROCESSOR_PERF_LEVEL;
|
||||
|
||||
typedef struct _PROCESSOR_PERF_STATE {
|
||||
UCHAR PercentFrequency;
|
||||
UCHAR MinCapacity;
|
||||
USHORT Power;
|
||||
UCHAR IncreaseLevel;
|
||||
UCHAR DecreaseLevel;
|
||||
USHORT Flags;
|
||||
ULONG IncreaseTime;
|
||||
ULONG DecreaseTime;
|
||||
ULONG IncreaseCount;
|
||||
ULONG DecreaseCount;
|
||||
ULONGLONG PerformanceTime;
|
||||
UCHAR PercentFrequency;
|
||||
UCHAR MinCapacity;
|
||||
USHORT Power;
|
||||
UCHAR IncreaseLevel;
|
||||
UCHAR DecreaseLevel;
|
||||
USHORT Flags;
|
||||
ULONG IncreaseTime;
|
||||
ULONG DecreaseTime;
|
||||
ULONG IncreaseCount;
|
||||
ULONG DecreaseCount;
|
||||
ULONGLONG PerformanceTime;
|
||||
} PROCESSOR_PERF_STATE, *PPROCESSOR_PERF_STATE;
|
||||
|
||||
typedef struct _PROCESSOR_STATE_HANDLER2 {
|
||||
ULONG NumIdleHandlers;
|
||||
PROCESSOR_IDLE_HANDLER_INFO IdleHandler[MAX_IDLE_HANDLERS];
|
||||
PSET_PROCESSOR_THROTTLE2 SetPerfLevel;
|
||||
ULONG HardwareLatency;
|
||||
UCHAR NumPerfStates;
|
||||
PROCESSOR_PERF_LEVEL PerfLevel[1];
|
||||
ULONG NumIdleHandlers;
|
||||
PROCESSOR_IDLE_HANDLER_INFO IdleHandler[MAX_IDLE_HANDLERS];
|
||||
PSET_PROCESSOR_THROTTLE2 SetPerfLevel;
|
||||
ULONG HardwareLatency;
|
||||
UCHAR NumPerfStates;
|
||||
PROCESSOR_PERF_LEVEL PerfLevel[1];
|
||||
} PROCESSOR_STATE_HANDLER2, *PPROCESSOR_STATE_HANDLER2;
|
||||
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtSetThreadExecutionState(
|
||||
IN EXECUTION_STATE esFlags,
|
||||
OUT EXECUTION_STATE *PreviousFlags);
|
||||
IN EXECUTION_STATE esFlags,
|
||||
OUT EXECUTION_STATE *PreviousFlags);
|
||||
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtRequestWakeupLatency(
|
||||
IN LATENCY_TIME latency);
|
||||
IN LATENCY_TIME latency);
|
||||
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtInitiatePowerAction(
|
||||
IN POWER_ACTION SystemAction,
|
||||
IN SYSTEM_POWER_STATE MinSystemState,
|
||||
IN ULONG Flags,
|
||||
IN BOOLEAN Asynchronous);
|
||||
IN POWER_ACTION SystemAction,
|
||||
IN SYSTEM_POWER_STATE MinSystemState,
|
||||
IN ULONG Flags,
|
||||
IN BOOLEAN Asynchronous);
|
||||
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
|
@ -294,93 +295,92 @@ NTSYSCALLAPI
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
NtGetDevicePowerState(
|
||||
IN HANDLE Device,
|
||||
OUT DEVICE_POWER_STATE *State);
|
||||
IN HANDLE Device,
|
||||
OUT DEVICE_POWER_STATE *State);
|
||||
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtCancelDeviceWakeupRequest(
|
||||
IN HANDLE Device);
|
||||
IN HANDLE Device);
|
||||
|
||||
NTSYSCALLAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
NtIsSystemResumeAutomatic(
|
||||
VOID);
|
||||
NtIsSystemResumeAutomatic(VOID);
|
||||
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtRequestDeviceWakeup(
|
||||
IN HANDLE Device);
|
||||
IN HANDLE Device);
|
||||
|
||||
#define WINLOGON_LOCK_ON_SLEEP 0x00000001
|
||||
|
||||
typedef struct {
|
||||
BOOLEAN PowerButtonPresent;
|
||||
BOOLEAN SleepButtonPresent;
|
||||
BOOLEAN LidPresent;
|
||||
BOOLEAN SystemS1;
|
||||
BOOLEAN SystemS2;
|
||||
BOOLEAN SystemS3;
|
||||
BOOLEAN SystemS4;
|
||||
BOOLEAN SystemS5;
|
||||
BOOLEAN HiberFilePresent;
|
||||
BOOLEAN FullWake;
|
||||
BOOLEAN VideoDimPresent;
|
||||
BOOLEAN ApmPresent;
|
||||
BOOLEAN UpsPresent;
|
||||
BOOLEAN ThermalControl;
|
||||
BOOLEAN ProcessorThrottle;
|
||||
UCHAR ProcessorMinThrottle;
|
||||
BOOLEAN PowerButtonPresent;
|
||||
BOOLEAN SleepButtonPresent;
|
||||
BOOLEAN LidPresent;
|
||||
BOOLEAN SystemS1;
|
||||
BOOLEAN SystemS2;
|
||||
BOOLEAN SystemS3;
|
||||
BOOLEAN SystemS4;
|
||||
BOOLEAN SystemS5;
|
||||
BOOLEAN HiberFilePresent;
|
||||
BOOLEAN FullWake;
|
||||
BOOLEAN VideoDimPresent;
|
||||
BOOLEAN ApmPresent;
|
||||
BOOLEAN UpsPresent;
|
||||
BOOLEAN ThermalControl;
|
||||
BOOLEAN ProcessorThrottle;
|
||||
UCHAR ProcessorMinThrottle;
|
||||
#if (NTDDI_VERSION < NTDDI_WINXP)
|
||||
UCHAR ProcessorThrottleScale;
|
||||
UCHAR spare2[4];
|
||||
UCHAR ProcessorThrottleScale;
|
||||
UCHAR spare2[4];
|
||||
#else
|
||||
UCHAR ProcessorMaxThrottle;
|
||||
BOOLEAN FastSystemS4;
|
||||
UCHAR spare2[3];
|
||||
#endif // (NTDDI_VERSION < NTDDI_WINXP)
|
||||
BOOLEAN DiskSpinDown;
|
||||
UCHAR spare3[8];
|
||||
BOOLEAN SystemBatteriesPresent;
|
||||
BOOLEAN BatteriesAreShortTerm;
|
||||
BATTERY_REPORTING_SCALE BatteryScale[3];
|
||||
SYSTEM_POWER_STATE AcOnLineWake;
|
||||
SYSTEM_POWER_STATE SoftLidWake;
|
||||
SYSTEM_POWER_STATE RtcWake;
|
||||
SYSTEM_POWER_STATE MinDeviceWakeState;
|
||||
SYSTEM_POWER_STATE DefaultLowLatencyWake;
|
||||
UCHAR ProcessorMaxThrottle;
|
||||
BOOLEAN FastSystemS4;
|
||||
UCHAR spare2[3];
|
||||
#endif /* (NTDDI_VERSION < NTDDI_WINXP) */
|
||||
BOOLEAN DiskSpinDown;
|
||||
UCHAR spare3[8];
|
||||
BOOLEAN SystemBatteriesPresent;
|
||||
BOOLEAN BatteriesAreShortTerm;
|
||||
BATTERY_REPORTING_SCALE BatteryScale[3];
|
||||
SYSTEM_POWER_STATE AcOnLineWake;
|
||||
SYSTEM_POWER_STATE SoftLidWake;
|
||||
SYSTEM_POWER_STATE RtcWake;
|
||||
SYSTEM_POWER_STATE MinDeviceWakeState;
|
||||
SYSTEM_POWER_STATE DefaultLowLatencyWake;
|
||||
} SYSTEM_POWER_CAPABILITIES, *PSYSTEM_POWER_CAPABILITIES;
|
||||
|
||||
typedef struct {
|
||||
BOOLEAN AcOnLine;
|
||||
BOOLEAN BatteryPresent;
|
||||
BOOLEAN Charging;
|
||||
BOOLEAN Discharging;
|
||||
BOOLEAN Spare1[4];
|
||||
ULONG MaxCapacity;
|
||||
ULONG RemainingCapacity;
|
||||
ULONG Rate;
|
||||
ULONG EstimatedTime;
|
||||
ULONG DefaultAlert1;
|
||||
ULONG DefaultAlert2;
|
||||
BOOLEAN AcOnLine;
|
||||
BOOLEAN BatteryPresent;
|
||||
BOOLEAN Charging;
|
||||
BOOLEAN Discharging;
|
||||
BOOLEAN Spare1[4];
|
||||
ULONG MaxCapacity;
|
||||
ULONG RemainingCapacity;
|
||||
ULONG Rate;
|
||||
ULONG EstimatedTime;
|
||||
ULONG DefaultAlert1;
|
||||
ULONG DefaultAlert2;
|
||||
} SYSTEM_BATTERY_STATE, *PSYSTEM_BATTERY_STATE;
|
||||
|
||||
typedef struct _PROCESSOR_POWER_INFORMATION {
|
||||
ULONG Number;
|
||||
ULONG MaxMhz;
|
||||
ULONG CurrentMhz;
|
||||
ULONG MhzLimit;
|
||||
ULONG MaxIdleState;
|
||||
ULONG CurrentIdleState;
|
||||
ULONG Number;
|
||||
ULONG MaxMhz;
|
||||
ULONG CurrentMhz;
|
||||
ULONG MhzLimit;
|
||||
ULONG MaxIdleState;
|
||||
ULONG CurrentIdleState;
|
||||
} PROCESSOR_POWER_INFORMATION, *PPROCESSOR_POWER_INFORMATION;
|
||||
|
||||
typedef struct _POWER_ACTION_POLICY {
|
||||
POWER_ACTION Action;
|
||||
ULONG Flags;
|
||||
ULONG EventCode;
|
||||
POWER_ACTION Action;
|
||||
ULONG Flags;
|
||||
ULONG EventCode;
|
||||
} POWER_ACTION_POLICY, *PPOWER_ACTION_POLICY;
|
||||
|
||||
/* POWER_ACTION_POLICY.Flags constants */
|
||||
|
@ -400,15 +400,15 @@ typedef struct _POWER_ACTION_POLICY {
|
|||
#define POWER_USER_NOTIFY_SHUTDOWN 0x00000010
|
||||
#define POWER_FORCE_TRIGGER_RESET 0x80000000
|
||||
|
||||
#define DISCHARGE_POLICY_CRITICAL 0
|
||||
#define DISCHARGE_POLICY_LOW 1
|
||||
#define NUM_DISCHARGE_POLICIES 4
|
||||
#define DISCHARGE_POLICY_CRITICAL 0
|
||||
#define DISCHARGE_POLICY_LOW 1
|
||||
#define NUM_DISCHARGE_POLICIES 4
|
||||
|
||||
#define PO_THROTTLE_NONE 0
|
||||
#define PO_THROTTLE_CONSTANT 1
|
||||
#define PO_THROTTLE_DEGRADE 2
|
||||
#define PO_THROTTLE_ADAPTIVE 3
|
||||
#define PO_THROTTLE_MAXIMUM 4
|
||||
#define PO_THROTTLE_NONE 0
|
||||
#define PO_THROTTLE_CONSTANT 1
|
||||
#define PO_THROTTLE_DEGRADE 2
|
||||
#define PO_THROTTLE_ADAPTIVE 3
|
||||
#define PO_THROTTLE_MAXIMUM 4
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -520,4 +520,4 @@ RtlStringCbCopyA(OUT LPSTR Destination,
|
|||
return Status;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* _NTSTRSAFE_H_INCLUDED_ */
|
||||
|
|
|
@ -126,12 +126,11 @@
|
|||
#define PORTCLS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#include <wdm.h>
|
||||
extern "C" {
|
||||
#include <wdm.h>
|
||||
}
|
||||
#else
|
||||
#include <wdm.h>
|
||||
#include <wdm.h>
|
||||
#endif
|
||||
|
||||
#include <windef.h>
|
||||
|
@ -146,12 +145,11 @@ extern "C"
|
|||
#include <drmk.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#include <wdm.h>
|
||||
extern "C" {
|
||||
#include <wdm.h>
|
||||
}
|
||||
#else
|
||||
#include <wdm.h>
|
||||
#include <wdm.h>
|
||||
#endif
|
||||
|
||||
#ifndef PC_NO_IMPORTS
|
||||
|
@ -213,24 +211,22 @@ DEFINE_GUID(CLSID_MiniportDriverFmSynthWithVol, 0xe5a3c139L, 0xf0f2, 0x11d1, 0x8
|
|||
IoIsWdmVersionAvailable may also be used by older drivers.
|
||||
*/
|
||||
|
||||
enum
|
||||
{
|
||||
kVersionInvalid = -1,
|
||||
|
||||
kVersionWin98,
|
||||
kVersionWin98SE,
|
||||
kVersionWin2K,
|
||||
kVersionWin98SE_QFE2,
|
||||
kVersionWin2K_SP2,
|
||||
kVersionWinME,
|
||||
kVersionWin98SE_QFE3,
|
||||
kVersionWinME_QFE1,
|
||||
kVersionWinXP,
|
||||
kVersionWinXPSP1,
|
||||
kVersionWinServer2003,
|
||||
kVersionWin2K_UAAQFE, /* These support IUnregister* interface */
|
||||
kVersionWinXP_UAAQFE,
|
||||
kVersionWinServer2003_UAAQFE
|
||||
enum {
|
||||
kVersionInvalid = -1,
|
||||
kVersionWin98,
|
||||
kVersionWin98SE,
|
||||
kVersionWin2K,
|
||||
kVersionWin98SE_QFE2,
|
||||
kVersionWin2K_SP2,
|
||||
kVersionWinME,
|
||||
kVersionWin98SE_QFE3,
|
||||
kVersionWinME_QFE1,
|
||||
kVersionWinXP,
|
||||
kVersionWinXPSP1,
|
||||
kVersionWinServer2003,
|
||||
kVersionWin2K_UAAQFE, /* These support IUnregister* interface */
|
||||
kVersionWinXP_UAAQFE,
|
||||
kVersionWinServer2003_UAAQFE
|
||||
};
|
||||
|
||||
/* ===============================================================
|
||||
|
@ -241,164 +237,151 @@ struct _PCPROPERTY_REQUEST;
|
|||
|
||||
typedef struct _PCPROPERTY_REQUEST PCPROPERTY_REQUEST, *PPCPROPERTY_REQUEST;
|
||||
|
||||
typedef NTSTATUS (NTAPI *PCPFNPROPERTY_HANDLER)(
|
||||
IN PPCPROPERTY_REQUEST PropertyRequest);
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PCPFNPROPERTY_HANDLER)(
|
||||
IN PPCPROPERTY_REQUEST PropertyRequest);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const GUID * Set;
|
||||
ULONG Id;
|
||||
ULONG Flags;
|
||||
typedef struct {
|
||||
const GUID *Set;
|
||||
ULONG Id;
|
||||
ULONG Flags;
|
||||
#define PCPROPERTY_ITEM_FLAG_GET KSPROPERTY_TYPE_GET
|
||||
#define PCPROPERTY_ITEM_FLAG_SET KSPROPERTY_TYPE_SET
|
||||
#define PCPROPERTY_ITEM_FLAG_BASICSUPPORT KSPROPERTY_TYPE_BASICSUPPORT
|
||||
//not supported #define PCPROPERTY_ITEM_FLAG_RELATIONS KSPROPERTY_TYPE_RELATIONS
|
||||
//not supported #define PCPROPERTY_ITEM_FLAG_RELATIONS KSPROPERTY_TYPE_RELATIONS
|
||||
#define PCPROPERTY_ITEM_FLAG_SERIALIZERAW KSPROPERTY_TYPE_SERIALIZERAW
|
||||
#define PCPROPERTY_ITEM_FLAG_UNSERIALIZERAW KSPROPERTY_TYPE_UNSERIALIZERAW
|
||||
#define PCPROPERTY_ITEM_FLAG_SERIALIZESIZE KSPROPERTY_TYPE_SERIALIZESIZE
|
||||
#define PCPROPERTY_ITEM_FLAG_SERIALIZE\
|
||||
(PCPROPERTY_ITEM_FLAG_SERIALIZERAW\
|
||||
|PCPROPERTY_ITEM_FLAG_UNSERIALIZERAW\
|
||||
|PCPROPERTY_ITEM_FLAG_SERIALIZESIZE\
|
||||
)
|
||||
(PCPROPERTY_ITEM_FLAG_SERIALIZERAW\
|
||||
|PCPROPERTY_ITEM_FLAG_UNSERIALIZERAW\
|
||||
|PCPROPERTY_ITEM_FLAG_SERIALIZESIZE\
|
||||
)
|
||||
#define PCPROPERTY_ITEM_FLAG_DEFAULTVALUES KSPROPERTY_TYPE_DEFAULTVALUES
|
||||
PCPFNPROPERTY_HANDLER Handler;
|
||||
PCPFNPROPERTY_HANDLER Handler;
|
||||
}
|
||||
PCPROPERTY_ITEM, *PPCPROPERTY_ITEM;
|
||||
|
||||
|
||||
struct _PCPROPERTY_REQUEST
|
||||
{
|
||||
PUNKNOWN MajorTarget;
|
||||
PUNKNOWN MinorTarget;
|
||||
ULONG Node;
|
||||
const PCPROPERTY_ITEM * PropertyItem;
|
||||
ULONG Verb;
|
||||
ULONG InstanceSize;
|
||||
PVOID Instance;
|
||||
ULONG ValueSize;
|
||||
PVOID Value;
|
||||
PIRP Irp;
|
||||
struct _PCPROPERTY_REQUEST {
|
||||
PUNKNOWN MajorTarget;
|
||||
PUNKNOWN MinorTarget;
|
||||
ULONG Node;
|
||||
const PCPROPERTY_ITEM *PropertyItem;
|
||||
ULONG Verb;
|
||||
ULONG InstanceSize;
|
||||
PVOID Instance;
|
||||
ULONG ValueSize;
|
||||
PVOID Value;
|
||||
PIRP Irp;
|
||||
};
|
||||
|
||||
struct _PCEVENT_REQUEST;
|
||||
|
||||
typedef NTSTATUS (NTAPI *PCPFNEVENT_HANDLER)(
|
||||
IN struct _PCEVENT_REQUEST* EventRequest);
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PCPFNEVENT_HANDLER)(
|
||||
IN struct _PCEVENT_REQUEST* EventRequest);
|
||||
|
||||
typedef struct _PCEVENT_ITEM
|
||||
{
|
||||
const GUID* Set;
|
||||
ULONG Id;
|
||||
ULONG Flags;
|
||||
PCPFNEVENT_HANDLER Handler;
|
||||
typedef struct _PCEVENT_ITEM {
|
||||
const GUID* Set;
|
||||
ULONG Id;
|
||||
ULONG Flags;
|
||||
PCPFNEVENT_HANDLER Handler;
|
||||
} PCEVENT_ITEM, *PPCEVENT_ITEM;
|
||||
|
||||
typedef struct _PCEVENT_REQUEST
|
||||
{
|
||||
PUNKNOWN MajorTarget;
|
||||
PUNKNOWN MinorTarget;
|
||||
ULONG Node;
|
||||
const PCEVENT_ITEM* EventItem;
|
||||
PKSEVENT_ENTRY EventEntry;
|
||||
ULONG Verb;
|
||||
PIRP Irp;
|
||||
typedef struct _PCEVENT_REQUEST {
|
||||
PUNKNOWN MajorTarget;
|
||||
PUNKNOWN MinorTarget;
|
||||
ULONG Node;
|
||||
const PCEVENT_ITEM* EventItem;
|
||||
PKSEVENT_ENTRY EventEntry;
|
||||
ULONG Verb;
|
||||
PIRP Irp;
|
||||
} PCEVENT_REQUEST, *PPCEVENT_REQUEST;
|
||||
|
||||
|
||||
|
||||
struct _PCMETHOD_REQUEST;
|
||||
|
||||
typedef NTSTATUS (NTAPI *PCPFNMETHOD_HANDLER)(
|
||||
IN struct _PCMETHOD_REQUEST* MethodRequest);
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PCPFNMETHOD_HANDLER)(
|
||||
IN struct _PCMETHOD_REQUEST* MethodRequest);
|
||||
|
||||
typedef struct _PCMETHOD_ITEM
|
||||
{
|
||||
const GUID* Set;
|
||||
ULONG Id;
|
||||
ULONG Flags;
|
||||
PCPFNMETHOD_HANDLER Handler;
|
||||
typedef struct _PCMETHOD_ITEM {
|
||||
const GUID* Set;
|
||||
ULONG Id;
|
||||
ULONG Flags;
|
||||
PCPFNMETHOD_HANDLER Handler;
|
||||
} PCMETHOD_ITEM, *PPCMETHOD_ITEM;
|
||||
|
||||
typedef struct _PCMETHOD_REQUEST
|
||||
{
|
||||
PUNKNOWN MajorTarget;
|
||||
PUNKNOWN MinorTarget;
|
||||
ULONG Node;
|
||||
const PCMETHOD_ITEM* MethodItem;
|
||||
ULONG Verb;
|
||||
typedef struct _PCMETHOD_REQUEST {
|
||||
PUNKNOWN MajorTarget;
|
||||
PUNKNOWN MinorTarget;
|
||||
ULONG Node;
|
||||
const PCMETHOD_ITEM* MethodItem;
|
||||
ULONG Verb;
|
||||
} PCMETHOD_REQUEST, *PPCMETHOD_REQUEST;
|
||||
|
||||
|
||||
/* ===============================================================
|
||||
Structures (unsorted)
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG PropertyItemSize;
|
||||
ULONG PropertyCount;
|
||||
const PCPROPERTY_ITEM* Properties;
|
||||
ULONG MethodItemSize;
|
||||
ULONG MethodCount;
|
||||
const PCMETHOD_ITEM* Methods;
|
||||
ULONG EventItemSize;
|
||||
ULONG EventCount;
|
||||
const PCEVENT_ITEM* Events;
|
||||
ULONG Reserved;
|
||||
typedef struct {
|
||||
ULONG PropertyItemSize;
|
||||
ULONG PropertyCount;
|
||||
const PCPROPERTY_ITEM* Properties;
|
||||
ULONG MethodItemSize;
|
||||
ULONG MethodCount;
|
||||
const PCMETHOD_ITEM* Methods;
|
||||
ULONG EventItemSize;
|
||||
ULONG EventCount;
|
||||
const PCEVENT_ITEM* Events;
|
||||
ULONG Reserved;
|
||||
} PCAUTOMATION_TABLE, *PPCAUTOMATION_TABLE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG FromNode;
|
||||
ULONG FromNodePin;
|
||||
ULONG ToNode;
|
||||
ULONG ToNodePin;
|
||||
typedef struct {
|
||||
ULONG FromNode;
|
||||
ULONG FromNodePin;
|
||||
ULONG ToNode;
|
||||
ULONG ToNodePin;
|
||||
} PCCONNECTION_DESCRIPTOR, *PPCCONNECTIONDESCRIPTOR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG MaxGlobalInstanceCount;
|
||||
ULONG MaxFilterInstanceCount;
|
||||
ULONG MinFilterInstanceCount;
|
||||
const PCAUTOMATION_TABLE* AutomationTable;
|
||||
KSPIN_DESCRIPTOR KsPinDescriptor;
|
||||
typedef struct {
|
||||
ULONG MaxGlobalInstanceCount;
|
||||
ULONG MaxFilterInstanceCount;
|
||||
ULONG MinFilterInstanceCount;
|
||||
const PCAUTOMATION_TABLE* AutomationTable;
|
||||
KSPIN_DESCRIPTOR KsPinDescriptor;
|
||||
} PCPIN_DESCRIPTOR, *PPCPIN_DESCRIPTOR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG Flags;
|
||||
const PCAUTOMATION_TABLE* AutomationTable;
|
||||
const GUID* Type;
|
||||
const GUID* Name;
|
||||
typedef struct {
|
||||
ULONG Flags;
|
||||
const PCAUTOMATION_TABLE* AutomationTable;
|
||||
const GUID* Type;
|
||||
const GUID* Name;
|
||||
} PCNODE_DESCRIPTOR, *PPCNODE_DESCRIPTOR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG Version;
|
||||
const PCAUTOMATION_TABLE* AutomationTable;
|
||||
ULONG PinSize;
|
||||
ULONG PinCount;
|
||||
const PCPIN_DESCRIPTOR* Pins;
|
||||
ULONG NodeSize;
|
||||
ULONG NodeCount;
|
||||
const PCNODE_DESCRIPTOR* Nodes;
|
||||
ULONG ConnectionCount;
|
||||
const PCCONNECTION_DESCRIPTOR* Connections;
|
||||
ULONG CategoryCount;
|
||||
const GUID* Categories;
|
||||
typedef struct {
|
||||
ULONG Version;
|
||||
const PCAUTOMATION_TABLE* AutomationTable;
|
||||
ULONG PinSize;
|
||||
ULONG PinCount;
|
||||
const PCPIN_DESCRIPTOR* Pins;
|
||||
ULONG NodeSize;
|
||||
ULONG NodeCount;
|
||||
const PCNODE_DESCRIPTOR* Nodes;
|
||||
ULONG ConnectionCount;
|
||||
const PCCONNECTION_DESCRIPTOR* Connections;
|
||||
ULONG CategoryCount;
|
||||
const GUID* Categories;
|
||||
} PCFILTER_DESCRIPTOR, *PPCFILTER_DESCRIPTOR;
|
||||
|
||||
#define DEFINE_PCAUTOMATION_TABLE_PROP(AutomationTable,PropertyTable)\
|
||||
const PCAUTOMATION_TABLE AutomationTable =\
|
||||
{\
|
||||
sizeof(PropertyTable[0]),\
|
||||
SIZEOF_ARRAY(PropertyTable),\
|
||||
(const PCPROPERTY_ITEM *) PropertyTable,\
|
||||
0,0,NULL,\
|
||||
0,0,NULL,\
|
||||
0\
|
||||
}
|
||||
#define DEFINE_PCAUTOMATION_TABLE_PROP(AutomationTable,PropertyTable) \
|
||||
const PCAUTOMATION_TABLE AutomationTable = { \
|
||||
sizeof(PropertyTable[0]), \
|
||||
SIZEOF_ARRAY(PropertyTable), \
|
||||
(const PCPROPERTY_ITEM *) PropertyTable, \
|
||||
0,0,NULL, \
|
||||
0,0,NULL, \
|
||||
0 \
|
||||
}
|
||||
|
||||
/* ===============================================================
|
||||
IResourceList Interface
|
||||
|
@ -409,34 +392,33 @@ const PCAUTOMATION_TABLE AutomationTable =\
|
|||
|
||||
DEFINE_GUID(IID_IResourceList, 0x22C6AC60L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
|
||||
|
||||
DECLARE_INTERFACE_(IResourceList, IUnknown)
|
||||
{
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
DECLARE_INTERFACE_(IResourceList, IUnknown) {
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
|
||||
STDMETHOD_(ULONG, NumberOfEntries)( THIS ) PURE;
|
||||
STDMETHOD_(ULONG, NumberOfEntries)( THIS ) PURE;
|
||||
|
||||
STDMETHOD_(ULONG, NumberOfEntriesOfType)( THIS_
|
||||
IN CM_RESOURCE_TYPE Type) PURE;
|
||||
STDMETHOD_(ULONG, NumberOfEntriesOfType)( THIS_
|
||||
IN CM_RESOURCE_TYPE Type) PURE;
|
||||
|
||||
STDMETHOD_(PCM_PARTIAL_RESOURCE_DESCRIPTOR, FindTranslatedEntry)( THIS_
|
||||
IN CM_RESOURCE_TYPE Type,
|
||||
IN ULONG Index) PURE;
|
||||
STDMETHOD_(PCM_PARTIAL_RESOURCE_DESCRIPTOR, FindTranslatedEntry)( THIS_
|
||||
IN CM_RESOURCE_TYPE Type,
|
||||
IN ULONG Index) PURE;
|
||||
|
||||
STDMETHOD_(PCM_PARTIAL_RESOURCE_DESCRIPTOR, FindUntranslatedEntry)( THIS_
|
||||
IN CM_RESOURCE_TYPE Type,
|
||||
IN ULONG Index) PURE;
|
||||
STDMETHOD_(PCM_PARTIAL_RESOURCE_DESCRIPTOR, FindUntranslatedEntry)( THIS_
|
||||
IN CM_RESOURCE_TYPE Type,
|
||||
IN ULONG Index) PURE;
|
||||
|
||||
STDMETHOD_(NTSTATUS, AddEntry)( THIS_
|
||||
IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Translated,
|
||||
IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Untranslated) PURE;
|
||||
STDMETHOD_(NTSTATUS, AddEntry)( THIS_
|
||||
IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Translated,
|
||||
IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Untranslated) PURE;
|
||||
|
||||
STDMETHOD_(NTSTATUS, AddEntryFromParent)( THIS_
|
||||
IN IResourceList* Parent,
|
||||
IN CM_RESOURCE_TYPE Type,
|
||||
IN ULONG Index) PURE;
|
||||
STDMETHOD_(NTSTATUS, AddEntryFromParent)( THIS_
|
||||
IN IResourceList* Parent,
|
||||
IN CM_RESOURCE_TYPE Type,
|
||||
IN ULONG Index) PURE;
|
||||
|
||||
STDMETHOD_(PCM_RESOURCE_LIST, TranslatedList)( THIS ) PURE;
|
||||
STDMETHOD_(PCM_RESOURCE_LIST, UntranslatedList)( THIS ) PURE;
|
||||
STDMETHOD_(PCM_RESOURCE_LIST, TranslatedList)( THIS ) PURE;
|
||||
STDMETHOD_(PCM_RESOURCE_LIST, UntranslatedList)( THIS ) PURE;
|
||||
};
|
||||
|
||||
#define IMP_IResourceList \
|
||||
|
@ -468,116 +450,115 @@ DECLARE_INTERFACE_(IResourceList, IUnknown)
|
|||
typedef IResourceList *PRESOURCELIST;
|
||||
|
||||
#define NumberOfPorts() \
|
||||
NumberOfEntriesOfType(CmResourceTypePort)
|
||||
NumberOfEntriesOfType(CmResourceTypePort)
|
||||
|
||||
#define FindTranslatedPort(n) \
|
||||
FindTranslatedEntry(CmResourceTypePort, (n))
|
||||
FindTranslatedEntry(CmResourceTypePort, (n))
|
||||
|
||||
#define FindUntranslatedPort(n) \
|
||||
FindUntranslatedEntry(CmResourceTypePort, (n))
|
||||
FindUntranslatedEntry(CmResourceTypePort, (n))
|
||||
|
||||
#define AddPortFromParent(p, n) \
|
||||
AddEntryFromParent((p), CmResourceTypePort, (n))
|
||||
AddEntryFromParent((p), CmResourceTypePort, (n))
|
||||
|
||||
#define NumberOfInterrupts() \
|
||||
NumberOfEntriesOfType(CmResourceTypeInterrupt)
|
||||
NumberOfEntriesOfType(CmResourceTypeInterrupt)
|
||||
|
||||
#define FindTranslatedInterrupt(n) \
|
||||
FindTranslatedEntry(CmResourceTypeInterrupt, (n))
|
||||
FindTranslatedEntry(CmResourceTypeInterrupt, (n))
|
||||
|
||||
#define FindUntranslatedInterrupt(n) \
|
||||
FindUntranslatedEntry(CmResourceTypeInterrupt, (n))
|
||||
FindUntranslatedEntry(CmResourceTypeInterrupt, (n))
|
||||
|
||||
#define AddInterruptFromParent(p, n) \
|
||||
AddEntryFromParent((p), CmResourceTypeInterrupt, (n))
|
||||
AddEntryFromParent((p), CmResourceTypeInterrupt, (n))
|
||||
|
||||
#define NumberOfMemories() \
|
||||
NumberOfEntriesOfType(CmResourceTypeMemory)
|
||||
NumberOfEntriesOfType(CmResourceTypeMemory)
|
||||
|
||||
#define FindTranslatedMemory(n) \
|
||||
FindTranslatedEntry(CmResourceTypeMemory, (n))
|
||||
FindTranslatedEntry(CmResourceTypeMemory, (n))
|
||||
|
||||
#define FindUntranslatedMemory(n) \
|
||||
FindUntranslatedEntry(CmResourceTypeMemory, (n))
|
||||
FindUntranslatedEntry(CmResourceTypeMemory, (n))
|
||||
|
||||
#define AddMemoryFromParent(p, n) \
|
||||
AddEntryFromParent((p), CmResourceTypeMemory, (n))
|
||||
AddEntryFromParent((p), CmResourceTypeMemory, (n))
|
||||
|
||||
#define NumberOfDmas() \
|
||||
NumberOfEntriesOfType(CmResourceTypeDma)
|
||||
NumberOfEntriesOfType(CmResourceTypeDma)
|
||||
|
||||
#define FindTranslatedDma(n) \
|
||||
FindTranslatedEntry(CmResourceTypeDma, (n))
|
||||
FindTranslatedEntry(CmResourceTypeDma, (n))
|
||||
|
||||
#define FindUntranslatedDma(n) \
|
||||
FindUntranslatedEntry(CmResourceTypeDma, (n))
|
||||
FindUntranslatedEntry(CmResourceTypeDma, (n))
|
||||
|
||||
#define AddDmaFromParent(p, n) \
|
||||
AddEntryFromParent((p), CmResourceTypeInterrupt, (n))
|
||||
AddEntryFromParent((p), CmResourceTypeInterrupt, (n))
|
||||
|
||||
#define NumberOfDeviceSpecifics() \
|
||||
NumberOfEntriesOfType(CmResourceTypeDeviceSpecific)
|
||||
NumberOfEntriesOfType(CmResourceTypeDeviceSpecific)
|
||||
|
||||
#define FindTranslatedDeviceSpecific(n) \
|
||||
FindTranslatedEntry(CmResourceTypeDeviceSpecific, (n))
|
||||
FindTranslatedEntry(CmResourceTypeDeviceSpecific, (n))
|
||||
|
||||
#define FindUntranslatedDeviceSpecific(n) \
|
||||
FindUntranslatedEntry(CmResourceTypeDeviceSpecific, (n))
|
||||
FindUntranslatedEntry(CmResourceTypeDeviceSpecific, (n))
|
||||
|
||||
#define AddDeviceSpecificFromParent(p, n) \
|
||||
AddEntryFromParent((p), CmResourceTypeDeviceSpecific, (n))
|
||||
AddEntryFromParent((p), CmResourceTypeDeviceSpecific, (n))
|
||||
|
||||
#define NumberOfBusNumbers() \
|
||||
NumberOfEntriesOfType(CmResourceTypeBusNumber)
|
||||
NumberOfEntriesOfType(CmResourceTypeBusNumber)
|
||||
|
||||
#define FindTranslatedBusNumber(n) \
|
||||
FindTranslatedEntry(CmResourceTypeBusNumber, (n))
|
||||
FindTranslatedEntry(CmResourceTypeBusNumber, (n))
|
||||
|
||||
#define FindUntranslatedBusNumber(n) \
|
||||
FindUntranslatedEntry(CmResourceTypeBusNumber, (n))
|
||||
FindUntranslatedEntry(CmResourceTypeBusNumber, (n))
|
||||
|
||||
#define AddBusNumberFromParent(p, n) \
|
||||
AddEntryFromParent((p), CmResourceTypeBusNumber, (n))
|
||||
AddEntryFromParent((p), CmResourceTypeBusNumber, (n))
|
||||
|
||||
#define NumberOfDevicePrivates() \
|
||||
NumberOfEntriesOfType(CmResourceTypeDevicePrivate)
|
||||
NumberOfEntriesOfType(CmResourceTypeDevicePrivate)
|
||||
|
||||
#define FindTranslatedDevicePrivate(n) \
|
||||
FindTranslatedEntry(CmResourceTypeDevicePrivate, (n))
|
||||
FindTranslatedEntry(CmResourceTypeDevicePrivate, (n))
|
||||
|
||||
#define FindUntranslatedDevicePrivate(n) \
|
||||
FindUntranslatedEntry(CmResourceTypeDevicePrivate, (n))
|
||||
FindUntranslatedEntry(CmResourceTypeDevicePrivate, (n))
|
||||
|
||||
#define AddDevicePrivateFromParent(p, n) \
|
||||
AddEntryFromParent((p), CmResourceTypeDevicePrivate, (n))
|
||||
AddEntryFromParent((p), CmResourceTypeDevicePrivate, (n))
|
||||
|
||||
#define NumberOfAssignedResources() \
|
||||
NumberOfEntriesOfType(CmResourceTypeAssignedResource)
|
||||
NumberOfEntriesOfType(CmResourceTypeAssignedResource)
|
||||
|
||||
#define FindTranslatedAssignedResource(n) \
|
||||
FindTranslatedEntry(CmResourceTypeAssignedResource, (n))
|
||||
FindTranslatedEntry(CmResourceTypeAssignedResource, (n))
|
||||
|
||||
#define FindUntranslatedAssignedResource(n) \
|
||||
FindUntranslatedEntry(CmResourceTypeAssignedResource, (n))
|
||||
FindUntranslatedEntry(CmResourceTypeAssignedResource, (n))
|
||||
|
||||
#define AddAssignedResourceFromParent(p, n) \
|
||||
AddEntryFromParent((p), CmResourceTypeAssignedResource, (n))
|
||||
AddEntryFromParent((p), CmResourceTypeAssignedResource, (n))
|
||||
|
||||
#define NumberOfSubAllocateFroms() \
|
||||
NumberOfEntriesOfType(CmResourceTypeSubAllocateFrom)
|
||||
NumberOfEntriesOfType(CmResourceTypeSubAllocateFrom)
|
||||
|
||||
#define FindTranslatedSubAllocateFrom(n) \
|
||||
FindTranslatedEntry(CmResourceTypeSubAllocateFrom, (n))
|
||||
FindTranslatedEntry(CmResourceTypeSubAllocateFrom, (n))
|
||||
|
||||
#define FindUntranslatedSubAllocateFrom(n) \
|
||||
FindUntranslatedEntry(CmResourceTypeSubAllocateFrom, (n))
|
||||
FindUntranslatedEntry(CmResourceTypeSubAllocateFrom, (n))
|
||||
|
||||
#define AddSubAllocateFromFromParent(p, n) \
|
||||
AddEntryFromParent((p), CmResourceTypeSubAllocateFrom, (n))
|
||||
AddEntryFromParent((p), CmResourceTypeSubAllocateFrom, (n))
|
||||
|
||||
#undef INTERFACE
|
||||
|
||||
|
||||
/* ===============================================================
|
||||
IServiceSink Interface
|
||||
*/
|
||||
|
@ -585,18 +566,16 @@ typedef IResourceList *PRESOURCELIST;
|
|||
|
||||
DEFINE_GUID(IID_IServiceSink, 0x22C6AC64L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
|
||||
|
||||
DECLARE_INTERFACE_(IServiceSink, IUnknown)
|
||||
{
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
STDMETHOD_(void, RequestService)( THIS ) PURE;
|
||||
DECLARE_INTERFACE_(IServiceSink, IUnknown) {
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
STDMETHOD_(void, RequestService)( THIS ) PURE;
|
||||
};
|
||||
|
||||
#define IMP_IServiceSink \
|
||||
STDMETHODIMP_(void) RequestService(void);
|
||||
STDMETHODIMP_(void) RequestService(void);
|
||||
|
||||
typedef IServiceSink *PSERVICESINK;
|
||||
|
||||
|
||||
/* ===============================================================
|
||||
IServiceGroup Interface
|
||||
*/
|
||||
|
@ -605,24 +584,23 @@ typedef IServiceSink *PSERVICESINK;
|
|||
|
||||
DEFINE_GUID(IID_IServiceGroup, 0x22C6AC65L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
|
||||
|
||||
DECLARE_INTERFACE_(IServiceGroup, IServiceSink)
|
||||
{
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
DECLARE_INTERFACE_(IServiceGroup, IServiceSink) {
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
|
||||
STDMETHOD_(void, RequestService)( THIS ) PURE; /* IServiceSink */
|
||||
STDMETHOD_(void, RequestService)( THIS ) PURE; /* IServiceSink */
|
||||
|
||||
STDMETHOD_(NTSTATUS, AddMember)( THIS_
|
||||
IN PSERVICESINK pServiceSink) PURE;
|
||||
STDMETHOD_(NTSTATUS, AddMember)( THIS_
|
||||
IN PSERVICESINK pServiceSink) PURE;
|
||||
|
||||
STDMETHOD_(void, RemoveMember)( THIS_
|
||||
IN PSERVICESINK pServiceSink) PURE;
|
||||
STDMETHOD_(void, RemoveMember)( THIS_
|
||||
IN PSERVICESINK pServiceSink) PURE;
|
||||
|
||||
STDMETHOD_(void, SupportDelayedService)( THIS ) PURE;
|
||||
STDMETHOD_(void, SupportDelayedService)( THIS ) PURE;
|
||||
|
||||
STDMETHOD_(void, RequestDelayedService)( THIS_
|
||||
IN ULONGLONG ullDelay) PURE;
|
||||
STDMETHOD_(void, RequestDelayedService)( THIS_
|
||||
IN ULONGLONG ullDelay) PURE;
|
||||
|
||||
STDMETHOD_(void, CancelDelayedService)( THIS ) PURE;
|
||||
STDMETHOD_(void, CancelDelayedService)( THIS ) PURE;
|
||||
};
|
||||
|
||||
#define IMP_IServiceGroup \
|
||||
|
@ -654,21 +632,20 @@ DEFINE_GUID(IID_IUnregisterSubdevice, 0x16738177L, 0xe199, 0x41f9, 0x9a, 0x87, 0
|
|||
#undef INTERFACE
|
||||
#define INTERFACE IUnregisterSubdevice
|
||||
|
||||
DECLARE_INTERFACE_(IUnregisterSubdevice,IUnknown)
|
||||
{
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
DECLARE_INTERFACE_(IUnregisterSubdevice,IUnknown) {
|
||||
DEFINE_ABSTRACT_UNKNOWN()
|
||||
|
||||
STDMETHOD_(NTSTATUS,UnregisterSubdevice)(THIS_
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PUNKNOWN Unknown)PURE;
|
||||
STDMETHOD_(NTSTATUS,UnregisterSubdevice)(THIS_
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PUNKNOWN Unknown) PURE;
|
||||
};
|
||||
|
||||
typedef IUnregisterSubdevice *PUNREGISTERSUBDEVICE;
|
||||
|
||||
#define IMP_IUnregisterSubdevice \
|
||||
STDMETHODIMP_(NTSTATUS) UnregisterSubdevice(THIS_ \
|
||||
IN PDEVICE_OBJECT DeviceObject, \
|
||||
IN PUNKNOWN Unknown)
|
||||
#define IMP_IUnregisterSubdevice \
|
||||
STDMETHODIMP_(NTSTATUS) UnregisterSubdevice(THIS_ \
|
||||
IN PDEVICE_OBJECT DeviceObject, \
|
||||
IN PUNKNOWN Unknown)
|
||||
|
||||
/* ===============================================================
|
||||
IUnregisterPhysicalConnection Interface
|
||||
|
@ -2189,16 +2166,15 @@ typedef IPortClsVersion *PPORTCLSVERSION;
|
|||
IPreFetchOffset Interface
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* ===============================================================
|
||||
PortCls API Functions
|
||||
*/
|
||||
|
||||
typedef NTSTATUS (NTAPI *PCPFNSTARTDEVICE)(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
IN PRESOURCELIST ResourceList);
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PCPFNSTARTDEVICE)(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
IN PRESOURCELIST ResourceList);
|
||||
|
||||
/* This is in NTDDK.H */
|
||||
/*
|
||||
|
@ -2209,18 +2185,17 @@ typedef NTSTATUS (*PDRIVER_ADD_DEVICE)(
|
|||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcAddAdapterDevice(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN PDEVICE_OBJECT PhysicalDeviceObject,
|
||||
IN PCPFNSTARTDEVICE StartDevice,
|
||||
IN ULONG MaxObjects,
|
||||
IN ULONG DeviceExtensionSize);
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN PDEVICE_OBJECT PhysicalDeviceObject,
|
||||
IN PCPFNSTARTDEVICE StartDevice,
|
||||
IN ULONG MaxObjects,
|
||||
IN ULONG DeviceExtensionSize);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcInitializeAdapterDriver(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN PUNICODE_STRING RegistryPathName,
|
||||
IN PDRIVER_ADD_DEVICE AddDevice);
|
||||
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN PUNICODE_STRING RegistryPathName,
|
||||
IN PDRIVER_ADD_DEVICE AddDevice);
|
||||
|
||||
/* ===============================================================
|
||||
Factories (TODO: Move elsewhere)
|
||||
|
@ -2228,62 +2203,62 @@ PcInitializeAdapterDriver(
|
|||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcNewDmaChannel(
|
||||
OUT PDMACHANNEL* OutDmaChannel,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL,
|
||||
IN POOL_TYPE PoolType,
|
||||
IN PDEVICE_DESCRIPTION DeviceDescription,
|
||||
IN PDEVICE_OBJECT DeviceObject);
|
||||
OUT PDMACHANNEL* OutDmaChannel,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL,
|
||||
IN POOL_TYPE PoolType,
|
||||
IN PDEVICE_DESCRIPTION DeviceDescription,
|
||||
IN PDEVICE_OBJECT DeviceObject);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcNewInterruptSync(
|
||||
OUT PINTERRUPTSYNC* OUtInterruptSync,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL,
|
||||
IN PRESOURCELIST ResourceList,
|
||||
IN ULONG ResourceIndex,
|
||||
IN INTERRUPTSYNCMODE Mode);
|
||||
OUT PINTERRUPTSYNC* OUtInterruptSync,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL,
|
||||
IN PRESOURCELIST ResourceList,
|
||||
IN ULONG ResourceIndex,
|
||||
IN INTERRUPTSYNCMODE Mode);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcNewMiniport(
|
||||
OUT PMINIPORT* OutMiniport,
|
||||
IN REFCLSID ClassId);
|
||||
OUT PMINIPORT* OutMiniport,
|
||||
IN REFCLSID ClassId);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcNewPort(
|
||||
OUT PPORT* OutPort,
|
||||
IN REFCLSID ClassId);
|
||||
OUT PPORT* OutPort,
|
||||
IN REFCLSID ClassId);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcNewRegistryKey(
|
||||
OUT PREGISTRYKEY* OutRegistryKey,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL,
|
||||
IN ULONG RegistryKeyType,
|
||||
IN ACCESS_MASK DesiredAccess,
|
||||
IN PVOID DeviceObject OPTIONAL,
|
||||
IN PVOID SubDevice OPTIONAL,
|
||||
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
|
||||
IN ULONG CreateOptions OPTIONAL,
|
||||
OUT PULONG Disposition OPTIONAL);
|
||||
OUT PREGISTRYKEY* OutRegistryKey,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL,
|
||||
IN ULONG RegistryKeyType,
|
||||
IN ACCESS_MASK DesiredAccess,
|
||||
IN PVOID DeviceObject OPTIONAL,
|
||||
IN PVOID SubDevice OPTIONAL,
|
||||
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
|
||||
IN ULONG CreateOptions OPTIONAL,
|
||||
OUT PULONG Disposition OPTIONAL);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcNewResourceList(
|
||||
OUT PRESOURCELIST* OutResourceList,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL,
|
||||
IN POOL_TYPE PoolType,
|
||||
IN PCM_RESOURCE_LIST TranslatedResources,
|
||||
IN PCM_RESOURCE_LIST UntranslatedResources);
|
||||
OUT PRESOURCELIST* OutResourceList,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL,
|
||||
IN POOL_TYPE PoolType,
|
||||
IN PCM_RESOURCE_LIST TranslatedResources,
|
||||
IN PCM_RESOURCE_LIST UntranslatedResources);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcNewResourceSublist(
|
||||
OUT PRESOURCELIST* OutResourceList,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL,
|
||||
IN POOL_TYPE PoolType,
|
||||
IN PRESOURCELIST ParentList,
|
||||
IN ULONG MaximumEntries);
|
||||
OUT PRESOURCELIST* OutResourceList,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL,
|
||||
IN POOL_TYPE PoolType,
|
||||
IN PRESOURCELIST ParentList,
|
||||
IN ULONG MaximumEntries);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcNewServiceGroup(
|
||||
OUT PSERVICEGROUP* OutServiceGroup,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL);
|
||||
OUT PSERVICEGROUP* OutServiceGroup,
|
||||
IN PUNKNOWN OuterUnknown OPTIONAL);
|
||||
|
||||
|
||||
/* ===============================================================
|
||||
|
@ -2292,20 +2267,19 @@ PcNewServiceGroup(
|
|||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcDispatchIrp(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcCompleteIrp(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
IN NTSTATUS Status);
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
IN NTSTATUS Status);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcForwardIrpSynchronous(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
|
||||
/* ===============================================================
|
||||
Power Management
|
||||
|
@ -2313,14 +2287,13 @@ PcForwardIrpSynchronous(
|
|||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcRegisterAdapterPowerManagement(
|
||||
IN PUNKNOWN pUnknown,
|
||||
IN PVOID pvContext1);
|
||||
IN PUNKNOWN pUnknown,
|
||||
IN PVOID pvContext1);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcRequestNewPowerState(
|
||||
IN PDEVICE_OBJECT pDeviceObject,
|
||||
IN DEVICE_POWER_STATE RequestedNewState);
|
||||
|
||||
IN PDEVICE_OBJECT pDeviceObject,
|
||||
IN DEVICE_POWER_STATE RequestedNewState);
|
||||
|
||||
/* ===============================================================
|
||||
Properties
|
||||
|
@ -2328,17 +2301,16 @@ PcRequestNewPowerState(
|
|||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcGetDeviceProperty(
|
||||
IN PVOID DeviceObject,
|
||||
IN DEVICE_REGISTRY_PROPERTY DeviceProperty,
|
||||
IN ULONG BufferLength,
|
||||
OUT PVOID PropertyBuffer,
|
||||
OUT PULONG ResultLength);
|
||||
IN PVOID DeviceObject,
|
||||
IN DEVICE_REGISTRY_PROPERTY DeviceProperty,
|
||||
IN ULONG BufferLength,
|
||||
OUT PVOID PropertyBuffer,
|
||||
OUT PULONG ResultLength);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcCompletePendingPropertyRequest(
|
||||
IN PPCPROPERTY_REQUEST PropertyRequest,
|
||||
IN NTSTATUS NtStatus);
|
||||
|
||||
IN PPCPROPERTY_REQUEST PropertyRequest,
|
||||
IN NTSTATUS NtStatus);
|
||||
|
||||
/* ===============================================================
|
||||
I/O Timeouts
|
||||
|
@ -2346,16 +2318,15 @@ PcCompletePendingPropertyRequest(
|
|||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcRegisterIoTimeout(
|
||||
IN PDEVICE_OBJECT pDeviceObject,
|
||||
IN PIO_TIMER_ROUTINE pTimerRoutine,
|
||||
IN PVOID pContext);
|
||||
IN PDEVICE_OBJECT pDeviceObject,
|
||||
IN PIO_TIMER_ROUTINE pTimerRoutine,
|
||||
IN PVOID pContext);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcUnregisterIoTimeout(
|
||||
IN PDEVICE_OBJECT pDeviceObject,
|
||||
IN PIO_TIMER_ROUTINE pTimerRoutine,
|
||||
IN PVOID pContext);
|
||||
|
||||
IN PDEVICE_OBJECT pDeviceObject,
|
||||
IN PIO_TIMER_ROUTINE pTimerRoutine,
|
||||
IN PVOID pContext);
|
||||
|
||||
/* ===============================================================
|
||||
Physical Connections
|
||||
|
@ -2363,28 +2334,27 @@ PcUnregisterIoTimeout(
|
|||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcRegisterPhysicalConnection(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PUNKNOWN FromUnknown,
|
||||
IN ULONG FromPin,
|
||||
IN PUNKNOWN ToUnknown,
|
||||
IN ULONG ToPin);
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PUNKNOWN FromUnknown,
|
||||
IN ULONG FromPin,
|
||||
IN PUNKNOWN ToUnknown,
|
||||
IN ULONG ToPin);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcRegisterPhysicalConnectionFromExternal(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PUNICODE_STRING FromString,
|
||||
IN ULONG FromPin,
|
||||
IN PUNKNOWN ToUnknown,
|
||||
IN ULONG ToPin);
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PUNICODE_STRING FromString,
|
||||
IN ULONG FromPin,
|
||||
IN PUNKNOWN ToUnknown,
|
||||
IN ULONG ToPin);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcRegisterPhysicalConnectionToExternal(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PUNKNOWN FromUnknown,
|
||||
IN ULONG FromPin,
|
||||
IN PUNICODE_STRING ToString,
|
||||
IN ULONG ToPin);
|
||||
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PUNKNOWN FromUnknown,
|
||||
IN ULONG FromPin,
|
||||
IN PUNICODE_STRING ToString,
|
||||
IN ULONG ToPin);
|
||||
|
||||
/* ===============================================================
|
||||
Misc
|
||||
|
@ -2392,14 +2362,13 @@ PcRegisterPhysicalConnectionToExternal(
|
|||
|
||||
PORTCLASSAPI ULONGLONG NTAPI
|
||||
PcGetTimeInterval(
|
||||
IN ULONGLONG Since);
|
||||
IN ULONGLONG Since);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcRegisterSubdevice(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PWCHAR Name,
|
||||
IN PUNKNOWN Unknown);
|
||||
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PWCHAR Name,
|
||||
IN PUNKNOWN Unknown);
|
||||
|
||||
/* ===============================================================
|
||||
Digital Rights Management Functions
|
||||
|
@ -2408,41 +2377,40 @@ PcRegisterSubdevice(
|
|||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcAddContentHandlers(
|
||||
IN ULONG ContentId,
|
||||
IN PVOID *paHandlers,
|
||||
IN ULONG NumHandlers);
|
||||
IN ULONG ContentId,
|
||||
IN PVOID *paHandlers,
|
||||
IN ULONG NumHandlers);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcCreateContentMixed(
|
||||
IN PULONG paContentId,
|
||||
IN ULONG cContentId,
|
||||
OUT PULONG pMixedContentId);
|
||||
IN PULONG paContentId,
|
||||
IN ULONG cContentId,
|
||||
OUT PULONG pMixedContentId);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcDestroyContent(
|
||||
IN ULONG ContentId);
|
||||
IN ULONG ContentId);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcForwardContentToDeviceObject(
|
||||
IN ULONG ContentId,
|
||||
IN PVOID Reserved,
|
||||
IN PCDRMFORWARD DrmForward);
|
||||
IN ULONG ContentId,
|
||||
IN PVOID Reserved,
|
||||
IN PCDRMFORWARD DrmForward);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcForwardContentToFileObject(
|
||||
IN ULONG ContentId,
|
||||
IN PFILE_OBJECT FileObject);
|
||||
IN ULONG ContentId,
|
||||
IN PFILE_OBJECT FileObject);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcForwardContentToInterface(
|
||||
IN ULONG ContentId,
|
||||
IN PUNKNOWN pUnknown,
|
||||
IN ULONG NumMethods);
|
||||
IN ULONG ContentId,
|
||||
IN PUNKNOWN pUnknown,
|
||||
IN ULONG NumMethods);
|
||||
|
||||
PORTCLASSAPI NTSTATUS NTAPI
|
||||
PcGetContentRights(
|
||||
IN ULONG ContentId,
|
||||
OUT PDRMRIGHTS DrmRights);
|
||||
IN ULONG ContentId,
|
||||
OUT PDRMRIGHTS DrmRights);
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* PORTCLS_H */
|
||||
|
|
|
@ -21,69 +21,61 @@ extern "C" {
|
|||
#include <basetyps.h>
|
||||
|
||||
#ifdef PUT_GUIDS_HERE
|
||||
#include <initguid.h>
|
||||
#include <initguid.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* ===============================================================
|
||||
IUnknown
|
||||
*/
|
||||
|
||||
#ifndef __IUnknown_INTERFACE_DEFINED__
|
||||
#define __IUnknown_INTERFACE_DEFINED__
|
||||
DEFINE_GUID(
|
||||
IID_IUnknown,
|
||||
0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
|
||||
|
||||
DEFINE_GUID(IID_IUnknown,
|
||||
0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IUnknown
|
||||
|
||||
DECLARE_INTERFACE(IUnknown)
|
||||
{
|
||||
STDMETHOD_(NTSTATUS, QueryInterface)( THIS_
|
||||
IN REFIID,
|
||||
OUT PVOID*)
|
||||
PURE;
|
||||
DECLARE_INTERFACE(IUnknown) {
|
||||
STDMETHOD_(NTSTATUS, QueryInterface)( THIS_
|
||||
IN REFIID,
|
||||
OUT PVOID*) PURE;
|
||||
|
||||
STDMETHOD_(ULONG, AddRef)( THIS )
|
||||
PURE;
|
||||
STDMETHOD_(ULONG, AddRef)( THIS ) PURE;
|
||||
|
||||
STDMETHOD_(ULONG, Release)( THIS )
|
||||
PURE;
|
||||
STDMETHOD_(ULONG, Release)( THIS ) PURE;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* __IUnknown_INTERFACE_DEFINED__ */
|
||||
|
||||
#undef INTERFACE
|
||||
|
||||
typedef IUnknown *PUNKNOWN;
|
||||
|
||||
|
||||
/* ===============================================================
|
||||
IUnknown definition
|
||||
Boilerplate code macro for use in subclassed interfaces
|
||||
*/
|
||||
|
||||
#define DEFINE_ABSTRACT_UNKNOWN() \
|
||||
STDMETHOD_(NTSTATUS, QueryInterface)( THIS_ \
|
||||
REFIID InterfaceId, \
|
||||
PVOID* Interface) \
|
||||
PURE; \
|
||||
\
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) \
|
||||
PURE; \
|
||||
\
|
||||
STDMETHOD_(ULONG, Release)(THIS) \
|
||||
PURE;
|
||||
|
||||
#define DEFINE_ABSTRACT_UNKNOWN() \
|
||||
STDMETHOD_(NTSTATUS, QueryInterface)( THIS_ \
|
||||
REFIID InterfaceId, \
|
||||
PVOID* Interface) PURE; \
|
||||
\
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE; \
|
||||
\
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
/* ===============================================================
|
||||
Constructor callback definition
|
||||
*/
|
||||
|
||||
typedef HRESULT (NTAPI *PFNCREATEINSTANCE)(
|
||||
OUT PUNKNOWN* Unknown,
|
||||
IN REFCLSID ClassId,
|
||||
IN PUNKNOWN OuterUnknown,
|
||||
IN POOL_TYPE PoolType);
|
||||
typedef HRESULT
|
||||
(NTAPI *PFNCREATEINSTANCE)(
|
||||
OUT PUNKNOWN* Unknown,
|
||||
IN REFCLSID ClassId,
|
||||
IN PUNKNOWN OuterUnknown,
|
||||
IN POOL_TYPE PoolType);
|
||||
|
||||
#endif
|
||||
#endif /* _UNKNOWN_H_ */
|
||||
|
|
|
@ -28,9 +28,9 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#if !defined(SMBCLASS)
|
||||
#define SMBCLASSAPI DECLSPEC_IMPORT
|
||||
#define SMBCLASSAPI DECLSPEC_IMPORT
|
||||
#else
|
||||
#define SMBCLASSAPI
|
||||
#define SMBCLASSAPI
|
||||
#endif
|
||||
|
||||
#define SMB_BUS_REQUEST \
|
||||
|
@ -74,25 +74,25 @@ struct _SMB_CLASS;
|
|||
#define SMB_MAXIMUM_PROTOCOL 0x0A
|
||||
|
||||
typedef struct _SMB_REQUEST {
|
||||
UCHAR Status;
|
||||
UCHAR Protocol;
|
||||
UCHAR Address;
|
||||
UCHAR Command;
|
||||
UCHAR BlockLength;
|
||||
UCHAR Data[SMB_MAX_DATA_SIZE];
|
||||
UCHAR Status;
|
||||
UCHAR Protocol;
|
||||
UCHAR Address;
|
||||
UCHAR Command;
|
||||
UCHAR BlockLength;
|
||||
UCHAR Data[SMB_MAX_DATA_SIZE];
|
||||
} SMB_REQUEST, *PSMB_REQUEST;
|
||||
|
||||
typedef VOID
|
||||
(NTAPI *SMB_ALARM_NOTIFY)(
|
||||
PVOID Context,
|
||||
UCHAR Address,
|
||||
USHORT Data);
|
||||
PVOID Context,
|
||||
UCHAR Address,
|
||||
USHORT Data);
|
||||
|
||||
typedef struct _SMB_REGISTER_ALARM {
|
||||
UCHAR MinAddress;
|
||||
UCHAR MaxAddress;
|
||||
SMB_ALARM_NOTIFY NotifyFunction;
|
||||
PVOID NotifyContext;
|
||||
UCHAR MinAddress;
|
||||
UCHAR MaxAddress;
|
||||
SMB_ALARM_NOTIFY NotifyFunction;
|
||||
PVOID NotifyContext;
|
||||
} SMB_REGISTER_ALARM, *PSMB_REGISTER_ALARM;
|
||||
|
||||
/* SMB_CLASS.XxxVersion constants */
|
||||
|
@ -101,83 +101,83 @@ typedef struct _SMB_REGISTER_ALARM {
|
|||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *SMB_RESET_DEVICE)(
|
||||
IN struct _SMB_CLASS *SmbClass,
|
||||
IN PVOID SmbMiniport);
|
||||
IN struct _SMB_CLASS *SmbClass,
|
||||
IN PVOID SmbMiniport);
|
||||
|
||||
typedef VOID
|
||||
(NTAPI *SMB_START_IO)(
|
||||
IN struct _SMB_CLASS *SmbClass,
|
||||
IN PVOID SmbMiniport);
|
||||
IN struct _SMB_CLASS *SmbClass,
|
||||
IN PVOID SmbMiniport);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *SMB_STOP_DEVICE)(
|
||||
IN struct _SMB_CLASS *SmbClass,
|
||||
IN PVOID SmbMiniport);
|
||||
IN struct _SMB_CLASS *SmbClass,
|
||||
IN PVOID SmbMiniport);
|
||||
|
||||
typedef struct _SMB_CLASS {
|
||||
USHORT MajorVersion;
|
||||
USHORT MinorVersion;
|
||||
PVOID Miniport;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
PDEVICE_OBJECT PDO;
|
||||
PDEVICE_OBJECT LowerDeviceObject;
|
||||
PIRP CurrentIrp;
|
||||
PSMB_REQUEST CurrentSmb;
|
||||
SMB_RESET_DEVICE ResetDevice;
|
||||
SMB_START_IO StartIo;
|
||||
SMB_STOP_DEVICE StopDevice;
|
||||
USHORT MajorVersion;
|
||||
USHORT MinorVersion;
|
||||
PVOID Miniport;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
PDEVICE_OBJECT PDO;
|
||||
PDEVICE_OBJECT LowerDeviceObject;
|
||||
PIRP CurrentIrp;
|
||||
PSMB_REQUEST CurrentSmb;
|
||||
SMB_RESET_DEVICE ResetDevice;
|
||||
SMB_START_IO StartIo;
|
||||
SMB_STOP_DEVICE StopDevice;
|
||||
} SMB_CLASS, *PSMB_CLASS;
|
||||
|
||||
SMBCLASSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
SmbClassAlarm(
|
||||
IN PSMB_CLASS SmbClass,
|
||||
IN UCHAR Address,
|
||||
IN USHORT Data);
|
||||
IN PSMB_CLASS SmbClass,
|
||||
IN UCHAR Address,
|
||||
IN USHORT Data);
|
||||
|
||||
SMBCLASSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
SmbClassCompleteRequest(
|
||||
IN PSMB_CLASS SmbClass);
|
||||
IN PSMB_CLASS SmbClass);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PSMB_INITIALIZE_MINIPORT)(
|
||||
IN PSMB_CLASS SmbClass,
|
||||
IN PVOID MiniportExtension,
|
||||
IN PVOID MiniportContext);
|
||||
IN PSMB_CLASS SmbClass,
|
||||
IN PVOID MiniportExtension,
|
||||
IN PVOID MiniportContext);
|
||||
|
||||
SMBCLASSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
SmbClassCreateFdo(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN PDEVICE_OBJECT PDO,
|
||||
IN ULONG MiniportExtensionSize,
|
||||
IN PSMB_INITIALIZE_MINIPORT MiniportInitialize,
|
||||
IN PVOID MiniportContext,
|
||||
OUT PDEVICE_OBJECT *FDO);
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN PDEVICE_OBJECT PDO,
|
||||
IN ULONG MiniportExtensionSize,
|
||||
IN PSMB_INITIALIZE_MINIPORT MiniportInitialize,
|
||||
IN PVOID MiniportContext,
|
||||
OUT PDEVICE_OBJECT *FDO);
|
||||
|
||||
SMBCLASSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
SmbClassInitializeDevice(
|
||||
IN ULONG MajorVersion,
|
||||
IN ULONG MinorVersion,
|
||||
IN PDRIVER_OBJECT DriverObject);
|
||||
IN ULONG MajorVersion,
|
||||
IN ULONG MinorVersion,
|
||||
IN PDRIVER_OBJECT DriverObject);
|
||||
|
||||
SMBCLASSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
SmbClassLockDevice(
|
||||
IN PSMB_CLASS SmbClass);
|
||||
IN PSMB_CLASS SmbClass);
|
||||
|
||||
SMBCLASSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
SmbClassUnlockDevice(
|
||||
IN PSMB_CLASS SmbClass);
|
||||
IN PSMB_CLASS SmbClass);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -13,15 +13,6 @@
|
|||
|
||||
#include <punknown.h>
|
||||
|
||||
/* Helper macro to enable gcc's extension. */
|
||||
#ifndef __GNU_EXTENSION
|
||||
#ifdef __GNUC__
|
||||
#define __GNU_EXTENSION __extension__
|
||||
#else
|
||||
#define __GNU_EXTENSION
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ===============================================================
|
||||
INonDelegatingUnknown interface
|
||||
*/
|
||||
|
|
|
@ -30,134 +30,132 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#if defined(_STORPORT_)
|
||||
#define STORPORTAPI
|
||||
#define STORPORTAPI
|
||||
#else
|
||||
#define STORPORTAPI DECLSPEC_IMPORT
|
||||
#define STORPORTAPI DECLSPEC_IMPORT
|
||||
#endif
|
||||
|
||||
|
||||
typedef PHYSICAL_ADDRESS STOR_PHYSICAL_ADDRESS;
|
||||
|
||||
typedef struct _STOR_SCATTER_GATHER_ELEMENT {
|
||||
STOR_PHYSICAL_ADDRESS PhysicalAddress;
|
||||
ULONG Length;
|
||||
ULONG_PTR Reserved;
|
||||
STOR_PHYSICAL_ADDRESS PhysicalAddress;
|
||||
ULONG Length;
|
||||
ULONG_PTR Reserved;
|
||||
} STOR_SCATTER_GATHER_ELEMENT, *PSTOR_SCATTER_GATHER_ELEMENT;
|
||||
|
||||
typedef struct _STOR_SCATTER_GATHER_LIST {
|
||||
ULONG NumberOfElements;
|
||||
ULONG_PTR Reserved;
|
||||
STOR_SCATTER_GATHER_ELEMENT List[0];
|
||||
ULONG NumberOfElements;
|
||||
ULONG_PTR Reserved;
|
||||
STOR_SCATTER_GATHER_ELEMENT List[0];
|
||||
} STOR_SCATTER_GATHER_LIST, *PSTOR_SCATTER_GATHER_LIST;
|
||||
|
||||
typedef struct _SCSI_WMI_REQUEST_BLOCK {
|
||||
USHORT Length;
|
||||
UCHAR Function;
|
||||
UCHAR SrbStatus;
|
||||
UCHAR WMISubFunction;
|
||||
UCHAR PathId;
|
||||
UCHAR TargetId;
|
||||
UCHAR Lun;
|
||||
UCHAR Reserved1;
|
||||
UCHAR WMIFlags;
|
||||
UCHAR Reserved2[2];
|
||||
ULONG SrbFlags;
|
||||
ULONG DataTransferLength;
|
||||
ULONG TimeOutValue;
|
||||
PVOID DataBuffer;
|
||||
PVOID DataPath;
|
||||
PVOID Reserved3;
|
||||
PVOID OriginalRequest;
|
||||
PVOID SrbExtension;
|
||||
ULONG Reserved4;
|
||||
UCHAR Reserved5[16];
|
||||
USHORT Length;
|
||||
UCHAR Function;
|
||||
UCHAR SrbStatus;
|
||||
UCHAR WMISubFunction;
|
||||
UCHAR PathId;
|
||||
UCHAR TargetId;
|
||||
UCHAR Lun;
|
||||
UCHAR Reserved1;
|
||||
UCHAR WMIFlags;
|
||||
UCHAR Reserved2[2];
|
||||
ULONG SrbFlags;
|
||||
ULONG DataTransferLength;
|
||||
ULONG TimeOutValue;
|
||||
PVOID DataBuffer;
|
||||
PVOID DataPath;
|
||||
PVOID Reserved3;
|
||||
PVOID OriginalRequest;
|
||||
PVOID SrbExtension;
|
||||
ULONG Reserved4;
|
||||
UCHAR Reserved5[16];
|
||||
} SCSI_WMI_REQUEST_BLOCK, *PSCSI_WMI_REQUEST_BLOCK;
|
||||
|
||||
|
||||
STORPORTAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
StorPortInitialize(
|
||||
IN PVOID Argument1,
|
||||
IN PVOID Argument2,
|
||||
IN PHW_INITIALIZATION_DATA HwInitializationData,
|
||||
IN PVOID Unused);
|
||||
IN PVOID Argument1,
|
||||
IN PVOID Argument2,
|
||||
IN PHW_INITIALIZATION_DATA HwInitializationData,
|
||||
IN PVOID Unused);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
StorPortFreeDeviceBase(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PVOID MappedAddress);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PVOID MappedAddress);
|
||||
|
||||
STORPORTAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
StorPortGetBusData(
|
||||
IN PVOID DeviceExtension,
|
||||
IN ULONG BusDataType,
|
||||
IN ULONG SystemIoBusNumber,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Length);
|
||||
IN PVOID DeviceExtension,
|
||||
IN ULONG BusDataType,
|
||||
IN ULONG SystemIoBusNumber,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Length);
|
||||
|
||||
STORPORTAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
StorPortSetBusDataByOffset(
|
||||
IN PVOID DeviceExtension,
|
||||
IN ULONG BusDataType,
|
||||
IN ULONG SystemIoBusNumber,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length);
|
||||
IN PVOID DeviceExtension,
|
||||
IN ULONG BusDataType,
|
||||
IN ULONG SystemIoBusNumber,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length);
|
||||
|
||||
STORPORTAPI
|
||||
PVOID
|
||||
NTAPI
|
||||
StorPortGetDeviceBase(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN INTERFACE_TYPE BusType,
|
||||
IN ULONG SystemIoBusNumber,
|
||||
IN SCSI_PHYSICAL_ADDRESS IoAddress,
|
||||
IN ULONG NumberOfBytes,
|
||||
IN BOOLEAN InIoSpace);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN INTERFACE_TYPE BusType,
|
||||
IN ULONG SystemIoBusNumber,
|
||||
IN SCSI_PHYSICAL_ADDRESS IoAddress,
|
||||
IN ULONG NumberOfBytes,
|
||||
IN BOOLEAN InIoSpace);
|
||||
|
||||
STORPORTAPI
|
||||
PVOID
|
||||
NTAPI
|
||||
StorPortGetLogicalUnit(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun);
|
||||
|
||||
STORPORTAPI
|
||||
PSCSI_REQUEST_BLOCK
|
||||
NTAPI
|
||||
StorPortGetSrb(
|
||||
IN PVOID DeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun,
|
||||
IN LONG QueueTag);
|
||||
IN PVOID DeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun,
|
||||
IN LONG QueueTag);
|
||||
|
||||
STORPORTAPI
|
||||
STOR_PHYSICAL_ADDRESS
|
||||
NTAPI
|
||||
StorPortGetPhysicalAddress(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PSCSI_REQUEST_BLOCK Srb,
|
||||
IN PVOID VirtualAddress,
|
||||
OUT ULONG *Length);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PSCSI_REQUEST_BLOCK Srb,
|
||||
IN PVOID VirtualAddress,
|
||||
OUT ULONG *Length);
|
||||
|
||||
STORPORTAPI
|
||||
PVOID
|
||||
NTAPI
|
||||
StorPortGetVirtualAddress(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN STOR_PHYSICAL_ADDRESS PhysicalAddress);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN STOR_PHYSICAL_ADDRESS PhysicalAddress);
|
||||
|
||||
STORPORTAPI
|
||||
PVOID
|
||||
|
@ -171,238 +169,238 @@ STORPORTAPI
|
|||
VOID
|
||||
__cdecl
|
||||
StorPortNotification(
|
||||
IN SCSI_NOTIFICATION_TYPE NotificationType,
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN SCSI_NOTIFICATION_TYPE NotificationType,
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN ...);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
StorPortLogError(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PSCSI_REQUEST_BLOCK Srb OPTIONAL,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun,
|
||||
IN ULONG ErrorCode,
|
||||
IN ULONG UniqueId);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PSCSI_REQUEST_BLOCK Srb OPTIONAL,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun,
|
||||
IN ULONG ErrorCode,
|
||||
IN ULONG UniqueId);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
StorPortCompleteRequest(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun,
|
||||
IN UCHAR SrbStatus);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun,
|
||||
IN UCHAR SrbStatus);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
StorPortMoveMemory(
|
||||
IN PVOID WriteBuffer,
|
||||
IN PVOID ReadBuffer,
|
||||
IN ULONG Length);
|
||||
IN PVOID WriteBuffer,
|
||||
IN PVOID ReadBuffer,
|
||||
IN ULONG Length);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
StorPortStallExecution(
|
||||
IN ULONG Delay);
|
||||
IN ULONG Delay);
|
||||
|
||||
STORPORTAPI
|
||||
STOR_PHYSICAL_ADDRESS
|
||||
NTAPI
|
||||
StorPortConvertUlong64ToPhysicalAddress(
|
||||
IN ULONG64 UlongAddress);
|
||||
IN ULONG64 UlongAddress);
|
||||
|
||||
STORPORTAPI
|
||||
ULONG64
|
||||
NTAPI
|
||||
StorPortConvertPhysicalAddressToUlong64(
|
||||
IN STOR_PHYSICAL_ADDRESS Address);
|
||||
IN STOR_PHYSICAL_ADDRESS Address);
|
||||
|
||||
STORPORTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
StorPortValidateRange(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN INTERFACE_TYPE BusType,
|
||||
IN ULONG SystemIoBusNumber,
|
||||
IN STOR_PHYSICAL_ADDRESS IoAddress,
|
||||
IN ULONG NumberOfBytes,
|
||||
IN BOOLEAN InIoSpace);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN INTERFACE_TYPE BusType,
|
||||
IN ULONG SystemIoBusNumber,
|
||||
IN STOR_PHYSICAL_ADDRESS IoAddress,
|
||||
IN ULONG NumberOfBytes,
|
||||
IN BOOLEAN InIoSpace);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
__cdecl
|
||||
StorPortDebugPrint(
|
||||
IN ULONG DebugPrintLevel,
|
||||
IN PCCHAR DebugMessage,
|
||||
IN ULONG DebugPrintLevel,
|
||||
IN PCCHAR DebugMessage,
|
||||
IN ...);
|
||||
|
||||
STORPORTAPI
|
||||
UCHAR
|
||||
NTAPI
|
||||
StorPortReadPortUchar(
|
||||
IN PUCHAR Port);
|
||||
IN PUCHAR Port);
|
||||
|
||||
STORPORTAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
StorPortReadPortUlong(
|
||||
IN PULONG Port);
|
||||
IN PULONG Port);
|
||||
|
||||
STORPORTAPI
|
||||
USHORT
|
||||
NTAPI
|
||||
StorPortReadPortUshort(
|
||||
IN PUSHORT Port);
|
||||
IN PUSHORT Port);
|
||||
|
||||
STORPORTAPI
|
||||
UCHAR
|
||||
NTAPI
|
||||
StorPortReadRegisterUchar(
|
||||
IN PUCHAR Register);
|
||||
IN PUCHAR Register);
|
||||
|
||||
STORPORTAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
StorPortReadRegisterUlong(
|
||||
IN PULONG Register);
|
||||
IN PULONG Register);
|
||||
|
||||
STORPORTAPI
|
||||
USHORT
|
||||
NTAPI
|
||||
StorPortReadRegisterUshort(
|
||||
IN PUSHORT Register);
|
||||
IN PUSHORT Register);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
StorPortWritePortUchar(
|
||||
IN PUCHAR Port,
|
||||
IN UCHAR Value);
|
||||
IN PUCHAR Port,
|
||||
IN UCHAR Value);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
StorPortWritePortUlong(
|
||||
IN PULONG Port,
|
||||
IN ULONG Value);
|
||||
IN PULONG Port,
|
||||
IN ULONG Value);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
StorPortWritePortUshort(
|
||||
IN PUSHORT Port,
|
||||
IN USHORT Value);
|
||||
IN PUSHORT Port,
|
||||
IN USHORT Value);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
StorPortWriteRegisterUchar(
|
||||
IN PUCHAR Port,
|
||||
IN UCHAR Value);
|
||||
IN PUCHAR Port,
|
||||
IN UCHAR Value);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
StorPortWriteRegisterUlong(
|
||||
IN PULONG Port,
|
||||
IN ULONG Value);
|
||||
IN PULONG Port,
|
||||
IN ULONG Value);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
StorPortWriteRegisterUshort(
|
||||
IN PUSHORT Port,
|
||||
IN USHORT Value);
|
||||
IN PUSHORT Port,
|
||||
IN USHORT Value);
|
||||
|
||||
STORPORTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
StorPortPauseDevice(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun,
|
||||
IN ULONG TimeOut);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun,
|
||||
IN ULONG TimeOut);
|
||||
|
||||
STORPORTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
StorPortResumeDevice(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun);
|
||||
|
||||
STORPORTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
StorPortPause(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN ULONG TimeOut);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN ULONG TimeOut);
|
||||
|
||||
STORPORTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
StorPortResume(
|
||||
IN PVOID HwDeviceExtension);
|
||||
IN PVOID HwDeviceExtension);
|
||||
|
||||
STORPORTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
StorPortDeviceBusy(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun,
|
||||
IN ULONG RequestsToComplete);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun,
|
||||
IN ULONG RequestsToComplete);
|
||||
|
||||
STORPORTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
StorPortDeviceReady(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN UCHAR PathId,
|
||||
IN UCHAR TargetId,
|
||||
IN UCHAR Lun);
|
||||
|
||||
STORPORTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
StorPortBusy(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN ULONG RequestsToComplete);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN ULONG RequestsToComplete);
|
||||
|
||||
STORPORTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
StorPortReady(
|
||||
IN PVOID HwDeviceExtension);
|
||||
IN PVOID HwDeviceExtension);
|
||||
|
||||
STORPORTAPI
|
||||
PSTOR_SCATTER_GATHER_LIST
|
||||
NTAPI
|
||||
StorPortGetScatterGatherList(
|
||||
IN PVOID DeviceExtension,
|
||||
IN PSCSI_REQUEST_BLOCK Srb);
|
||||
IN PVOID DeviceExtension,
|
||||
IN PSCSI_REQUEST_BLOCK Srb);
|
||||
|
||||
typedef BOOLEAN
|
||||
(NTAPI *PSTOR_SYNCHRONIZED_ACCESS)(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PVOID Context);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PVOID Context);
|
||||
|
||||
STORPORTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
StorPortSynchronizeAccess(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine,
|
||||
IN PVOID Context);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine,
|
||||
IN PVOID Context);
|
||||
|
||||
#if DBG
|
||||
#define DebugPrint(x) StorPortDebugPrint x
|
||||
|
|
|
@ -5,38 +5,27 @@
|
|||
#include <windef.h>
|
||||
#include <ks.h>
|
||||
|
||||
/* Helper macro to enable gcc's extension. */
|
||||
#ifndef __GNU_EXTENSION
|
||||
#ifdef __GNUC__
|
||||
#define __GNU_EXTENSION __extension__
|
||||
#else
|
||||
#define __GNU_EXTENSION
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define STREAMAPI __stdcall
|
||||
#define STREAM_SYSTEM_TIME_MASK ((STREAM_SYSTEM_TIME)0x00000001FFFFFFFF)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DebugLevelFatal = 0,
|
||||
DebugLevelError,
|
||||
DebugLevelWarning,
|
||||
DebugLevelInfo,
|
||||
DebugLevelTrace,
|
||||
DebugLevelVerbose,
|
||||
DebugLevelMaximum
|
||||
}STREAM_DEBUG_LEVEL;
|
||||
|
||||
typedef enum {
|
||||
DebugLevelFatal = 0,
|
||||
DebugLevelError,
|
||||
DebugLevelWarning,
|
||||
DebugLevelInfo,
|
||||
DebugLevelTrace,
|
||||
DebugLevelVerbose,
|
||||
DebugLevelMaximum
|
||||
} STREAM_DEBUG_LEVEL;
|
||||
|
||||
#if DBG
|
||||
|
||||
#define DebugPrint(x) StreamClassDebugPrint x
|
||||
#define DEBUG_BREAKPOINT() DbgBreakPoint()
|
||||
#define DEBUG_ASSERT(exp) \
|
||||
if ( !(exp) ) { \
|
||||
StreamClassDebugAssert( __FILE__, __LINE__, #exp, exp); \
|
||||
}
|
||||
if ( !(exp) ) { \
|
||||
StreamClassDebugAssert( __FILE__, __LINE__, #exp, exp); \
|
||||
}
|
||||
#else
|
||||
|
||||
#define DebugPrint(x)
|
||||
|
@ -49,538 +38,484 @@ typedef PHYSICAL_ADDRESS STREAM_PHYSICAL_ADDRESS, *PSTREAM_PHYSICAL_ADDRESS;
|
|||
__GNU_EXTENSION typedef unsigned __int64 STREAM_SYSTEM_TIME, *PSTREAM_SYSTEM_TIME;
|
||||
__GNU_EXTENSION typedef unsigned __int64 STREAM_TIMESTAMP, *PSTREAM_TIMESTAMP;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TIME_GET_STREAM_TIME,
|
||||
TIME_READ_ONBOARD_CLOCK,
|
||||
TIME_SET_ONBOARD_CLOCK
|
||||
}TIME_FUNCTION;
|
||||
typedef enum {
|
||||
TIME_GET_STREAM_TIME,
|
||||
TIME_READ_ONBOARD_CLOCK,
|
||||
TIME_SET_ONBOARD_CLOCK
|
||||
} TIME_FUNCTION;
|
||||
|
||||
typedef struct _HW_TIME_CONTEXT
|
||||
{
|
||||
struct _HW_DEVICE_EXTENSION *HwDeviceExtension;
|
||||
struct _HW_STREAM_OBJECT *HwStreamObject;
|
||||
TIME_FUNCTION Function;
|
||||
ULONGLONG Time;
|
||||
ULONGLONG SystemTime;
|
||||
}HW_TIME_CONTEXT, *PHW_TIME_CONTEXT;
|
||||
typedef struct _HW_TIME_CONTEXT {
|
||||
struct _HW_DEVICE_EXTENSION *HwDeviceExtension;
|
||||
struct _HW_STREAM_OBJECT *HwStreamObject;
|
||||
TIME_FUNCTION Function;
|
||||
ULONGLONG Time;
|
||||
ULONGLONG SystemTime;
|
||||
} HW_TIME_CONTEXT, *PHW_TIME_CONTEXT;
|
||||
|
||||
typedef struct _HW_EVENT_DESCRIPTOR
|
||||
{
|
||||
BOOLEAN Enable;
|
||||
PKSEVENT_ENTRY EventEntry;
|
||||
PKSEVENTDATA EventData;
|
||||
__GNU_EXTENSION union
|
||||
{
|
||||
struct _HW_STREAM_OBJECT * StreamObject;
|
||||
struct _HW_DEVICE_EXTENSION *DeviceExtension;
|
||||
};
|
||||
ULONG EnableEventSetIndex;
|
||||
PVOID HwInstanceExtension;
|
||||
ULONG Reserved;
|
||||
typedef struct _HW_EVENT_DESCRIPTOR {
|
||||
BOOLEAN Enable;
|
||||
PKSEVENT_ENTRY EventEntry;
|
||||
PKSEVENTDATA EventData;
|
||||
__GNU_EXTENSION union {
|
||||
struct _HW_STREAM_OBJECT * StreamObject;
|
||||
struct _HW_DEVICE_EXTENSION *DeviceExtension;
|
||||
};
|
||||
ULONG EnableEventSetIndex;
|
||||
PVOID HwInstanceExtension;
|
||||
ULONG Reserved;
|
||||
} HW_EVENT_DESCRIPTOR, *PHW_EVENT_DESCRIPTOR;
|
||||
|
||||
struct _HW_STREAM_REQUEST_BLOCK;
|
||||
|
||||
typedef VOID (STREAMAPI * PHW_RECEIVE_STREAM_DATA_SRB) (IN struct _HW_STREAM_REQUEST_BLOCK * SRB);
|
||||
typedef VOID (STREAMAPI * PHW_RECEIVE_STREAM_CONTROL_SRB) (IN struct _HW_STREAM_REQUEST_BLOCK * SRB);
|
||||
typedef NTSTATUS (STREAMAPI * PHW_EVENT_ROUTINE) (IN PHW_EVENT_DESCRIPTOR EventDescriptor);
|
||||
typedef VOID (STREAMAPI * PHW_CLOCK_FUNCTION) (IN PHW_TIME_CONTEXT HwTimeContext);
|
||||
typedef VOID (STREAMAPI *PHW_RECEIVE_STREAM_DATA_SRB) (IN struct _HW_STREAM_REQUEST_BLOCK *SRB);
|
||||
typedef VOID (STREAMAPI *PHW_RECEIVE_STREAM_CONTROL_SRB) (IN struct _HW_STREAM_REQUEST_BLOCK *SRB);
|
||||
typedef NTSTATUS (STREAMAPI *PHW_EVENT_ROUTINE) (IN PHW_EVENT_DESCRIPTOR EventDescriptor);
|
||||
typedef VOID (STREAMAPI *PHW_CLOCK_FUNCTION) (IN PHW_TIME_CONTEXT HwTimeContext);
|
||||
|
||||
typedef struct _HW_CLOCK_OBJECT
|
||||
{
|
||||
PHW_CLOCK_FUNCTION HwClockFunction;
|
||||
ULONG ClockSupportFlags;
|
||||
ULONG Reserved[2];
|
||||
typedef struct _HW_CLOCK_OBJECT {
|
||||
PHW_CLOCK_FUNCTION HwClockFunction;
|
||||
ULONG ClockSupportFlags;
|
||||
ULONG Reserved[2];
|
||||
} HW_CLOCK_OBJECT, *PHW_CLOCK_OBJECT;
|
||||
|
||||
#define CLOCK_SUPPORT_CAN_SET_ONBOARD_CLOCK 0x1
|
||||
#define CLOCK_SUPPORT_CAN_SET_ONBOARD_CLOCK 0x1
|
||||
#define CLOCK_SUPPORT_CAN_READ_ONBOARD_CLOCK 0x2
|
||||
#define CLOCK_SUPPORT_CAN_RETURN_STREAM_TIME 0x4
|
||||
|
||||
typedef struct _HW_STREAM_OBJECT
|
||||
{
|
||||
ULONG SizeOfThisPacket;
|
||||
ULONG StreamNumber;
|
||||
PVOID HwStreamExtension;
|
||||
PHW_RECEIVE_STREAM_DATA_SRB ReceiveDataPacket;
|
||||
PHW_RECEIVE_STREAM_CONTROL_SRB ReceiveControlPacket;
|
||||
HW_CLOCK_OBJECT HwClockObject;
|
||||
BOOLEAN Dma;
|
||||
BOOLEAN Pio;
|
||||
PVOID HwDeviceExtension;
|
||||
ULONG StreamHeaderMediaSpecific;
|
||||
ULONG StreamHeaderWorkspace;
|
||||
BOOLEAN Allocator;
|
||||
PHW_EVENT_ROUTINE HwEventRoutine;
|
||||
ULONG Reserved[2];
|
||||
typedef struct _HW_STREAM_OBJECT {
|
||||
ULONG SizeOfThisPacket;
|
||||
ULONG StreamNumber;
|
||||
PVOID HwStreamExtension;
|
||||
PHW_RECEIVE_STREAM_DATA_SRB ReceiveDataPacket;
|
||||
PHW_RECEIVE_STREAM_CONTROL_SRB ReceiveControlPacket;
|
||||
HW_CLOCK_OBJECT HwClockObject;
|
||||
BOOLEAN Dma;
|
||||
BOOLEAN Pio;
|
||||
PVOID HwDeviceExtension;
|
||||
ULONG StreamHeaderMediaSpecific;
|
||||
ULONG StreamHeaderWorkspace;
|
||||
BOOLEAN Allocator;
|
||||
PHW_EVENT_ROUTINE HwEventRoutine;
|
||||
ULONG Reserved[2];
|
||||
} HW_STREAM_OBJECT, *PHW_STREAM_OBJECT;
|
||||
|
||||
typedef struct _HW_STREAM_HEADER
|
||||
{
|
||||
ULONG NumberOfStreams;
|
||||
ULONG SizeOfHwStreamInformation;
|
||||
ULONG NumDevPropArrayEntries;
|
||||
PKSPROPERTY_SET DevicePropertiesArray;
|
||||
ULONG NumDevEventArrayEntries;
|
||||
PKSEVENT_SET DeviceEventsArray;
|
||||
PKSTOPOLOGY Topology;
|
||||
PHW_EVENT_ROUTINE DeviceEventRoutine;
|
||||
LONG NumDevMethodArrayEntries;
|
||||
PKSMETHOD_SET DeviceMethodsArray;
|
||||
}HW_STREAM_HEADER, *PHW_STREAM_HEADER;
|
||||
typedef struct _HW_STREAM_HEADER {
|
||||
ULONG NumberOfStreams;
|
||||
ULONG SizeOfHwStreamInformation;
|
||||
ULONG NumDevPropArrayEntries;
|
||||
PKSPROPERTY_SET DevicePropertiesArray;
|
||||
ULONG NumDevEventArrayEntries;
|
||||
PKSEVENT_SET DeviceEventsArray;
|
||||
PKSTOPOLOGY Topology;
|
||||
PHW_EVENT_ROUTINE DeviceEventRoutine;
|
||||
LONG NumDevMethodArrayEntries;
|
||||
PKSMETHOD_SET DeviceMethodsArray;
|
||||
} HW_STREAM_HEADER, *PHW_STREAM_HEADER;
|
||||
|
||||
typedef struct _HW_STREAM_INFORMATION
|
||||
{
|
||||
ULONG NumberOfPossibleInstances;
|
||||
KSPIN_DATAFLOW DataFlow;
|
||||
BOOLEAN DataAccessible;
|
||||
ULONG NumberOfFormatArrayEntries;
|
||||
PKSDATAFORMAT* StreamFormatsArray;
|
||||
PVOID ClassReserved[4];
|
||||
ULONG NumStreamPropArrayEntries;
|
||||
PKSPROPERTY_SET StreamPropertiesArray;
|
||||
ULONG NumStreamEventArrayEntries;
|
||||
PKSEVENT_SET StreamEventsArray;
|
||||
GUID* Category;
|
||||
GUID* Name;
|
||||
ULONG MediumsCount;
|
||||
const KSPIN_MEDIUM* Mediums;
|
||||
BOOLEAN BridgeStream;
|
||||
ULONG Reserved[2];
|
||||
}HW_STREAM_INFORMATION, *PHW_STREAM_INFORMATION;
|
||||
typedef struct _HW_STREAM_INFORMATION {
|
||||
ULONG NumberOfPossibleInstances;
|
||||
KSPIN_DATAFLOW DataFlow;
|
||||
BOOLEAN DataAccessible;
|
||||
ULONG NumberOfFormatArrayEntries;
|
||||
PKSDATAFORMAT* StreamFormatsArray;
|
||||
PVOID ClassReserved[4];
|
||||
ULONG NumStreamPropArrayEntries;
|
||||
PKSPROPERTY_SET StreamPropertiesArray;
|
||||
ULONG NumStreamEventArrayEntries;
|
||||
PKSEVENT_SET StreamEventsArray;
|
||||
GUID* Category;
|
||||
GUID* Name;
|
||||
ULONG MediumsCount;
|
||||
const KSPIN_MEDIUM* Mediums;
|
||||
BOOLEAN BridgeStream;
|
||||
ULONG Reserved[2];
|
||||
} HW_STREAM_INFORMATION, *PHW_STREAM_INFORMATION;
|
||||
|
||||
|
||||
typedef struct _HW_STREAM_DESCRIPTOR
|
||||
{
|
||||
HW_STREAM_HEADER StreamHeader;
|
||||
HW_STREAM_INFORMATION StreamInfo;
|
||||
typedef struct _HW_STREAM_DESCRIPTOR {
|
||||
HW_STREAM_HEADER StreamHeader;
|
||||
HW_STREAM_INFORMATION StreamInfo;
|
||||
} HW_STREAM_DESCRIPTOR, *PHW_STREAM_DESCRIPTOR;
|
||||
|
||||
typedef struct _STREAM_TIME_REFERENCE
|
||||
{
|
||||
STREAM_TIMESTAMP CurrentOnboardClockValue;
|
||||
LARGE_INTEGER OnboardClockFrequency;
|
||||
LARGE_INTEGER CurrentSystemTime;
|
||||
ULONG Reserved[2];
|
||||
}STREAM_TIME_REFERENCE, *PSTREAM_TIME_REFERENCE;
|
||||
typedef struct _STREAM_TIME_REFERENCE {
|
||||
STREAM_TIMESTAMP CurrentOnboardClockValue;
|
||||
LARGE_INTEGER OnboardClockFrequency;
|
||||
LARGE_INTEGER CurrentSystemTime;
|
||||
ULONG Reserved[2];
|
||||
} STREAM_TIME_REFERENCE, *PSTREAM_TIME_REFERENCE;
|
||||
|
||||
typedef struct _STREAM_DATA_INTERSECT_INFO
|
||||
{
|
||||
ULONG StreamNumber;
|
||||
PKSDATARANGE DataRange;
|
||||
PVOID DataFormatBuffer;
|
||||
ULONG SizeOfDataFormatBuffer;
|
||||
typedef struct _STREAM_DATA_INTERSECT_INFO {
|
||||
ULONG StreamNumber;
|
||||
PKSDATARANGE DataRange;
|
||||
PVOID DataFormatBuffer;
|
||||
ULONG SizeOfDataFormatBuffer;
|
||||
} STREAM_DATA_INTERSECT_INFO, *PSTREAM_DATA_INTERSECT_INFO;
|
||||
|
||||
}STREAM_DATA_INTERSECT_INFO, *PSTREAM_DATA_INTERSECT_INFO;
|
||||
typedef struct _STREAM_PROPERTY_DESCRIPTOR {
|
||||
PKSPROPERTY Property;
|
||||
ULONG PropertySetID;
|
||||
PVOID PropertyInfo;
|
||||
ULONG PropertyInputSize;
|
||||
ULONG PropertyOutputSize;
|
||||
} STREAM_PROPERTY_DESCRIPTOR, *PSTREAM_PROPERTY_DESCRIPTOR;
|
||||
|
||||
typedef struct _STREAM_PROPERTY_DESCRIPTOR
|
||||
{
|
||||
PKSPROPERTY Property;
|
||||
ULONG PropertySetID;
|
||||
PVOID PropertyInfo;
|
||||
ULONG PropertyInputSize;
|
||||
ULONG PropertyOutputSize;
|
||||
}STREAM_PROPERTY_DESCRIPTOR, *PSTREAM_PROPERTY_DESCRIPTOR;
|
||||
|
||||
typedef struct _STREAM_METHOD_DESCRIPTOR
|
||||
{
|
||||
ULONG MethodSetID;
|
||||
PKSMETHOD Method;
|
||||
PVOID MethodInfo;
|
||||
LONG MethodInputSize;
|
||||
LONG MethodOutputSize;
|
||||
typedef struct _STREAM_METHOD_DESCRIPTOR {
|
||||
ULONG MethodSetID;
|
||||
PKSMETHOD Method;
|
||||
PVOID MethodInfo;
|
||||
LONG MethodInputSize;
|
||||
LONG MethodOutputSize;
|
||||
} STREAM_METHOD_DESCRIPTOR, *PSTREAM_METHOD_DESCRIPTOR;
|
||||
|
||||
#define STREAM_REQUEST_BLOCK_SIZE sizeof(STREAM_REQUEST_BLOCK)
|
||||
|
||||
typedef enum _SRB_COMMAND
|
||||
{
|
||||
SRB_READ_DATA,
|
||||
SRB_WRITE_DATA,
|
||||
SRB_GET_STREAM_STATE,
|
||||
SRB_SET_STREAM_STATE,
|
||||
SRB_SET_STREAM_PROPERTY,
|
||||
SRB_GET_STREAM_PROPERTY,
|
||||
SRB_OPEN_MASTER_CLOCK,
|
||||
typedef enum _SRB_COMMAND {
|
||||
SRB_READ_DATA,
|
||||
SRB_WRITE_DATA,
|
||||
SRB_GET_STREAM_STATE,
|
||||
SRB_SET_STREAM_STATE,
|
||||
SRB_SET_STREAM_PROPERTY,
|
||||
SRB_GET_STREAM_PROPERTY,
|
||||
SRB_OPEN_MASTER_CLOCK,
|
||||
|
||||
SRB_INDICATE_MASTER_CLOCK,
|
||||
SRB_UNKNOWN_STREAM_COMMAND,
|
||||
SRB_SET_STREAM_RATE,
|
||||
SRB_PROPOSE_DATA_FORMAT,
|
||||
SRB_CLOSE_MASTER_CLOCK,
|
||||
SRB_PROPOSE_STREAM_RATE,
|
||||
SRB_SET_DATA_FORMAT,
|
||||
SRB_GET_DATA_FORMAT,
|
||||
SRB_BEGIN_FLUSH,
|
||||
SRB_END_FLUSH,
|
||||
SRB_INDICATE_MASTER_CLOCK,
|
||||
SRB_UNKNOWN_STREAM_COMMAND,
|
||||
SRB_SET_STREAM_RATE,
|
||||
SRB_PROPOSE_DATA_FORMAT,
|
||||
SRB_CLOSE_MASTER_CLOCK,
|
||||
SRB_PROPOSE_STREAM_RATE,
|
||||
SRB_SET_DATA_FORMAT,
|
||||
SRB_GET_DATA_FORMAT,
|
||||
SRB_BEGIN_FLUSH,
|
||||
SRB_END_FLUSH,
|
||||
|
||||
SRB_GET_STREAM_INFO = 0x100,
|
||||
SRB_OPEN_STREAM,
|
||||
SRB_CLOSE_STREAM,
|
||||
SRB_OPEN_DEVICE_INSTANCE,
|
||||
SRB_CLOSE_DEVICE_INSTANCE,
|
||||
SRB_GET_DEVICE_PROPERTY,
|
||||
SRB_SET_DEVICE_PROPERTY,
|
||||
SRB_INITIALIZE_DEVICE,
|
||||
SRB_CHANGE_POWER_STATE,
|
||||
SRB_UNINITIALIZE_DEVICE,
|
||||
SRB_UNKNOWN_DEVICE_COMMAND,
|
||||
SRB_PAGING_OUT_DRIVER,
|
||||
SRB_GET_DATA_INTERSECTION,
|
||||
SRB_INITIALIZATION_COMPLETE,
|
||||
SRB_SURPRISE_REMOVAL
|
||||
SRB_GET_STREAM_INFO = 0x100,
|
||||
SRB_OPEN_STREAM,
|
||||
SRB_CLOSE_STREAM,
|
||||
SRB_OPEN_DEVICE_INSTANCE,
|
||||
SRB_CLOSE_DEVICE_INSTANCE,
|
||||
SRB_GET_DEVICE_PROPERTY,
|
||||
SRB_SET_DEVICE_PROPERTY,
|
||||
SRB_INITIALIZE_DEVICE,
|
||||
SRB_CHANGE_POWER_STATE,
|
||||
SRB_UNINITIALIZE_DEVICE,
|
||||
SRB_UNKNOWN_DEVICE_COMMAND,
|
||||
SRB_PAGING_OUT_DRIVER,
|
||||
SRB_GET_DATA_INTERSECTION,
|
||||
SRB_INITIALIZATION_COMPLETE,
|
||||
SRB_SURPRISE_REMOVAL
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
|
||||
,SRB_DEVICE_METHOD
|
||||
,SRB_STREAM_METHOD
|
||||
|
||||
,SRB_DEVICE_METHOD
|
||||
,SRB_STREAM_METHOD
|
||||
#if ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
|
||||
|
||||
,SRB_NOTIFY_IDLE_STATE
|
||||
|
||||
,SRB_NOTIFY_IDLE_STATE
|
||||
#endif
|
||||
|
||||
#endif
|
||||
} SRB_COMMAND;
|
||||
|
||||
}SRB_COMMAND;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PHYSICAL_ADDRESS PhysicalAddress;
|
||||
ULONG Length;
|
||||
typedef struct {
|
||||
PHYSICAL_ADDRESS PhysicalAddress;
|
||||
ULONG Length;
|
||||
} KSSCATTER_GATHER, *PKSSCATTER_GATHER;
|
||||
|
||||
|
||||
typedef struct _HW_STREAM_REQUEST_BLOCK
|
||||
{
|
||||
ULONG SizeOfThisPacket;
|
||||
SRB_COMMAND Command;
|
||||
NTSTATUS Status;
|
||||
PHW_STREAM_OBJECT StreamObject;
|
||||
PVOID HwDeviceExtension;
|
||||
PVOID SRBExtension;
|
||||
typedef struct _HW_STREAM_REQUEST_BLOCK {
|
||||
ULONG SizeOfThisPacket;
|
||||
SRB_COMMAND Command;
|
||||
NTSTATUS Status;
|
||||
PHW_STREAM_OBJECT StreamObject;
|
||||
PVOID HwDeviceExtension;
|
||||
PVOID SRBExtension;
|
||||
|
||||
union _CommandData
|
||||
{
|
||||
PKSSTREAM_HEADER DataBufferArray;
|
||||
PHW_STREAM_DESCRIPTOR StreamBuffer;
|
||||
KSSTATE StreamState;
|
||||
PSTREAM_TIME_REFERENCE TimeReference;
|
||||
PSTREAM_PROPERTY_DESCRIPTOR PropertyInfo;
|
||||
PKSDATAFORMAT OpenFormat;
|
||||
struct _PORT_CONFIGURATION_INFORMATION *ConfigInfo;
|
||||
HANDLE MasterClockHandle;
|
||||
DEVICE_POWER_STATE DeviceState;
|
||||
PSTREAM_DATA_INTERSECT_INFO IntersectInfo;
|
||||
union _CommandData {
|
||||
PKSSTREAM_HEADER DataBufferArray;
|
||||
PHW_STREAM_DESCRIPTOR StreamBuffer;
|
||||
KSSTATE StreamState;
|
||||
PSTREAM_TIME_REFERENCE TimeReference;
|
||||
PSTREAM_PROPERTY_DESCRIPTOR PropertyInfo;
|
||||
PKSDATAFORMAT OpenFormat;
|
||||
struct _PORT_CONFIGURATION_INFORMATION *ConfigInfo;
|
||||
HANDLE MasterClockHandle;
|
||||
DEVICE_POWER_STATE DeviceState;
|
||||
PSTREAM_DATA_INTERSECT_INFO IntersectInfo;
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
PVOID MethodInfo;
|
||||
LONG FilterTypeIndex;
|
||||
PVOID MethodInfo;
|
||||
LONG FilterTypeIndex;
|
||||
#if ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
|
||||
BOOLEAN Idle;
|
||||
BOOLEAN Idle;
|
||||
#endif
|
||||
#endif
|
||||
} CommandData;
|
||||
|
||||
}CommandData;
|
||||
ULONG NumberOfBuffers;
|
||||
ULONG TimeoutCounter;
|
||||
ULONG TimeoutOriginal;
|
||||
struct _HW_STREAM_REQUEST_BLOCK *NextSRB;
|
||||
|
||||
ULONG NumberOfBuffers;
|
||||
ULONG TimeoutCounter;
|
||||
ULONG TimeoutOriginal;
|
||||
struct _HW_STREAM_REQUEST_BLOCK *NextSRB;
|
||||
PIRP Irp;
|
||||
ULONG Flags;
|
||||
PVOID HwInstanceExtension;
|
||||
|
||||
PIRP Irp;
|
||||
ULONG Flags;
|
||||
PVOID HwInstanceExtension;
|
||||
__GNU_EXTENSION union {
|
||||
ULONG NumberOfBytesToTransfer;
|
||||
ULONG ActualBytesTransferred;
|
||||
};
|
||||
|
||||
__GNU_EXTENSION union
|
||||
{
|
||||
ULONG NumberOfBytesToTransfer;
|
||||
ULONG ActualBytesTransferred;
|
||||
};
|
||||
|
||||
PKSSCATTER_GATHER ScatterGatherBuffer;
|
||||
ULONG NumberOfPhysicalPages;
|
||||
ULONG NumberOfScatterGatherElements;
|
||||
ULONG Reserved[1];
|
||||
|
||||
}HW_STREAM_REQUEST_BLOCK, *PHW_STREAM_REQUEST_BLOCK;
|
||||
PKSSCATTER_GATHER ScatterGatherBuffer;
|
||||
ULONG NumberOfPhysicalPages;
|
||||
ULONG NumberOfScatterGatherElements;
|
||||
ULONG Reserved[1];
|
||||
} HW_STREAM_REQUEST_BLOCK, *PHW_STREAM_REQUEST_BLOCK;
|
||||
|
||||
#define SRB_HW_FLAGS_DATA_TRANSFER 0x01
|
||||
#define SRB_HW_FLAGS_STREAM_REQUEST 0x2
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PerRequestExtension,
|
||||
DmaBuffer,
|
||||
SRBDataBuffer
|
||||
}STREAM_BUFFER_TYPE;
|
||||
typedef enum {
|
||||
PerRequestExtension,
|
||||
DmaBuffer,
|
||||
SRBDataBuffer
|
||||
} STREAM_BUFFER_TYPE;
|
||||
|
||||
typedef struct _ACCESS_RANGE
|
||||
{
|
||||
STREAM_PHYSICAL_ADDRESS RangeStart;
|
||||
ULONG RangeLength;
|
||||
BOOLEAN RangeInMemory;
|
||||
ULONG Reserved;
|
||||
}ACCESS_RANGE, *PACCESS_RANGE;
|
||||
typedef struct _ACCESS_RANGE {
|
||||
STREAM_PHYSICAL_ADDRESS RangeStart;
|
||||
ULONG RangeLength;
|
||||
BOOLEAN RangeInMemory;
|
||||
ULONG Reserved;
|
||||
} ACCESS_RANGE, *PACCESS_RANGE;
|
||||
|
||||
typedef struct _PORT_CONFIGURATION_INFORMATION
|
||||
{
|
||||
ULONG SizeOfThisPacket;
|
||||
PVOID HwDeviceExtension;
|
||||
PDEVICE_OBJECT ClassDeviceObject;
|
||||
PDEVICE_OBJECT PhysicalDeviceObject;
|
||||
ULONG SystemIoBusNumber;
|
||||
INTERFACE_TYPE AdapterInterfaceType;
|
||||
ULONG BusInterruptLevel;
|
||||
ULONG BusInterruptVector;
|
||||
KINTERRUPT_MODE InterruptMode;
|
||||
ULONG DmaChannel;
|
||||
ULONG NumberOfAccessRanges;
|
||||
PACCESS_RANGE AccessRanges;
|
||||
ULONG StreamDescriptorSize;
|
||||
PIRP Irp;
|
||||
PKINTERRUPT InterruptObject;
|
||||
PADAPTER_OBJECT DmaAdapterObject;
|
||||
PDEVICE_OBJECT RealPhysicalDeviceObject;
|
||||
ULONG Reserved[1];
|
||||
}PORT_CONFIGURATION_INFORMATION, *PPORT_CONFIGURATION_INFORMATION;
|
||||
typedef struct _PORT_CONFIGURATION_INFORMATION {
|
||||
ULONG SizeOfThisPacket;
|
||||
PVOID HwDeviceExtension;
|
||||
PDEVICE_OBJECT ClassDeviceObject;
|
||||
PDEVICE_OBJECT PhysicalDeviceObject;
|
||||
ULONG SystemIoBusNumber;
|
||||
INTERFACE_TYPE AdapterInterfaceType;
|
||||
ULONG BusInterruptLevel;
|
||||
ULONG BusInterruptVector;
|
||||
KINTERRUPT_MODE InterruptMode;
|
||||
ULONG DmaChannel;
|
||||
ULONG NumberOfAccessRanges;
|
||||
PACCESS_RANGE AccessRanges;
|
||||
ULONG StreamDescriptorSize;
|
||||
PIRP Irp;
|
||||
PKINTERRUPT InterruptObject;
|
||||
PADAPTER_OBJECT DmaAdapterObject;
|
||||
PDEVICE_OBJECT RealPhysicalDeviceObject;
|
||||
ULONG Reserved[1];
|
||||
} PORT_CONFIGURATION_INFORMATION, *PPORT_CONFIGURATION_INFORMATION;
|
||||
|
||||
typedef VOID (STREAMAPI * PHW_RECEIVE_DEVICE_SRB) (IN PHW_STREAM_REQUEST_BLOCK SRB);
|
||||
typedef VOID (STREAMAPI * PHW_CANCEL_SRB) (IN PHW_STREAM_REQUEST_BLOCK SRB);
|
||||
typedef VOID (STREAMAPI * PHW_REQUEST_TIMEOUT_HANDLER) (IN PHW_STREAM_REQUEST_BLOCK SRB);
|
||||
typedef BOOLEAN (STREAMAPI * PHW_INTERRUPT) (IN PVOID DeviceExtension);
|
||||
typedef VOID (STREAMAPI * PHW_TIMER_ROUTINE) (IN PVOID Context);
|
||||
typedef VOID (STREAMAPI * PHW_PRIORITY_ROUTINE) (IN PVOID Context);
|
||||
typedef VOID (STREAMAPI * PHW_QUERY_CLOCK_ROUTINE) (IN PHW_TIME_CONTEXT TimeContext);
|
||||
typedef BOOLEAN (STREAMAPI * PHW_RESET_ADAPTER) (IN PVOID DeviceExtension);
|
||||
typedef VOID (STREAMAPI *PHW_RECEIVE_DEVICE_SRB) (IN PHW_STREAM_REQUEST_BLOCK SRB);
|
||||
typedef VOID (STREAMAPI *PHW_CANCEL_SRB) (IN PHW_STREAM_REQUEST_BLOCK SRB);
|
||||
typedef VOID (STREAMAPI *PHW_REQUEST_TIMEOUT_HANDLER) (IN PHW_STREAM_REQUEST_BLOCK SRB);
|
||||
typedef BOOLEAN (STREAMAPI *PHW_INTERRUPT) (IN PVOID DeviceExtension);
|
||||
typedef VOID (STREAMAPI *PHW_TIMER_ROUTINE) (IN PVOID Context);
|
||||
typedef VOID (STREAMAPI *PHW_PRIORITY_ROUTINE) (IN PVOID Context);
|
||||
typedef VOID (STREAMAPI *PHW_QUERY_CLOCK_ROUTINE) (IN PHW_TIME_CONTEXT TimeContext);
|
||||
typedef BOOLEAN (STREAMAPI *PHW_RESET_ADAPTER) (IN PVOID DeviceExtension);
|
||||
|
||||
typedef enum _STREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE
|
||||
{
|
||||
ReadyForNextStreamDataRequest,
|
||||
ReadyForNextStreamControlRequest,
|
||||
HardwareStarved,
|
||||
StreamRequestComplete,
|
||||
SignalMultipleStreamEvents,
|
||||
SignalStreamEvent,
|
||||
DeleteStreamEvent,
|
||||
StreamNotificationMaximum
|
||||
}STREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE, *PSTREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE;
|
||||
typedef enum _STREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE {
|
||||
ReadyForNextStreamDataRequest,
|
||||
ReadyForNextStreamControlRequest,
|
||||
HardwareStarved,
|
||||
StreamRequestComplete,
|
||||
SignalMultipleStreamEvents,
|
||||
SignalStreamEvent,
|
||||
DeleteStreamEvent,
|
||||
StreamNotificationMaximum
|
||||
} STREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE, *PSTREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE;
|
||||
|
||||
typedef enum _STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE
|
||||
{
|
||||
ReadyForNextDeviceRequest,
|
||||
DeviceRequestComplete,
|
||||
SignalMultipleDeviceEvents,
|
||||
SignalDeviceEvent,
|
||||
DeleteDeviceEvent,
|
||||
typedef enum _STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE {
|
||||
ReadyForNextDeviceRequest,
|
||||
DeviceRequestComplete,
|
||||
SignalMultipleDeviceEvents,
|
||||
SignalDeviceEvent,
|
||||
DeleteDeviceEvent,
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
SignalMultipleDeviceInstanceEvents,
|
||||
SignalMultipleDeviceInstanceEvents,
|
||||
#endif
|
||||
DeviceNotificationMaximum
|
||||
DeviceNotificationMaximum
|
||||
} STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE, *PSTREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE;
|
||||
|
||||
#define STREAM_CLASS_VERSION_20 0x0200
|
||||
|
||||
typedef struct _HW_INITIALIZATION_DATA {
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
__GNU_EXTENSION union
|
||||
{
|
||||
ULONG HwInitializationDataSize;
|
||||
__GNU_EXTENSION struct
|
||||
{
|
||||
USHORT SizeOfThisPacket;
|
||||
USHORT StreamClassVersion;
|
||||
};
|
||||
__GNU_EXTENSION union {
|
||||
ULONG HwInitializationDataSize;
|
||||
__GNU_EXTENSION struct {
|
||||
USHORT SizeOfThisPacket;
|
||||
USHORT StreamClassVersion;
|
||||
};
|
||||
};
|
||||
#else
|
||||
ULONG HwInitializationDataSize;
|
||||
#endif
|
||||
ULONG HwInitializationDataSize;
|
||||
#endif /* NTDDI_VERSION >= NTDDI_WINXP */
|
||||
|
||||
PHW_INTERRUPT HwInterrupt;
|
||||
PHW_RECEIVE_DEVICE_SRB HwReceivePacket;
|
||||
PHW_CANCEL_SRB HwCancelPacket;
|
||||
PHW_REQUEST_TIMEOUT_HANDLER HwRequestTimeoutHandler;
|
||||
ULONG DeviceExtensionSize;
|
||||
ULONG PerRequestExtensionSize;
|
||||
ULONG PerStreamExtensionSize;
|
||||
ULONG FilterInstanceExtensionSize;
|
||||
BOOLEAN BusMasterDMA;
|
||||
BOOLEAN Dma24BitAddresses;
|
||||
ULONG BufferAlignment;
|
||||
BOOLEAN TurnOffSynchronization;
|
||||
ULONG DmaBufferSize;
|
||||
PHW_INTERRUPT HwInterrupt;
|
||||
PHW_RECEIVE_DEVICE_SRB HwReceivePacket;
|
||||
PHW_CANCEL_SRB HwCancelPacket;
|
||||
PHW_REQUEST_TIMEOUT_HANDLER HwRequestTimeoutHandler;
|
||||
ULONG DeviceExtensionSize;
|
||||
ULONG PerRequestExtensionSize;
|
||||
ULONG PerStreamExtensionSize;
|
||||
ULONG FilterInstanceExtensionSize;
|
||||
BOOLEAN BusMasterDMA;
|
||||
BOOLEAN Dma24BitAddresses;
|
||||
ULONG BufferAlignment;
|
||||
BOOLEAN TurnOffSynchronization;
|
||||
ULONG DmaBufferSize;
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
ULONG NumNameExtensions;
|
||||
PWCHAR *NameExtensionArray;
|
||||
ULONG NumNameExtensions;
|
||||
PWCHAR *NameExtensionArray;
|
||||
#else
|
||||
ULONG Reserved[2];
|
||||
ULONG Reserved[2];
|
||||
#endif
|
||||
} HW_INITIALIZATION_DATA, *PHW_INITIALIZATION_DATA;
|
||||
|
||||
typedef enum _STREAM_PRIORITY
|
||||
{
|
||||
High,
|
||||
Dispatch,
|
||||
Low,
|
||||
LowToHigh
|
||||
}STREAM_PRIORITY, *PSTREAM_PRIORITY;
|
||||
typedef enum _STREAM_PRIORITY {
|
||||
High,
|
||||
Dispatch,
|
||||
Low,
|
||||
LowToHigh
|
||||
} STREAM_PRIORITY, *PSTREAM_PRIORITY;
|
||||
|
||||
|
||||
VOID
|
||||
StreamClassAbortOutstandingRequests(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PHW_STREAM_OBJECT HwStreamObject,
|
||||
IN NTSTATUS Status
|
||||
);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PHW_STREAM_OBJECT HwStreamObject,
|
||||
IN NTSTATUS Status);
|
||||
|
||||
VOID
|
||||
STREAMAPI
|
||||
StreamClassCallAtNewPriority(
|
||||
IN PHW_STREAM_OBJECT StreamObject,
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN STREAM_PRIORITY Priority,
|
||||
IN PHW_PRIORITY_ROUTINE PriorityRoutine,
|
||||
IN PVOID Context
|
||||
);
|
||||
|
||||
IN PHW_STREAM_OBJECT StreamObject,
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN STREAM_PRIORITY Priority,
|
||||
IN PHW_PRIORITY_ROUTINE PriorityRoutine,
|
||||
IN PVOID Context);
|
||||
|
||||
VOID
|
||||
STREAMAPI
|
||||
StreamClassCompleteRequestAndMarkQueueReady(
|
||||
IN PHW_STREAM_REQUEST_BLOCK Srb
|
||||
);
|
||||
IN PHW_STREAM_REQUEST_BLOCK Srb);
|
||||
|
||||
VOID
|
||||
STREAMAPI
|
||||
StreamClassDebugAssert(
|
||||
IN PCHAR File,
|
||||
IN ULONG Line,
|
||||
IN PCHAR AssertText,
|
||||
IN ULONG AssertValue
|
||||
);
|
||||
IN PCHAR File,
|
||||
IN ULONG Line,
|
||||
IN PCHAR AssertText,
|
||||
IN ULONG AssertValue);
|
||||
|
||||
VOID
|
||||
__cdecl
|
||||
StreamClassDebugPrint(
|
||||
IN STREAM_DEBUG_LEVEL DebugPrintLevel,
|
||||
IN PCCHAR DebugMessage,
|
||||
...
|
||||
);
|
||||
IN STREAM_DEBUG_LEVEL DebugPrintLevel,
|
||||
IN PCCHAR DebugMessage,
|
||||
...);
|
||||
|
||||
VOID
|
||||
__cdecl
|
||||
StreamClassDeviceNotification(
|
||||
IN STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE NotificationType,
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PHW_STREAM_REQUEST_BLOCK pSrb,
|
||||
IN PKSEVENT_ENTRY EventEntry,
|
||||
IN GUID *EventSet,
|
||||
IN ULONG EventId
|
||||
);
|
||||
IN STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE NotificationType,
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PHW_STREAM_REQUEST_BLOCK pSrb,
|
||||
IN PKSEVENT_ENTRY EventEntry,
|
||||
IN GUID *EventSet,
|
||||
IN ULONG EventId);
|
||||
|
||||
VOID
|
||||
STREAMAPI
|
||||
StreamClassFilterReenumerateStreams(
|
||||
IN PVOID HwInstanceExtension,
|
||||
IN ULONG StreamDescriptorSize
|
||||
);
|
||||
IN PVOID HwInstanceExtension,
|
||||
IN ULONG StreamDescriptorSize);
|
||||
|
||||
PVOID
|
||||
STREAMAPI
|
||||
StreamClassGetDmaBuffer(
|
||||
IN PVOID HwDeviceExtension
|
||||
);
|
||||
IN PVOID HwDeviceExtension);
|
||||
|
||||
|
||||
PKSEVENT_ENTRY
|
||||
StreamClassGetNextEvent(
|
||||
IN PVOID HwInstanceExtension_OR_HwDeviceExtension,
|
||||
IN PHW_STREAM_OBJECT HwStreamObject,
|
||||
IN GUID * EventGuid,
|
||||
IN ULONG EventItem,
|
||||
IN PKSEVENT_ENTRY CurrentEvent
|
||||
);
|
||||
IN PVOID HwInstanceExtension_OR_HwDeviceExtension,
|
||||
IN PHW_STREAM_OBJECT HwStreamObject,
|
||||
IN GUID * EventGuid,
|
||||
IN ULONG EventItem,
|
||||
IN PKSEVENT_ENTRY CurrentEvent);
|
||||
|
||||
STREAM_PHYSICAL_ADDRESS
|
||||
STREAMAPI
|
||||
StreamClassGetPhysicalAddress(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PHW_STREAM_REQUEST_BLOCK HwSRB,
|
||||
IN PVOID VirtualAddress,
|
||||
IN STREAM_BUFFER_TYPE Type,
|
||||
IN ULONG * Length
|
||||
);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PHW_STREAM_REQUEST_BLOCK HwSRB,
|
||||
IN PVOID VirtualAddress,
|
||||
IN STREAM_BUFFER_TYPE Type,
|
||||
IN ULONG *Length);
|
||||
|
||||
VOID
|
||||
StreamClassQueryMasterClock(
|
||||
IN PHW_STREAM_OBJECT HwStreamObject,
|
||||
IN HANDLE MasterClockHandle,
|
||||
IN TIME_FUNCTION TimeFunction,
|
||||
IN PHW_QUERY_CLOCK_ROUTINE ClockCallbackRoutine
|
||||
);
|
||||
IN PHW_STREAM_OBJECT HwStreamObject,
|
||||
IN HANDLE MasterClockHandle,
|
||||
IN TIME_FUNCTION TimeFunction,
|
||||
IN PHW_QUERY_CLOCK_ROUTINE ClockCallbackRoutine);
|
||||
|
||||
VOID
|
||||
STREAMAPI
|
||||
StreamClassQueryMasterClockSync(
|
||||
IN HANDLE MasterClockHandle,
|
||||
IN PHW_TIME_CONTEXT TimeContext
|
||||
);
|
||||
IN HANDLE MasterClockHandle,
|
||||
IN PHW_TIME_CONTEXT TimeContext);
|
||||
|
||||
BOOLEAN
|
||||
STREAMAPI
|
||||
StreamClassReadWriteConfig(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN BOOLEAN Read,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length
|
||||
);
|
||||
StreamClassReadWriteConfig(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN BOOLEAN Read,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length);
|
||||
|
||||
VOID
|
||||
STREAMAPI
|
||||
StreamClassReenumerateStreams(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN ULONG StreamDescriptorSize
|
||||
);
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN ULONG StreamDescriptorSize);
|
||||
|
||||
NTSTATUS
|
||||
STREAMAPI
|
||||
StreamClassRegisterAdapter(
|
||||
IN PVOID Argument1,
|
||||
IN PVOID Argument2,
|
||||
IN PHW_INITIALIZATION_DATA HwInitializationData
|
||||
);
|
||||
IN PVOID Argument1,
|
||||
IN PVOID Argument2,
|
||||
IN PHW_INITIALIZATION_DATA HwInitializationData);
|
||||
|
||||
#define StreamClassRegisterMinidriver StreamClassRegisterAdapter
|
||||
|
||||
NTSTATUS
|
||||
StreamClassRegisterFilterWithNoKSPins(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN const GUID * InterfaceClassGUID,
|
||||
IN ULONG PinCount,
|
||||
IN BOOLEAN * PinDirection,
|
||||
IN KSPIN_MEDIUM * MediumList,
|
||||
IN GUID * CategoryList
|
||||
);
|
||||
StreamClassRegisterFilterWithNoKSPins(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN const GUID *InterfaceClassGUID,
|
||||
IN ULONG PinCount,
|
||||
IN BOOLEAN *PinDirection,
|
||||
IN KSPIN_MEDIUM *MediumList,
|
||||
IN GUID *CategoryList);
|
||||
|
||||
VOID
|
||||
STREAMAPI
|
||||
StreamClassScheduleTimer(
|
||||
IN PHW_STREAM_OBJECT StreamObject,
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN ULONG NumberOfMicroseconds,
|
||||
IN PHW_TIMER_ROUTINE TimerRoutine,
|
||||
IN PVOID Context
|
||||
);
|
||||
IN PHW_STREAM_OBJECT StreamObject,
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN ULONG NumberOfMicroseconds,
|
||||
IN PHW_TIMER_ROUTINE TimerRoutine,
|
||||
IN PVOID Context);
|
||||
|
||||
VOID
|
||||
__cdecl
|
||||
StreamClassStreamNotification(
|
||||
IN STREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE NotificationType,
|
||||
IN PHW_STREAM_OBJECT StreamObject,
|
||||
IN ...
|
||||
);
|
||||
IN STREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE NotificationType,
|
||||
IN PHW_STREAM_OBJECT StreamObject,
|
||||
IN ...);
|
||||
|
||||
#endif
|
||||
#endif /* _STREAM_H */
|
||||
|
|
|
@ -6,10 +6,9 @@
|
|||
#define IOCTL_SWENUM_GET_BUS_ID CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x002, METHOD_NEITHER, FILE_READ_ACCESS)
|
||||
|
||||
typedef struct _SWENUM_INSTALL_INTERFACE {
|
||||
GUID DeviceId;
|
||||
GUID InterfaceId;
|
||||
WCHAR ReferenceString[1];
|
||||
|
||||
GUID DeviceId;
|
||||
GUID InterfaceId;
|
||||
WCHAR ReferenceString[1];
|
||||
} SWENUM_INSTALL_INTERFACE, *PSWENUM_INSTALL_INTERFACE;
|
||||
|
||||
#if defined(_KS_)
|
||||
|
@ -17,28 +16,24 @@ typedef struct _SWENUM_INSTALL_INTERFACE {
|
|||
#define BUSID_SoftwareDeviceEnumerator KSMEDIUMSETID_Standard
|
||||
#else
|
||||
#define STATIC_BUSID_SoftwareDeviceEnumerator \
|
||||
0x4747B320L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
||||
#endif
|
||||
0x4747B320L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
||||
#endif /* _KS_ */
|
||||
|
||||
#if defined(_NTDDK_)
|
||||
|
||||
|
||||
#if !defined(_KS_)
|
||||
|
||||
typedef VOID (NTAPI *PFNREFERENCEDEVICEOBJECT)(PVOID Context);
|
||||
typedef VOID (NTAPI *PFNDEREFERENCEDEVICEOBJECT)(PVOID Context);
|
||||
typedef NTSTATUS (NTAPI *PFNQUERYREFERENCESTRING)(PVOID Context, PWCHAR *String);
|
||||
|
||||
#endif
|
||||
#endif /* _KS_ */
|
||||
|
||||
#define BUS_INTERFACE_SWENUM_VERSION 0x100
|
||||
|
||||
typedef struct _BUS_INTERFACE_SWENUM
|
||||
{
|
||||
INTERFACE Interface;
|
||||
PFNREFERENCEDEVICEOBJECT ReferenceDeviceObject;
|
||||
PFNDEREFERENCEDEVICEOBJECT DereferenceDeviceObject;
|
||||
PFNQUERYREFERENCESTRING QueryReferenceString;
|
||||
typedef struct _BUS_INTERFACE_SWENUM {
|
||||
INTERFACE Interface;
|
||||
PFNREFERENCEDEVICEOBJECT ReferenceDeviceObject;
|
||||
PFNDEREFERENCEDEVICEOBJECT DereferenceDeviceObject;
|
||||
PFNQUERYREFERENCESTRING QueryReferenceString;
|
||||
} BUS_INTERFACE_SWENUM, *PBUS_INTERFACE_SWENUM;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
@ -51,103 +46,91 @@ KSDDKAPI
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
KsQuerySoftwareBusInterface(
|
||||
IN PDEVICE_OBJECT PnpDeviceObject,
|
||||
OUT PBUS_INTERFACE_SWENUM BusInterface
|
||||
);
|
||||
IN PDEVICE_OBJECT PnpDeviceObject,
|
||||
OUT PBUS_INTERFACE_SWENUM BusInterface);
|
||||
|
||||
KSDDKAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KsReferenceSoftwareBusObject(
|
||||
IN KSDEVICE_HEADER Header
|
||||
);
|
||||
IN KSDEVICE_HEADER Header);
|
||||
|
||||
KSDDKAPI
|
||||
VOID
|
||||
NTAPI
|
||||
KsDereferenceSoftwareBusObject(
|
||||
IN KSDEVICE_HEADER Header
|
||||
);
|
||||
IN KSDEVICE_HEADER Header);
|
||||
|
||||
KSDDKAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KsCreateBusEnumObject(
|
||||
IN PWSTR BusIdentifier,
|
||||
IN PDEVICE_OBJECT BusDeviceObject,
|
||||
IN PDEVICE_OBJECT PhysicalDeviceObject,
|
||||
IN PDEVICE_OBJECT PnpDeviceObject,
|
||||
IN REFGUID InterfaceGuid,
|
||||
IN PWSTR ServiceRelativePath
|
||||
);
|
||||
IN PWSTR BusIdentifier,
|
||||
IN PDEVICE_OBJECT BusDeviceObject,
|
||||
IN PDEVICE_OBJECT PhysicalDeviceObject,
|
||||
IN PDEVICE_OBJECT PnpDeviceObject,
|
||||
IN REFGUID InterfaceGuid,
|
||||
IN PWSTR ServiceRelativePath);
|
||||
|
||||
KSDDKAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KsGetBusEnumIdentifier(
|
||||
IN OUT PIRP Irp
|
||||
);
|
||||
IN OUT PIRP Irp);
|
||||
|
||||
KSDDKAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KsGetBusEnumPnpDeviceObject(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
OUT PDEVICE_OBJECT *PnpDeviceObject
|
||||
);
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
OUT PDEVICE_OBJECT *PnpDeviceObject);
|
||||
|
||||
KSDDKAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KsInstallBusEnumInterface(
|
||||
IN PIRP Irp
|
||||
);
|
||||
IN PIRP Irp);
|
||||
|
||||
KSDDKAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KsIsBusEnumChildDevice(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
OUT PBOOLEAN ChildDevice
|
||||
);
|
||||
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
OUT PBOOLEAN ChildDevice);
|
||||
|
||||
KSDDKAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KsRemoveBusEnumInterface(
|
||||
IN PIRP Irp
|
||||
);
|
||||
IN PIRP Irp);
|
||||
|
||||
KSDDKAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KsServiceBusEnumPnpRequest(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN OUT PIRP Irp
|
||||
);
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN OUT PIRP Irp);
|
||||
|
||||
KSDDKAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KsServiceBusEnumCreateRequest(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN OUT PIRP Irp
|
||||
);
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN OUT PIRP Irp);
|
||||
|
||||
KSDDKAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KsGetBusEnumParentFDOFromChildPDO(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
OUT PDEVICE_OBJECT *FunctionalDeviceObject
|
||||
);
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
OUT PDEVICE_OBJECT *FunctionalDeviceObject);
|
||||
|
||||
#endif
|
||||
#endif /* _KS_ */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDK_ */
|
||||
|
||||
#endif /* _SWENUM_ */
|
||||
|
|
|
@ -30,17 +30,17 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#if defined(_TDI_)
|
||||
#define TDIKRNLAPI
|
||||
#define TDIKRNLAPI
|
||||
#else
|
||||
#define TDIKRNLAPI DECLSPEC_IMPORT
|
||||
#define TDIKRNLAPI DECLSPEC_IMPORT
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct _TDI_REQUEST_KERNEL {
|
||||
ULONG RequestFlags;
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
|
||||
PVOID RequestSpecific;
|
||||
ULONG RequestFlags;
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
|
||||
PVOID RequestSpecific;
|
||||
} TDI_REQUEST_KERNEL, *PTDI_REQUEST_KERNEL;
|
||||
|
||||
/* Request codes */
|
||||
|
@ -72,7 +72,7 @@ typedef struct _TDI_REQUEST_KERNEL {
|
|||
|
||||
/* TdiAssociateAddress */
|
||||
typedef struct _TDI_REQUEST_KERNEL_ASSOCIATE {
|
||||
HANDLE AddressHandle;
|
||||
HANDLE AddressHandle;
|
||||
} TDI_REQUEST_KERNEL_ASSOCIATE, *PTDI_REQUEST_KERNEL_ASSOCIATE;
|
||||
|
||||
/* TdiDisassociateAddress */
|
||||
|
@ -81,8 +81,8 @@ typedef TDI_REQUEST_KERNEL TDI_REQUEST_KERNEL_DISASSOCIATE,
|
|||
|
||||
/* TdiAccept */
|
||||
typedef struct _TDI_REQUEST_KERNEL_ACCEPT {
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
|
||||
} TDI_REQUEST_KERNEL_ACCEPT, *PTDI_REQUEST_KERNEL_ACCEPT;
|
||||
|
||||
/* TdiConnect */
|
||||
|
@ -99,50 +99,49 @@ typedef TDI_REQUEST_KERNEL TDI_REQUEST_KERNEL_LISTEN,
|
|||
|
||||
/* TdiReceive */
|
||||
typedef struct _TDI_REQUEST_KERNEL_RECEIVE {
|
||||
ULONG ReceiveLength;
|
||||
ULONG ReceiveFlags;
|
||||
ULONG ReceiveLength;
|
||||
ULONG ReceiveFlags;
|
||||
} TDI_REQUEST_KERNEL_RECEIVE, *PTDI_REQUEST_KERNEL_RECEIVE;
|
||||
|
||||
/* TdiReceiveDatagram */
|
||||
typedef struct _TDI_REQUEST_KERNEL_RECEIVEDG {
|
||||
ULONG ReceiveLength;
|
||||
PTDI_CONNECTION_INFORMATION ReceiveDatagramInformation;
|
||||
PTDI_CONNECTION_INFORMATION ReturnDatagramInformation;
|
||||
ULONG ReceiveFlags;
|
||||
ULONG ReceiveLength;
|
||||
PTDI_CONNECTION_INFORMATION ReceiveDatagramInformation;
|
||||
PTDI_CONNECTION_INFORMATION ReturnDatagramInformation;
|
||||
ULONG ReceiveFlags;
|
||||
} TDI_REQUEST_KERNEL_RECEIVEDG, *PTDI_REQUEST_KERNEL_RECEIVEDG;
|
||||
|
||||
/* TdiSend */
|
||||
typedef struct _TDI_REQUEST_KERNEL_SEND {
|
||||
ULONG SendLength;
|
||||
ULONG SendFlags;
|
||||
ULONG SendLength;
|
||||
ULONG SendFlags;
|
||||
} TDI_REQUEST_KERNEL_SEND, *PTDI_REQUEST_KERNEL_SEND;
|
||||
|
||||
/* TdiSendDatagram */
|
||||
typedef struct _TDI_REQUEST_KERNEL_SENDDG {
|
||||
ULONG SendLength;
|
||||
PTDI_CONNECTION_INFORMATION SendDatagramInformation;
|
||||
ULONG SendLength;
|
||||
PTDI_CONNECTION_INFORMATION SendDatagramInformation;
|
||||
} TDI_REQUEST_KERNEL_SENDDG, *PTDI_REQUEST_KERNEL_SENDDG;
|
||||
|
||||
/* TdiSetEventHandler */
|
||||
typedef struct _TDI_REQUEST_KERNEL_SET_EVENT {
|
||||
LONG EventType;
|
||||
PVOID EventHandler;
|
||||
PVOID EventContext;
|
||||
LONG EventType;
|
||||
PVOID EventHandler;
|
||||
PVOID EventContext;
|
||||
} TDI_REQUEST_KERNEL_SET_EVENT, *PTDI_REQUEST_KERNEL_SET_EVENT;
|
||||
|
||||
/* TdiQueryInformation */
|
||||
typedef struct _TDI_REQUEST_KERNEL_QUERY_INFO {
|
||||
LONG QueryType;
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
LONG QueryType;
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
} TDI_REQUEST_KERNEL_QUERY_INFORMATION, *PTDI_REQUEST_KERNEL_QUERY_INFORMATION;
|
||||
|
||||
/* TdiSetInformation */
|
||||
typedef struct _TDI_REQUEST_KERNEL_SET_INFO {
|
||||
LONG SetType;
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
LONG SetType;
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
} TDI_REQUEST_KERNEL_SET_INFORMATION, *PTDI_REQUEST_KERNEL_SET_INFORMATION;
|
||||
|
||||
|
||||
/* Event types */
|
||||
#define TDI_EVENT_CONNECT 0
|
||||
#define TDI_EVENT_DISCONNECT 1
|
||||
|
@ -158,133 +157,133 @@ typedef struct _TDI_REQUEST_KERNEL_SET_INFO {
|
|||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PTDI_IND_CONNECT)(
|
||||
IN PVOID TdiEventContext,
|
||||
IN LONG RemoteAddressLength,
|
||||
IN PVOID RemoteAddress,
|
||||
IN LONG UserDataLength,
|
||||
IN PVOID UserData,
|
||||
IN LONG OptionsLength,
|
||||
IN PVOID Options,
|
||||
OUT CONNECTION_CONTEXT *ConnectionContext,
|
||||
OUT PIRP *AcceptIrp);
|
||||
IN PVOID TdiEventContext,
|
||||
IN LONG RemoteAddressLength,
|
||||
IN PVOID RemoteAddress,
|
||||
IN LONG UserDataLength,
|
||||
IN PVOID UserData,
|
||||
IN LONG OptionsLength,
|
||||
IN PVOID Options,
|
||||
OUT CONNECTION_CONTEXT *ConnectionContext,
|
||||
OUT PIRP *AcceptIrp);
|
||||
|
||||
TDIKRNLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
TdiDefaultConnectHandler(
|
||||
IN PVOID TdiEventContext,
|
||||
IN LONG RemoteAddressLength,
|
||||
IN PVOID RemoteAddress,
|
||||
IN LONG UserDataLength,
|
||||
IN PVOID UserData,
|
||||
IN LONG OptionsLength,
|
||||
IN PVOID Options,
|
||||
IN PVOID TdiEventContext,
|
||||
IN LONG RemoteAddressLength,
|
||||
IN PVOID RemoteAddress,
|
||||
IN LONG UserDataLength,
|
||||
IN PVOID UserData,
|
||||
IN LONG OptionsLength,
|
||||
IN PVOID Options,
|
||||
OUT CONNECTION_CONTEXT *ConnectionContext,
|
||||
OUT PIRP *AcceptIrp);
|
||||
OUT PIRP *AcceptIrp);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PTDI_IND_DISCONNECT)(
|
||||
IN PVOID TdiEventContext,
|
||||
IN CONNECTION_CONTEXT ConnectionContext,
|
||||
IN LONG DisconnectDataLength,
|
||||
IN PVOID DisconnectData,
|
||||
IN LONG DisconnectInformationLength,
|
||||
IN PVOID DisconnectInformation,
|
||||
IN ULONG DisconnectFlags);
|
||||
IN PVOID TdiEventContext,
|
||||
IN CONNECTION_CONTEXT ConnectionContext,
|
||||
IN LONG DisconnectDataLength,
|
||||
IN PVOID DisconnectData,
|
||||
IN LONG DisconnectInformationLength,
|
||||
IN PVOID DisconnectInformation,
|
||||
IN ULONG DisconnectFlags);
|
||||
|
||||
TDIKRNLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
TdiDefaultDisconnectHandler(
|
||||
IN PVOID TdiEventContext,
|
||||
IN CONNECTION_CONTEXT ConnectionContext,
|
||||
IN LONG DisconnectDataLength,
|
||||
IN PVOID DisconnectData,
|
||||
IN LONG DisconnectInformationLength,
|
||||
IN PVOID DisconnectInformation,
|
||||
IN ULONG DisconnectFlags);
|
||||
IN PVOID TdiEventContext,
|
||||
IN CONNECTION_CONTEXT ConnectionContext,
|
||||
IN LONG DisconnectDataLength,
|
||||
IN PVOID DisconnectData,
|
||||
IN LONG DisconnectInformationLength,
|
||||
IN PVOID DisconnectInformation,
|
||||
IN ULONG DisconnectFlags);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PTDI_IND_ERROR)(
|
||||
IN PVOID TdiEventContext,
|
||||
IN NTSTATUS Status);
|
||||
IN PVOID TdiEventContext,
|
||||
IN NTSTATUS Status);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PTDI_IND_ERROR_EX)(
|
||||
IN PVOID TdiEventContext,
|
||||
IN NTSTATUS Status,
|
||||
IN PVOID Buffer);
|
||||
IN PVOID TdiEventContext,
|
||||
IN NTSTATUS Status,
|
||||
IN PVOID Buffer);
|
||||
|
||||
TDIKRNLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
TdiDefaultErrorHandler(
|
||||
IN PVOID TdiEventContext,
|
||||
IN NTSTATUS Status);
|
||||
IN PVOID TdiEventContext,
|
||||
IN NTSTATUS Status);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PTDI_IND_RECEIVE)(
|
||||
IN PVOID TdiEventContext,
|
||||
IN CONNECTION_CONTEXT ConnectionContext,
|
||||
IN ULONG ReceiveFlags,
|
||||
IN ULONG BytesIndicated,
|
||||
IN ULONG BytesAvailable,
|
||||
OUT ULONG *BytesTaken,
|
||||
IN PVOID Tsdu,
|
||||
OUT PIRP *IoRequestPacket);
|
||||
IN PVOID TdiEventContext,
|
||||
IN CONNECTION_CONTEXT ConnectionContext,
|
||||
IN ULONG ReceiveFlags,
|
||||
IN ULONG BytesIndicated,
|
||||
IN ULONG BytesAvailable,
|
||||
OUT ULONG *BytesTaken,
|
||||
IN PVOID Tsdu,
|
||||
OUT PIRP *IoRequestPacket);
|
||||
|
||||
TDIKRNLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
TdiDefaultReceiveHandler(
|
||||
IN PVOID TdiEventContext,
|
||||
IN CONNECTION_CONTEXT ConnectionContext,
|
||||
IN ULONG ReceiveFlags,
|
||||
IN ULONG BytesIndicated,
|
||||
IN ULONG BytesAvailable,
|
||||
OUT ULONG *BytesTaken,
|
||||
IN PVOID Tsdu,
|
||||
OUT PIRP *IoRequestPacket);
|
||||
IN PVOID TdiEventContext,
|
||||
IN CONNECTION_CONTEXT ConnectionContext,
|
||||
IN ULONG ReceiveFlags,
|
||||
IN ULONG BytesIndicated,
|
||||
IN ULONG BytesAvailable,
|
||||
OUT ULONG *BytesTaken,
|
||||
IN PVOID Tsdu,
|
||||
OUT PIRP *IoRequestPacket);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PTDI_IND_RECEIVE_DATAGRAM)(
|
||||
IN PVOID TdiEventContext,
|
||||
IN LONG SourceAddressLength,
|
||||
IN PVOID SourceAddress,
|
||||
IN LONG OptionsLength,
|
||||
IN PVOID Options,
|
||||
IN ULONG ReceiveDatagramFlags,
|
||||
IN ULONG BytesIndicated,
|
||||
IN ULONG BytesAvailable,
|
||||
OUT ULONG *BytesTaken,
|
||||
IN PVOID Tsdu,
|
||||
OUT PIRP *IoRequestPacket);
|
||||
IN PVOID TdiEventContext,
|
||||
IN LONG SourceAddressLength,
|
||||
IN PVOID SourceAddress,
|
||||
IN LONG OptionsLength,
|
||||
IN PVOID Options,
|
||||
IN ULONG ReceiveDatagramFlags,
|
||||
IN ULONG BytesIndicated,
|
||||
IN ULONG BytesAvailable,
|
||||
OUT ULONG *BytesTaken,
|
||||
IN PVOID Tsdu,
|
||||
OUT PIRP *IoRequestPacket);
|
||||
|
||||
TDIKRNLAPI
|
||||
NTSTATUS NTAPI
|
||||
TdiDefaultRcvDatagramHandler(
|
||||
IN PVOID TdiEventContext,
|
||||
IN LONG SourceAddressLength,
|
||||
IN PVOID SourceAddress,
|
||||
IN LONG OptionsLength,
|
||||
IN PVOID Options,
|
||||
IN ULONG ReceiveDatagramFlags,
|
||||
IN ULONG BytesIndicated,
|
||||
IN ULONG BytesAvailable,
|
||||
OUT ULONG *BytesTaken,
|
||||
IN PVOID Tsdu,
|
||||
OUT PIRP *IoRequestPacket);
|
||||
IN PVOID TdiEventContext,
|
||||
IN LONG SourceAddressLength,
|
||||
IN PVOID SourceAddress,
|
||||
IN LONG OptionsLength,
|
||||
IN PVOID Options,
|
||||
IN ULONG ReceiveDatagramFlags,
|
||||
IN ULONG BytesIndicated,
|
||||
IN ULONG BytesAvailable,
|
||||
OUT ULONG *BytesTaken,
|
||||
IN PVOID Tsdu,
|
||||
OUT PIRP *IoRequestPacket);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PTDI_IND_RECEIVE_EXPEDITED)(
|
||||
IN PVOID TdiEventContext,
|
||||
IN CONNECTION_CONTEXT ConnectionContext,
|
||||
IN ULONG ReceiveFlags,
|
||||
IN ULONG BytesIndicated,
|
||||
IN ULONG BytesAvailable,
|
||||
OUT ULONG *BytesTaken,
|
||||
IN PVOID Tsdu,
|
||||
OUT PIRP *IoRequestPacket);
|
||||
IN PVOID TdiEventContext,
|
||||
IN CONNECTION_CONTEXT ConnectionContext,
|
||||
IN ULONG ReceiveFlags,
|
||||
IN ULONG BytesIndicated,
|
||||
IN ULONG BytesAvailable,
|
||||
OUT ULONG *BytesTaken,
|
||||
IN PVOID Tsdu,
|
||||
OUT PIRP *IoRequestPacket);
|
||||
|
||||
TDIKRNLAPI
|
||||
NTSTATUS
|
||||
|
|
|
@ -59,7 +59,7 @@ extern "C" {
|
|||
#define TDI_REQ_ABORTED STATUS_REQUEST_ABORTED
|
||||
#define TDI_BUFFER_TOO_SMALL STATUS_BUFFER_TOO_SMALL
|
||||
#define TDI_CANCELLED STATUS_CANCELLED
|
||||
#define TDI_BUFFER_TOO_BIG STATUS_INVALID_BUFFER_SIZE
|
||||
#define TDI_BUFFER_TOO_BIG STATUS_INVALID_BUFFER_SIZE
|
||||
#define TDI_INVALID_REQUEST STATUS_INVALID_DEVICE_REQUEST
|
||||
#define TDI_PENDING STATUS_PENDING
|
||||
#define TDI_ITEM_NOT_FOUND STATUS_OBJECT_NAME_NOT_FOUND
|
||||
|
@ -67,10 +67,10 @@ extern "C" {
|
|||
#define TDI_STATUS_BAD_VERSION 0xC0010004L
|
||||
#define TDI_STATUS_BAD_CHARACTERISTICS 0xC0010005L
|
||||
|
||||
#define TDI_OPTION_EOL 0
|
||||
#define TDI_OPTION_EOL 0
|
||||
|
||||
#define TDI_ADDRESS_OPTION_REUSE 1
|
||||
#define TDI_ADDRESS_OPTION_DHCP 2
|
||||
#define TDI_ADDRESS_OPTION_REUSE 1
|
||||
#define TDI_ADDRESS_OPTION_DHCP 2
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -28,9 +28,9 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#if defined(_APCUPS_)
|
||||
#define UPSAPI
|
||||
#define UPSAPI
|
||||
#else
|
||||
#define UPSAPI DECLSPEC_IMPORT
|
||||
#define UPSAPI DECLSPEC_IMPORT
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -72,14 +72,14 @@ UPSAPI
|
|||
VOID
|
||||
NTAPI
|
||||
UPSTurnOff(
|
||||
IN DWORD aTurnOffDelay);
|
||||
IN DWORD aTurnOffDelay);
|
||||
|
||||
UPSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
UPSWaitForStateChange(
|
||||
IN DWORD aCurrentState,
|
||||
IN DWORD anInterval);
|
||||
IN DWORD aCurrentState,
|
||||
IN DWORD anInterval);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -67,8 +67,8 @@ typedef BOOLEAN
|
|||
#define USB_BUSIF_USBDI_VERSION_2 0x0002
|
||||
#define USB_BUSIF_USBDI_VERSION_3 0x0003
|
||||
|
||||
DEFINE_GUID(USB_BUS_INTERFACE_USBDI_GUID,
|
||||
0xb1a96a13, 0x3de0, 0x4574, 0x9b, 0x1, 0xc0, 0x8f, 0xea, 0xb3, 0x18, 0xd6);
|
||||
DEFINE_GUID(USB_BUS_INTERFACE_USBDI_GUID,
|
||||
0xb1a96a13, 0x3de0, 0x4574, 0x9b, 0x1, 0xc0, 0x8f, 0xea, 0xb3, 0x18, 0xd6);
|
||||
|
||||
typedef struct _USB_BUS_INTERFACE_USBDI_V0 {
|
||||
USHORT Size;
|
||||
|
@ -109,7 +109,7 @@ typedef struct _USB_BUS_INTERFACE_USBDI_V2 {
|
|||
PUSB_BUSIFFN_ENUM_LOG_ENTRY EnumLogEntry;
|
||||
} USB_BUS_INTERFACE_USBDI_V2, *PUSB_BUS_INTERFACE_USBDI_V2;
|
||||
|
||||
#endif
|
||||
#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_VISTA)
|
||||
|
||||
|
@ -145,8 +145,8 @@ typedef struct _USB_BUS_INTERFACE_USBDI_V3 {
|
|||
PUSB_BUSIFFN_QUERY_CONTROLLER_TYPE QueryControllerType;
|
||||
} USB_BUS_INTERFACE_USBDI_V3, *PUSB_BUS_INTERFACE_USBDI_V3;
|
||||
|
||||
DEFINE_GUID(USB_BUS_INTERFACE_USBC_CONFIGURATION_GUID,
|
||||
0x893b6a96, 0xb7f, 0x4d4d, 0xbd, 0xb4, 0xbb, 0xd4, 0xce, 0xeb, 0xb3, 0x1c);
|
||||
DEFINE_GUID(USB_BUS_INTERFACE_USBC_CONFIGURATION_GUID,
|
||||
0x893b6a96, 0xb7f, 0x4d4d, 0xbd, 0xb4, 0xbb, 0xd4, 0xce, 0xeb, 0xb3, 0x1c);
|
||||
|
||||
#define USBC_FUNCTION_FLAG_APPEND_ID 0x1
|
||||
|
||||
|
@ -194,4 +194,5 @@ typedef struct _USBC_DEVICE_CONFIGURATION_INTERFACE_V1 {
|
|||
PVOID Reserved[7];
|
||||
} USBC_DEVICE_CONFIGURATION_INTERFACE_V1, *PUSBC_DEVICE_CONFIGURATION_INTERFACE_V1;
|
||||
|
||||
#endif
|
||||
#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
|
||||
|
||||
|
|
|
@ -5,116 +5,108 @@ typedef struct _USBD_INTERFACE_LIST_ENTRY {
|
|||
PUSBD_INTERFACE_INFORMATION Interface;
|
||||
} USBD_INTERFACE_LIST_ENTRY, *PUSBD_INTERFACE_LIST_ENTRY;
|
||||
|
||||
#define UsbBuildInterruptOrBulkTransferRequest(urb,length, pipeHandle, transferBuffer, transferBufferMDL, transferBufferLength, transferFlags, link) \
|
||||
{ \
|
||||
(urb)->UrbHeader.Function = URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER; \
|
||||
(urb)->UrbHeader.Length = (length); \
|
||||
(urb)->UrbBulkOrInterruptTransfer.PipeHandle = (pipeHandle); \
|
||||
(urb)->UrbBulkOrInterruptTransfer.TransferBufferLength = (transferBufferLength); \
|
||||
(urb)->UrbBulkOrInterruptTransfer.TransferBufferMDL = (transferBufferMDL); \
|
||||
(urb)->UrbBulkOrInterruptTransfer.TransferBuffer = (transferBuffer); \
|
||||
(urb)->UrbBulkOrInterruptTransfer.TransferFlags = (transferFlags); \
|
||||
(urb)->UrbBulkOrInterruptTransfer.UrbLink = (link); \
|
||||
#define UsbBuildInterruptOrBulkTransferRequest(urb,length, pipeHandle, transferBuffer, transferBufferMDL, transferBufferLength, transferFlags, link) { \
|
||||
(urb)->UrbHeader.Function = URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER; \
|
||||
(urb)->UrbHeader.Length = (length); \
|
||||
(urb)->UrbBulkOrInterruptTransfer.PipeHandle = (pipeHandle); \
|
||||
(urb)->UrbBulkOrInterruptTransfer.TransferBufferLength = (transferBufferLength); \
|
||||
(urb)->UrbBulkOrInterruptTransfer.TransferBufferMDL = (transferBufferMDL); \
|
||||
(urb)->UrbBulkOrInterruptTransfer.TransferBuffer = (transferBuffer); \
|
||||
(urb)->UrbBulkOrInterruptTransfer.TransferFlags = (transferFlags); \
|
||||
(urb)->UrbBulkOrInterruptTransfer.UrbLink = (link); \
|
||||
}
|
||||
|
||||
#define UsbBuildGetDescriptorRequest(urb, length, descriptorType, descriptorIndex, languageId, transferBuffer, transferBufferMDL, transferBufferLength, link) \
|
||||
{ \
|
||||
(urb)->UrbHeader.Function = URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE; \
|
||||
(urb)->UrbHeader.Length = (length); \
|
||||
(urb)->UrbControlDescriptorRequest.TransferBufferLength = (transferBufferLength); \
|
||||
(urb)->UrbControlDescriptorRequest.TransferBufferMDL = (transferBufferMDL); \
|
||||
(urb)->UrbControlDescriptorRequest.TransferBuffer = (transferBuffer); \
|
||||
(urb)->UrbControlDescriptorRequest.DescriptorType = (descriptorType); \
|
||||
(urb)->UrbControlDescriptorRequest.Index = (descriptorIndex); \
|
||||
(urb)->UrbControlDescriptorRequest.LanguageId = (languageId); \
|
||||
(urb)->UrbControlDescriptorRequest.UrbLink = (link); \
|
||||
#define UsbBuildGetDescriptorRequest(urb, length, descriptorType, descriptorIndex, languageId, transferBuffer, transferBufferMDL, transferBufferLength, link) { \
|
||||
(urb)->UrbHeader.Function = URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE; \
|
||||
(urb)->UrbHeader.Length = (length); \
|
||||
(urb)->UrbControlDescriptorRequest.TransferBufferLength = (transferBufferLength); \
|
||||
(urb)->UrbControlDescriptorRequest.TransferBufferMDL = (transferBufferMDL); \
|
||||
(urb)->UrbControlDescriptorRequest.TransferBuffer = (transferBuffer); \
|
||||
(urb)->UrbControlDescriptorRequest.DescriptorType = (descriptorType); \
|
||||
(urb)->UrbControlDescriptorRequest.Index = (descriptorIndex); \
|
||||
(urb)->UrbControlDescriptorRequest.LanguageId = (languageId); \
|
||||
(urb)->UrbControlDescriptorRequest.UrbLink = (link); \
|
||||
}
|
||||
|
||||
#define UsbBuildGetStatusRequest(urb, op, index, transferBuffer, transferBufferMDL, link) \
|
||||
{ \
|
||||
(urb)->UrbHeader.Function = (op); \
|
||||
(urb)->UrbHeader.Length = sizeof(struct _URB_CONTROL_GET_STATUS_REQUEST); \
|
||||
(urb)->UrbControlGetStatusRequest.TransferBufferLength = sizeof(USHORT); \
|
||||
(urb)->UrbControlGetStatusRequest.TransferBufferMDL = (transferBufferMDL); \
|
||||
(urb)->UrbControlGetStatusRequest.TransferBuffer = (transferBuffer); \
|
||||
(urb)->UrbControlGetStatusRequest.Index = (index); \
|
||||
(urb)->UrbControlGetStatusRequest.UrbLink = (link); \
|
||||
#define UsbBuildGetStatusRequest(urb, op, index, transferBuffer, transferBufferMDL, link) { \
|
||||
(urb)->UrbHeader.Function = (op); \
|
||||
(urb)->UrbHeader.Length = sizeof(struct _URB_CONTROL_GET_STATUS_REQUEST); \
|
||||
(urb)->UrbControlGetStatusRequest.TransferBufferLength = sizeof(USHORT); \
|
||||
(urb)->UrbControlGetStatusRequest.TransferBufferMDL = (transferBufferMDL); \
|
||||
(urb)->UrbControlGetStatusRequest.TransferBuffer = (transferBuffer); \
|
||||
(urb)->UrbControlGetStatusRequest.Index = (index); \
|
||||
(urb)->UrbControlGetStatusRequest.UrbLink = (link); \
|
||||
}
|
||||
|
||||
#define UsbBuildFeatureRequest(urb, op, featureSelector, index, link) \
|
||||
{ \
|
||||
(urb)->UrbHeader.Function = (op); \
|
||||
(urb)->UrbHeader.Length = sizeof(struct _URB_CONTROL_FEATURE_REQUEST); \
|
||||
(urb)->UrbControlFeatureRequest.FeatureSelector = (featureSelector); \
|
||||
(urb)->UrbControlFeatureRequest.Index = (index); \
|
||||
(urb)->UrbControlFeatureRequest.UrbLink = (link); \
|
||||
#define UsbBuildFeatureRequest(urb, op, featureSelector, index, link) { \
|
||||
(urb)->UrbHeader.Function = (op); \
|
||||
(urb)->UrbHeader.Length = sizeof(struct _URB_CONTROL_FEATURE_REQUEST); \
|
||||
(urb)->UrbControlFeatureRequest.FeatureSelector = (featureSelector); \
|
||||
(urb)->UrbControlFeatureRequest.Index = (index); \
|
||||
(urb)->UrbControlFeatureRequest.UrbLink = (link); \
|
||||
}
|
||||
|
||||
#define UsbBuildSelectConfigurationRequest(urb, length, configurationDescriptor) \
|
||||
{ \
|
||||
(urb)->UrbHeader.Function = URB_FUNCTION_SELECT_CONFIGURATION; \
|
||||
(urb)->UrbHeader.Length = (length); \
|
||||
(urb)->UrbSelectConfiguration.ConfigurationDescriptor = (configurationDescriptor); \
|
||||
#define UsbBuildSelectConfigurationRequest(urb, length, configurationDescriptor) { \
|
||||
(urb)->UrbHeader.Function = URB_FUNCTION_SELECT_CONFIGURATION; \
|
||||
(urb)->UrbHeader.Length = (length); \
|
||||
(urb)->UrbSelectConfiguration.ConfigurationDescriptor = (configurationDescriptor); \
|
||||
}
|
||||
|
||||
#define UsbBuildSelectInterfaceRequest(urb, length, configurationHandle, interfaceNumber, alternateSetting) \
|
||||
{ \
|
||||
(urb)->UrbHeader.Function = URB_FUNCTION_SELECT_INTERFACE; \
|
||||
(urb)->UrbHeader.Length = (length); \
|
||||
(urb)->UrbSelectInterface.Interface.AlternateSetting = (alternateSetting); \
|
||||
(urb)->UrbSelectInterface.Interface.InterfaceNumber = (interfaceNumber); \
|
||||
(urb)->UrbSelectInterface.Interface.Length = (length - sizeof(struct _URB_HEADER) - sizeof(USBD_CONFIGURATION_HANDLE)); \
|
||||
(urb)->UrbSelectInterface.ConfigurationHandle = (configurationHandle); \
|
||||
#define UsbBuildSelectInterfaceRequest(urb, length, configurationHandle, interfaceNumber, alternateSetting) { \
|
||||
(urb)->UrbHeader.Function = URB_FUNCTION_SELECT_INTERFACE; \
|
||||
(urb)->UrbHeader.Length = (length); \
|
||||
(urb)->UrbSelectInterface.Interface.AlternateSetting = (alternateSetting); \
|
||||
(urb)->UrbSelectInterface.Interface.InterfaceNumber = (interfaceNumber); \
|
||||
(urb)->UrbSelectInterface.Interface.Length = (length - sizeof(struct _URB_HEADER) - sizeof(USBD_CONFIGURATION_HANDLE)); \
|
||||
(urb)->UrbSelectInterface.ConfigurationHandle = (configurationHandle); \
|
||||
}
|
||||
|
||||
#define UsbBuildVendorRequest(urb, cmd, length, transferFlags, reservedbits, request, value, index, transferBuffer, transferBufferMDL, transferBufferLength, link) \
|
||||
{ \
|
||||
(urb)->UrbHeader.Function = cmd; \
|
||||
(urb)->UrbHeader.Length = (length); \
|
||||
(urb)->UrbControlVendorClassRequest.TransferBufferLength = (transferBufferLength); \
|
||||
(urb)->UrbControlVendorClassRequest.TransferBufferMDL = (transferBufferMDL); \
|
||||
(urb)->UrbControlVendorClassRequest.TransferBuffer = (transferBuffer); \
|
||||
(urb)->UrbControlVendorClassRequest.RequestTypeReservedBits = (reservedbits); \
|
||||
(urb)->UrbControlVendorClassRequest.Request = (request); \
|
||||
(urb)->UrbControlVendorClassRequest.Value = (value); \
|
||||
(urb)->UrbControlVendorClassRequest.Index = (index); \
|
||||
(urb)->UrbControlVendorClassRequest.TransferFlags = (transferFlags); \
|
||||
(urb)->UrbControlVendorClassRequest.UrbLink = (link); \
|
||||
#define UsbBuildVendorRequest(urb, cmd, length, transferFlags, reservedbits, request, value, index, transferBuffer, transferBufferMDL, transferBufferLength, link) { \
|
||||
(urb)->UrbHeader.Function = cmd; \
|
||||
(urb)->UrbHeader.Length = (length); \
|
||||
(urb)->UrbControlVendorClassRequest.TransferBufferLength = (transferBufferLength); \
|
||||
(urb)->UrbControlVendorClassRequest.TransferBufferMDL = (transferBufferMDL); \
|
||||
(urb)->UrbControlVendorClassRequest.TransferBuffer = (transferBuffer); \
|
||||
(urb)->UrbControlVendorClassRequest.RequestTypeReservedBits = (reservedbits); \
|
||||
(urb)->UrbControlVendorClassRequest.Request = (request); \
|
||||
(urb)->UrbControlVendorClassRequest.Value = (value); \
|
||||
(urb)->UrbControlVendorClassRequest.Index = (index); \
|
||||
(urb)->UrbControlVendorClassRequest.TransferFlags = (transferFlags); \
|
||||
(urb)->UrbControlVendorClassRequest.UrbLink = (link); \
|
||||
}
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
|
||||
#define UsbBuildOsFeatureDescriptorRequest(urb, length, interface, index, transferBuffer, transferBufferMDL, transferBufferLength, link) \
|
||||
{ \
|
||||
(urb)->UrbHeader.Function = URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR; \
|
||||
(urb)->UrbHeader.Length = (length); \
|
||||
(urb)->UrbOSFeatureDescriptorRequest.TransferBufferLength = (transferBufferLength); \
|
||||
(urb)->UrbOSFeatureDescriptorRequest.TransferBufferMDL = (transferBufferMDL); \
|
||||
(urb)->UrbOSFeatureDescriptorRequest.TransferBuffer = (transferBuffer); \
|
||||
(urb)->UrbOSFeatureDescriptorRequest.InterfaceNumber = (interface); \
|
||||
(urb)->UrbOSFeatureDescriptorRequest.MS_FeatureDescriptorIndex = (index); \
|
||||
(urb)->UrbOSFeatureDescriptorRequest.UrbLink = (link); \
|
||||
#define UsbBuildOsFeatureDescriptorRequest(urb, length, interface, index, transferBuffer, transferBufferMDL, transferBufferLength, link) { \
|
||||
(urb)->UrbHeader.Function = URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR; \
|
||||
(urb)->UrbHeader.Length = (length); \
|
||||
(urb)->UrbOSFeatureDescriptorRequest.TransferBufferLength = (transferBufferLength); \
|
||||
(urb)->UrbOSFeatureDescriptorRequest.TransferBufferMDL = (transferBufferMDL); \
|
||||
(urb)->UrbOSFeatureDescriptorRequest.TransferBuffer = (transferBuffer); \
|
||||
(urb)->UrbOSFeatureDescriptorRequest.InterfaceNumber = (interface); \
|
||||
(urb)->UrbOSFeatureDescriptorRequest.MS_FeatureDescriptorIndex = (index); \
|
||||
urb)->UrbOSFeatureDescriptorRequest.UrbLink = (link); \
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* NTDDI_VERSION >= NTDDI_WINXP */
|
||||
|
||||
#define URB_STATUS(urb) ((urb)->UrbHeader.Status)
|
||||
#define URB_STATUS(urb) ((urb)->UrbHeader.Status)
|
||||
|
||||
#define GET_SELECT_CONFIGURATION_REQUEST_SIZE(totalInterfaces, totalPipes) \
|
||||
(sizeof(struct _URB_SELECT_CONFIGURATION) + \
|
||||
((totalInterfaces-1) * sizeof(USBD_INTERFACE_INFORMATION)) + \
|
||||
((totalPipes-totalInterfaces)*sizeof(USBD_PIPE_INFORMATION)))
|
||||
#define GET_SELECT_CONFIGURATION_REQUEST_SIZE(totalInterfaces, totalPipes) \
|
||||
(sizeof(struct _URB_SELECT_CONFIGURATION) + \
|
||||
((totalInterfaces-1) * sizeof(USBD_INTERFACE_INFORMATION)) + \
|
||||
((totalPipes-totalInterfaces)*sizeof(USBD_PIPE_INFORMATION)))
|
||||
|
||||
#define GET_SELECT_INTERFACE_REQUEST_SIZE(totalPipes) \
|
||||
(sizeof(struct _URB_SELECT_INTERFACE) + \
|
||||
((totalPipes-1)*sizeof(USBD_PIPE_INFORMATION)))
|
||||
#define GET_SELECT_INTERFACE_REQUEST_SIZE(totalPipes) \
|
||||
(sizeof(struct _URB_SELECT_INTERFACE) + \
|
||||
((totalPipes-1)*sizeof(USBD_PIPE_INFORMATION)))
|
||||
|
||||
#define GET_USBD_INTERFACE_SIZE(numEndpoints) (sizeof(USBD_INTERFACE_INFORMATION) + \
|
||||
(sizeof(USBD_PIPE_INFORMATION)*(numEndpoints)) \
|
||||
- sizeof(USBD_PIPE_INFORMATION))
|
||||
#define GET_USBD_INTERFACE_SIZE(numEndpoints) \
|
||||
(sizeof(USBD_INTERFACE_INFORMATION) + \
|
||||
(sizeof(USBD_PIPE_INFORMATION)*(numEndpoints)) - sizeof(USBD_PIPE_INFORMATION))
|
||||
|
||||
#define GET_ISO_URB_SIZE(n) (sizeof(struct _URB_ISOCH_TRANSFER)+ \
|
||||
sizeof(USBD_ISO_PACKET_DESCRIPTOR)*n)
|
||||
#define GET_ISO_URB_SIZE(n) (sizeof(struct _URB_ISOCH_TRANSFER)+ \
|
||||
sizeof(USBD_ISO_PACKET_DESCRIPTOR)*n)
|
||||
|
||||
#ifndef _USBD_
|
||||
|
||||
|
@ -224,4 +216,5 @@ USBD_ValidateConfigurationDescriptor(
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* ! _USBD_ */
|
||||
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
#define USB_SPEC 0x0200
|
||||
#define HID_SPEC 0x0101
|
||||
|
||||
#define USB_20_SPEC 0x0200
|
||||
#define USB_11_SPEC 0x0110
|
||||
#define USB_10_SPEC 0x0100
|
||||
#define USB_20_SPEC 0x0200
|
||||
#define USB_11_SPEC 0x0110
|
||||
#define USB_10_SPEC 0x0100
|
||||
|
||||
#define HID_MAX_PACKET_SIZE0 0x08
|
||||
#define MICROSOFT_VENDOR_ID 0x045E
|
||||
|
@ -81,7 +81,9 @@
|
|||
#define RCPT_RPIPE 5
|
||||
|
||||
#if !defined(MIDL_PASS)
|
||||
#define USB_MAKE_REQUEST_TYPE(direction, type, recipient) (BYTE)( ((BYTE)direction << 7) | ((BYTE)type << 5) | ((BYTE)recipient & 0x07) )
|
||||
#define USB_MAKE_REQUEST_TYPE(direction, type, recipient) \
|
||||
(BYTE)( ((BYTE)direction << 7) | \
|
||||
((BYTE)type << 5) | ((BYTE)recipient & 0x07) )
|
||||
#endif
|
||||
|
||||
#define GET_STATUS 0
|
||||
|
@ -207,7 +209,8 @@
|
|||
#define EP_OUT 0
|
||||
#define EP_IN 1
|
||||
|
||||
#define MAKE_ENDPOINT_ADDRESS(num, dir) ( ((BYTE)(dir) << 7) | ((BYTE)(num) & 0x0F) )
|
||||
#define MAKE_ENDPOINT_ADDRESS(num, dir) \
|
||||
( ((BYTE)(dir) << 7) | ((BYTE)(num) & 0x0F) )
|
||||
|
||||
#define ENDPOINT_TYPE 0x03
|
||||
#define CONTROL_ENDPOINT 0
|
||||
|
@ -501,7 +504,8 @@ typedef struct _USBHUBPORTDATA {
|
|||
USBHUBPORTSTATUSCHANGE PortStatusChange;
|
||||
} USBHUBPORTDATA;
|
||||
|
||||
#define USB_MAKE_LANGID(lang, sublang) ((((USHORT)(sublang)) << 10) | (USHORT)(lang))
|
||||
#define USB_MAKE_LANGID(lang, sublang) \
|
||||
((((USHORT)(sublang)) << 10) | (USHORT)(lang))
|
||||
|
||||
#define USB_LANG_RESERVED 0x00
|
||||
#define USB_LANG_ARABIC 0x01
|
||||
|
@ -672,6 +676,6 @@ typedef struct _USBHUBPORTDATA {
|
|||
#define USB_SUBLANG_HID_VENDOR_DEFINED_3 0x3e
|
||||
#define USB_SUBLANG_HID_VENDOR_DEFINED_4 0x3f
|
||||
|
||||
#endif // !defined(MIDL_PASS)
|
||||
#endif /* !defined(MIDL_PASS) */
|
||||
|
||||
#include <poppack.h>
|
||||
|
|
|
@ -30,7 +30,7 @@ typedef NTSTATUS
|
|||
OUT PUNICODE_STRING *RegistryPath OPTIONAL,
|
||||
IN OUT PUNICODE_STRING MofResourceName,
|
||||
OUT PDEVICE_OBJECT *Pdo OPTIONAL);
|
||||
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PWMI_FUNCTION_CONTROL) (
|
||||
IN OUT PDEVICE_OBJECT DeviceObject,
|
||||
|
|
Loading…
Reference in a new issue