DDK update

- Add devioctl.h
- miniport.h: fix include guard and add more stuff
- video.h: fix include guard, remove VideoDebugprint prototype
- videoagp.h: fix include guard
-winddi.h: fix include guard, add some defines and some function pointer types
- guiddef.h: add definition of EXTERN_C

svn path=/trunk/; revision=40383
This commit is contained in:
Timo Kreuzer 2009-04-06 01:21:04 +00:00
parent 3a3b09ba86
commit 468227f96a
6 changed files with 372 additions and 29 deletions

View file

@ -0,0 +1,106 @@
/*
* devioctl.h
*
* IOCTL definitions
*
* This file is part of the ReactOS ddk.
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef _DEVIOCTL_
#define _DEVIOCTL_
/* DEVICE_OBJECT.DeviceType */
#define DEVICE_TYPE ULONG
#define FILE_DEVICE_BEEP 0x00000001
#define FILE_DEVICE_CD_ROM 0x00000002
#define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003
#define FILE_DEVICE_CONTROLLER 0x00000004
#define FILE_DEVICE_DATALINK 0x00000005
#define FILE_DEVICE_DFS 0x00000006
#define FILE_DEVICE_DISK 0x00000007
#define FILE_DEVICE_DISK_FILE_SYSTEM 0x00000008
#define FILE_DEVICE_FILE_SYSTEM 0x00000009
#define FILE_DEVICE_INPORT_PORT 0x0000000a
#define FILE_DEVICE_KEYBOARD 0x0000000b
#define FILE_DEVICE_MAILSLOT 0x0000000c
#define FILE_DEVICE_MIDI_IN 0x0000000d
#define FILE_DEVICE_MIDI_OUT 0x0000000e
#define FILE_DEVICE_MOUSE 0x0000000f
#define FILE_DEVICE_MULTI_UNC_PROVIDER 0x00000010
#define FILE_DEVICE_NAMED_PIPE 0x00000011
#define FILE_DEVICE_NETWORK 0x00000012
#define FILE_DEVICE_NETWORK_BROWSER 0x00000013
#define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
#define FILE_DEVICE_NULL 0x00000015
#define FILE_DEVICE_PARALLEL_PORT 0x00000016
#define FILE_DEVICE_PHYSICAL_NETCARD 0x00000017
#define FILE_DEVICE_PRINTER 0x00000018
#define FILE_DEVICE_SCANNER 0x00000019
#define FILE_DEVICE_SERIAL_MOUSE_PORT 0x0000001a
#define FILE_DEVICE_SERIAL_PORT 0x0000001b
#define FILE_DEVICE_SCREEN 0x0000001c
#define FILE_DEVICE_SOUND 0x0000001d
#define FILE_DEVICE_STREAMS 0x0000001e
#define FILE_DEVICE_TAPE 0x0000001f
#define FILE_DEVICE_TAPE_FILE_SYSTEM 0x00000020
#define FILE_DEVICE_TRANSPORT 0x00000021
#define FILE_DEVICE_UNKNOWN 0x00000022
#define FILE_DEVICE_VIDEO 0x00000023
#define FILE_DEVICE_VIRTUAL_DISK 0x00000024
#define FILE_DEVICE_WAVE_IN 0x00000025
#define FILE_DEVICE_WAVE_OUT 0x00000026
#define FILE_DEVICE_8042_PORT 0x00000027
#define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028
#define FILE_DEVICE_BATTERY 0x00000029
#define FILE_DEVICE_BUS_EXTENDER 0x0000002a
#define FILE_DEVICE_MODEM 0x0000002b
#define FILE_DEVICE_VDM 0x0000002c
#define FILE_DEVICE_MASS_STORAGE 0x0000002d
#define FILE_DEVICE_SMB 0x0000002e
#define FILE_DEVICE_KS 0x0000002f
#define FILE_DEVICE_CHANGER 0x00000030
#define FILE_DEVICE_SMARTCARD 0x00000031
#define FILE_DEVICE_ACPI 0x00000032
#define FILE_DEVICE_DVD 0x00000033
#define FILE_DEVICE_FULLSCREEN_VIDEO 0x00000034
#define FILE_DEVICE_DFS_FILE_SYSTEM 0x00000035
#define FILE_DEVICE_DFS_VOLUME 0x00000036
#define FILE_DEVICE_SERENUM 0x00000037
#define FILE_DEVICE_TERMSRV 0x00000038
#define FILE_DEVICE_KSEC 0x00000039
#define FILE_DEVICE_FIPS 0x0000003a
#define CTL_CODE(DeviceType, Function, Method, Access)( \
((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))
#define DEVICE_TYPE_FROM_CTL_CODE(ctl) (((ULONG) (ctl & 0xffff0000)) >> 16)
#define METHOD_FROM_CTL_CODE(ctrlCode) ((ULONG)((ctrlCode) & 3))
#define METHOD_BUFFERED 0
#define METHOD_IN_DIRECT 1
#define METHOD_OUT_DIRECT 2
#define METHOD_NEITHER 3
#define METHOD_DIRECT_TO_HARDWARE METHOD_IN_DIRECT
#define METHOD_DIRECT_FROM_HARDWARE METHOD_OUT_DIRECT
#define FILE_ANY_ACCESS 0x00000000
#define FILE_SPECIAL_ACCESS FILE_ANY_ACCESS
#define FILE_READ_ACCESS 0x00000001
#define FILE_WRITE_ACCESS 0x00000002
#endif /* !_DEVIOCTL_ */

