Author: tkreuzer
Date: Mon Apr  6 05:21:04 2009
New Revision: 40383

URL: http://svn.reactos.org/svn/reactos?rev=40383&view=rev
Log:
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

Added:
    trunk/reactos/include/ddk/devioctl.h   (with props)
Modified:
    trunk/reactos/include/ddk/miniport.h
    trunk/reactos/include/ddk/video.h
    trunk/reactos/include/ddk/videoagp.h
    trunk/reactos/include/ddk/winddi.h
    trunk/reactos/include/psdk/guiddef.h

Added: trunk/reactos/include/ddk/devioctl.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/devioctl.h?rev=40383&view=auto
==============================================================================
--- trunk/reactos/include/ddk/devioctl.h (added)
+++ trunk/reactos/include/ddk/devioctl.h [iso-8859-1] Mon Apr  6 05:21:04 2009
@@ -1,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_ */

Propchange: trunk/reactos/include/ddk/devioctl.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: trunk/reactos/include/ddk/miniport.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/miniport.h?rev=40383&r1=40382&r2=40383&view=diff
==============================================================================
--- trunk/reactos/include/ddk/miniport.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/miniport.h [iso-8859-1] Mon Apr  6 05:21:04 2009
@@ -20,12 +20,48 @@
  *
  */
 
-#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
@@ -35,7 +71,6 @@
        Ushort,
        Ulong
 } EMULATOR_PORT_ACCESS_TYPE, *PEMULATOR_PORT_ACCESS_TYPE;
-
 
 typedef struct _EMULATOR_ACCESS_ENTRY {
   ULONG  BasePort;
@@ -58,6 +93,170 @@
 } 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,

Modified: trunk/reactos/include/ddk/video.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/video.h?rev=40383&r1=40382&r2=40383&view=diff
==============================================================================
--- trunk/reactos/include/ddk/video.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/video.h [iso-8859-1] Mon Apr  6 05:21:04 2009
@@ -20,10 +20,10 @@
  *
  */
 
-#ifndef __VIDEO_H
-#define __VIDEO_H
-
-#ifdef __WINDDI_H
+#ifndef __VIDEO_H__
+#define __VIDEO_H__
+
+#ifdef _WINDDI_
 #error winddi.h cannot be included with video.h
 #else
 
@@ -632,14 +632,6 @@
 VPAPI
 VOID
 DDKAPI
-VideoDebugPrint(
-  IN ULONG  DebugPrintLevel,
-  IN PCHAR  DebugMessage,
-  IN ...);
-
-VPAPI
-VOID
-DDKAPI
 VideoPortAcquireDeviceLock(
   IN PVOID  HwDeviceExtension);
 
@@ -1558,6 +1550,6 @@
 }
 #endif
 
-#endif /* defined __WINDDI_H */
-
-#endif /* __VIDEO_H */
+#endif /* defined _WINDDI_ */
+
+#endif /* __VIDEO_H__ */

Modified: trunk/reactos/include/ddk/videoagp.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/videoagp.h?rev=40383&r1=40382&r2=40383&view=diff
==============================================================================
--- trunk/reactos/include/ddk/videoagp.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/videoagp.h [iso-8859-1] Mon Apr  6 05:21:04 2009
@@ -20,8 +20,8 @@
  *
  */
 
-#ifndef __VIDEOAGP_H
-#define __VIDEOAGP_H
+#ifndef __VIDEOAGP_H__
+#define __VIDEOAGP_H__
 
 #include "video.h"
 
@@ -120,4 +120,4 @@
 }
 #endif
 
-#endif /* __VIDEOAGP_H */
+#endif /* __VIDEOAGP_H__ */

Modified: trunk/reactos/include/ddk/winddi.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddi.h?rev=40383&r1=40382&r2=40383&view=diff
==============================================================================
--- trunk/reactos/include/ddk/winddi.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/winddi.h [iso-8859-1] Mon Apr  6 05:21:04 2009
@@ -20,10 +20,10 @@
  *
  */
 
-#ifndef __WINDDI_H
-#define __WINDDI_H
-
-#ifdef __VIDEO_H
+#ifndef _WINDDI_
+#define _WINDDI_
+
+#ifdef __VIDEO_H__
 #error video.h cannot be included with winddi.h
 #else
 
@@ -113,6 +113,12 @@
 #define GX_OFFSET                         1
 #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;
@@ -802,7 +808,7 @@
 typedef struct _PATHDATA {
   FLONG  flags;
   ULONG  count;
-  POINTFIX  *glypptfx;
+  POINTFIX  *pptfx;
 } PATHDATA, *PPATHDATA;
 
 /* PATHOBJ.fl constants */
@@ -3636,21 +3642,20 @@
   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,10 +4100,21 @@
 DrvDisableDirectDraw(
   IN DHPDEV  dhpdev);
 
+typedef VOID
+(APIENTRY *PFN_DrvDisableDirectDraw)(
+  IN DHPDEV  dhpdev);
+
 WIN32KAPI
 BOOL
 APIENTRY
 DrvEnableDirectDraw(
+  IN DHPDEV  dhpdev,
+  OUT DD_CALLBACKS  *pCallBacks,
+  OUT DD_SURFACECALLBACKS  *pSurfaceCallBacks,
+  OUT DD_PALETTECALLBACKS  *pPaletteCallBacks);
+
+typedef BOOL
+(APIENTRY *PFN_DrvEnableDirectDraw)(
   IN DHPDEV  dhpdev,
   OUT DD_CALLBACKS  *pCallBacks,
   OUT DD_SURFACECALLBACKS  *pSurfaceCallBacks,
@@ -4115,10 +4131,32 @@
   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 /* __WINDDI_H */
+#endif /* defined __VIDEO_H__ */
+
+#endif /* _WINDDI_ */

Modified: trunk/reactos/include/psdk/guiddef.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/guiddef.h?rev=40383&r1=40382&r2=40383&view=diff
==============================================================================
--- trunk/reactos/include/psdk/guiddef.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/guiddef.h [iso-8859-1] Mon Apr  6 05:21:04 2009
@@ -33,6 +33,14 @@
 
 #ifndef DECLSPEC_SELECTANY
 #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

Reply via email to