View file

@ -20,13 +20,49 @@
*
*/
#ifndef __MINIPORT_H
#define __MINIPORT_H
#ifndef _MINIPORT_
#define _MINIPORT_
#include <ntdef.h>
#include <stddef.h>
#include <basetsd.h>
#include <sdkddkver.h>
#include <guiddef.h>
#ifdef __cplusplus
extern "C" {
#endif
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;
typedef enum _KINTERRUPT_MODE
{
LevelSensitive,
Latched
} KINTERRUPT_MODE, *PKINTERRUPT_MODE;
#define EMULATOR_READ_ACCESS 0x01
#define EMULATOR_WRITE_ACCESS 0x02
@ -36,7 +72,6 @@ typedef enum _EMULATOR_PORT_ACCESS_TYPE {
Ulong
} EMULATOR_PORT_ACCESS_TYPE, *PEMULATOR_PORT_ACCESS_TYPE;
typedef struct _EMULATOR_ACCESS_ENTRY {
ULONG BasePort;
ULONG NumConsecutivePorts;
@ -58,6 +93,170 @@ typedef struct _VIDEO_ACCESS_RANGE {
} VIDEO_ACCESS_RANGE, *PVIDEO_ACCESS_RANGE;
#endif
typedef VOID (*PINTERFACE_REFERENCE)(PVOID Context);
typedef VOID (*PINTERFACE_DEREFERENCE)(PVOID Context);
typedef struct _INTERFACE
{
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
} IRQ_DEVICE_POLICY, *PIRQ_DEVICE_POLICY;
typedef enum _IRQ_PRIORITY
{
IrqPriorityUndefined = 0,
IrqPriorityLow,
IrqPriorityNormal,
IrqPriorityHigh
} IRQ_PRIORITY, *PIRQ_PRIORITY;
typedef enum _DMA_WIDTH
{
Width8Bits,
Width16Bits,
Width32Bits,
MaximumDmaWidth
} DMA_WIDTH, *PDMA_WIDTH;
typedef enum _DMA_SPEED
{
Compatible,
TypeA,
TypeB,
TypeC,
TypeF,
MaximumDmaSpeed
} DMA_SPEED, *PDMA_SPEED;
#pragma pack(push,4)
typedef enum _BUS_DATA_TYPE
{
ConfigurationSpaceUndefined = -1,
Cmos,
EisaConfiguration,
Pos,
CbusConfiguration,
PCIConfiguration,
VMEConfiguration,
NuBusConfiguration,
PCMCIAConfiguration,
MPIConfiguration,
MPSAConfiguration,
PNPISAConfiguration,
SgiInternalConfiguration,
MaximumBusDataType
} BUS_DATA_TYPE, *PBUS_DATA_TYPE;
#pragma pack(pop)
typedef struct _IO_RESOURCE_DESCRIPTOR
{
UCHAR Option;
UCHAR Type;
UCHAR ShareDisposition;
UCHAR Spare1;
USHORT Flags;
USHORT Spare2;
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;
struct
{
ULONG Length;
ULONG MinBusNumber;
ULONG MaxBusNumber;
ULONG Reserved;
} BusNumber;
struct
{
ULONG Priority;
ULONG Reserved1;
ULONG Reserved2;
} ConfigData;
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;
typedef VOID DDKAPI
(*PBANKED_SECTION_ROUTINE)(
IN ULONG ReadBank,

View file

@ -20,10 +20,10 @@
*
*/
#ifndef __VIDEO_H
#define __VIDEO_H
#ifndef __VIDEO_H__
#define __VIDEO_H__
#ifdef __WINDDI_H
#ifdef _WINDDI_
#error winddi.h cannot be included with video.h
#else
@ -629,14 +629,6 @@ typedef struct _VPOSVERSIONINFO {
/* Video port functions for miniports */
VPAPI
VOID
DDKAPI
VideoDebugPrint(
IN ULONG DebugPrintLevel,
IN PCHAR DebugMessage,
IN ...);
VPAPI
VOID
DDKAPI
@ -1558,6 +1550,6 @@ VideoPortZeroMemory(
}
#endif
#endif /* defined __WINDDI_H */
#endif /* defined _WINDDI_ */
#endif /* __VIDEO_H */
#endif /* __VIDEO_H__ */

View file

@ -20,8 +20,8 @@
*
*/
#ifndef __VIDEOAGP_H
#define __VIDEOAGP_H
#ifndef __VIDEOAGP_H__
#define __VIDEOAGP_H__
#include "video.h"
@ -120,4 +120,4 @@ VideoPortGetAgpServices(
}
#endif
#endif /* __VIDEOAGP_H */
#endif /* __VIDEOAGP_H__ */

View file

@ -20,10 +20,10 @@
*
*/
#ifndef __WINDDI_H
#define __WINDDI_H
#ifndef _WINDDI_
#define _WINDDI_
#ifdef __VIDEO_H
#ifdef __VIDEO_H__
#error video.h cannot be included with winddi.h
#else
@ -114,6 +114,12 @@ typedef struct _ENG_EVENT *PEVENT;
#define GX_SCALE 2
#define GX_GENERAL 3
#define LTOFX(x) ((x) << 4)
#define FXTOL(x) ((x) >> 4)
#define FXTOLFLOOR(x) ((x) >> 4)
#define FXTOLCEILING(x) ((x + 0x0F) >> 4)
#define FXTOLROUND(x) ((((x) >> 3) + 1) >> 1)
typedef struct _POINTE {
FLOATL x;
FLOATL y;
@ -802,7 +808,7 @@ typedef struct _GDIINFO {
typedef struct _PATHDATA {
FLONG flags;
ULONG count;
POINTFIX *glypptfx;
POINTFIX *pptfx;
} PATHDATA, *PPATHDATA;
/* PATHOBJ.fl constants */
@ -3636,21 +3642,20 @@ typedef BOOL
IN ULONG iEngineVersion,
IN ULONG cj,
OUT DRVENABLEDATA *pded);
#if 0
typedef DHPDEV
typedef DHPDEV
(APIENTRY *PFN_DrvEnablePDEV)(
IN DEVMODEW *pdm,
IN LPWSTR pwszLogAddress,
IN ULONG cPat,
OUT HSURF *phsurfPatterns,
IN ULONG cjCaps,
OUT ULONG *pdevcaps,
GDIINFO *pdevcaps,
IN ULONG cjDevInfo,
OUT DEVINFO *pdi,
IN HDEV hdev,
IN LPWSTR pwszDeviceName,
IN HANDLE hDriver);
#endif
typedef HSURF
(APIENTRY *PFN_DrvEnableSurface)(
@ -4095,6 +4100,10 @@ APIENTRY
DrvDisableDirectDraw(
IN DHPDEV dhpdev);
typedef VOID
(APIENTRY *PFN_DrvDisableDirectDraw)(
IN DHPDEV dhpdev);
WIN32KAPI
BOOL
APIENTRY
@ -4104,6 +4113,13 @@ DrvEnableDirectDraw(
OUT DD_SURFACECALLBACKS *pSurfaceCallBacks,
OUT DD_PALETTECALLBACKS *pPaletteCallBacks);
typedef BOOL
(APIENTRY *PFN_DrvEnableDirectDraw)(
IN DHPDEV dhpdev,
OUT DD_CALLBACKS *pCallBacks,
OUT DD_SURFACECALLBACKS *pSurfaceCallBacks,
OUT DD_PALETTECALLBACKS *pPaletteCallBacks);
WIN32KAPI
BOOL
APIENTRY
@ -4115,10 +4131,32 @@ DrvGetDirectDrawInfo(
OUT DWORD *pdwNumFourCCCodes,
OUT DWORD *pdwFourCC);
typedef BOOL
(APIENTRY *PFN_DrvGetDirectDrawInfo)(
IN DHPDEV dhpdev,
OUT DD_HALINFO *pHalInfo,
OUT DWORD *pdwNumHeaps,
OUT VIDEOMEMORY *pvmList,
OUT DWORD *pdwNumFourCCCodes,
OUT DWORD *pdwFourCC);
//DECLSPEC_DEPRECATED_DDK
BOOL
APIENTRY
DrvQuerySpoolType(
IN DHPDEV dhpdev,
IN LPWSTR pwchType);
typedef BOOL
(APIENTRY *PFN_DrvQuerySpoolType)(
IN DHPDEV dhpdev,
IN LPWSTR pwchType);
#ifdef __cplusplus
}
#endif
#endif /* defined __VIDEO_H */
#endif /* defined __VIDEO_H__ */
#endif /* __WINDDI_H */
#endif /* _WINDDI_ */

View file

@ -35,6 +35,14 @@ typedef struct _GUID
#define DECLSPEC_SELECTANY __declspec(selectany)
#endif
#ifndef EXTERN_C
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C extern
#endif
#endif
#undef DEFINE_GUID
#ifdef INITGUID