changeset 10:1f9d0b71ccf6

Updated the version of MingW contributing to include/ and mingwex/
author Gregor Richards <Richards@codu.org>
date Mon, 14 Dec 2009 11:52:08 -0500
parents 1e322f644912
children 76eb4d6b0cd6
files include/GL/gl.h include/_mingw.h include/aclui.h include/adsprop.h include/amaudio.h include/amvideo.h include/assert.h include/audevcod.h include/aviriff.h include/aygshell.h include/basetyps.h include/bdatypes.h include/cmnquery.h include/comcat.h include/commctrl.h include/commdlg.h include/complex.h include/conio.h include/control.h include/ctype.h include/d3d9.h include/d3d9caps.h include/d3d9types.h include/ddeml.h include/ddk/batclass.h include/ddk/cfgmgr32.h include/ddk/ddkmapi.h include/ddk/hidclass.h include/ddk/hidpi.h include/ddk/hidsdi.h include/ddk/kbdmou.h include/ddk/mcd.h include/ddk/miniport.h include/ddk/minitape.h include/ddk/ndis.h include/ddk/ndistapi.h include/ddk/ndiswan.h include/ddk/newdev.h include/ddk/ntapi.h include/ddk/ntdd8042.h include/ddk/ntddk.h include/ddk/ntddpcm.h include/ddk/ntifs.h include/ddk/ntpoapi.h include/ddk/parallel.h include/ddk/pfhook.h include/ddk/scsi.h include/ddk/scsiwmi.h include/ddk/smbus.h include/ddk/srb.h include/ddk/storport.h include/ddk/tdikrnl.h include/ddk/upssvc.h include/ddk/usbcamdi.h include/ddk/usbscan.h include/ddk/video.h include/ddk/videoagp.h include/ddk/win2k.h include/ddk/winddi.h include/ddk/winddk.h include/ddk/winnt4.h include/ddk/ws2san.h include/devguid.h include/dir.h include/direct.h include/directx/d3d9.h include/directx/d3d9caps.h include/directx/d3d9types.h include/directx/dxerr8.h include/directx/dxerr9.h include/dirent.h include/docobj.h include/dos.h include/dsadmin.h include/dsclient.h include/dsgetdc.h include/dshow.h include/dsquery.h include/dsrole.h include/dvdevcod.h include/dvdmedia.h include/dxerr8.h include/dxerr9.h include/edevdefs.h include/errno.h include/errors.h include/evcode.h include/excpt.h include/exdisp.h include/fcntl.h include/fenv.h include/float.h include/fltdefs.h include/getopt.h include/gmon.h include/icm.h include/il21dec.h include/imagehlp.h include/imm.h include/intshcut.h include/inttypes.h include/io.h include/iphlpapi.h include/ipifcons.h include/ipinfoid.h include/iprtrmib.h include/iptypes.h include/ipxconst.h include/ipxrtdef.h include/ipxtfflt.h include/ks.h include/ksmedia.h include/libgen.h include/lmaccess.h include/locale.h include/malloc.h include/math.h include/mbctype.h include/mbstring.h include/mem.h include/memory.h include/mgm.h include/mlang.h include/mmreg.h include/mmsystem.h include/mpegtype.h include/mprapi.h include/mq.h include/mshtml.h include/ntdsapi.h include/ntdsbcli.h include/ntsecapi.h include/ntsecpkg.h include/oaidl.h include/objfwd.h include/objidl.h include/objsafe.h include/objsel.h include/ocidl.h include/oleacc.h include/oleauto.h include/olectl.h include/oledlg.h include/oleidl.h include/pbt.h include/process.h include/profil.h include/profile.h include/psapi.h include/qedit.h include/ras.h include/rasdlg.h include/richole.h include/routprot.h include/rpc.h include/rpcdce.h include/rpcndr.h include/rpcnsi.h include/rpcnsip.h include/rtutils.h include/sddl.h include/search.h include/secext.h include/servprov.h include/setjmp.h include/setupapi.h include/share.h include/shellapi.h include/shldisp.h include/shlobj.h include/shlwapi.h include/signal.h include/specstrings.h include/sspi.h include/stdint.h include/stdio.h include/stdlib.h include/stm.h include/string.h include/strings.h include/strmif.h include/sys/fcntl.h include/sys/file.h include/sys/locking.h include/sys/param.h include/sys/stat.h include/sys/time.h include/sys/timeb.h include/sys/types.h include/sys/unistd.h include/sys/utime.h include/tchar.h include/time.h include/unistd.h include/unknwn.h include/usp10.h include/utime.h include/uxtheme.h include/values.h include/varargs.h include/vfw.h include/vidcap.h include/vmr9.h include/vptype.h include/w32api.h include/wchar.h include/wctype.h include/winbase.h include/wincon.h include/wincrypt.h include/windef.h include/windns.h include/windows.h include/winerror.h include/wingdi.h include/wininet.h include/winioctl.h include/winnetwk.h include/winnls.h include/winnt.h include/winreg.h include/winsock.h include/winsock2.h include/winspool.h include/winuser.h include/winver.h include/ws2spi.h include/ws2tcpip.h include/wsahelp.h include/wtsapi32.h include/wtypes.h include/xprtdefs.h mingwex/Makefile.in mingwex/basename.c mingwex/btowc.c mingwex/complex/cabsf.c mingwex/complex/cabsl.c mingwex/complex/cacosf.c mingwex/complex/cacoshf.c mingwex/complex/cacoshl.c mingwex/complex/cacosl.c mingwex/complex/carg.c mingwex/complex/cargf.c mingwex/complex/cargl.c mingwex/complex/casinf.c mingwex/complex/casinhf.c mingwex/complex/casinhl.c mingwex/complex/casinl.c mingwex/complex/catanf.c mingwex/complex/catanhf.c mingwex/complex/catanhl.c mingwex/complex/catanl.c mingwex/complex/ccosf.c mingwex/complex/ccoshf.c mingwex/complex/ccoshl.c mingwex/complex/ccosl.c mingwex/complex/cexpf.c mingwex/complex/cexpl.c mingwex/complex/cimagf.c mingwex/complex/cimagl.c mingwex/complex/clogf.c mingwex/complex/clogl.c mingwex/complex/cpowf.c mingwex/complex/cpowl.c mingwex/complex/cprojf.c mingwex/complex/cprojl.c mingwex/complex/crealf.c mingwex/complex/creall.c mingwex/complex/csinf.c mingwex/complex/csinhf.c mingwex/complex/csinhl.c mingwex/complex/csinl.c mingwex/complex/csqrtf.c mingwex/complex/csqrtl.c mingwex/complex/ctanf.c mingwex/complex/ctanhf.c mingwex/complex/ctanhl.c mingwex/complex/ctanl.c mingwex/cpu_features.c mingwex/cpu_features.h mingwex/dirent.c mingwex/dirname.c mingwex/feclearexcept.c mingwex/fegetenv.c mingwex/fegetround.c mingwex/feholdexcept.c mingwex/fesetenv.c mingwex/fesetexceptflag.c mingwex/fesetround.c mingwex/fetestexcept.c mingwex/feupdateenv.c mingwex/ftruncate.c mingwex/fwide.c mingwex/gdtoa/README mingwex/gdtoa/arithchk.c mingwex/gdtoa/dmisc.c mingwex/gdtoa/dtoa.c mingwex/gdtoa/g__fmt.c mingwex/gdtoa/g_dfmt.c mingwex/gdtoa/g_ffmt.c mingwex/gdtoa/g_xfmt.c mingwex/gdtoa/gd_arith.h mingwex/gdtoa/gd_qnan.h mingwex/gdtoa/gdtoa.c mingwex/gdtoa/gdtoa.h mingwex/gdtoa/gdtoaimp.h mingwex/gdtoa/gethex.c mingwex/gdtoa/gmisc.c mingwex/gdtoa/hd_init.c mingwex/gdtoa/hexnan.c mingwex/gdtoa/misc.c mingwex/gdtoa/qnan.c mingwex/gdtoa/smisc.c mingwex/gdtoa/strtodg.c mingwex/gdtoa/strtodnrp.c mingwex/gdtoa/strtof.c mingwex/gdtoa/strtopx.c mingwex/gdtoa/sum.c mingwex/gdtoa/ulp.c mingwex/getopt.c mingwex/gettimeofday.c mingwex/isblank.c mingwex/iswblank.c mingwex/ldtoa.c mingwex/math/acosf.c mingwex/math/acosh.c mingwex/math/acoshf.c mingwex/math/acoshl.c mingwex/math/acosl.c mingwex/math/asinf.c mingwex/math/asinh.c mingwex/math/asinhf.c mingwex/math/asinhl.c mingwex/math/asinl.c mingwex/math/atan2f.c mingwex/math/atan2l.c mingwex/math/atanf.c mingwex/math/atanh.c mingwex/math/atanhf.c mingwex/math/atanhl.c mingwex/math/atanl.c mingwex/math/cbrt.c mingwex/math/cbrtf.c mingwex/math/cbrtl.c mingwex/math/ceilf.S mingwex/math/ceill.S mingwex/math/cephes_emath.c mingwex/math/cephes_emath.h mingwex/math/cephes_mconf.h mingwex/math/copysign.S mingwex/math/copysignf.S mingwex/math/copysignl.S mingwex/math/cosf.S mingwex/math/coshf.c mingwex/math/coshl.c mingwex/math/cosl.S mingwex/math/erfl.c mingwex/math/exp2.S mingwex/math/exp2f.S mingwex/math/exp2l.S mingwex/math/expf.c mingwex/math/expl.c mingwex/math/expm1.c mingwex/math/expm1f.c mingwex/math/expm1l.c mingwex/math/fabs.c mingwex/math/fabsf.c mingwex/math/fabsl.c mingwex/math/fastmath.h mingwex/math/fdim.c mingwex/math/fdimf.c mingwex/math/fdiml.c mingwex/math/floorf.S mingwex/math/floorl.S mingwex/math/fma.S mingwex/math/fmaf.S mingwex/math/fmal.c mingwex/math/fmax.c mingwex/math/fmaxf.c mingwex/math/fmaxl.c mingwex/math/fmin.c mingwex/math/fminf.c mingwex/math/fminl.c mingwex/math/fmodf.c mingwex/math/fmodl.c mingwex/math/fp_consts.c mingwex/math/fp_consts.h mingwex/math/fp_constsf.c mingwex/math/fp_constsl.c mingwex/math/fpclassify.c mingwex/math/fpclassifyf.c mingwex/math/fpclassifyl.c mingwex/math/frexpf.c mingwex/math/frexpl.S mingwex/math/fucom.c mingwex/math/hypotf.c mingwex/math/hypotl.c mingwex/math/ilogb.S mingwex/math/ilogbf.S mingwex/math/ilogbl.S mingwex/math/isnan.c mingwex/math/isnanf.c mingwex/math/isnanl.c mingwex/math/ldexpf.c mingwex/math/ldexpl.c mingwex/math/lgamma.c mingwex/math/lgammaf.c mingwex/math/lgammal.c mingwex/math/llrint.c mingwex/math/llrintf.c mingwex/math/llrintl.c mingwex/math/llround.c mingwex/math/llroundf.c mingwex/math/llroundl.c mingwex/math/log10f.S mingwex/math/log10l.S mingwex/math/log1p.S mingwex/math/log1pf.S mingwex/math/log1pl.S mingwex/math/log2.S mingwex/math/log2f.S mingwex/math/log2l.S mingwex/math/logb.c mingwex/math/logbf.c mingwex/math/logbl.c mingwex/math/logf.S mingwex/math/logl.S mingwex/math/lrint.c mingwex/math/lrintf.c mingwex/math/lrintl.c mingwex/math/lround.c mingwex/math/lround_generic.c mingwex/math/lroundf.c mingwex/math/lroundl.c mingwex/math/modff.c mingwex/math/modfl.c mingwex/math/nearbyint.S mingwex/math/nearbyintf.S mingwex/math/nearbyintl.S mingwex/math/nextafterf.c mingwex/math/nextafterl.c mingwex/math/nexttoward.c mingwex/math/nexttowardf.c mingwex/math/powf.c mingwex/math/powi.c mingwex/math/powif.c mingwex/math/powil.c mingwex/math/powl.c mingwex/math/remainder.S mingwex/math/remainderf.S mingwex/math/remainderl.S mingwex/math/remquo.S mingwex/math/remquof.S mingwex/math/remquol.S mingwex/math/rint.c mingwex/math/rintf.c mingwex/math/rintl.c mingwex/math/round.c mingwex/math/round_generic.c mingwex/math/round_internal.h mingwex/math/roundf.c mingwex/math/roundl.c mingwex/math/s_erf.c mingwex/math/scalbn.S mingwex/math/scalbnf.S mingwex/math/scalbnl.S mingwex/math/sf_erf.c mingwex/math/signbit.c mingwex/math/signbitf.c mingwex/math/signbitl.c mingwex/math/sinf.S mingwex/math/sinhf.c mingwex/math/sinhl.c mingwex/math/sinl.S mingwex/math/sqrtf.c mingwex/math/sqrtl.c mingwex/math/tanf.S mingwex/math/tanhf.c mingwex/math/tanhl.c mingwex/math/tanl.S mingwex/math/tgamma.c mingwex/math/tgammaf.c mingwex/math/tgammal.c mingwex/math/trunc.c mingwex/math/truncf.c mingwex/math/truncl.c mingwex/mb_wc_common.h mingwex/mbrtowc.c mingwex/mingw-aligned-malloc.c mingwex/stdio/fopen64.c mingwex/stdio/fprintf.c mingwex/stdio/fseeko64.c mingwex/stdio/ftello64.c mingwex/stdio/lseek64.c mingwex/stdio/pformat.c mingwex/stdio/pformat.h mingwex/stdio/printf.c mingwex/stdio/snprintf.c mingwex/stdio/sprintf.c mingwex/stdio/vfprintf.c mingwex/stdio/vprintf.c mingwex/stdio/vsnprintf.c mingwex/stdio/vsprintf.c mingwex/strtof.c mingwex/strtold.c mingwex/tdelete.c mingwex/tfind.c mingwex/tsearch.c mingwex/tst-aligned-malloc.c mingwex/twalk.c mingwex/usleep.c mingwex/wcrtomb.c mingwex/wcstof.c mingwex/wcstold.c mingwex/wctob.c mingwex/wctrans.c mingwex/wctype.c mingwex/wdirent.c
diffstat 465 files changed, 51916 insertions(+), 31008 deletions(-) [+]
line wrap: on
line diff
--- a/include/GL/gl.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/GL/gl.h	Mon Dec 14 11:52:08 2009 -0500
@@ -1,5 +1,3 @@
-/* $Id: gl.h,v 1.3 2003/08/25 02:02:37 dannysmith Exp $ */
-
 /*
  * Mesa 3-D graphics library
  * Version:  4.0
--- a/include/_mingw.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/_mingw.h	Mon Dec 14 11:52:08 2009 -0500
@@ -1,171 +1,278 @@
-/*
- * _mingw.h
- *
- * Mingw specific macros included by ALL include files. 
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- *  Created by Mumit Khan  <khan@xraylith.wisc.edu>
- *
- *  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 __MINGW_H
-#define __MINGW_H
-
-/* Bugs in the MingW headers */
-#ifdef __ELF__
-#define _imp____mbcur_max _imp____mb_cur_max
-#define __cdecl
-#endif
-
-/* These are defined by the user (or the compiler)
-   to specify how identifiers are imported from a DLL.
-
-   __DECLSPEC_SUPPORTED    Defined if dllimport attribute is supported.
-   __MINGW_IMPORT          The attribute definition to specify imported
-                           variables/functions. 
-   _CRTIMP                 As above.  For MS compatibility.  
-   __MINGW32_VERSION       Runtime version.
-   __MINGW32_MAJOR_VERSION Runtime major version.
-   __MINGW32_MINOR_VERSION Runtime minor version.
-   __MINGW32_BUILD_DATE    Runtime build date.
-   
-   Other macros:
-
-   __int64                 define to be long long. Using a typedef doesn't
-                           work for "unsigned __int64"
-  
-   All headers should include this first, and then use __DECLSPEC_SUPPORTED
-   to choose between the old ``__imp__name'' style or __MINGW_IMPORT
-   style declarations.  */
-
-/* Try to avoid problems with outdated checks for GCC __attribute__ support.  */ 
-#undef __attribute__
-
-#ifndef __GNUC__
-# ifndef __MINGW_IMPORT
-#  define __MINGW_IMPORT  __declspec(dllimport)
-# endif
-# ifndef _CRTIMP
-#  define _CRTIMP  __declspec(dllimport)
-# endif
-# define __DECLSPEC_SUPPORTED
-# define __attribute__(x) /* nothing */
-#else /* __GNUC__ */
-# ifdef __declspec
-#  ifndef __MINGW_IMPORT
-   /* Note the extern. This is needed to work around GCC's
-      limitations in handling dllimport attribute.  */
-#   define __MINGW_IMPORT  extern __attribute__ ((dllimport))
-#  endif
-#  ifndef _CRTIMP
-#   ifdef __USE_CRTIMP
-#    define _CRTIMP  __attribute__ ((dllimport))
-#   else  
-#    define _CRTIMP
-#   endif
-#  endif
-#  define __DECLSPEC_SUPPORTED
-# else /* __declspec */
-#  undef __DECLSPEC_SUPPORTED
-#  undef __MINGW_IMPORT
-#  ifndef _CRTIMP
-#   define _CRTIMP
-#  endif
-# endif /* __declspec */
-# ifndef __cdecl
-#  define __cdecl __attribute__ ((__cdecl__))
-# endif
-# ifndef __stdcall
-#  define __stdcall __attribute__ ((__stdcall__))
-# endif
-# ifndef __int64
-#  define __int64 long long
-# endif
-# ifndef __int32
-#  define __int32 long
-# endif
-# ifndef __int16
-#  define __int16 short
-# endif
-# ifndef __int8
-#  define __int8 char
-# endif
-# ifndef __small
-#  define __small char
-# endif
-# ifndef __hyper
-#  define __hyper long long
-# endif
-#endif /* __GNUC__ */
-
-#ifdef __cplusplus
-#define __CRT_INLINE inline
-#else
-#define __CRT_INLINE extern __inline__
-#endif
-
-#if defined (__GNUC__) && defined (__GNUC_MINOR__)
-#define __MINGW_GNUC_PREREQ(major, minor) \
-  (__GNUC__ > (major) \
-   || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
-#else
-#define __MINGW_GNUC_PREREQ(major, minor)  0
-#endif
-
-#ifdef __cplusplus
-# define __UNUSED_PARAM(x) 
-#else 
-# ifdef __GNUC__
-#  define __UNUSED_PARAM(x) x __attribute__ ((__unused__))
-# else
-#  define __UNUSED_PARAM(x) x
-# endif
-#endif
-
-#ifdef __GNUC__
-#define __MINGW_ATTRIB_NORETURN __attribute__ ((__noreturn__))
-#define __MINGW_ATTRIB_CONST __attribute__ ((__const__))
-#else
-#define __MINGW_ATTRIB_NORETURN
-#define __MINGW_ATTRIB_CONST
-#endif
-
-#if __MINGW_GNUC_PREREQ (3, 0)
-#define __MINGW_ATTRIB_MALLOC __attribute__ ((__malloc__))
-#define __MINGW_ATTRIB_PURE __attribute__ ((__pure__))
-#else
-#define __MINGW_ATTRIB_MALLOC
-#define __MINGW_ATTRIB_PURE
-#endif
-
-/* Attribute `nonnull' was valid as of gcc 3.3.  We don't use GCC's
-   variadiac macro facility, because variadic macros cause syntax
-   errors with  --traditional-cpp.  */
-#if  __MINGW_GNUC_PREREQ (3, 3)
-#define __MINGW_ATTRIB_NONNULL(arg) __attribute__ ((__nonnull__ (arg)))
-#else
-#define __MINGW_ATTRIB_NONNULL(arg)
-#endif /* GNUC >= 3.3 */
-
-#ifndef __MSVCRT_VERSION__
-/*  High byte is the major version, low byte is the minor. */
-# define __MSVCRT_VERSION__ 0x0600
-#endif
-
-#define __MINGW32_VERSION 3.9
-#define __MINGW32_MAJOR_VERSION 3
-#define __MINGW32_MINOR_VERSION 9
-
-#endif /* __MINGW_H */
+#ifndef __MINGW_H
+/*
+ * _mingw.h
+ *
+ * Mingw specific macros included by ALL include files.
+ *
+ * This file is part of the Mingw32 package.
+ *
+ * Contributors:
+ *  Created by Mumit Khan  <khan@xraylith.wisc.edu>
+ *
+ *  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.
+ *
+ */
+#define __MINGW_H
+
+#define __MINGW32_VERSION           3.17
+#define __MINGW32_MAJOR_VERSION     3
+#define __MINGW32_MINOR_VERSION     17
+#define __MINGW32_PATCHLEVEL        0
+
+#if __GNUC__ >= 3
+#pragma GCC system_header
+#endif
+
+/* These are defined by the user (or the compiler)
+   to specify how identifiers are imported from a DLL.
+
+   __DECLSPEC_SUPPORTED            Defined if dllimport attribute is supported.
+   __MINGW_IMPORT                  The attribute definition to specify imported
+                                   variables/functions.
+   _CRTIMP                         As above.  For MS compatibility.
+   __MINGW32_VERSION               Runtime version.
+   __MINGW32_MAJOR_VERSION         Runtime major version.
+   __MINGW32_MINOR_VERSION         Runtime minor version.
+   __MINGW32_BUILD_DATE            Runtime build date.
+
+   Macros to enable MinGW features which deviate from standard MSVC
+   compatible behaviour; these may be specified directly in user code,
+   activated implicitly, (e.g. by specifying _POSIX_C_SOURCE or such),
+   or by inclusion in __MINGW_FEATURES__:
+
+   __USE_MINGW_ANSI_STDIO          Select a more ANSI C99 compatible
+                                   implementation of printf() and friends.
+
+   Other macros:
+
+   __int64                         define to be long long.  Using a typedef
+                                   doesn't work for "unsigned __int64"
+
+   All headers should include this first, and then use __DECLSPEC_SUPPORTED
+   to choose between the old ``__imp__name'' style or __MINGW_IMPORT
+   style declarations.  */
+
+
+/* Manifest definitions identifying the flag bits, controlling activation
+ * of MinGW features, as specified by the user in __MINGW_FEATURES__.
+ */
+#define __MINGW_ANSI_STDIO__		0x0000000000000001ULL
+/*
+ * The following three are not yet formally supported; they are
+ * included here, to document anticipated future usage.
+ */
+#define __MINGW_LC_EXTENSIONS__ 	0x0000000000000050ULL
+#define __MINGW_LC_MESSAGES__		0x0000000000000010ULL
+#define __MINGW_LC_ENVVARS__		0x0000000000000040ULL
+
+/* Try to avoid problems with outdated checks for GCC __attribute__ support.  */
+#undef __attribute__
+
+#if defined (__PCC__)
+#  undef __DECLSPEC_SUPPORTED
+# ifndef __MINGW_IMPORT
+#  define __MINGW_IMPORT extern
+# endif
+# ifndef _CRTIMP
+#  define _CRTIMP
+# endif
+# ifndef __cdecl 
+#  define __cdecl  _Pragma("cdecl")
+# endif
+# ifndef __stdcall
+#  define __stdcall _Pragma("stdcall")
+# endif
+# ifndef __int64
+#  define __int64 long long
+# endif
+# ifndef __int32
+#  define __int32 long
+# endif
+# ifndef __int16
+#  define __int16 short
+# endif
+# ifndef __int8
+#  define __int8 char
+# endif
+# ifndef __small
+#  define __small char
+# endif
+# ifndef __hyper
+#  define __hyper long long
+# endif
+# ifndef __volatile__
+#  define __volatile__ volatile
+# endif
+# ifndef __restrict__
+#  define __restrict__ restrict
+# endif
+# define NONAMELESSUNION
+#elif defined(__GNUC__)
+# ifdef __declspec
+#  ifndef __MINGW_IMPORT
+   /* Note the extern. This is needed to work around GCC's
+      limitations in handling dllimport attribute.  */
+#   define __MINGW_IMPORT  extern __attribute__ ((__dllimport__))
+#  endif
+#  ifndef _CRTIMP
+#   ifdef __USE_CRTIMP
+#    define _CRTIMP  __attribute__ ((dllimport))
+#   else
+#    define _CRTIMP
+#   endif
+#  endif
+#  define __DECLSPEC_SUPPORTED
+# else /* __declspec */
+#  undef __DECLSPEC_SUPPORTED
+#  undef __MINGW_IMPORT
+#  ifndef _CRTIMP
+#   define _CRTIMP
+#  endif
+# endif /* __declspec */
+/*
+ * The next two defines can cause problems if user code adds the
+ * __cdecl attribute like so:
+ * void __attribute__ ((__cdecl)) foo(void); 
+ */
+# ifndef __cdecl 
+#  define __cdecl  __attribute__ ((__cdecl__))
+# endif
+# ifndef __stdcall
+#  define __stdcall __attribute__ ((__stdcall__))
+# endif
+# ifndef __int64
+#  define __int64 long long
+# endif
+# ifndef __int32
+#  define __int32 long
+# endif
+# ifndef __int16
+#  define __int16 short
+# endif
+# ifndef __int8
+#  define __int8 char
+# endif
+# ifndef __small
+#  define __small char
+# endif
+# ifndef __hyper
+#  define __hyper long long
+# endif
+#else /* ! __GNUC__ && ! __PCC__ */
+# ifndef __MINGW_IMPORT
+#  define __MINGW_IMPORT  __declspec(dllimport)
+# endif
+# ifndef _CRTIMP
+#  define _CRTIMP  __declspec(dllimport)
+# endif
+# define __DECLSPEC_SUPPORTED
+# define __attribute__(x) /* nothing */
+#endif
+
+#if defined (__GNUC__) && defined (__GNUC_MINOR__)
+#define __MINGW_GNUC_PREREQ(major, minor) \
+  (__GNUC__ > (major) \
+   || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
+#else
+#define __MINGW_GNUC_PREREQ(major, minor)  0
+#endif
+
+#ifdef __cplusplus
+# define __CRT_INLINE inline
+#else
+# if __GNUC_STDC_INLINE__
+#  define __CRT_INLINE extern inline __attribute__((__gnu_inline__))
+# else
+#  define __CRT_INLINE extern __inline__
+# endif
+#endif
+
+#ifdef __cplusplus
+# define __UNUSED_PARAM(x)
+#else
+# ifdef __GNUC__
+#  define __UNUSED_PARAM(x) x __attribute__ ((__unused__))
+# else
+#  define __UNUSED_PARAM(x) x
+# endif
+#endif
+
+#ifdef __GNUC__
+#define __MINGW_ATTRIB_NORETURN __attribute__ ((__noreturn__))
+#define __MINGW_ATTRIB_CONST __attribute__ ((__const__))
+#else
+#define __MINGW_ATTRIB_NORETURN
+#define __MINGW_ATTRIB_CONST
+#endif
+
+#if __MINGW_GNUC_PREREQ (3, 0)
+#define __MINGW_ATTRIB_MALLOC __attribute__ ((__malloc__))
+#define __MINGW_ATTRIB_PURE __attribute__ ((__pure__))
+#else
+#define __MINGW_ATTRIB_MALLOC
+#define __MINGW_ATTRIB_PURE
+#endif
+
+/* Attribute `nonnull' was valid as of gcc 3.3.  We don't use GCC's
+   variadiac macro facility, because variadic macros cause syntax
+   errors with  --traditional-cpp.  */
+#if  __MINGW_GNUC_PREREQ (3, 3)
+#define __MINGW_ATTRIB_NONNULL(arg) __attribute__ ((__nonnull__ (arg)))
+#else
+#define __MINGW_ATTRIB_NONNULL(arg)
+#endif /* GNUC >= 3.3 */
+
+#if  __MINGW_GNUC_PREREQ (3, 1)
+#define __MINGW_ATTRIB_DEPRECATED __attribute__ ((__deprecated__))
+#else
+#define __MINGW_ATTRIB_DEPRECATED
+#endif /* GNUC >= 3.1 */
+ 
+#if  __MINGW_GNUC_PREREQ (3, 3)
+#define __MINGW_NOTHROW __attribute__ ((__nothrow__))
+#else
+#define __MINGW_NOTHROW
+#endif /* GNUC >= 3.3 */
+
+
+/* TODO: Mark (almost) all CRT functions as __MINGW_NOTHROW.  This will
+allow GCC to optimize away some EH unwind code, at least in DW2 case.  */
+
+#ifndef __MSVCRT_VERSION__
+/*  High byte is the major version, low byte is the minor. */
+# define __MSVCRT_VERSION__ 0x0600
+#endif
+
+/* Activation of MinGW specific extended features:
+ */
+#ifndef __USE_MINGW_ANSI_STDIO
+/*
+ * If user didn't specify it explicitly...
+ */
+# if   defined __STRICT_ANSI__  ||  defined _ISOC99_SOURCE \
+   ||  defined _POSIX_SOURCE    ||  defined _POSIX_C_SOURCE \
+   ||  defined _XOPEN_SOURCE    ||  defined _XOPEN_SOURCE_EXTENDED \
+   ||  defined _GNU_SOURCE      ||  defined _BSD_SOURCE \
+   ||  defined _SVID_SOURCE
+   /*
+    * but where any of these source code qualifiers are specified,
+    * then assume ANSI I/O standards are preferred over Microsoft's...
+    */
+#  define __USE_MINGW_ANSI_STDIO    1
+# else
+   /*
+    * otherwise use whatever __MINGW_FEATURES__ specifies...
+    */
+#  define __USE_MINGW_ANSI_STDIO    (__MINGW_FEATURES__ & __MINGW_ANSI_STDIO__)
+# endif
+#endif
+
+#endif /* __MINGW_H */
--- a/include/aclui.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/aclui.h	Mon Dec 14 11:52:08 2009 -0500
@@ -4,7 +4,7 @@
 #pragma GCC system_header
 #endif
 
-#ifndef __OBJC__
+#ifndef _OBJC_NO_COM
 #include <objbase.h>
 #include <commctrl.h>
 #include <accctrl.h>
@@ -98,7 +98,6 @@
 
 #ifndef __ISecurityInformation_INTERFACE_DEFINED__
 #define __ISecurityInformation_INTERFACE_DEFINED__
-#undef INTERFACE
 #define INTERFACE ISecurityInformation
 DECLARE_INTERFACE_(ISecurityInformation, IUnknown)
 {
@@ -114,6 +113,7 @@
 		STDMETHOD(GetInheritTypes)(THIS_ PSI_INHERIT_TYPE*,ULONG*) PURE;
 		STDMETHOD(PropertySheetPageCallback)(THIS_ HWND,UINT,SI_PAGE_TYPE) PURE;
 };
+#undef INTERFACE
 typedef ISecurityInformation *LPSECURITYINFO;
 #endif
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/adsprop.h	Mon Dec 14 11:52:08 2009 -0500
@@ -0,0 +1,59 @@
+/*
+ * adsprop.h - Active Directory
+ *
+ * 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 _ADSPROP_H
+#define _ADSPROP_H
+#if __GNUC__ >= 3
+#pragma GCC system_header
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*--- Active Directory Reference - Active Directory Messages */
+#define WM_ADSPROP_NOTIFY_APPLY (WM_USER+1104)
+#define WM_ADSPROP_NOTIFY_CHANGE (WM_USER+1103)
+#define WM_ADSPROP_NOTIFY_ERROR (WM_USER+1110)
+#define WM_ADSPROP_NOTIFY_EXIT (WM_USER+1107)
+#define WM_ADSPROP_NOTIFY_FOREGROUND (WM_USER+1106)
+#define WM_ADSPROP_NOTIFY_PAGEHWND (WM_USER+1102)
+#define WM_ADSPROP_NOTIFY_PAGEINIT (WM_USER+1101)
+#define WM_ADSPROP_NOTIFY_SETFOCUS (WM_USER+1105)
+/*--- Active Directory Reference - Active Directory Structures - Active Directory MMC Property Page Structures */
+#if (_WIN32_WINNT >= 0x0501)
+typedef struct {
+	HWND hwndPage;
+	PWSTR pszPageTitle;
+	PWSTR pszObjPath;
+	PWSTR pszObjClass;
+	HRESULT hr;
+	PWSTR pszError;
+} ADSPROPERROR,*PADSPROPERROR;
+#endif /* (_WIN32_WINNT >= 0x0501) */
+#if (_WIN32_WINNT >= 0x0500)
+typedef struct {
+	DWORD dwSize;
+	DWORD dwFlags;
+	HRESULT hr;
+	IDirectoryObject *pDsObj;
+	LPWSTR pwzCN;
+	PADS_ATTR_INFO pWritableAttrs;
+} ADSPROPINITPARAMS,*PADSPROPINITPARAMS;
+#endif /* (_WIN32_WINNT >= 0x0500) */
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/amaudio.h	Mon Dec 14 11:52:08 2009 -0500
@@ -0,0 +1,33 @@
+#ifndef _AMAUDIO_H
+#define _AMAUDIO_H
+#if __GNUC__ >= 3
+#pragma GCC system_header
+#endif
+
+#include <dsound.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define INTERFACE IAMDirectSound
+DECLARE_INTERFACE_(IAMDirectSound, IUnknown)
+{
+	STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
+	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+	STDMETHOD_(ULONG,Release)(THIS) PURE;
+	STDMETHOD(GetDirectSoundInterface)(THIS_ LPDIRECTSOUND*) PURE;
+	STDMETHOD(GetPrimaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER*) PURE;
+	STDMETHOD(GetSecondaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER*) PURE;
+	STDMETHOD(GetFocusWindow)(THIS_ HWND*,BOOL*) PURE ;
+	STDMETHOD(ReleaseDirectSoundInterface)(THIS_ LPDIRECTSOUND) PURE;
+	STDMETHOD(ReleasePrimaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER) PURE;
+	STDMETHOD(ReleaseSecondaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER) PURE;
+	STDMETHOD(SetFocusWindow)(THIS_ HWND,BOOL) PURE ;
+};
+#undef INTERFACE
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/amvideo.h	Mon Dec 14 11:52:08 2009 -0500
@@ -0,0 +1,179 @@
+#ifndef _AMVIDEO_H
+#define _AMVIDEO_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#include <ddraw.h>
+#include <strmif.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define AMDDS_NONE 0x0000
+#define AMDDS_DCIPS 0x0001
+#define AMDDS_PS 0x0002
+#define AMDDS_RGBOVR 0x0004
+#define AMDDS_YUVOVR 0x0008
+#define AMDDS_RGBOFF 0x0010
+#define AMDDS_YUVOFF 0x0020
+#define AMDDS_RGBFLP 0x0040
+#define AMDDS_YUVFLP 0x0080
+#define AMDDS_ ALL 0x00FF
+#define AMDDS_DEFAULT 0x00FF
+#define AMDDS_YUV (AMDDS_YUVOFF|AMDDS_YUVOVR|AMDDS_YUVFLP)
+#define AMDDS_RGB (AMDDS_RGBOFF|AMDDS_RGBOVR|AMDDS_RGBFLP)
+#define AMDDS_PRIMARY (AMDDS_DCIPS|AMDDS_PS)
+#define BIT_MASKS_MATCH(pbmi1,pbmi2) ((pbmi1)->dwBitMasks[0] == (pbmi2)->dwBitMasks[0] && (pbmi1)->dwBitMasks[1] == (pbmi2)->dwBitMasks[1] && (pbmi1)->dwBitMasks[2] == (pbmi2)->dwBitMasks[2])
+#define PALETTISED(pbmi) ((pbmi)->bmiHeader.biBitCount <= 8)
+#define PALETTE_ENTRIES(pbmi) (1 << (pbmi)->bmiHeader.biBitCount)
+#define RESET_MASKS(pbmi) (ZeroMemory((PVOID)(pbmi)->dwBitFields,3*sizeof(DWORD)))
+#define RESET_PALETTE(pbmi) (ZeroMemory((PVOID)(pbmi)->bmiColors,256*sizeof(RGBQUAD)));
+#define SIZE_EGA_PALETTE (16*sizeof(RGBQUAD))
+#define SIZE_MASKS (3*sizeof(DWORD))
+#define SIZE_PALETTE (256*sizeof(RGBQUAD))
+typedef enum {
+	AM_PROPERTY_FRAMESTEP_STEP = 1,
+	AM_PROPERTY_FRAMESTEP_CANCEL = 2,
+	AM_PROPERTY_FRAMESTEP_CANSTEP = 3,
+	AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE = 4
+} AM_PROPERTY_FRAMESTEP;
+typedef struct tag_TRUECOLORINFO {
+	DWORD dwBitMasks[3];
+	RGBQUAD bmiColors[256];
+} TRUECOLORINFO;
+typedef struct tagVIDEOINFOHEADER {
+	RECT rcSource;
+	RECT rcTarget;
+	DWORD dwBitRate;
+	DWORD dwBitErrorRate;
+	REFERENCE_TIME AvgTimePerFrame;
+	BITMAPINFOHEADER bmiHeader;
+} VIDEOINFOHEADER;
+typedef struct tagVIDEOINFO {
+	RECT rcSource,
+	RECT rcTarget,
+	DWORD dwBitRate,
+	DWORD dwBitErrorRate,
+	REFERENCE_TIME AvgTimePerFrame;
+	BITMAPINFOHEADER bmiHeader;
+	union {
+		RGBQUAD bmiColors[256];
+		DWORD dwBitMasks[3];
+		TRUECOLORINFO TrueColorInfo;
+	};
+} VIDEOINFO;
+typedef struct tagMPEG1VIDEOINFO {
+	VIDEOINFOHEADER hdr;
+	DWORD dwStartTimeCode;
+	DWORD cbSequenceHeader;
+	BYTE bSequenceHeader[1];
+} MPEG1VIDEOINFO;
+typedef struct tagAnalogVideoInfo {
+	RECT rcSource;           
+	RECT rcTarget;           
+	DWORD dwActiveWidth;      
+	DWORD dwActiveHeight;     
+	REFERENCE_TIME AvgTimePerFrame;    
+} ANALOGVIDEOINFO;
+typedef struct _AM_FRAMESTEP_STEP {
+	DWORD dwFramesToStep;
+} AM_FRAMESTEP_STEP;
+#define INTERFACE IDirectDrawVideo
+DECLARE_INTERFACE_(IDirectDrawVideo, IUnknown)
+{
+	STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
+	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+	STDMETHOD_(ULONG,Release)(THIS) PURE;
+	STDMETHOD(CanUseOverlayStretch)(THIS_ long*) PURE;
+	STDMETHOD(CanUseScanLine)(THIS_ long*) PURE;
+	STDMETHOD(GetCaps)(THIS_ DDCAPS*) PURE;
+	STDMETHOD(GetDirectDraw)(THIS_ LPDIRECTDRAW*) PURE;
+	STDMETHOD(GetEmulatedCaps)(THIS_ DDCAPS*) PURE;
+	STDMETHOD(GetFourCCCodes)(THIS_ DWORD*,DWORD*) PURE;
+	STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC*) PURE;
+	STDMETHOD(GetSurfaceType)(THIS_ DWORD*) PURE;
+	STDMETHOD(GetSwitches)(THIS_ DWORD*) PURE;
+	STDMETHOD(SetDefault)(THIS) PURE;
+	STDMETHOD(SetDirectDraw)(THIS_ LPDIRECTDRAW) PURE;
+	STDMETHOD(SetSwitches)(THIS_ DWORD) PURE;
+	STDMETHOD(UseOverlayStretch)(THIS_ long) PURE;
+	STDMETHOD(UseScanLine)(THIS_ long) PURE;
+	STDMETHOD(UseWhenFullScreen)(THIS_ long) PURE;
+	STDMETHOD(WillUseFullScreen)(THIS_ long*) PURE;
+};
+#undef INTERFACE
+#define INTERFACE IQualProp
+DECLARE_INTERFACE_(IQualProp, IUnknown)
+{
+	STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
+	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+	STDMETHOD_(ULONG,Release)(THIS) PURE;
+	STDMETHOD(get_AvgFrameRate)(THIS_ int*) PURE;
+	STDMETHOD(get_AvgSyncOffset)(THIS_ int*) PURE;
+	STDMETHOD(get_DevSyncOffset)(THIS_ int*) PURE;
+	STDMETHOD(get_FramesDrawn)(THIS_ int*) PURE;
+	STDMETHOD(get_FramesDroppedInRenderer)(THIS_ int*) PURE;
+	STDMETHOD(get_Jitter)(THIS_ int*) PURE;
+};
+#undef INTERFACE
+#define INTERFACE IFullScreenVideo
+DECLARE_INTERFACE_(IFullScreenVideo, IUnknown)
+{
+	STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
+	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+	STDMETHOD_(ULONG,Release)(THIS) PURE;
+	STDMETHOD(CountModes)(THIS_ long*) PURE;
+	STDMETHOD(GetCaption)(THIS_ BSTR*) PURE;
+	STDMETHOD(GetClipFactor)(THIS_ long*) PURE;
+	STDMETHOD(GetCurrentMode)(THIS_ long*) PURE;
+	STDMETHOD(GetMessageDrain)(THIS_ HWND*) PURE;
+	STDMETHOD(GetModeInfo)(THIS_ long,long*,long*,long*) PURE;
+	STDMETHOD(GetMonitor)(THIS_ long*) PURE;
+	STDMETHOD(HideOnDeactivate)(THIS_ long) PURE;
+	STDMETHOD(IsHideOnDeactivate)(THIS) PURE;
+	STDMETHOD(IsModeAvailable)(THIS_ long) PURE;
+	STDMETHOD(IsModeEnabled)(THIS_ long) PURE;
+	STDMETHOD(SetCaption)(THIS_ BSTR) PURE;
+	STDMETHOD(SetClipFactor)(THIS_ long) PURE;
+	STDMETHOD(SetDefault)(THIS) PURE;
+	STDMETHOD(SetEnabled)(THIS_ long,long) PURE;
+	STDMETHOD(SetMessageDrain)(THIS_ HWND) PURE;
+	STDMETHOD(SetMonitor)(THIS_ long) PURE;
+};
+#undef INTERFACE
+#define INTERFACE IFullScreenVideoEx
+DECLARE_INTERFACE_(IFullScreenVideoEx, IFullScreenVideo)
+{
+	STDMETHOD(QueryInterface)(THIS_ REFIID, LPVOID*) PURE;
+	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+	STDMETHOD_(ULONG,Release)(THIS) PURE;
+	STDMETHOD(CountModes)(THIS_ long*) PURE;
+	STDMETHOD(GetAcceleratorTable)(THIS_ HWND*,HACCEL*) PURE;
+	STDMETHOD(GetCaption)(THIS_ BSTR*) PURE;
+	STDMETHOD(GetClipFactor)(THIS_ long*) PURE;
+	STDMETHOD(GetCurrentMode)(THIS_ long*) PURE;
+	STDMETHOD(GetMessageDrain)(THIS_ HWND*) PURE;
+	STDMETHOD(GetModeInfo)(THIS_ long,long*,long*,long*) PURE;
+	STDMETHOD(GetMonitor)(THIS_ long*) PURE;
+	STDMETHOD(HideOnDeactivate)(THIS_ long) PURE;
+	STDMETHOD(IsHideOnDeactivate)(THIS) PURE;
+	STDMETHOD(IsKeepPixelAspectRatio)(THIS_ long*) PURE;
+	STDMETHOD(IsModeAvailable)(THIS_ long) PURE;
+	STDMETHOD(IsModeEnabled)(THIS_ long) PURE;
+	STDMETHOD(KeepPixelAspectRatio)(THIS_ long) PURE;
+	STDMETHOD(SetAcceleratorTable)(THIS_ HWND,HACCEL) PURE;
+	STDMETHOD(SetCaption)(THIS_ BSTR) PURE;
+	STDMETHOD(SetClipFactor)(THIS_ long) PURE;
+	STDMETHOD(SetDefault)(THIS) PURE;
+	STDMETHOD(SetEnabled)(THIS_ long,long) PURE;
+	STDMETHOD(SetMessageDrain)(THIS_ HWND) PURE;
+	STDMETHOD(SetMonitor)(THIS_ long) PURE;
+};
+#undef INTERFACE
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- a/include/assert.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/assert.h	Mon Dec 14 11:52:08 2009 -0500
@@ -1,51 +1,51 @@
-/* 
- * assert.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Define the assert macro for debug output.
- *
- */
-
-/* We should be able to include this file multiple times to allow the assert
-   macro to be enabled/disabled for different parts of code.  So don't add a
-   header guard.  */ 
-
-#ifndef RC_INVOKED
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#undef assert
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#ifdef NDEBUG
-/*
- * If not debugging, assert does nothing.
- */
-#define assert(x)	((void)0)
-
-#else /* debugging enabled */
-
-/*
- * CRTDLL nicely supplies a function which does the actual output and
- * call to abort.
- */
-_CRTIMP void __cdecl _assert (const char*, const char*, int) __MINGW_ATTRIB_NORETURN;
-
-/*
- * Definition of the assert macro.
- */
-#define assert(e)       ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
-
-#endif	/* NDEBUG */
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
+/* 
+ * assert.h
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is a part of the mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within the package.
+ *
+ * Define the assert macro for debug output.
+ *
+ */
+
+/* We should be able to include this file multiple times to allow the assert
+   macro to be enabled/disabled for different parts of code.  So don't add a
+   header guard.  */ 
+
+#ifndef RC_INVOKED
+
+/* All the headers include this file. */
+#include <_mingw.h>
+
+#undef assert
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+#ifdef NDEBUG
+/*
+ * If not debugging, assert does nothing.
+ */
+#define assert(x)	((void)0)
+
+#else /* debugging enabled */
+
+/*
+ * CRTDLL nicely supplies a function which does the actual output and
+ * call to abort.
+ */
+_CRTIMP void __cdecl __MINGW_NOTHROW _assert (const char*, const char*, int) __MINGW_ATTRIB_NORETURN;
+
+/*
+ * Definition of the assert macro.
+ */
+#define assert(e)       ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
+
+#endif	/* NDEBUG */
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif /* Not RC_INVOKED */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/audevcod.h	Mon Dec 14 11:52:08 2009 -0500
@@ -0,0 +1,31 @@
+#ifndef _AUDEVCOD_H
+#define _AUDEVCOD_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum _tagSND_DEVICE_ERROR {
+	SNDDEV_ERROR_Open = 1,       
+	SNDDEV_ERROR_Close = 2,       
+	SNDDEV_ERROR_GetCaps = 3,       
+	SNDDEV_ERROR_PrepareHeader = 4,
+	SNDDEV_ERROR_UnprepareHeader = 5,       
+	SNDDEV_ERROR_Reset = 6,
+	SNDDEV_ERROR_Restart = 7,       
+	SNDDEV_ERROR_GetPosition = 8,       
+	SNDDEV_ERROR_Write = 9,
+	SNDDEV_ERROR_Pause = 10,       
+	SNDDEV_ERROR_Stop = 11,       
+	SNDDEV_ERROR_Start = 12,       
+	SNDDEV_ERROR_AddBuffer = 13,
+	SNDDEV_ERROR_Query = 14
+} SNDDEV_ERR;
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/aviriff.h	Mon Dec 14 11:52:08 2009 -0500
@@ -0,0 +1,87 @@
+#ifndef _AVIRIFF_H
+#define _AVIRIFF_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#ifndef _MMSYSTEM_H
+#include <mmsystem.h>
+#endif
+#ifndef _WINGDI_H
+#include <wingdi.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*--- DirectShow Reference - DirectShow Structures */
+typedef struct _avimainheader {
+	FOURCC fcc;
+	DWORD cb;
+	DWORD dwMicroSecPerFrame;
+	DWORD dwMaxBytesPerSec;
+	DWORD dwPaddingGranularity;
+	DWORD dwFlags;
+	DWORD dwTotalFrames;
+	DWORD dwInitialFrames;
+	DWORD dwStreams;
+	DWORD dwSuggestedBufferSize;
+	DWORD dwWidth;
+	DWORD dwHeight;
+	DWORD dwReserved[4];
+} AVIMAINHEADER;
+#define AVIF_COPYRIGHTED 0x00020000
+#define AVIF_HASINDEX 0x00000010
+#define AVIF_ISINTERLEAVED 0x00000100
+#define AVIF_MUSTUSEINDEX 0x00000020
+#define AVIF_WASCAPTUREFILE 0x00010000
+typedef struct _avioldindex {
+	FOURCC fcc;
+	DWORD cb;
+	struct _avioldindex_entry {
+		DWORD dwChunkId;
+		DWORD dwFlags;
+		DWORD dwOffset;
+		DWORD dwSize;
+	} aIndex[];
+} AVIOLDINDEX;
+#define AVIIF_LIST 0x00000001
+#define AVIIF_KEYFRAME 0x00000010
+#define AVIIF_NO_TIME 0x00000100
+typedef struct {
+	BYTE bFirstEntry;
+	BYTE bNumEntries;
+	WORD wFlags;
+	PALETTEENTRY peNew[];
+} AVIPALCHANGE;
+typedef struct _avistreamheader {
+	FOURCC fcc;
+	DWORD cb;
+	FOURCC fccType;
+	FOURCC fccHandler;
+	DWORD dwFlags;
+	WORD wPriority;
+	WORD wLanguage;
+	DWORD dwInitialFrames;
+	DWORD dwScale;
+	DWORD dwRate;
+	DWORD dwStart;
+	DWORD dwLength;
+	DWORD dwSuggestedBufferSize;
+	DWORD dwQuality;
+	DWORD dwSampleSize;
+	struct {
+		short int left;
+		short int top;
+		short int right;
+		short int bottom;
+	} rcFrame;
+} AVISTREAMHEADER;
+#define AVISF_DISABLED 0x00000001
+#define AVISF_VIDEO_PALCHANGES 0x00010000
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/aygshell.h	Mon Dec 14 11:52:08 2009 -0500
@@ -0,0 +1,49 @@
+#ifndef _AYGSHELL_H
+#define _AYGSHELL_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#if _WIN32_WCE >= 400
+
+#include <windef.h>             /* shellapi needs this */
+#include <basetyps.h>
+#include <shellapi.h>           /* for WINSHELLAPI */
+
+typedef struct tagSHMENUBARINFO {
+  DWORD cbSize;
+  HWND hwndParent;
+  DWORD dwFlags;
+  UINT nToolBarId;
+  HINSTANCE hInstRes;
+  int nBmpId;
+  int cBmpImages;
+  HWND hwndMB;
+  COLORREF clrBk;
+} SHMENUBARINFO, *PSHMENUBARINFO;
+
+typedef struct tagSHACTIVATEINFO {
+  DWORD cbSize;
+  HWND hwndLastFocus;
+  UINT fSipUp :1;
+  UINT fSipOnDeactivation :1;
+  UINT fActive :1;
+  UINT fReserved :29;
+} SHACTIVATEINFO, *PSHACTIVATEINFO;
+
+WINSHELLAPI BOOL WINAPI SHCreateMenuBar(SHMENUBARINFO*);
+WINSHELLAPI HWND WINAPI SHFindMenuBar(HWND);
+WINSHELLAPI HRESULT WINAPI SHCreateNewItem(HWND,REFCLSID);
+WINSHELLAPI BOOL WINAPI SHFullScreen(HWND,DWORD);
+WINSHELLAPI BOOL WINAPI SHSipInfo(UINT,UINT,PVOID,UINT);
+/* next exported by ordinal only: @84 */
+WINSHELLAPI BOOL WINAPI SHHandleWMActivate(HWND,WPARAM,LPARAM,SHACTIVATEINFO*,DWORD);
+/* next exported by ordinal only: @83 */
+WINSHELLAPI BOOL WINAPI SHHandleWMSettingChange(HWND,WPARAM,LPARAM,SHACTIVATEINFO*);
+
+/* The following are not in device ROMs. */
+extern BOOL SHInvokeContextMenuCommand(HWND,UINT,HANDLE);
+
+#endif /* _WIN32_WCE >= 400 */
+
+#endif
--- a/include/basetyps.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/basetyps.h	Mon Dec 14 11:52:08 2009 -0500
@@ -4,7 +4,7 @@
 #pragma GCC system_header
 #endif
 
-#ifndef __OBJC__
+#ifndef _OBJC_NO_COM_
 # ifdef __cplusplus
 #  define EXTERN_C extern "C"
 # else
@@ -40,7 +40,14 @@
 # define STDAPIV_(t)	EXTERN_C t STDAPIVCALLTYPE
 # define STDMETHODIMPV	HRESULT STDMETHODVCALLTYPE
 # define STDMETHODIMPV_(t)	t STDMETHODVCALLTYPE
-# define interface	struct
+/* Newer MS compilers support the __interface keyword, but
+   that has a specific meaning that is enforced by the compiler.
+   For now, just get 'interface' out of the global namespace
+   for __OBJC__ */
+# define _COM_interface	struct
+# ifndef __OBJC__
+#  define interface	_COM_interface
+# endif
 # if defined(__cplusplus) && !defined(CINTERFACE)
 #  define STDMETHOD(m)	virtual HRESULT STDMETHODCALLTYPE m
 #  define STDMETHOD_(t,m)	virtual t STDMETHODCALLTYPE m
@@ -52,11 +59,11 @@
   g++ vtables are now COM-compatible by default
 */
 #  if defined(__GNUC__) &&  __GNUC__ < 3 && !defined(NOCOMATTRIBUTE)
-#   define DECLARE_INTERFACE(i) interface __attribute__((com_interface)) i
-#   define DECLARE_INTERFACE_(i,b) interface __attribute__((com_interface)) i : public b
+#   define DECLARE_INTERFACE(i) _COM_interface __attribute__((com_interface)) i
+#   define DECLARE_INTERFACE_(i,b) _COM_interface __attribute__((com_interface)) i : public b
 #  else
-#   define DECLARE_INTERFACE(i) interface i
-#   define DECLARE_INTERFACE_(i,b) interface i : public b
+#   define DECLARE_INTERFACE(i) _COM_interface i
+#   define DECLARE_INTERFACE_(i,b) _COM_interface i : public b
 #  endif
 # else
 #  define STDMETHOD(m)	HRESULT(STDMETHODCALLTYPE *m)
@@ -68,7 +75,7 @@
 #   define CONST_VTABLE
 #  endif
 #  define DECLARE_INTERFACE(i) \
-   typedef interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; } i; \
+   typedef _COM_interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; } i; \
    typedef CONST_VTABLE struct i##Vtbl i##Vtbl; \
    CONST_VTABLE struct i##Vtbl
 #  define DECLARE_INTERFACE_(i,b) DECLARE_INTERFACE(i)
@@ -76,7 +83,7 @@
 # define BEGIN_INTERFACE
 # define END_INTERFACE
 
-# define FWD_DECL(i) typedef interface i i
+# define FWD_DECL(i) typedef _COM_interface i i
 # if defined(__cplusplus) && !defined(CINTERFACE)
 #  define IENUM_THIS(T)
 #  define IENUM_THIS_(T)
@@ -97,7 +104,7 @@
          }
 # define DECLARE_ENUMERATOR(T) DECLARE_ENUMERATOR_(IEnum##T,T)
 
-#endif /* __OBJC__ */
+#endif /* _OBJC_NO_COM_ */
 
 #ifdef _GUID_DEFINED
 # warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
@@ -117,7 +124,10 @@
 #define UUID_DEFINED
 typedef GUID UUID;
 #endif /* UUID_DEFINED */
+#ifndef __IID_DEFINED__
+#define __IID_DEFINED__
 typedef GUID IID;
+#endif /* __IID_DEFINED__ */
 typedef GUID CLSID;
 typedef CLSID *LPCLSID;
 typedef IID *LPIID;
@@ -134,14 +144,17 @@
 #define REFGUID const GUID&
 #define REFIID const IID&
 #define REFCLSID const CLSID&
+#define REFFMTID const FMTID&
 #else
 #define REFGUID const GUID* const
 #define REFIID const IID* const
 #define REFCLSID const CLSID* const
+#define REFFMTID const FMTID* const
 #endif
 #define _REFGUID_DEFINED
 #define _REFIID_DEFINED
 #define _REFCLSID_DEFINED
+#define _REFFMTID_DEFINED
 #endif
 #ifndef GUID_SECTION
 #define GUID_SECTION ".text"
@@ -166,4 +179,4 @@
 #define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n
 #define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
 #endif
-#endif
+#endif 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/bdatypes.h	Mon Dec 14 11:52:08 2009 -0500
@@ -0,0 +1,32 @@
+#ifndef _BDATYPES_H
+#define _BDATYPES_H
+#if __GNUC__ >= 3
+#pragma GCC system_header
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*--- DirectShow Reference - DirectShow Enumerated Types */
+typedef enum {
+	MEDIA_TRANSPORT_PACKET,
+	MEDIA_ELEMENTARY_STREAM,
+	MEDIA_MPEG2_PSI,
+	MEDIA_TRANSPORT_PAYLOAD
+} MEDIA_SAMPLE_CONTENT;
+/*--- DirectShow Reference - DirectShow Structures */
+typedef struct {
+	DWORD dwOffset
+	DWORD dwPacketLength
+	DWORD dwStride
+} MPEG2_TRANSPORT_STRIDE;
+typedef struct {
+	ULONG ulPID;
+	MEDIA_SAMPLE_CONTENT MediaSampleContent ;
+} PID_MAP;
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/cmnquery.h	Mon Dec 14 11:52:08 2009 -0500
@@ -0,0 +1,81 @@
+/*
+ * cmnquery.h - Active Directory
+ *
+ * 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 _CMNQUERY_H
+#define _CMNQUERY_H
+#if __GNUC__ >= 3
+#pragma GCC system_header
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*--- Active Directory Reference - Active Directory Structures - Active Directory Display Structures */
+#if (_WIN32_WINNT >= 0x0500)
+typedef struct {
+	DWORD cbStruct;
+	DWORD dwFlags;
+	CLSID clsid;
+	HICON hIcon;
+	LPWSTR pszTitle;
+} CQFORM,*LPCQFORM;
+#define CQFF_NOGLOBALPAGES 0x00000001
+#define CQFF_ISOPTIONAL 0x00000002
+typedef struct {
+	DWORD cbStruct;
+	DWORD dwFlags;
+	LPCQPAGEPROC pPageProc;
+	HINSTANCE hInstance;
+	INT idPageName;
+	INT idPageTemplate;
+	DLGPROC pDlgProc;
+	LPARAM lParam;
+} CQPAGE,*LPCQPAGE;
+/*********
+typedef struct {
+	DWORD cbStruct;
+	DWORD dwFlags;
+	CLSID clsidHandler;
+	LPVOID pHandlerParameters;
+	CLSID clsidDefaultForm;
+	IPersistQuery* pPersistQuery;
+	union {
+		void* pFormParameters;
+		IPropertyBag* ppbFormParameters;
+	};
+} OPENQUERYWINDOW,*LPOPENQUERYWINDOW;
+*********/
+#define OQWF_OKCANCEL 0x00000001
+#define OQWF_DEFAULTFORM 0x00000002
+#define OQWF_SINGLESELECT 0x00000004
+#define OQWF_LOADQUERY 0x00000008
+#define OQWF_REMOVESCOPES 0x00000010
+#define OQWF_REMOVEFORMS 0x00000020
+#define OQWF_ISSUEONOPEN 0x00000040
+#define OQWF_SHOWOPTIONAL 0x00000080
+#define OQWF_SAVEQUERYONOK 0x00000200
+#define OQWF_HIDEMENUS 0x00000400
+#define OQWF_HIDESEARCHUI 0x00000800
+#define OQWF_PARAMISPROPERTYBAG 0x80000000
+/*--- Active Directory Reference - Active Directory Functions - Active Directory Display Functions */
+typedef HRESULT (CALLBACK* CQAddFormsProc)(LPARAM,LPCQFORM);
+typedef HRESULT (CALLBACK* CQAddPagesProc)(LPARAM,REFCLSID,LPCQPAGE);
+typedef HRESULT (CALLBACK* CQPageProc)(LPCQPAGE,HWND,UINT,WPARAM,LPARAM);
+#endif /* (_WIN32_WINNT >= 0x0500) */
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- a/include/comcat.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/comcat.h	Mon Dec 14 11:52:08 2009 -0500
@@ -16,9 +16,8 @@
 #endif
 
 EXTERN_C const IID IID_IEnumGUID;
-typedef interface IEnumGUID *LPENUMGUID;
+typedef _COM_interface IEnumGUID *LPENUMGUID;
 
-#undef INTERFACE
 #define INTERFACE IEnumGUID
 DECLARE_INTERFACE_(IEnumGUID,IUnknown)
 {
@@ -80,13 +79,13 @@
 #define IID_IEnumCLSID IID_IEnumGUID
 
 EXTERN_C const IID IID_ICatInformation;
-typedef interface ICatInformation *LPCATINFORMATION;
+typedef _COM_interface ICatInformation *LPCATINFORMATION;
 
 EXTERN_C const IID IID_ICatRegister;
-typedef interface ICatRegister *LPCATREGISTER;
+typedef _COM_interface ICatRegister *LPCATREGISTER;
 
 EXTERN_C const IID IID_IEnumCATEGORYINFO;
-typedef interface IEnumCATEGORYINFO *LPENUMCATEGORYINFO;
+typedef _COM_interface IEnumCATEGORYINFO *LPENUMCATEGORYINFO;
 
 EXTERN_C const CLSID CLSID_StdComponentCategoriesMgr;
 
@@ -145,7 +144,6 @@
 #endif
 
 EXTERN_C const IID IID_IEnumCATEGORYINFO;
-#undef INTERFACE
 #define INTERFACE IEnumCATEGORYINFO
 DECLARE_INTERFACE_(IEnumCATEGORYINFO,IUnknown)
 {
--- a/include/commctrl.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/commctrl.h	Mon Dec 14 11:52:08 2009 -0500
@@ -15,6 +15,15 @@
 #endif
 #endif
 
+#ifndef COMMCTRLAPI
+#ifdef __W32API_USE_DLLIMPORT__
+#define COMMCTRLAPI DECLSPEC_IMPORT
+#else
+#define COMMCTRLAPI
+#endif
+#endif
+
+
 #ifndef SNDMSG
 #ifdef __cplusplus
 #define SNDMSG ::SendMessage
@@ -74,6 +83,8 @@
 #define WC_COMBOBOXW	L"ComboBox"
 #define WC_SCROLLBARA	"ScrollBar"
 #define WC_SCROLLBARW	L"ScrollBar"
+#define WC_LINKA	"SysLink"
+#define WC_LINKW	L"SysLink"
 
 #ifdef UNICODE
 #define HOTKEY_CLASS HOTKEY_CLASSW
@@ -101,6 +112,7 @@
 #define WC_LISTBOX WC_LISTBOXW
 #define WC_COMBOBOX WC_COMBOBOXW
 #define WC_SCROLLBAR WC_SCROLLBARW
+#define WC_LINK WC_LINKW
 #else
 #define ANIMATE_CLASS ANIMATE_CLASSA
 #define HOTKEY_CLASS HOTKEY_CLASSA
@@ -127,6 +139,7 @@
 #define WC_LISTBOX WC_LISTBOXA
 #define WC_COMBOBOX WC_COMBOBOXA
 #define WC_SCROLLBAR WC_SCROLLBARA
+#define WC_LINK WC_LINKA
 #endif
 
 #if (_WIN32_IE >= 0x0500)
@@ -998,6 +1011,41 @@
 #define LVM_GETIMAGELIST	(LVM_FIRST+2)
 #define LVM_SETIMAGELIST	(LVM_FIRST+3)
 #define LVM_GETITEMCOUNT	(LVM_FIRST+4)
+#define LVM_SORTITEMSEX		(LVM_FIRST+81)
+#if (_WIN32_WINNT >= 0x501)
+#define LVM_SETSELECTEDCOLUMN	(LVM_FIRST+140)
+#endif
+#define LVM_SETVIEW		(LVM_FIRST+142)
+#define LVM_GETVIEW		(LVM_FIRST+143)
+#define LVM_INSERTGROUP		(LVM_FIRST+145)
+#define LVM_SETGROUPINFO	(LVM_FIRST+147)
+#define LVM_GETGROUPINFO	(LVM_FIRST+149)
+#define LVM_REMOVEGROUP		(LVM_FIRST+150)
+#define LVM_MOVEGROUP		(LVM_FIRST+151)
+#define LVM_SETGROUPMETRICS	(LVM_FIRST+155)
+#define LVM_GETGROUPMETRICS	(LVM_FIRST+156)
+#define LVM_ENABLEGROUPVIEW	(LVM_FIRST+157)
+#define LVM_SORTGROUPS		(LVM_FIRST+158)
+#define LVM_INSERTGROUPSORTED	(LVM_FIRST+159)
+#define LVM_REMOVEALLGROUPS	(LVM_FIRST+160)
+#define LVM_HASGROUP		(LVM_FIRST+161)
+#define LVM_SETTILEVIEWINFO	(LVM_FIRST+162)
+#define LVM_GETTILEVIEWINFO	(LVM_FIRST+163)
+#define LVM_SETTILEINFO		(LVM_FIRST+164)
+#define LVM_GETTILEINFO		(LVM_FIRST+165)
+#define LVM_SETINSERTMARK	(LVM_FIRST+166)
+#define LVM_GETINSERTMARK	(LVM_FIRST+167)
+#define LVM_INSERTMARKHITTEST	(LVM_FIRST+168)
+#define LVM_GETINSERTMARKRECT	(LVM_FIRST+169)
+#define LVM_SETINSERTMARKCOLOR	(LVM_FIRST+170)
+#define LVM_GETINSERTMARKCOLOR	(LVM_FIRST+171)
+#define LVM_SETINFOTIP		(LVM_FIRST+173)
+#define LVM_GETSELECTEDCOLUMN	(LVM_FIRST+174)
+#define LVM_ISGROUPVIEWENABLED	(LVM_FIRST+175)
+#define LVM_GETOUTLINECOLOR	(LVM_FIRST+176)
+#define LVM_SETOUTLINECOLOR	(LVM_FIRST+177)
+#define LVM_CANCELEDITLABEL	(LVM_FIRST+179)
+#define LVM_MAPIDTOINDEX	(LVM_FIRST+181)
 #define LVIF_TEXT	1
 #define LVIF_IMAGE	2
 #define LVIF_PARAM	4
@@ -1180,6 +1228,7 @@
 #define LVN_SETDISPINFOW	(LVN_FIRST-78)
 #define LVN_KEYDOWN	(LVN_FIRST-55)
 #if (_WIN32_IE >= 0x0400)
+#define LVN_MARQUEEBEGIN  (LVN_FIRST-56)
 #define LVN_GETINFOTIPA	(LVN_FIRST-57)
 #define LVN_GETINFOTIPW	(LVN_FIRST-58)
 #define LVKF_ALT	0x0001
@@ -1690,7 +1739,6 @@
 #define PGM_GETBUTTONSIZE (PGM_FIRST+11)
 #define PGM_GETBUTTONSTATE (PGM_FIRST+12)
 #define PGM_GETDROPTARGET CCM_GETDROPTARGET
-
 #define RBS_REGISTERDROP 4096
 #define RBS_AUTOSIZE 8192
 #define RBS_VERTICALGRIPPER 16384
@@ -1797,6 +1845,21 @@
 #define FSB_ENCARTA_MODE	1
 #define FSB_REGULAR_MODE	0
 #endif /* _WIN32_IE >= 0x400 */
+#if (_WIN32_WINNT >= 0x0501)
+#define LIF_ITEMINDEX	0x00000001
+#define LIF_STATE	0x00000002
+#define LIF_ITEMID	0x00000004
+#define LIF_URL	0x00000008
+#define LIS_FOCUSED	0x00000001
+#define LIS_ENABLED	0x00000002
+#define LIS_VISITED	0x00000004
+#define LM_HITTEST	(WM_USER + 768)
+#define LM_GETIDEALHEIGHT	(WM_USER + 769)
+#define LM_SETITEM	(WM_USER + 770)
+#define LM_GETITEM	(WM_USER + 771)
+#define MAX_LINKID_TEXT	48
+#define L_MAX_URL_LENGTH	2084
+#endif
 
 #ifndef RC_INVOKED
 typedef struct tagCOMBOBOXEXITEMA{
@@ -2066,7 +2129,7 @@
 	LPVOID pvFilter;
 #endif
 } HDITEMW, * LPHDITEMW;
-/* for backward compatability */
+/* for backward compatibility */
 #define HD_ITEMA HDITEMA
 #define HD_ITEMW HDITEMW
 #define HD_ITEM HDITEM
@@ -2074,7 +2137,7 @@
 	RECT *prc;
 	WINDOWPOS *pwpos;
 } HDLAYOUT, *LPHDLAYOUT;
-#define HD_LAYOUT HDLAYOUT /*  backward compatability */
+#define HD_LAYOUT HDLAYOUT /*  backward compatibility */
 typedef struct _HD_HITTESTINFO {
 	POINT pt;
 	UINT flags;
@@ -2336,7 +2399,7 @@
 	int iPos;
 	int iDelta;
 } NMUPDOWN,*LPNMUPDOWN;
-/* for backward compatability */
+/* for backward compatibility */
 #define NM_UPDOWN NMUPDOWN 
 #define LPNM_UPDOWN LPNMUPDOWN 
 typedef struct _LVITEMA {
@@ -2460,7 +2523,7 @@
 	POINT ptAction;
 	LPARAM lParam;
 } NMLISTVIEW, *LPNMLISTVIEW;
-/* for backward compatability */
+/* for backward compatibility */
 #define _NM_LISTVIEW  tagNMLISTVIEW
 #define NM_LISTVIEW NMLISTVIEW
 #define LPNM_LISTVIEW LPNMLISTVIEW
@@ -2485,8 +2548,11 @@
 	NMHDR hdr;
 	int iFrom;
 	int iTo;
-} NMLVCACHEHINT, *PNMLVCACHEHINT;
+} NMLVCACHEHINT, *LPNMLVCACHEHINT;
 #define NM_CACHEHINT NMLVCACHEHINT
+#define PNM_CACHEHINT LPNMLVCACHEHINT
+#define LPNM_CACHEHINT LPNMLVCACHEHINT
+
 typedef struct _TREEITEM *HTREEITEM;
 typedef struct tagTVITEMA {
 	UINT mask;
@@ -2790,6 +2856,13 @@
 #define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA,wID)
 #define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
 #if (_WIN32_IE >= 0x0300)
+typedef struct tagNMLVODSTATECHANGE {
+  NMHDR hdr;
+  int iFrom;
+  int iTo;
+  UINT uNewState;
+  UINT uOldState;
+} NMLVODSTATECHANGE, *LPNMLVODSTATECHANGE;
 typedef struct tagIMAGELISTDRAWPARAMS {
 	DWORD cbSize;
 	HIMAGELIST himl;
@@ -2857,6 +2930,22 @@
 typedef INT (CALLBACK *PFNDPACOMPARE)(PVOID,PVOID,LPARAM);
 #if (_WIN32_WINNT >= 0x0501)
 typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND,UINT,WPARAM,LPARAM,UINT_PTR,DWORD_PTR);
+typedef struct tagLITEM {
+	UINT mask;
+	int iLink;
+	UINT state;
+	UINT stateMask;
+	WCHAR szID[MAX_LINKID_TEXT];
+	WCHAR szUrl[L_MAX_URL_LENGTH];
+} LITEM,*PLITEM;
+typedef struct tagLHITTESTINFO {
+	POINT pt;
+	LITEM item;
+} LHITTESTINFO,*PLHITTESTINFO;
+typedef struct tagNMLINK {
+	NMHDR hdr;
+	LITEM item;
+} NMLINK,*PNMLINK;
 #endif /* _WIN32_WINNT >= 0x0501 */
 
 #define INDEXTOOVERLAYMASK(i) ((i)<<8)
@@ -2896,6 +2985,9 @@
 void WINAPI DrawStatusTextA(HDC,LPRECT,LPCSTR,UINT);
 void WINAPI DrawStatusTextW(HDC,LPRECT,LPCWSTR,UINT);
 void WINAPI GetEffectiveClientRect(HWND,LPRECT,LPINT);
+#if (_WIN32_IE >= 0x0500)
+LANGID WINAPI GetMUILanguage(VOID);
+#endif
 #define Header_GetItemCount(w) (int)SNDMSG((w),HDM_GETITEMCOUNT,0,0)
 #define Header_InsertItem(w,i,phdi) (int)SNDMSG((w),HDM_INSERTITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM*)(phdi))
 #define Header_DeleteItem(w,i) (BOOL)SNDMSG((w),HDM_DELETEITEM,(WPARAM)(int)(i),0)
@@ -3002,6 +3094,9 @@
 #if (_WIN32_IE >= 0x0300)
 BOOL WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
 #endif
+#if (_WIN32_IE >= 0x0500)
+VOID WINAPI InitMUILanguage(LANGID);
+#endif
 int WINAPI LBItemFromPt(HWND,POINT,BOOL);
 #define ListView_GetBkColor(w) (COLORREF)SNDMSG((w),LVM_GETBKCOLOR,0,0)
 #define ListView_GetImageList(w,i) (HIMAGELIST)SNDMSG((w),LVM_GETIMAGELIST,(i),0)
@@ -3013,7 +3108,7 @@
 #define ListView_InsertItem(w,i) (int)SNDMSG((w),LVM_INSERTITEM,0,(LPARAM)(const LV_ITEM*)(i))
 #define ListView_DeleteItem(w,i) (BOOL)SNDMSG((w),LVM_DELETEITEM,i,0)
 #define ListView_DeleteAllItems(w) (BOOL)SNDMSG((w),LVM_DELETEALLITEMS,0,0)
-#define ListView_GetCallbackMask(w) (BOOL)SNDMSG((w),LVM_GETCALLBACKMASK,0,0)
+#define ListView_GetCallbackMask(w) (UINT)SNDMSG((w),LVM_GETCALLBACKMASK,0,0)
 #define ListView_SetCallbackMask(w,m) (BOOL)SNDMSG((w),LVM_SETCALLBACKMASK,m,0)
 #define ListView_GetNextItem(w,i,f) (int)SNDMSG((w),LVM_GETNEXTITEM,i,MAKELPARAM((f),0))
 #define ListView_FindItem(w,i,p) (int)SNDMSG((w), LVM_FINDITEM,(WPARAM)i,(LPARAM)(const LV_FINDINFO*)(p))
@@ -3024,7 +3119,7 @@
 #define ListView_GetStringWidth(w,s) (int)SNDMSG((w),LVM_GETSTRINGWIDTH,0,(LPARAM)s)
 #define ListView_HitTest(w,p) (int)SNDMSG((w),LVM_HITTEST,0,(LPARAM)(LV_HITTESTINFO*)(p))
 #define ListView_EnsureVisible(w,i,f) (BOOL)SNDMSG((w),LVM_ENSUREVISIBLE,i,MAKELPARAM((f),0))
-#define ListView_Scroll(w,dx,dy) (BOOL)SNDMSG((w),LVM_SCROLL,dx,dy)
+#define ListView_Scroll(w,x,y) (BOOL)SNDMSG((w),LVM_SCROLL,x,y)
 #define ListView_RedrawItems(w,f,l) (BOOL)SNDMSG((w),LVM_REDRAWITEMS,f,l)
 #define ListView_Arrange(w,c) (BOOL)SNDMSG((w),LVM_ARRANGE,c,0)
 #define ListView_EditLabel(w,i) (HWND)SNDMSG((w),LVM_EDITLABEL,i,0)
@@ -3045,7 +3140,7 @@
 #define ListView_GetCountPerPage(w) (int)SNDMSG((w),LVM_GETCOUNTPERPAGE,0,0)
 #define ListView_GetOrigin(w,p) (BOOL)SNDMSG((w),LVM_GETORIGIN,0,(LPARAM)(POINT*)(p))
 #define ListView_GetOrigin(w,p) (BOOL)SNDMSG((w),LVM_GETORIGIN,0,(LPARAM)(POINT*)(p))
-#define ListView_Update(w,i) (BOOL)SNDMSG((w),LVM_UPDATE,i,0)
+#define ListView_Update(w,i) (BOOL)SNDMSG((w),LVM_UPDATE,(WPARAM)(i),0)
 #define ListView_SetItemState(w,i,d,m) \
 { \
 	LV_ITEM _lvi;\
@@ -3069,7 +3164,7 @@
 	_lvi.pszText=s;\
 	SNDMSG((w),LVM_SETITEMTEXT,i,(LPARAM)(LV_ITEM*)&_lvi);\
 }
-#define ListView_SetItemCount(w,n) SNDMSG((w),LVM_SETITEMCOUNT,n,0)
+#define ListView_SetItemCount(w,n) (void)SNDMSG((w),LVM_SETITEMCOUNT,n,0)
 #define ListView_SortItems(w,f,l) (BOOL)SNDMSG((w),LVM_SORTITEMS,l,(LPARAM)f)
 #define ListView_SetItemPosition32(w,i,x,y) \
 { \
@@ -3079,11 +3174,46 @@
 #define ListView_GetSelectedCount(w) (UINT)SNDMSG((w),LVM_GETSELECTEDCOUNT,0,0)
 #define ListView_GetCheckState(w,i) ((((UINT)(SNDMSG((w),LVM_GETITEMSTATE,(WPARAM)(i),LVIS_STATEIMAGEMASK)))>>12)-1)
 #define ListView_SetCheckState(w,i,f) ListView_SetItemState(w,i,INDEXTOSTATEIMAGEMASK((f)+1),LVIS_STATEIMAGEMASK)
-#define ListView_GetISearchString(w, lpsz) (BOOL)SNDMSG((w), LVM_GETISEARCHSTRING, 0, (LPARAM) (LPTSTR)(lpsz)) 
+#define ListView_GetISearchString(w,lpsz) (BOOL)SNDMSG((w),LVM_GETISEARCHSTRING,0,(LPARAM)(LPTSTR)(lpsz)) 
+#define ListView_CancelEditLabel(w) (VOID)SNDMSG((w),LVM_CANCELEDITLABEL,0,0)
+#define ListView_EnableGroupView(w,i) (int)SNDMSG((w),LVM_ENABLEGROUPVIEW,(WPARAM)(i),0)
+#define ListView_GetGroupInfo(w,i,p) (int)SNDMSG((w),LVM_GETGROUPINFO,(WPARAM)(i),(LPARAM)(p))
+#define ListView_GetGroupMetrics(w,p) SNDMSG((w),LVM_GETGROUPMETRICS,0,(LPARAM)(p))
+#define ListView_GetInsertMark(w,p) (BOOL)SNDMSG((w),LVM_GETINSERTMARK,0,(LPARAM)(p))
+#define ListView_GetInsertMarkColor(w) (COLORREF)SNDMSG((w),LVM_GETINSERTMARKCOLOR,0,0)
+#define ListView_GetInsertMarkRect(w,p) (int)SNDMSG((w),LVM_GETINSERTMARKRECT,0,(LPARAM)(p))
+#define ListView_GetOutlineColor(w) (COLORREF)SNDMSG((w),LVM_GETOUTLINECOLOR,0,0)
+#define ListView_GetSelectedColumn(w) (UINT)SNDMSG((w),LVM_GETSELECTEDCOLUMN,0,0)
+#define ListView_GetTileInfo(w,p) SNDMSG((w),LVM_GETTILEINFO,0,(LPARAM)(p))
+#define ListView_GetTileViewInfo(w,p) SNDMSG((w),LVM_GETTILEVIEWINFO,0,(LPARAM)(p))
+#define ListView_GetView(w) (DWORD)SNDMSG((w),LVM_GETVIEW,0,0)
+#define ListView_HasGroup(w,i) (BOOL)SNDMSG((w),LVM_HASGROUP,(WPARAM)(i),0)
+#define ListView_InsertGroup(w,i,p) (int)SNDMSG((w),LVM_INSERTGROUP,(WPARAM)(i),(LPARAM)(p))
+#define ListView_InsertGroupSorted(w,p) SNDMSG((w),LVM_INSERTGROUPSORTED,(WPARAM)(p),0)
+#define ListView_InsertMarkHitTest(w,p,t) (BOOL)SNDMSG((w),LVM_INSERTMARKHITTEST,(WPARAM)(p),(LPARAM)(t))
+#define ListView_IsGroupViewEnabled(w) (BOOL)SNDMSG((w),LVM_ISGROUPVIEWENABLED,0,0)
+#define ListView_MapIDToIndex(w,i) (UINT)SNDMSG((w),LVM_MAPIDTOINDEX,(WPARAM)(i),0)
+#define ListView_MoveGroup(w,i,t) SNDMSG((w),LVM_MOVEGROUP,(WPARAM)(i),(LPARAM)(t))
+#define ListView_RemoveAllGroups(w) SNDMSG((w),LVM_REMOVEALLGROUPS,0,0)
+#define ListView_RemoveGroup(w,i) (int)SNDMSG((w),LVM_REMOVEGROUP,(WPARAM)(i),0)
+#define ListView_SetGroupInfo(w,i,p) (int)SNDMSG((w),LVM_SETGROUPINFO,(WPARAM)(i),(LPARAM)(p))
+#define ListView_SetGroupMetrics(w,p) SNDMSG((w),LVM_SETGROUPMETRICS,0,(LPARAM)(p))
+#define ListView_SetInfoTip(w,p) (BOOL)SNDMSG((w),LVM_SETINFOTIP,0,(LPARAM)(p))
+#define ListView_SetInsertMark(w,p) (BOOL)SNDMSG((w),LVM_SETINSERTMARK,0,(LPARAM)(p))
+#define ListView_SetInsertMarkColor(w,c) (COLORREF)SNDMSG((w),LVM_SETINSERTMARKCOLOR,0,(LPARAM)(c))
+#define ListView_SetOutlineColor(w,c) (COLORREF)SNDMSG((w),LVM_SETOUTLINECOLOR,0,(LPARAM)(c))
+#if (_WIN32_WINNT >= 0x0501)
+#define ListView_SetSelectedColumn(w,i) SNDMSG((w),LVM_SETSELECTEDCOLUMN,(WPARAM)i,0)
+#endif
+#define ListView_SetTileInfo(w,p) (BOOL)SNDMSG((w),LVM_SETTILEINFO,0,(LPARAM)(p))
+#define ListView_SetTileViewInfo(w,p) (BOOL)SNDMSG((w),LVM_SETTILEVIEWINFO,0,(LPARAM)(p))
+#define ListView_SetView(w,i) (int)SNDMSG((w),LVM_SETVIEW,(WPARAM)(i),0)
+#define ListView_SortGroups(w,c,p) (int)SNDMSG((w),LVM_SORTGROUPS,(WPARAM)(c),(LPARAM)(p))
+#define ListView_SortItemsEx(w,c,p) (BOOL)SNDMSG((w),LVM_SORTITEMSEX,(WPARAM)(p),(LPARAM)(c))
 
 #if (_WIN32_WINNT >= 0x0501)
-#define ComboBox_SetMinVisible(w,i) (BOOL)SNDMSG((w), CB_SETMINVISIBLE, (WPARAM)(i), 0);
-#define ComboBox_GetMinVisible(w) (int)SNDMSG((w), CB_GETMINVISIBLE, 0, 0);
+#define ComboBox_SetMinVisible(w,i) (BOOL)SNDMSG((w), CB_SETMINVISIBLE,(WPARAM)(i),0);
+#define ComboBox_GetMinVisible(w) (INT)SNDMSG((w),CB_GETMINVISIBLE,0,0);
 #endif
 
 BOOL WINAPI MakeDragList(HWND);
@@ -3185,19 +3315,19 @@
 #define ListView_SetHotCursor(w,c) (HCURSOR)SNDMSG((w),LVM_SETHOTCURSOR,0,(LPARAM)(c))
 #define ListView_SetHotItem(w,i) (int)SNDMSG((w),LVM_SETHOTITEM,(WPARAM)(i),0)
 #define ListView_SetIconSpacing(w,x,y) (DWORD)SNDMSG((w),LVM_SETICONSPACING,0,MAKELONG(x,y))
-#define ListView_SubItemHitTest(w,p) (int)SNDMSG((w),LVM_SUBITEMHITTEST,0,(LPARAM)(LPLVHITTESTINFO)(p))
-#define ListView_SetItemCountEx(w, i, f) SNDMSG((w), LVM_SETITEMCOUNT, (WPARAM)(i), (LPARAM)(f))
+#define ListView_SubItemHitTest(w,p) (INT)SNDMSG((w),LVM_SUBITEMHITTEST,0,(LPARAM)(LPLVHITTESTINFO)(p))
+#define ListView_SetItemCountEx(w,i,f) (void)SNDMSG((w),LVM_SETITEMCOUNT,(WPARAM)(i),(LPARAM)(f))
 WINBOOL WINAPI ImageList_SetImageCount(HIMAGELIST,UINT);
 WINBOOL WINAPI ImageList_Copy(HIMAGELIST,int,HIMAGELIST,int,UINT);
 WINBOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
-#define TabCtrl_SetMinTabWidth(hwnd, x) SNDMSG((hwnd), TCM_SETMINTABWIDTH, 0, x)
-#define TabCtrl_DeselectAll(hwnd, fExcludeFocus) SNDMSG((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
+#define TabCtrl_SetMinTabWidth(hwnd,x) SNDMSG((hwnd),TCM_SETMINTABWIDTH,0,x)
+#define TabCtrl_DeselectAll(hwnd,fExcludeFocus) SNDMSG((hwnd),TCM_DESELECTALL,fExcludeFocus,0)
 #define TreeView_GetToolTips(w) (HWND)SNDMSG((w),TVM_GETTOOLTIPS,0,0)
 #define TreeView_SetToolTips(w,wt) (HWND)SNDMSG((w),TVM_SETTOOLTIPS,(WPARAM)(wt),0)
 #endif
 #if (_WIN32_IE >= 0x0400)
-#define ListView_GetBkImage(h,plvbki) (BOOL)SNDMSG((h), LVM_GETBKIMAGE, 0, (LPARAM)(plvbki))
-#define ListView_SetBkImage(h, plvbki) (BOOL)SNDMSG((h), LVM_SETBKIMAGE, 0, (LPARAM)(plvbki))
+#define ListView_GetBkImage(h,plvbki) (BOOL)SNDMSG((h),LVM_GETBKIMAGE,0,(LPARAM)(plvbki))
+#define ListView_SetBkImage(h,plvbki) (BOOL)SNDMSG((h),LVM_SETBKIMAGE,0,(LPARAM)(plvbki))
 #define ListView_SetExtendedListViewStyleEx(w,m,s) (DWORD)SNDMSG((w),LVM_SETEXTENDEDLISTVIEWSTYLE,(m),(s))
 #define ListView_SetWorkAreas(w,n,r) (BOOL)SNDMSG((w),LVM_SETWORKAREAS,(WPARAM)(n),(LPARAM)(RECT *)(r))
 #define ListView_GetWorkAreas(w,n,r) (BOOL)SNDMSG((w),LVM_GETWORKAREAS,(WPARAM)(n),(LPARAM)(RECT *)(r))
@@ -3208,13 +3338,13 @@
 #define ListView_SetSelectionMark(w,i) (INT)SNDMSG((w),LVM_SETSELECTIONMARK,0,(LPARAM)(i))
 #define ListView_SetToolTips(w,n) (HWND)SNDMSG((w),LVM_SETTOOLTIPS,(WPARAM)(n),0)
 #define ListView_GetToolTips(w) (HWND)SNDMSG((w),LVM_GETTOOLTIPS,0,0)
-#define ListView_SetUnicodeFormat(w, f) (BOOL)SNDMSG((w), LVM_SETUNICODEFORMAT, (WPARAM)(f), 0)
-#define ListView_GetUnicodeFormat(w) (BOOL)SNDMSG((w), LVM_GETUNICODEFORMAT, 0, 0)
-#define TabCtrl_HighlightItem(hwnd, i, fHighlight) SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)i, (LPARAM)MAKELONG (fHighlight, 0))
-#define TabCtrl_SetExtendedStyle(hwnd, dw) SNDMSG((hwnd), TCM_SETEXTENDEDSTYLE, 0, dw)
-#define TabCtrl_GetExtendedStyle(hwnd) SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)
-#define TabCtrl_SetUnicodeFormat(hwnd, fUnicode) SNDMSG((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
-#define TabCtrl_GetUnicodeFormat(hwnd) SNDMSG((hwnd), TCM_GETUNICODEFORMAT, 0, 0)
+#define ListView_SetUnicodeFormat(w,f) (BOOL)SNDMSG((w),LVM_SETUNICODEFORMAT,(WPARAM)(f),0)
+#define ListView_GetUnicodeFormat(w) (BOOL)SNDMSG((w),LVM_GETUNICODEFORMAT,0,0)
+#define TabCtrl_HighlightItem(w,i,fHighlight) SNDMSG((w),TCM_HIGHLIGHTITEM,(WPARAM)i,(LPARAM)MAKELONG(fHighlight,0))
+#define TabCtrl_SetExtendedStyle(w,dw) SNDMSG((w),TCM_SETEXTENDEDSTYLE,0,dw)
+#define TabCtrl_GetExtendedStyle(w) SNDMSG((w),TCM_GETEXTENDEDSTYLE,0,0)
+#define TabCtrl_SetUnicodeFormat(w,u) SNDMSG((w),TCM_SETUNICODEFORMAT,(WPARAM)(u),0)
+#define TabCtrl_GetUnicodeFormat(w) SNDMSG((w),TCM_GETUNICODEFORMAT,0,0)
 #define TreeView_GetBkColor(w) (COLORREF)SNDMSG((w),TVM_GETBKCOLOR,0,0)
 #define TreeView_GetInsertMarkColor(w) (COLORREF)SNDMSG((w),TVM_GETINSERTMARKCOLOR,0,0)
 #define TreeView_GetItemHeight(w) (int)SNDMSG((w),TVM_GETITEMHEIGHT,0,0)
@@ -3598,6 +3728,28 @@
 #endif
 #endif /* RC_INVOKED */
 
+#ifdef _WIN32_WCE               /* these are PPC only */
+
+COMMCTRLAPI HWND WINAPI CommandBar_Create(HINSTANCE, HWND, int); 
+COMMCTRLAPI BOOL WINAPI CommandBar_Show(HWND, BOOL); 
+COMMCTRLAPI int WINAPI CommandBar_AddBitmap(HWND, HINSTANCE, int, int, int, int); 
+COMMCTRLAPI HWND WINAPI CommandBar_InsertComboBox(HWND, HINSTANCE, int, UINT, WORD, WORD); 
+COMMCTRLAPI BOOL WINAPI CommandBar_InsertMenubar(HWND, HINSTANCE, WORD, WORD );
+COMMCTRLAPI BOOL WINAPI CommandBar_InsertMenubarEx(HWND, HINSTANCE, LPTSTR, WORD);
+COMMCTRLAPI BOOL WINAPI CommandBar_DrawMenuBar(HWND, WORD); 
+COMMCTRLAPI HMENU WINAPI CommandBar_GetMenu(HWND, WORD); 
+COMMCTRLAPI BOOL WINAPI CommandBar_AddAdornments(HWND, DWORD, DWORD); 
+COMMCTRLAPI int WINAPI CommandBar_Height(HWND hwndCB); 
+
+/* These two are not in the DLL */
+#define CommandBar_InsertButton(hwnd,i,lptbbutton)              \
+    SendMessage((hwnd),TB_INSERTBUTTON,(i),(lptbbutton))
+#define CommandBar_Destroy(hwnd)                                \
+    DestroyWindow(hwnd)
+
+
+#endif /* _WIN32_WCE */
+
 #ifdef __cplusplus
 }
 #endif
--- a/include/commdlg.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/commdlg.h	Mon Dec 14 11:52:08 2009 -0500
@@ -139,30 +139,40 @@
 #define FR_REPLACEALL 32
 #define FR_SHOWHELP 128
 #define FR_WHOLEWORD 2
-#define PD_ALLPAGES	0
-#define PD_SELECTION	1
-#define PD_PAGENUMS	2
-#define PD_NOSELECTION	4
-#define PD_NOPAGENUMS	8
-#define PD_COLLATE	16
-#define PD_PRINTTOFILE	32
-#define PD_PRINTSETUP	64
-#define PD_NOWARNING	128
-#define PD_RETURNDC	256
-#define PD_RETURNIC	512
-#define PD_RETURNDEFAULT	1024
-#define PD_SHOWHELP	2048
-#define PD_ENABLEPRINTHOOK	4096
-#define PD_ENABLESETUPHOOK	8192
-#define PD_ENABLEPRINTTEMPLATE	16384
-#define PD_ENABLESETUPTEMPLATE 32768
-#define PD_ENABLEPRINTTEMPLATEHANDLE 65536
-#define PD_ENABLESETUPTEMPLATEHANDLE 0x20000
-#define PD_USEDEVMODECOPIES	0x40000
-#define PD_USEDEVMODECOPIESANDCOLLATE	0x40000
-#define PD_DISABLEPRINTTOFILE	0x80000
-#define PD_HIDEPRINTTOFILE	0x100000
-#define PD_NONETWORKBUTTON	0x200000
+#define PD_ALLPAGES	0x00000000
+#define PD_SELECTION	0x00000001
+#define PD_PAGENUMS	0x00000002
+#define PD_NOSELECTION	0x00000004
+#define PD_NOPAGENUMS	0x00000008
+#define PD_COLLATE	0x00000010
+#define PD_PRINTTOFILE	0x00000020
+#define PD_PRINTSETUP	0x00000040
+#define PD_NOWARNING	0x00000080
+#define PD_RETURNDC	0x00000100
+#define PD_RETURNIC	0x00000200
+#define PD_RETURNDEFAULT	0x00000400
+#define PD_SHOWHELP	0x00000800
+#define PD_ENABLEPRINTHOOK	0x00001000
+#define PD_ENABLESETUPHOOK	0x00002000
+#define PD_ENABLEPRINTTEMPLATE	0x00004000
+#define PD_ENABLESETUPTEMPLATE 0x00008000
+#define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
+#define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
+#define PD_USEDEVMODECOPIES	0x00040000
+#define PD_USEDEVMODECOPIESANDCOLLATE	0x00040000
+#define PD_DISABLEPRINTTOFILE	0x00080000
+#define PD_HIDEPRINTTOFILE	0x00100000
+#define PD_NONETWORKBUTTON	0x00200000
+#if (_WIN32_WINNT >= 0x0500)
+#define PD_CURRENTPAGE	0x00400000
+#define PD_NOCURRENTPAGE	0x00800000
+#define PD_EXCLUSIONFLAGS	0x01000000 
+#define PD_USELARGETEMPLATE	0x10000000
+#define PD_RESULT_CANCEL	0
+#define PD_RESULT_PRINT	1
+#define PD_RESULT_APPLY	2
+#define START_PAGE_GENERAL	0XFFFFFFFF
+#endif
 #define PSD_DEFAULTMINMARGINS	0
 #define PSD_INWININIINTLMEASURE	0
 #define PSD_MINMARGINS	1
@@ -193,6 +203,9 @@
 #define CD_LBSELSUB      1
 #define CD_LBSELADD      2
 #define DN_DEFAULTPRN	1
+#if (_WIN32_WINNT >= 0x0500)
+#define OPENFILENAME_SIZE_VERSION_400  76
+#endif
 
 #ifndef SNDMSG
 #ifdef __cplusplus
@@ -453,7 +466,7 @@
 	HANDLE hPrintTemplate;
 	HANDLE hSetupTemplate;
 } PRINTDLGW,*LPPRINTDLGW;
-#if (WINVER >= 0x0500) && !defined (__OBJC__)
+#if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
 #include <unknwn.h>  /* for LPUNKNOWN  */ 
 #include <prsht.h>   /* for HPROPSHEETPAGE  */
 typedef struct tagPRINTPAGERANGE {
@@ -527,7 +540,7 @@
 BOOL WINAPI PrintDlgW(LPPRINTDLGW);
 HWND WINAPI ReplaceTextA(LPFINDREPLACEA);
 HWND WINAPI ReplaceTextW(LPFINDREPLACEW);
-#if (WINVER >= 0x0500) && !defined (__OBJC__)
+#if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
 HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA);
 HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW);
 #endif /* WINVER >= 0x0500 */
@@ -556,7 +569,7 @@
 #define PageSetupDlg PageSetupDlgW
 #define PrintDlg PrintDlgW
 #define ReplaceText ReplaceTextW
-#if (WINVER >= 0x0500) && !defined (__OBJC__)
+#if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
 typedef PRINTDLGEXW PRINTDLGEX, *LPPRINTDLGEX;
 #define PrintDlgEx PrintDlgExW
 #endif /* WINVER >= 0x0500 */
@@ -584,7 +597,7 @@
 #define PageSetupDlg PageSetupDlgA
 #define PrintDlg PrintDlgA
 #define ReplaceText ReplaceTextA
-#if (WINVER >= 0x0500) && !defined (__OBJC__)
+#if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
 typedef PRINTDLGEXA PRINTDLGEX, *LPPRINTDLGEX;
 #define PrintDlgEx PrintDlgExA
 #endif /* WINVER >= 0x0500 */
--- a/include/complex.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/complex.h	Mon Dec 14 11:52:08 2009 -0500
@@ -1,205 +1,200 @@
-/*
- * complex.h
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- *  Created by Danny Smith <dannysmith@users.sourceforge.net>
- *
- *  THIS SOFTWARE IS NOT COPYRIGHTED
- *
- *  This source code is offered for use in the public domain. You may
- *  use, modify or distribute it freely.
- *
- *  This code is distributed in the hope that it will be useful but
- *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- *  DISCLAIMED. This includes but is not limited to warranties of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef _COMPLEX_H_
-#define _COMPLEX_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
-     || !defined __STRICT_ANSI__ 
-
-/* These macros are specified by C99 standard */
-
-#ifndef __cplusplus
-#define complex _Complex
-#endif
-
-#define _Complex_I  (0.0F +  1.0iF)
-
-/* GCC doesn't support _Imaginary type yet, so we don't
-   define _Imaginary_I */
-
-#define I _Complex_I
-
-#ifdef __cplusplus
-extern "C" {
-#endif 
-
-#ifndef RC_INVOKED
-
-double __MINGW_ATTRIB_CONST creal (double _Complex);
-double __MINGW_ATTRIB_CONST cimag (double _Complex);
-double __MINGW_ATTRIB_CONST carg (double _Complex);
-double __MINGW_ATTRIB_CONST cabs (double _Complex);
-double _Complex __MINGW_ATTRIB_CONST conj (double _Complex);
-double _Complex  cacos (double _Complex);
-double _Complex  casin (double _Complex);
-double _Complex  catan (double _Complex);
-double _Complex  ccos (double _Complex);
-double _Complex  csin (double _Complex);
-double _Complex  ctan (double _Complex);
-double _Complex  cacosh (double _Complex);
-double _Complex  casinh (double _Complex);
-double _Complex  catanh (double _Complex);
-double _Complex  ccosh (double _Complex);
-double _Complex  csinh (double _Complex);
-double _Complex  ctanh (double _Complex);
-double _Complex  cexp (double _Complex);
-double _Complex  clog (double _Complex);
-double _Complex  cpow (double _Complex, double _Complex);
-double _Complex  csqrt (double _Complex);
-double _Complex __MINGW_ATTRIB_CONST cproj (double _Complex);
-
-float __MINGW_ATTRIB_CONST crealf (float _Complex);
-float __MINGW_ATTRIB_CONST cimagf (float _Complex);
-float __MINGW_ATTRIB_CONST cargf (float _Complex);
-float __MINGW_ATTRIB_CONST cabsf (float _Complex);
-float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex);
-float _Complex  cacosf (float _Complex);
-float _Complex  casinf (float _Complex);
-float _Complex  catanf (float _Complex);
-float _Complex  ccosf (float _Complex);
-float _Complex  csinf (float _Complex);
-float _Complex  ctanf (float _Complex);
-float _Complex  cacoshf (float _Complex);
-float _Complex  casinhf (float _Complex);
-float _Complex  catanhf (float _Complex);
-float _Complex  ccoshf (float _Complex);
-float _Complex  csinhf (float _Complex);
-float _Complex  ctanhf (float _Complex);
-float _Complex  cexpf (float _Complex);
-float _Complex  clogf (float _Complex);
-float _Complex  cpowf (float _Complex, float _Complex);
-float _Complex  csqrtf (float _Complex);
-float _Complex __MINGW_ATTRIB_CONST cprojf (float _Complex);
-
-long double __MINGW_ATTRIB_CONST creall (long double _Complex);
-long double __MINGW_ATTRIB_CONST cimagl (long double _Complex);
-long double __MINGW_ATTRIB_CONST cargl (long double _Complex);
-long double __MINGW_ATTRIB_CONST cabsl (long double _Complex);
-long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex);
-long double _Complex  cacosl (long double _Complex);
-long double _Complex  casinl (long double _Complex);
-long double _Complex  catanl (long double _Complex);
-long double _Complex  ccosl (long double _Complex);
-long double _Complex  csinl (long double _Complex);
-long double _Complex  ctanl (long double _Complex);
-long double _Complex  cacoshl (long double _Complex);
-long double _Complex  casinhl (long double _Complex);
-long double _Complex  catanhl (long double _Complex);
-long double _Complex  ccoshl (long double _Complex);
-long double _Complex  csinhl (long double _Complex);
-long double _Complex  ctanhl (long double _Complex);
-long double _Complex  cexpl (long double _Complex);
-long double _Complex  clogl (long double _Complex);
-long double _Complex  cpowl (long double _Complex, long double _Complex);
-long double _Complex  csqrtl (long double _Complex);
-long double _Complex __MINGW_ATTRIB_CONST cprojl (long double _Complex);
-
-#ifdef __GNUC__
-
-/* double */
-__CRT_INLINE double __MINGW_ATTRIB_CONST creal (double _Complex _Z)
-{
-  return __real__ _Z;
-}
-
-__CRT_INLINE double __MINGW_ATTRIB_CONST cimag (double _Complex _Z)
-{
-  return __imag__ _Z;
-}
-
-__CRT_INLINE double _Complex __MINGW_ATTRIB_CONST conj (double _Complex _Z)
-{
-  return __extension__ ~_Z;
-}
-
-__CRT_INLINE  double __MINGW_ATTRIB_CONST carg (double _Complex _Z)
-{
-  double res;
-  __asm__  ("fpatan;"
-	   : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
-  return res;
-}
-
-
-/* float */
-__CRT_INLINE float __MINGW_ATTRIB_CONST crealf (float _Complex _Z)
-{
-  return __real__ _Z;
-}
-
-__CRT_INLINE float __MINGW_ATTRIB_CONST cimagf (float _Complex _Z)
-{
-  return __imag__ _Z;
-}
-
-__CRT_INLINE float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex _Z)
-{
-  return __extension__ ~_Z;
-}
-
-__CRT_INLINE  float __MINGW_ATTRIB_CONST cargf (float _Complex _Z)
-{
-  float res;
-  __asm__  ("fpatan;"
-	   : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
-  return res;
-}
-
-/* long double */
-__CRT_INLINE long double __MINGW_ATTRIB_CONST creall (long double _Complex _Z)
-{
-  return __real__ _Z;
-}
-
-__CRT_INLINE long double __MINGW_ATTRIB_CONST cimagl (long double _Complex _Z)
-{
-  return __imag__ _Z;
-}
-
-__CRT_INLINE long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex _Z)
-{
-  return __extension__ ~_Z;
-}
-
-__CRT_INLINE  long double __MINGW_ATTRIB_CONST cargl (long double _Complex _Z)
-{
-  long double res;
-  __asm__  ("fpatan;"
-	   : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
-  return res;
-}
-
-#endif /* __GNUC__ */
-
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif /* __STDC_VERSION__ >= 199901L */
-
-
-#endif /* _COMPLEX_H */
+/*
+ * complex.h
+ *
+ * This file is part of the Mingw32 package.
+ *
+ * Contributors:
+ *  Created by Danny Smith <dannysmith@users.sourceforge.net>
+ *
+ *  THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ *  This source code is offered for use in the public domain. You may
+ *  use, modify or distribute it freely.
+ *
+ *  This code is distributed in the hope that it will be useful but
+ *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ *  DISCLAIMED. This includes but is not limited to warranties of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+#ifndef _COMPLEX_H_
+#define _COMPLEX_H_
+
+/* All the headers include this file. */
+#include <_mingw.h>
+
+/* These macros are specified by C99 standard */
+
+#ifndef __cplusplus
+#define complex _Complex
+#endif
+
+#define _Complex_I  (0.0F +  1.0iF)
+
+/* GCC doesn't support _Imaginary type yet, so we don't
+   define _Imaginary_I */
+
+#define I _Complex_I
+
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
+#ifndef RC_INVOKED
+
+double __MINGW_ATTRIB_CONST creal (double _Complex);
+double __MINGW_ATTRIB_CONST cimag (double _Complex);
+double __MINGW_ATTRIB_CONST carg (double _Complex);
+double __MINGW_ATTRIB_CONST cabs (double _Complex);
+double _Complex __MINGW_ATTRIB_CONST conj (double _Complex);
+double _Complex  cacos (double _Complex);
+double _Complex  casin (double _Complex);
+double _Complex  catan (double _Complex);
+double _Complex  ccos (double _Complex);
+double _Complex  csin (double _Complex);
+double _Complex  ctan (double _Complex);
+double _Complex  cacosh (double _Complex);
+double _Complex  casinh (double _Complex);
+double _Complex  catanh (double _Complex);
+double _Complex  ccosh (double _Complex);
+double _Complex  csinh (double _Complex);
+double _Complex  ctanh (double _Complex);
+double _Complex  cexp (double _Complex);
+double _Complex  clog (double _Complex);
+double _Complex  cpow (double _Complex, double _Complex);
+double _Complex  csqrt (double _Complex);
+double _Complex __MINGW_ATTRIB_CONST cproj (double _Complex);
+
+float __MINGW_ATTRIB_CONST crealf (float _Complex);
+float __MINGW_ATTRIB_CONST cimagf (float _Complex);
+float __MINGW_ATTRIB_CONST cargf (float _Complex);
+float __MINGW_ATTRIB_CONST cabsf (float _Complex);
+float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex);
+float _Complex  cacosf (float _Complex);
+float _Complex  casinf (float _Complex);
+float _Complex  catanf (float _Complex);
+float _Complex  ccosf (float _Complex);
+float _Complex  csinf (float _Complex);
+float _Complex  ctanf (float _Complex);
+float _Complex  cacoshf (float _Complex);
+float _Complex  casinhf (float _Complex);
+float _Complex  catanhf (float _Complex);
+float _Complex  ccoshf (float _Complex);
+float _Complex  csinhf (float _Complex);
+float _Complex  ctanhf (float _Complex);
+float _Complex  cexpf (float _Complex);
+float _Complex  clogf (float _Complex);
+float _Complex  cpowf (float _Complex, float _Complex);
+float _Complex  csqrtf (float _Complex);
+float _Complex __MINGW_ATTRIB_CONST cprojf (float _Complex);
+
+long double __MINGW_ATTRIB_CONST creall (long double _Complex);
+long double __MINGW_ATTRIB_CONST cimagl (long double _Complex);
+long double __MINGW_ATTRIB_CONST cargl (long double _Complex);
+long double __MINGW_ATTRIB_CONST cabsl (long double _Complex);
+long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex);
+long double _Complex  cacosl (long double _Complex);
+long double _Complex  casinl (long double _Complex);
+long double _Complex  catanl (long double _Complex);
+long double _Complex  ccosl (long double _Complex);
+long double _Complex  csinl (long double _Complex);
+long double _Complex  ctanl (long double _Complex);
+long double _Complex  cacoshl (long double _Complex);
+long double _Complex  casinhl (long double _Complex);
+long double _Complex  catanhl (long double _Complex);
+long double _Complex  ccoshl (long double _Complex);
+long double _Complex  csinhl (long double _Complex);
+long double _Complex  ctanhl (long double _Complex);
+long double _Complex  cexpl (long double _Complex);
+long double _Complex  clogl (long double _Complex);
+long double _Complex  cpowl (long double _Complex, long double _Complex);
+long double _Complex  csqrtl (long double _Complex);
+long double _Complex __MINGW_ATTRIB_CONST cprojl (long double _Complex);
+
+#ifdef __GNUC__
+
+/* double */
+__CRT_INLINE double __MINGW_ATTRIB_CONST creal (double _Complex _Z)
+{
+  return __real__ _Z;
+}
+
+__CRT_INLINE double __MINGW_ATTRIB_CONST cimag (double _Complex _Z)
+{
+  return __imag__ _Z;
+}
+
+__CRT_INLINE double _Complex __MINGW_ATTRIB_CONST conj (double _Complex _Z)
+{
+  return __extension__ ~_Z;
+}
+
+__CRT_INLINE  double __MINGW_ATTRIB_CONST carg (double _Complex _Z)
+{
+  double res;
+  __asm__  ("fpatan;"
+	   : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
+  return res;
+}
+
+
+/* float */
+__CRT_INLINE float __MINGW_ATTRIB_CONST crealf (float _Complex _Z)
+{
+  return __real__ _Z;
+}
+
+__CRT_INLINE float __MINGW_ATTRIB_CONST cimagf (float _Complex _Z)
+{
+  return __imag__ _Z;
+}
+
+__CRT_INLINE float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex _Z)
+{
+  return __extension__ ~_Z;
+}
+
+__CRT_INLINE  float __MINGW_ATTRIB_CONST cargf (float _Complex _Z)
+{
+  float res;
+  __asm__  ("fpatan;"
+	   : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
+  return res;
+}
+
+/* long double */
+__CRT_INLINE long double __MINGW_ATTRIB_CONST creall (long double _Complex _Z)
+{
+  return __real__ _Z;
+}
+
+__CRT_INLINE long double __MINGW_ATTRIB_CONST cimagl (long double _Complex _Z)
+{
+  return __imag__ _Z;
+}
+
+__CRT_INLINE long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex _Z)
+{
+  return __extension__ ~_Z;
+}
+
+__CRT_INLINE  long double __MINGW_ATTRIB_CONST cargl (long double _Complex _Z)
+{
+  long double res;
+  __asm__  ("fpatan;"
+	   : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
+  return res;
+}
+
+#endif /* __GNUC__ */
+
+
+#endif /* RC_INVOKED */
+
+#ifdef __cplusplus
+}
+#endif 
+
+
+#endif /* _COMPLEX_H */
--- a/include/conio.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/conio.h	Mon Dec 14 11:52:08 2009 -0500
@@ -1,53 +1,53 @@
-/*
- * conio.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Low level console I/O functions. Pretty please try to use the ANSI
- * standard ones if you are writing new code.
- *
- */
-
-#ifndef	_CONIO_H_
-#define	_CONIO_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifndef RC_INVOKED
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-_CRTIMP char* __cdecl	_cgets (char*);
-_CRTIMP int __cdecl	_cprintf (const char*, ...);
-_CRTIMP int __cdecl	_cputs (const char*);
-_CRTIMP int __cdecl	_cscanf (char*, ...);
-
-_CRTIMP int __cdecl	_getch (void);
-_CRTIMP int __cdecl	_getche (void);
-_CRTIMP int __cdecl	_kbhit (void);
-_CRTIMP int __cdecl	_putch (int);
-_CRTIMP int __cdecl	_ungetch (int);
-
-
-#ifndef	_NO_OLDNAMES
-
-_CRTIMP int __cdecl	getch (void);
-_CRTIMP int __cdecl	getche (void);
-_CRTIMP int __cdecl	kbhit (void);
-_CRTIMP int __cdecl	putch (int);
-_CRTIMP int __cdecl	ungetch (int);
-
-#endif	/* Not _NO_OLDNAMES */
-
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* Not RC_INVOKED */
-
-#endif	/* Not _CONIO_H_ */
+/*
+ * conio.h
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is a part of the mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within the package.
+ *
+ * Low level console I/O functions. Pretty please try to use the ANSI
+ * standard ones if you are writing new code.
+ *
+ */
+
+#ifndef	_CONIO_H_
+#define	_CONIO_H_
+
+/* All the headers include this file. */
+#include <_mingw.h>
+
+#ifndef RC_INVOKED
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+_CRTIMP char* __cdecl __MINGW_NOTHROW	_cgets (char*);
+_CRTIMP int __cdecl __MINGW_NOTHROW	_cprintf (const char*, ...);
+_CRTIMP int __cdecl __MINGW_NOTHROW	_cputs (const char*);
+_CRTIMP int __cdecl __MINGW_NOTHROW	_cscanf (char*, ...);
+
+_CRTIMP int __cdecl __MINGW_NOTHROW	_getch (void);
+_CRTIMP int __cdecl __MINGW_NOTHROW	_getche (void);
+_CRTIMP int __cdecl __MINGW_NOTHROW	_kbhit (void);
+_CRTIMP int __cdecl __MINGW_NOTHROW	_putch (int);
+_CRTIMP int __cdecl __MINGW_NOTHROW	_ungetch (int);
+
+
+#ifndef	_NO_OLDNAMES
+
+_CRTIMP int __cdecl __MINGW_NOTHROW	getch (void);
+_CRTIMP int __cdecl __MINGW_NOTHROW	getche (void);
+_CRTIMP int __cdecl __MINGW_NOTHROW	kbhit (void);
+_CRTIMP int __cdecl __MINGW_NOTHROW	putch (int);
+_CRTIMP int __cdecl __MINGW_NOTHROW	ungetch (int);
+
+#endif	/* Not _NO_OLDNAMES */
+
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* Not RC_INVOKED */
+
+#endif	/* Not _CONIO_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/control.h	Mon Dec 14 11:52:08 2009 -0500
@@ -0,0 +1,18 @@
+#ifndef _CONTROL_H
+#define _CONTROL_H
+#if __GNUC__ >= 3
+#pragma GCC system_header
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*--- DirectShow Reference - DirectShow Data Types */
+typedef LONG_PTR OAEVENT;
+typedef LONG_PTR OAHWND;
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- a/include/ctype.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/ctype.h	Mon Dec 14 11:52:08 2009 -0500
@@ -1,247 +1,275 @@
-/* 
- * ctype.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Functions for testing character types and converting characters.
- *
- */
-
-#ifndef _CTYPE_H_
-#define _CTYPE_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define	__need_wchar_t
-#define	__need_wint_t
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif	/* Not RC_INVOKED */
-
-
-/*
- * The following flags are used to tell iswctype and _isctype what character
- * types you are looking for.
- */
-#define	_UPPER		0x0001
-#define	_LOWER		0x0002
-#define	_DIGIT		0x0004
-#define	_SPACE		0x0008 /* HT  LF  VT  FF  CR  SP */
-#define	_PUNCT		0x0010
-#define	_CONTROL	0x0020
-#define	_BLANK		0x0040 /* this is SP only, not SP and HT as in C99  */
-#define	_HEX		0x0080
-#define	_LEADBYTE	0x8000
-
-#define	_ALPHA		0x0103
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_CRTIMP int __cdecl isalnum(int);
-_CRTIMP int __cdecl isalpha(int);
-_CRTIMP int __cdecl iscntrl(int);
-_CRTIMP int __cdecl isdigit(int);
-_CRTIMP int __cdecl isgraph(int);
-_CRTIMP int __cdecl islower(int);
-_CRTIMP int __cdecl isprint(int);
-_CRTIMP int __cdecl ispunct(int);
-_CRTIMP int __cdecl isspace(int);
-_CRTIMP int __cdecl isupper(int);
-_CRTIMP int __cdecl isxdigit(int);
-
-#ifndef __STRICT_ANSI__
-_CRTIMP int __cdecl _isctype (int, int);
-#endif
-
-/* These are the ANSI versions, with correct checking of argument */
-_CRTIMP int __cdecl tolower(int);
-_CRTIMP int __cdecl toupper(int);
-
-/*
- * NOTE: The above are not old name type wrappers, but functions exported
- * explicitly by MSVCRT/CRTDLL. However, underscored versions are also
- * exported.
- */
-#ifndef	__STRICT_ANSI__
-/*
- *  These are the cheap non-std versions: The return values are undefined
- *  if the argument is not ASCII char or is not of appropriate case
- */ 
-_CRTIMP int __cdecl _tolower(int);
-_CRTIMP int __cdecl _toupper(int);
-#endif
-
-/* Also defined in stdlib.h */
-#ifndef MB_CUR_MAX
-#ifdef __DECLSPEC_SUPPORTED
-# ifdef __MSVCRT__
-#  define MB_CUR_MAX __mb_cur_max
-   __MINGW_IMPORT int __mb_cur_max;
-# else	/* not __MSVCRT */
-#  define MB_CUR_MAX __mb_cur_max_dll
-   __MINGW_IMPORT int __mb_cur_max_dll;
-# endif	/* not __MSVCRT */
-
-#else		/* ! __DECLSPEC_SUPPORTED */
-# ifdef __MSVCRT__
-   extern int* _imp____mbcur_max;
-#  define MB_CUR_MAX (*_imp____mb_cur_max)
-# else		/* not __MSVCRT */
-   extern int*  _imp____mbcur_max_dll;
-#  define MB_CUR_MAX (*_imp____mb_cur_max_dll)
-# endif 	/* not __MSVCRT */
-#endif  	/*  __DECLSPEC_SUPPORTED */
-#endif  /* MB_CUR_MAX */
-
-
-#ifdef __DECLSPEC_SUPPORTED
-__MINGW_IMPORT unsigned short _ctype[];
-# ifdef __MSVCRT__
-  __MINGW_IMPORT unsigned short* _pctype;
-# else /* CRTDLL */
-  __MINGW_IMPORT unsigned short* _pctype_dll;
-# define  _pctype _pctype_dll
-# endif 
-
-#else		/*  __DECLSPEC_SUPPORTED */
-extern unsigned short** _imp___ctype;
-#define _ctype (*_imp___ctype)
-# ifdef __MSVCRT__
-  extern unsigned short** _imp___pctype;
-# define _pctype (*_imp___pctype)
-# else /* CRTDLL */
-  extern unsigned short** _imp___pctype_dll;
-# define _pctype (*_imp___pctype_dll)
-# endif /* CRTDLL */
-#endif		/*  __DECLSPEC_SUPPORTED */
-
-/*
- * Use inlines here rather than macros, because macros will upset 
- * C++ usage (eg, ::isalnum), and so usually get undefined
- *
- * According to standard for SB chars, these function are defined only
- * for input values representable by unsigned char or EOF.
- * Thus, there is no range test.
- * This reproduces behaviour of MSVCRT.dll lib implemention for SB chars.
- *
- * If no MB char support is needed, these can be simplified even
- * more by command line define -DMB_CUR_MAX=1.  The compiler will then
- * optimise away the constant condition.			
- */
-
-
-#if ! (defined (__NO_INLINE__)  || defined (__NO_CTYPE_INLINES) \
-      || defined (__STRICT_ANSI__ ))
-/* use  simple lookup if SB locale, else  _isctype()  */
-#define __ISCTYPE(c, mask)  (MB_CUR_MAX == 1 ? (_pctype[c] & mask) : _isctype(c, mask))
-__CRT_INLINE int __cdecl isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl isalpha(int c) {return __ISCTYPE(c, _ALPHA);}
-__CRT_INLINE int __cdecl iscntrl(int c) {return __ISCTYPE(c, _CONTROL);}
-__CRT_INLINE int __cdecl isdigit(int c) {return __ISCTYPE(c, _DIGIT);}
-__CRT_INLINE int __cdecl isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl islower(int c) {return __ISCTYPE(c, _LOWER);}
-__CRT_INLINE int __cdecl isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl ispunct(int c) {return __ISCTYPE(c, _PUNCT);}
-__CRT_INLINE int __cdecl isspace(int c) {return __ISCTYPE(c, _SPACE);}
-__CRT_INLINE int __cdecl isupper(int c) {return __ISCTYPE(c, _UPPER);}
-__CRT_INLINE int __cdecl isxdigit(int c) {return __ISCTYPE(c, _HEX);}
-
-/* these reproduce behaviour of lib underscored versions  */
-__CRT_INLINE int __cdecl _tolower(int c) {return ( c -'A'+'a');}
-__CRT_INLINE int __cdecl _toupper(int c) {return ( c -'a'+'A');}
-
-/* TODO? Is it worth inlining ANSI tolower, toupper? Probably only
-   if we only want C-locale. */
-
-#endif /* _NO_CTYPE_INLINES */
-
-/* Wide character equivalents */
-
-#ifndef WEOF
-#define	WEOF	(wchar_t)(0xFFFF)
-#endif
-
-#ifndef _WCTYPE_T_DEFINED
-typedef wchar_t wctype_t;
-#define _WCTYPE_T_DEFINED
-#endif
-
-_CRTIMP int __cdecl iswalnum(wint_t);
-_CRTIMP int __cdecl iswalpha(wint_t);
-_CRTIMP int __cdecl iswascii(wint_t);
-_CRTIMP int __cdecl iswcntrl(wint_t);
-_CRTIMP int __cdecl iswctype(wint_t, wctype_t);
-_CRTIMP int __cdecl is_wctype(wint_t, wctype_t);	/* Obsolete! */
-_CRTIMP int __cdecl iswdigit(wint_t);
-_CRTIMP int __cdecl iswgraph(wint_t);
-_CRTIMP int __cdecl iswlower(wint_t);
-_CRTIMP int __cdecl iswprint(wint_t);
-_CRTIMP int __cdecl iswpunct(wint_t);
-_CRTIMP int __cdecl iswspace(wint_t);
-_CRTIMP int __cdecl iswupper(wint_t);
-_CRTIMP int __cdecl iswxdigit(wint_t);
-
-/* Older MS docs uses wchar_t for arg and return type, while newer
-   online MS docs say arg is wint_t and return is int.
-   ISO C uses wint_t for both.  */
-_CRTIMP wint_t __cdecl towlower (wint_t);
-_CRTIMP wint_t __cdecl towupper (wint_t);
-
-_CRTIMP int __cdecl isleadbyte (int);
-
-/* Also in wctype.h */
-#if ! (defined (__NO_INLINE__) || defined(__NO_CTYPE_INLINES) \
-       || defined(__WCTYPE_INLINES_DEFINED))
-#define __WCTYPE_INLINES_DEFINED
-__CRT_INLINE int __cdecl iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
-__CRT_INLINE int __cdecl iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);}
-__CRT_INLINE int __cdecl iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
-__CRT_INLINE int __cdecl iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
-__CRT_INLINE int __cdecl iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
-__CRT_INLINE int __cdecl iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
-__CRT_INLINE int __cdecl iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
-__CRT_INLINE int __cdecl iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
-__CRT_INLINE int __cdecl iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
-__CRT_INLINE int __cdecl isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
-#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
-
-#ifndef	__STRICT_ANSI__
-int __cdecl __isascii (int);
-int __cdecl __toascii (int);
-int __cdecl __iscsymf (int);		/* Valid first character in C symbol */
-int __cdecl __iscsym (int);		/* Valid character in C symbol (after first) */
-
-#if !(defined (__NO_INLINE__) || defined (__NO_CTYPE_INLINES))
-__CRT_INLINE int __cdecl __isascii(int c) {return ((c & ~0x7F) == 0);} 
-__CRT_INLINE int __cdecl __toascii(int c) {return (c & 0x7F);}
-__CRT_INLINE int __cdecl __iscsymf(int c) {return (isalpha(c) || (c == '_'));}
-__CRT_INLINE int __cdecl __iscsym(int c)  {return  (isalnum(c) || (c == '_'));}
-#endif /* __NO_CTYPE_INLINES */
-
-#ifndef	_NO_OLDNAMES
-/* Not _CRTIMP */ 
-int __cdecl isascii (int);
-int __cdecl toascii (int);
-int __cdecl iscsymf (int);
-int __cdecl iscsym (int);
-#endif	/* Not _NO_OLDNAMES */
-
-#endif	/* Not __STRICT_ANSI__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif	/* Not RC_INVOKED */
-
-#endif	/* Not _CTYPE_H_ */
-
+/* 
+ * ctype.h
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is a part of the mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within the package.
+ *
+ * Functions for testing character types and converting characters.
+ *
+ */
+
+#ifndef _CTYPE_H_
+#define _CTYPE_H_
+
+/* All the headers include this file. */
+#include <_mingw.h>
+
+#define	__need_wchar_t
+#define	__need_wint_t
+#ifndef RC_INVOKED
+#include <stddef.h>
+#endif	/* Not RC_INVOKED */
+
+
+/*
+ * The following flags are used to tell iswctype and _isctype what character
+ * types you are looking for.
+ */
+#define	_UPPER		0x0001
+#define	_LOWER		0x0002
+#define	_DIGIT		0x0004
+#define	_SPACE		0x0008 /* HT  LF  VT  FF  CR  SP */
+#define	_PUNCT		0x0010
+#define	_CONTROL	0x0020
+/* _BLANK is set for SP and non-ASCII horizontal space chars (eg,
+   "no-break space", 0xA0, in CP1250) but not for HT.  */
+#define	_BLANK		0x0040
+#define	_HEX		0x0080
+#define	_LEADBYTE	0x8000
+
+#define	_ALPHA		0x0103
+
+#ifndef RC_INVOKED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_CRTIMP int __cdecl __MINGW_NOTHROW isalnum(int);
+_CRTIMP int __cdecl __MINGW_NOTHROW isalpha(int);
+_CRTIMP int __cdecl __MINGW_NOTHROW iscntrl(int);
+_CRTIMP int __cdecl __MINGW_NOTHROW isdigit(int);
+_CRTIMP int __cdecl __MINGW_NOTHROW isgraph(int);
+_CRTIMP int __cdecl __MINGW_NOTHROW islower(int);
+_CRTIMP int __cdecl __MINGW_NOTHROW isprint(int);
+_CRTIMP int __cdecl __MINGW_NOTHROW ispunct(int);
+_CRTIMP int __cdecl __MINGW_NOTHROW isspace(int);
+_CRTIMP int __cdecl __MINGW_NOTHROW isupper(int);
+_CRTIMP int __cdecl __MINGW_NOTHROW isxdigit(int);
+
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+     || !defined __STRICT_ANSI__
+int __cdecl __MINGW_NOTHROW isblank (int);
+#endif
+
+#ifndef __STRICT_ANSI__
+_CRTIMP int __cdecl __MINGW_NOTHROW _isctype (int, int);
+#endif
+
+/* These are the ANSI versions, with correct checking of argument */
+_CRTIMP int __cdecl __MINGW_NOTHROW tolower(int);
+_CRTIMP int __cdecl __MINGW_NOTHROW toupper(int);
+
+/*
+ * NOTE: The above are not old name type wrappers, but functions exported
+ * explicitly by MSVCRT/CRTDLL. However, underscored versions are also
+ * exported.
+ */
+#ifndef	__STRICT_ANSI__
+/*
+ *  These are the cheap non-std versions: The return values are undefined
+ *  if the argument is not ASCII char or is not of appropriate case
+ */ 
+_CRTIMP int __cdecl __MINGW_NOTHROW _tolower(int);
+_CRTIMP int __cdecl __MINGW_NOTHROW _toupper(int);
+#endif
+
+/* Also defined in stdlib.h */
+#ifndef MB_CUR_MAX
+#ifdef __DECLSPEC_SUPPORTED
+# ifdef __MSVCRT__
+#  define MB_CUR_MAX __mb_cur_max
+   __MINGW_IMPORT int __mb_cur_max;
+# else	/* not __MSVCRT */
+#  define MB_CUR_MAX __mb_cur_max_dll
+   __MINGW_IMPORT int __mb_cur_max_dll;
+# endif	/* not __MSVCRT */
+
+#else		/* ! __DECLSPEC_SUPPORTED */
+# ifdef __MSVCRT__
+   extern int* _imp____mb_cur_max;
+#  define MB_CUR_MAX (*_imp____mb_cur_max)
+# else		/* not __MSVCRT */
+   extern int*  _imp____mb_cur_max_dll;
+#  define MB_CUR_MAX (*_imp____mb_cur_max_dll)
+# endif 	/* not __MSVCRT */
+#endif  	/*  __DECLSPEC_SUPPORTED */
+#endif  /* MB_CUR_MAX */
+
+
+#ifdef __DECLSPEC_SUPPORTED
+# if __MSVCRT_VERSION__ <= 0x0700
+  __MINGW_IMPORT unsigned short _ctype[];
+# endif
+# ifdef __MSVCRT__
+  __MINGW_IMPORT unsigned short* _pctype;
+# else /* CRTDLL */
+  __MINGW_IMPORT unsigned short* _pctype_dll;
+# define  _pctype _pctype_dll
+# endif 
+
+#else		/*  __DECLSPEC_SUPPORTED */
+# if __MSVCRT_VERSION__ <= 0x0700
+  extern unsigned short** _imp___ctype;
+# define _ctype (*_imp___ctype)
+# endif
+# ifdef __MSVCRT__
+  extern unsigned short** _imp___pctype;
+# define _pctype (*_imp___pctype)
+# else /* CRTDLL */
+  extern unsigned short** _imp___pctype_dll;
+# define _pctype (*_imp___pctype_dll)
+# endif /* CRTDLL */
+#endif		/*  __DECLSPEC_SUPPORTED */
+
+/*
+ * Use inlines here rather than macros, because macros will upset 
+ * C++ usage (eg, ::isalnum), and so usually get undefined
+ *
+ * According to standard for SB chars, these function are defined only
+ * for input values representable by unsigned char or EOF.
+ * Thus, there is no range test.
+ * This reproduces behaviour of MSVCRT.dll lib implemention for SB chars.
+ *
+ * If no MB char support is needed, these can be simplified even
+ * more by command line define -DMB_CUR_MAX=1.  The compiler will then
+ * optimise away the constant condition.			
+ */
+
+#if !(defined (__NO_INLINE__)  || defined (__NO_CTYPE_INLINES) \
+	|| defined (__STRICT_ANSI__))
+
+/* use  simple lookup if SB locale, else  _isctype()  */
+#define __ISCTYPE(c, mask)  (MB_CUR_MAX == 1 ? (_pctype[c] & mask) : _isctype(c, mask))
+__CRT_INLINE int __cdecl __MINGW_NOTHROW isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW isalpha(int c) {return __ISCTYPE(c, _ALPHA);}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iscntrl(int c) {return __ISCTYPE(c, _CONTROL);}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW isdigit(int c) {return __ISCTYPE(c, _DIGIT);}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW islower(int c) {return __ISCTYPE(c, _LOWER);}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW ispunct(int c) {return __ISCTYPE(c, _PUNCT);}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW isspace(int c) {return __ISCTYPE(c, _SPACE);}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW isupper(int c) {return __ISCTYPE(c, _UPPER);}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW isxdigit(int c) {return __ISCTYPE(c, _HEX);}
+
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+     || !defined __STRICT_ANSI__
+__CRT_INLINE int __cdecl __MINGW_NOTHROW isblank (int c)
+  {return (__ISCTYPE(c, _BLANK) || c == '\t');}
+#endif
+
+/* these reproduce behaviour of lib underscored versions  */
+__CRT_INLINE int __cdecl __MINGW_NOTHROW _tolower(int c) {return ( c -'A'+'a');}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW _toupper(int c) {return ( c -'a'+'A');}
+
+/* TODO? Is it worth inlining ANSI tolower, toupper? Probably only
+   if we only want C-locale. */
+
+#endif /* _NO_CTYPE_INLINES */
+
+/* Wide character equivalents */
+
+#ifndef WEOF
+#define	WEOF	(wchar_t)(0xFFFF)
+#endif
+
+#ifndef _WCTYPE_T_DEFINED
+typedef wchar_t wctype_t;
+#define _WCTYPE_T_DEFINED
+#endif
+
+_CRTIMP int __cdecl __MINGW_NOTHROW iswalnum(wint_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW iswalpha(wint_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW iswascii(wint_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW iswcntrl(wint_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW iswctype(wint_t, wctype_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW is_wctype(wint_t, wctype_t);	/* Obsolete! */
+_CRTIMP int __cdecl __MINGW_NOTHROW iswdigit(wint_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW iswgraph(wint_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW iswlower(wint_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW iswprint(wint_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW iswpunct(wint_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW iswspace(wint_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW iswupper(wint_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW iswxdigit(wint_t);
+
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+     || !defined __STRICT_ANSI__ || defined __cplusplus
+int __cdecl __MINGW_NOTHROW iswblank (wint_t);
+#endif
+
+/* Older MS docs uses wchar_t for arg and return type, while newer
+   online MS docs say arg is wint_t and return is int.
+   ISO C uses wint_t for both.  */
+_CRTIMP wint_t __cdecl __MINGW_NOTHROW towlower (wint_t);
+_CRTIMP wint_t __cdecl __MINGW_NOTHROW towupper (wint_t);
+
+_CRTIMP int __cdecl __MINGW_NOTHROW isleadbyte (int);
+
+/* Also in wctype.h */
+#if ! (defined (__NO_INLINE__) || defined(__NO_CTYPE_INLINES) \
+       || defined(__WCTYPE_INLINES_DEFINED))
+#define __WCTYPE_INLINES_DEFINED
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+     || !defined __STRICT_ANSI__ || defined __cplusplus
+__CRT_INLINE int __cdecl __MINGW_NOTHROW iswblank (wint_t wc)
+  {return (iswctype(wc,_BLANK) || wc == L'\t');}
+#endif
+
+#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
+
+#ifndef	__STRICT_ANSI__
+int __cdecl __MINGW_NOTHROW __isascii (int);
+int __cdecl __MINGW_NOTHROW __toascii (int);
+int __cdecl __MINGW_NOTHROW __iscsymf (int);		/* Valid first character in C symbol */
+int __cdecl __MINGW_NOTHROW __iscsym (int);		/* Valid character in C symbol (after first) */
+
+#if !(defined (__NO_INLINE__) || defined (__NO_CTYPE_INLINES))
+__CRT_INLINE int __cdecl __MINGW_NOTHROW __isascii(int c) {return ((c & ~0x7F) == 0);} 
+__CRT_INLINE int __cdecl __MINGW_NOTHROW __toascii(int c) {return (c & 0x7F);}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW __iscsymf(int c) {return (isalpha(c) || (c == '_'));}
+__CRT_INLINE int __cdecl __MINGW_NOTHROW __iscsym(int c)  {return  (isalnum(c) || (c == '_'));}
+#endif /* __NO_CTYPE_INLINES */
+
+#ifndef	_NO_OLDNAMES
+/* Not _CRTIMP */ 
+int __cdecl __MINGW_NOTHROW isascii (int);
+int __cdecl __MINGW_NOTHROW toascii (int);
+int __cdecl __MINGW_NOTHROW iscsymf (int);
+int __cdecl __MINGW_NOTHROW iscsym (int);
+#endif	/* Not _NO_OLDNAMES */
+
+#endif	/* Not __STRICT_ANSI__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif	/* Not RC_INVOKED */
+
+#endif	/* Not _CTYPE_H_ */
+
--- a/include/d3d9.h	Mon Dec 14 10:57:20 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1288 +0,0 @@
-/*
-
-	d3d9.h - Header file for the Direct3D9 API
-
-	Written by Filip Navara <xnavara@volny.cz>
-
-	This library is distributed in the hope that it will be useful,
-	but WITHOUT ANY WARRANTY; without even the implied warranty of
-	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#ifndef _D3D9_H
-#define _D3D9_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef DIRECT3D_VERSION
-#define DIRECT3D_VERSION  0x0900
-#endif
-
-#if (DIRECT3D_VERSION >= 0x0900)
-
-#include <objbase.h>
-#include "d3d9types.h"
-#include "d3d9caps.h"
-
-#define D3D_SDK_VERSION	31
-#define D3DCREATE_FPU_PRESERVE	0x02
-#define D3DCREATE_MULTITHREADED	0x04
-#define D3DCREATE_PUREDEVICE	0x10
-#define D3DCREATE_SOFTWARE_VERTEXPROCESSING	0x20
-#define D3DCREATE_HARDWARE_VERTEXPROCESSING	0x40
-#define D3DCREATE_MIXED_VERTEXPROCESSING	0x80
-#define D3DSPD_IUNKNOWN	1
-#define D3DSGR_NO_CALIBRATION	0
-#define D3DSGR_CALIBRATE	1
-#define MAKE_D3DHRESULT(code)	MAKE_HRESULT(1,0x876,code)
-#define MAKE_D3DSTATUS(code)	MAKE_HRESULT(0,0x876,code)
-#define D3D_OK	0
-#define D3DOK_NOAUTOGEN	MAKE_D3DSTATUS(2159)
-#define D3DERR_WRONGTEXTUREFORMAT	MAKE_D3DHRESULT(2072)
-#define D3DERR_UNSUPPORTEDCOLOROPERATION	MAKE_D3DHRESULT(2073)
-#define D3DERR_UNSUPPORTEDCOLORARG	MAKE_D3DHRESULT(2074)
-#define D3DERR_UNSUPPORTEDALPHAOPERATION	MAKE_D3DHRESULT(2075)
-#define D3DERR_UNSUPPORTEDALPHAARG	MAKE_D3DHRESULT(2076)
-#define D3DERR_TOOMANYOPERATIONS	MAKE_D3DHRESULT(2077)
-#define D3DERR_CONFLICTINGTEXTUREFILTER	MAKE_D3DHRESULT(2078)
-#define D3DERR_UNSUPPORTEDFACTORVALUE	MAKE_D3DHRESULT(2079)
-#define D3DERR_CONFLICTINGRENDERSTATE	MAKE_D3DHRESULT(2081)
-#define D3DERR_UNSUPPORTEDTEXTUREFILTER	MAKE_D3DHRESULT(2082)
-#define D3DERR_CONFLICTINGTEXTUREPALETTE	MAKE_D3DHRESULT(2086)
-#define D3DERR_DRIVERINTERNALERROR	MAKE_D3DHRESULT(2087)
-#define D3DERR_NOTFOUND	MAKE_D3DHRESULT(2150)
-#define D3DERR_MOREDATA	MAKE_D3DHRESULT(2151)
-#define D3DERR_DEVICELOST	MAKE_D3DHRESULT(2152)
-#define D3DERR_DEVICENOTRESET	MAKE_D3DHRESULT(2153)
-#define D3DERR_NOTAVAILABLE	MAKE_D3DHRESULT(2154)
-#define D3DERR_OUTOFVIDEOMEMORY	MAKE_D3DHRESULT(380)
-#define D3DERR_INVALIDDEVICE	MAKE_D3DHRESULT(2155)
-#define D3DERR_INVALIDCALL	MAKE_D3DHRESULT(2156)
-#define D3DERR_DRIVERINVALIDCALL	MAKE_D3DHRESULT(2157)
-#define D3DERR_WASSTILLDRAWING	MAKE_D3DHRESULT(540)
-#define D3DADAPTER_DEFAULT	0
-#define D3DCURSOR_IMMEDIATE_UPDATE	1
-#define D3DENUM_HOST_ADAPTER	1
-#define D3DPRESENTFLAG_LOCKABLE_BACKBUFFER	1
-#define D3DPV_DONOTCOPYDATA	1
-#define D3DENUM_NO_WHQL_LEVEL	2
-#define D3DPRESENT_BACK_BUFFERS_MAX	3
-#define VALID_D3DENUM_FLAGS	3
-#define D3DMAXNUMPRIMITIVES	0xFFFF
-#define D3DMAXNUMVERTICES	0xFFFF
-#define D3DCURRENT_DISPLAY_MODE	0xEFFFFF
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern const GUID IID_IDirect3D9;
-extern const GUID IID_IDirect3DDevice9;
-extern const GUID IID_IDirect3DVolume9;
-extern const GUID IID_IDirect3DSwapChain9;
-extern const GUID IID_IDirect3DResource9;
-extern const GUID IID_IDirect3DSurface9;
-extern const GUID IID_IDirect3DVertexBuffer9;
-extern const GUID IID_IDirect3DIndexBuffer9;
-extern const GUID IID_IDirect3DBaseTexture9;
-extern const GUID IID_IDirect3DCubeTexture9;
-extern const GUID IID_IDirect3DTexture9;
-extern const GUID IID_IDirect3DVolumeTexture9;
-extern const GUID IID_IDirect3DVertexDeclaration9;
-extern const GUID IID_IDirect3DVertexShader9;
-extern const GUID IID_IDirect3DPixelShader9;
-extern const GUID IID_IDirect3DStateBlock9;
-extern const GUID IID_IDirect3DQuery9;
-#ifdef __cplusplus
-};
-#endif
-
-typedef interface IDirect3D9 IDirect3D9;
-typedef interface IDirect3DDevice9 IDirect3DDevice9;
-typedef interface IDirect3DVolume9 IDirect3DVolume9;
-typedef interface IDirect3DSwapChain9 IDirect3DSwapChain9;
-typedef interface IDirect3DResource9 IDirect3DResource9;
-typedef interface IDirect3DSurface9 IDirect3DSurface9;
-typedef interface IDirect3DVertexBuffer9 IDirect3DVertexBuffer9;
-typedef interface IDirect3DIndexBuffer9 IDirect3DIndexBuffer9;
-typedef interface IDirect3DBaseTexture9 IDirect3DBaseTexture9;
-typedef interface IDirect3DCubeTexture9 IDirect3DCubeTexture9;
-typedef interface IDirect3DTexture9 IDirect3DTexture9;
-typedef interface IDirect3DVolumeTexture9 IDirect3DVolumeTexture9;
-typedef interface IDirect3DVertexDeclaration9 IDirect3DVertexDeclaration9;
-typedef interface IDirect3DVertexShader9 IDirect3DVertexShader9;
-typedef interface IDirect3DPixelShader9 IDirect3DPixelShader9;
-typedef interface IDirect3DStateBlock9 IDirect3DStateBlock9;
-typedef interface IDirect3DQuery9 IDirect3DQuery9;
-
-#undef INTERFACE
-#define INTERFACE IDirect3D9
-DECLARE_INTERFACE_(IDirect3D9,IUnknown)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(RegisterSoftwareDevice)(THIS_ void* pInitializeFunction) PURE;
-	STDMETHOD_(UINT,GetAdapterCount)(THIS) PURE;
-	STDMETHOD(GetAdapterIdentifier)(THIS_ UINT,DWORD,D3DADAPTER_IDENTIFIER9*) PURE;
-	STDMETHOD_(UINT,GetAdapterModeCount)(THIS_ UINT,D3DFORMAT) PURE;
-	STDMETHOD(EnumAdapterModes)(THIS_ UINT,D3DFORMAT,UINT,D3DDISPLAYMODE*) PURE;
-	STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT,D3DDISPLAYMODE*) PURE;
-	STDMETHOD(CheckDeviceType)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,D3DFORMAT,BOOL) PURE;
-	STDMETHOD(CheckDeviceFormat)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,DWORD,D3DRESOURCETYPE,D3DFORMAT) PURE;
-	STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,BOOL,D3DMULTISAMPLE_TYPE,DWORD*) PURE;
-	STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,D3DFORMAT,D3DFORMAT) PURE;
-	STDMETHOD(CheckDeviceFormatConversion)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,D3DFORMAT) PURE;
-	STDMETHOD(GetDeviceCaps)(THIS_ UINT,D3DDEVTYPE,D3DCAPS9*) PURE;
-	STDMETHOD_(HMONITOR,GetAdapterMonitor)(THIS_ UINT) PURE;
-	STDMETHOD(CreateDevice)(THIS_ UINT,D3DDEVTYPE,HWND,DWORD,D3DPRESENT_PARAMETERS*,IDirect3DDevice9**) PURE;
-};
-typedef struct IDirect3D9 *LPDIRECT3D9, *PDIRECT3D9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3D9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3D9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3D9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3D9_RegisterSoftwareDevice(p,a)	(p)->lpVtbl->RegisterSoftwareDevice(p,a)
-#define IDirect3D9_GetAdapterCount(p)	(p)->lpVtbl->GetAdapterCount(p)
-#define IDirect3D9_GetAdapterIdentifier(p,a,b,c)	(p)->lpVtbl->GetAdapterIdentifier(p,a,b,c)
-#define IDirect3D9_GetAdapterModeCount(p,a,b)	(p)->lpVtbl->GetAdapterModeCount(p,a,b)
-#define IDirect3D9_EnumAdapterModes(p,a,b,c,d)	(p)->lpVtbl->EnumAdapterModes(p,a,b,c,d)
-#define IDirect3D9_GetAdapterDisplayMode(p,a,b)	(p)->lpVtbl->GetAdapterDisplayMode(p,a,b)
-#define IDirect3D9_CheckDeviceType(p,a,b,c,d,e)	(p)->lpVtbl->CheckDeviceType(p,a,b,c,d,e)
-#define IDirect3D9_CheckDeviceFormat(p,a,b,c,d,e,f)	(p)->lpVtbl->CheckDeviceFormat(p,a,b,c,d,e,f)
-#define IDirect3D9_CheckDeviceMultiSampleType(p,a,b,c,d,e,f)	(p)->lpVtbl->CheckDeviceMultiSampleType(p,a,b,c,d,e,f)
-#define IDirect3D9_CheckDepthStencilMatch(p,a,b,c,d,e)	(p)->lpVtbl->CheckDepthStencilMatch(p,a,b,c,d,e)
-#define IDirect3D9_CheckDeviceFormatConversion(p,a,b,c,d)	(p)->lpVtbl->CheckDeviceFormatConversion(p,a,b,c,d)
-#define IDirect3D9_GetDeviceCaps(p,a,b,c)	(p)->lpVtbl->GetDeviceCaps(p,a,b,c)
-#define IDirect3D9_GetAdapterMonitor(p,a)	(p)->lpVtbl->GetAdapterMonitor(p,a)
-#define IDirect3D9_CreateDevice(p,a,b,c,d,e,f)	(p)->lpVtbl->CreateDevice(p,a,b,c,d,e,f)
-#else
-#define IDirect3D9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3D9_AddRef(p)	(p)->AddRef()
-#define IDirect3D9_Release(p)	(p)->Release()
-#define IDirect3D9_RegisterSoftwareDevice(p,a)	(p)->RegisterSoftwareDevice(a)
-#define IDirect3D9_GetAdapterCount(p)	(p)->GetAdapterCount()
-#define IDirect3D9_GetAdapterIdentifier(p,a,b,c)	(p)->GetAdapterIdentifier(a,b,c)
-#define IDirect3D9_GetAdapterModeCount(p,a,b)	(p)->GetAdapterModeCount(a,b)
-#define IDirect3D9_EnumAdapterModes(p,a,b,c,d)	(p)->EnumAdapterModes(a,b,c,d)
-#define IDirect3D9_GetAdapterDisplayMode(p,a,b)	(p)->GetAdapterDisplayMode(a,b)
-#define IDirect3D9_CheckDeviceType(p,a,b,c,d,e)	(p)->CheckDeviceType(a,b,c,d,e)
-#define IDirect3D9_CheckDeviceFormat(p,a,b,c,d,e,f)	(p)->CheckDeviceFormat(a,b,c,d,e,f)
-#define IDirect3D9_CheckDeviceMultiSampleType(p,a,b,c,d,e,f)	(p)->CheckDeviceMultiSampleType(a,b,c,d,e,f)
-#define IDirect3D9_CheckDepthStencilMatch(p,a,b,c,d,e)	(p)->CheckDepthStencilMatch(a,b,c,d,e)
-#define IDirect3D9_CheckDeviceFormatConversion(p,a,b,c,d)	(p)->CheckDeviceFormatConversion(a,b,c,d)
-#define IDirect3D9_GetDeviceCaps(p,a,b,c)	(p)->GetDeviceCaps(a,b,c)
-#define IDirect3D9_GetAdapterMonitor(p,a)	(p)->GetAdapterMonitor(a)
-#define IDirect3D9_CreateDevice(p,a,b,c,d,e,f)	(p)->CreateDevice(a,b,c,d,e,f)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DDevice9
-DECLARE_INTERFACE_(IDirect3DDevice9,IUnknown)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(TestCooperativeLevel)(THIS) PURE;
-	STDMETHOD_(UINT,GetAvailableTextureMem)(THIS) PURE;
-	STDMETHOD(EvictManagedResources)(THIS) PURE;
-	STDMETHOD(GetDirect3D)(THIS_ IDirect3D9**) PURE;
-	STDMETHOD(GetDeviceCaps)(THIS_ D3DCAPS9*) PURE;
-	STDMETHOD(GetDisplayMode)(THIS_ UINT,D3DDISPLAYMODE*) PURE;
-	STDMETHOD(GetCreationParameters)(THIS_ D3DDEVICE_CREATION_PARAMETERS*) PURE;
-	STDMETHOD(SetCursorProperties)(THIS_ UINT,UINT,IDirect3DSurface9*) PURE;
-	STDMETHOD_(void,SetCursorPosition)(THIS_ int,int,DWORD) PURE;
-	STDMETHOD_(BOOL,ShowCursor)(THIS_ BOOL) PURE;
-	STDMETHOD(CreateAdditionalSwapChain)(THIS_ D3DPRESENT_PARAMETERS*,IDirect3DSwapChain9**) PURE;
-	STDMETHOD(GetSwapChain)(THIS_ UINT,IDirect3DSwapChain9**) PURE;
-	STDMETHOD_(UINT,GetNumberOfSwapChains)(THIS) PURE;
-	STDMETHOD(Reset)(THIS_ D3DPRESENT_PARAMETERS*) PURE;
-	STDMETHOD(Present)(THIS_ CONST RECT*,CONST RECT*,HWND,CONST RGNDATA*) PURE;
-	STDMETHOD(GetBackBuffer)(THIS_ UINT,UINT,D3DBACKBUFFER_TYPE,IDirect3DSurface9**) PURE;
-	STDMETHOD(GetRasterStatus)(THIS_ UINT,D3DRASTER_STATUS*) PURE;
-	STDMETHOD(SetDialogBoxMode)(THIS_ BOOL) PURE;
-	STDMETHOD_(void,SetGammaRamp)(THIS_ UINT,DWORD,CONST D3DGAMMARAMP*) PURE;
-	STDMETHOD_(void,GetGammaRamp)(THIS_ UINT,D3DGAMMARAMP*) PURE;
-	STDMETHOD(CreateTexture)(THIS_ UINT,UINT,UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3DTexture9**,HANDLE*) PURE;
-	STDMETHOD(CreateVolumeTexture)(THIS_ UINT,UINT,UINT,UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3DVolumeTexture9**,HANDLE*) PURE;
-	STDMETHOD(CreateCubeTexture)(THIS_ UINT,UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3DCubeTexture9**, HANDLE*) PURE;
-	STDMETHOD(CreateVertexBuffer)(THIS_ UINT,DWORD,DWORD,D3DPOOL,IDirect3DVertexBuffer9**, HANDLE*) PURE;
-	STDMETHOD(CreateIndexBuffer)(THIS_ UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3DIndexBuffer9**,HANDLE*) PURE;
-	STDMETHOD(CreateRenderTarget)(THIS_ UINT,UINT,D3DFORMAT,D3DMULTISAMPLE_TYPE,DWORD,BOOL,IDirect3DSurface9**,HANDLE*) PURE;
-	STDMETHOD(CreateDepthStencilSurface)(THIS_ UINT,UINT,D3DFORMAT,D3DMULTISAMPLE_TYPE,DWORD,BOOL,IDirect3DSurface9**,HANDLE*) PURE;
-	STDMETHOD(UpdateSurface)(THIS_ IDirect3DSurface9*,CONST RECT*,IDirect3DSurface9*,CONST POINT*) PURE;
-	STDMETHOD(UpdateTexture)(THIS_ IDirect3DBaseTexture9*,IDirect3DBaseTexture9*) PURE;
-	STDMETHOD(GetRenderTargetData)(THIS_ IDirect3DSurface9*,IDirect3DSurface9*) PURE;
-	STDMETHOD(GetFrontBufferData)(THIS_ UINT,IDirect3DSurface9*) PURE;
-	STDMETHOD(StretchRect)(THIS_ IDirect3DSurface9*,CONST RECT*,IDirect3DSurface9*,CONST RECT*,D3DTEXTUREFILTERTYPE) PURE;
-	STDMETHOD(ColorFill)(THIS_ IDirect3DSurface9*,CONST RECT*,D3DCOLOR) PURE;
-	STDMETHOD(CreateOffscreenPlainSurface)(THIS_ UINT,UINT,D3DFORMAT,D3DPOOL,IDirect3DSurface9**,HANDLE*) PURE;
-	STDMETHOD(SetRenderTarget)(THIS_ DWORD,IDirect3DSurface9*) PURE;
-	STDMETHOD(GetRenderTarget)(THIS_ DWORD,IDirect3DSurface9**) PURE;
-	STDMETHOD(SetDepthStencilSurface)(THIS_ IDirect3DSurface9*) PURE;
-	STDMETHOD(GetDepthStencilSurface)(THIS_ IDirect3DSurface9**) PURE;
-	STDMETHOD(BeginScene)(THIS) PURE;
-	STDMETHOD(EndScene)(THIS) PURE;
-	STDMETHOD(Clear)(THIS_ DWORD,CONST D3DRECT*,DWORD,D3DCOLOR,float,DWORD) PURE;
-	STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,CONST D3DMATRIX*) PURE;
-	STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,D3DMATRIX*) PURE;
-	STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,CONST D3DMATRIX*) PURE;
-	STDMETHOD(SetViewport)(THIS_ CONST D3DVIEWPORT9*) PURE;
-	STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT9*) PURE;
-	STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL9*) PURE;
-	STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL9*) PURE;
-	STDMETHOD(SetLight)(THIS_ DWORD,CONST D3DLIGHT9*) PURE;
-	STDMETHOD(GetLight)(THIS_ DWORD,D3DLIGHT9*) PURE;
-	STDMETHOD(LightEnable)(THIS_ DWORD,BOOL) PURE;
-	STDMETHOD(GetLightEnable)(THIS_ DWORD,BOOL*) PURE;
-	STDMETHOD(SetClipPlane)(THIS_ DWORD,CONST float*) PURE;
-	STDMETHOD(GetClipPlane)(THIS_ DWORD,float*) PURE;
-	STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
-	STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD*) PURE;
-	STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE,IDirect3DStateBlock9**) PURE;
-	STDMETHOD(BeginStateBlock)(THIS) PURE;
-	STDMETHOD(EndStateBlock)(THIS_ IDirect3DStateBlock9**) PURE;
-	STDMETHOD(SetClipStatus)(THIS_ CONST D3DCLIPSTATUS9*) PURE;
-	STDMETHOD(GetClipStatus)(THIS_ D3DCLIPSTATUS9*) PURE;
-	STDMETHOD(GetTexture)(THIS_ DWORD,IDirect3DBaseTexture9**) PURE;
-	STDMETHOD(SetTexture)(THIS_ DWORD,IDirect3DBaseTexture9*) PURE;
-	STDMETHOD(GetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD*) PURE;
-	STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD) PURE;
-	STDMETHOD(GetSamplerState)(THIS_ DWORD,D3DSAMPLERSTATETYPE,DWORD*) PURE;
-	STDMETHOD(SetSamplerState)(THIS_ DWORD,D3DSAMPLERSTATETYPE,DWORD) PURE;
-	STDMETHOD(ValidateDevice)(THIS_ DWORD*) PURE;
-	STDMETHOD(SetPaletteEntries)(THIS_ UINT,CONST PALETTEENTRY*) PURE;
-	STDMETHOD(GetPaletteEntries)(THIS_ UINT,PALETTEENTRY*) PURE;
-	STDMETHOD(SetCurrentTexturePalette)(THIS_ UINT) PURE;
-	STDMETHOD(GetCurrentTexturePalette)(THIS_ UINT*) PURE;
-	STDMETHOD(SetScissorRect)(THIS_ CONST RECT*) PURE;
-	STDMETHOD(GetScissorRect)(THIS_ RECT*) PURE;
-	STDMETHOD(SetSoftwareVertexProcessing)(THIS_ BOOL) PURE;
-	STDMETHOD_(BOOL,GetSoftwareVertexProcessing)(THIS) PURE;
-	STDMETHOD(SetNPatchMode)(THIS_ float) PURE;
-	STDMETHOD_(float,GetNPatchMode)(THIS) PURE;
-	STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,UINT,UINT) PURE;
-	STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,INT,UINT,UINT,UINT,UINT) PURE;
-	STDMETHOD(DrawPrimitiveUP)(THIS_ D3DPRIMITIVETYPE,UINT,CONST void*,UINT) PURE;
-	STDMETHOD(DrawIndexedPrimitiveUP)(THIS_ D3DPRIMITIVETYPE,UINT,UINT,UINT,CONST void*,D3DFORMAT,CONST void*,UINT) PURE;
-	STDMETHOD(ProcessVertices)(THIS_ UINT,UINT,UINT,IDirect3DVertexBuffer9*,IDirect3DVertexDeclaration9*,DWORD) PURE;
-	STDMETHOD(CreateVertexDeclaration)(THIS_ CONST D3DVERTEXELEMENT9*,IDirect3DVertexDeclaration9**) PURE;
-	STDMETHOD(SetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9*) PURE;
-	STDMETHOD(GetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9**) PURE;
-	STDMETHOD(SetFVF)(THIS_ DWORD) PURE;
-	STDMETHOD(GetFVF)(THIS_ DWORD*) PURE;
-	STDMETHOD(CreateVertexShader)(THIS_ CONST DWORD*,IDirect3DVertexShader9**) PURE;
-	STDMETHOD(SetVertexShader)(THIS_ IDirect3DVertexShader9*) PURE;
-	STDMETHOD(GetVertexShader)(THIS_ IDirect3DVertexShader9**) PURE;
-	STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT,CONST float*,UINT) PURE;
-	STDMETHOD(GetVertexShaderConstantF)(THIS_ UINT,float*,UINT) PURE;
-	STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT,CONST int*,UINT) PURE;
-	STDMETHOD(GetVertexShaderConstantI)(THIS_ UINT,int*,UINT) PURE;
-	STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT,CONST BOOL*,UINT) PURE;
-	STDMETHOD(GetVertexShaderConstantB)(THIS_ UINT,BOOL*,UINT) PURE;
-	STDMETHOD(SetStreamSource)(THIS_ UINT,IDirect3DVertexBuffer9*,UINT,UINT) PURE;
-	STDMETHOD(GetStreamSource)(THIS_ UINT,IDirect3DVertexBuffer9**,UINT*,UINT*) PURE;
-	STDMETHOD(SetStreamSourceFreq)(THIS_ UINT,UINT) PURE;
-	STDMETHOD(GetStreamSourceFreq)(THIS_ UINT,UINT*) PURE;
-	STDMETHOD(SetIndices)(THIS_ IDirect3DIndexBuffer9*) PURE;
-	STDMETHOD(GetIndices)(THIS_ IDirect3DIndexBuffer9**) PURE;
-	STDMETHOD(CreatePixelShader)(THIS_ CONST DWORD*,IDirect3DPixelShader9**) PURE;
-	STDMETHOD(SetPixelShader)(THIS_ IDirect3DPixelShader9*) PURE;
-	STDMETHOD(GetPixelShader)(THIS_ IDirect3DPixelShader9**) PURE;
-	STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT,CONST float*,UINT) PURE;
-	STDMETHOD(GetPixelShaderConstantF)(THIS_ UINT,float*,UINT) PURE;
-	STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT,CONST int*,UINT) PURE;
-	STDMETHOD(GetPixelShaderConstantI)(THIS_ UINT,int*,UINT) PURE;
-	STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT,CONST BOOL*,UINT) PURE;
-	STDMETHOD(GetPixelShaderConstantB)(THIS_ UINT,BOOL*,UINT) PURE;
-	STDMETHOD(DrawRectPatch)(THIS_ UINT,CONST float*,CONST D3DRECTPATCH_INFO*) PURE;
-	STDMETHOD(DrawTriPatch)(THIS_ UINT,CONST float*,CONST D3DTRIPATCH_INFO*) PURE;
-	STDMETHOD(DeletePatch)(THIS_ UINT) PURE;
-	STDMETHOD(CreateQuery)(THIS_ D3DQUERYTYPE,IDirect3DQuery9**) PURE;
-};
-typedef struct IDirect3DDevice9 *LPDIRECT3DDEVICE9, *PDIRECT3DDEVICE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DDevice9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DDevice9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DDevice9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DDevice9_TestCooperativeLevel(p)	(p)->lpVtbl->TestCooperativeLevel(p)
-#define IDirect3DDevice9_GetAvailableTextureMem(p)	(p)->lpVtbl->GetAvailableTextureMem(p)
-#define IDirect3DDevice9_EvictManagedResources(p)	(p)->lpVtbl->EvictManagedResources(p)
-#define IDirect3DDevice9_GetDirect3D(p,a)	(p)->lpVtbl->GetDirect3D(p,a)
-#define IDirect3DDevice9_GetDeviceCaps(p,a)	(p)->lpVtbl->GetDeviceCaps(p,a)
-#define IDirect3DDevice9_GetDisplayMode(p,a,b)	(p)->lpVtbl->GetDisplayMode(p,a,b)
-#define IDirect3DDevice9_GetCreationParameters(p,a)	(p)->lpVtbl->GetCreationParameters(p,a)
-#define IDirect3DDevice9_SetCursorProperties(p,a,b,c)	(p)->lpVtbl->SetCursorProperties(p,a,b,c)
-#define IDirect3DDevice9_SetCursorPosition(p,a,b,c)	(p)->lpVtbl->SetCursorPosition(p,a,b,c)
-#define IDirect3DDevice9_ShowCursor(p,a)	(p)->lpVtbl->ShowCursor(p,a)
-#define IDirect3DDevice9_CreateAdditionalSwapChain(p,a,b)	(p)->lpVtbl->CreateAdditionalSwapChain(p,a,b)
-#define IDirect3DDevice9_GetSwapChain(p,a,b)	(p)->lpVtbl->GetSwapChain(p,a,b)
-#define IDirect3DDevice9_GetNumberOfSwapChains(p)	(p)->lpVtbl->GetNumberOfSwapChains(p)
-#define IDirect3DDevice9_Reset(p,a)	(p)->lpVtbl->Reset(p,a)
-#define IDirect3DDevice9_Present(p,a,b,c,d)	(p)->lpVtbl->Present(p,a,b,c,d)
-#define IDirect3DDevice9_GetBackBuffer(p,a,b,c,d)	(p)->lpVtbl->GetBackBuffer(p,a,b,c,d)
-#define IDirect3DDevice9_GetRasterStatus(p,a,b)	(p)->lpVtbl->GetRasterStatus(p,a,b)
-#define IDirect3DDevice9_SetDialogBoxMode(p,a)	(p)->lpVtbl->SetDialogBoxMode(p,a)
-#define IDirect3DDevice9_SetGammaRamp(p,a,b,c)	(p)->lpVtbl->SetGammaRamp(p,a,b,c)
-#define IDirect3DDevice9_GetGammaRamp(p,a,b)	(p)->lpVtbl->GetGammaRamp(p,a,b)
-#define IDirect3DDevice9_CreateTexture(p,a,b,c,d,e,f,g,h)	(p)->lpVtbl->CreateTexture(p,a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)	(p)->lpVtbl->CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)
-#define IDirect3DDevice9_CreateCubeTexture(p,a,b,c,d,e,f,g)	(p)->lpVtbl->CreateCubeTexture(p,a,b,c,d,e,f,g)
-#define IDirect3DDevice9_CreateVertexBuffer(p,a,b,c,d,e,f)	(p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d,e,f)
-#define IDirect3DDevice9_CreateIndexBuffer(p,a,b,c,d,e,f)	(p)->lpVtbl->CreateIndexBuffer(p,a,b,c,d,e,f)
-#define IDirect3DDevice9_CreateRenderTarget(p,a,b,c,d,e,f,g,h)	(p)->lpVtbl->CreateRenderTarget(p,a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)	(p)->lpVtbl->CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_UpdateSurface(p,a,b,c,d)	(p)->lpVtbl->UpdateSurface(p,a,b,c,d)
-#define IDirect3DDevice9_UpdateTexture(p,a,b)	(p)->lpVtbl->UpdateTexture(p,a,b)
-#define IDirect3DDevice9_GetRenderTargetData(p,a,b)	(p)->lpVtbl->GetRenderTargetData(p,a,b)
-#define IDirect3DDevice9_GetFrontBufferData(p,a,b)	(p)->lpVtbl->GetFrontBufferData(p,a,b)
-#define IDirect3DDevice9_StretchRect(p,a,b,c,d,e)	(p)->lpVtbl->StretchRect(p,a,b,c,d,e)
-#define IDirect3DDevice9_ColorFill(p,a,b,c)	(p)->lpVtbl->ColorFill(p,a,b,c)
-#define IDirect3DDevice9_CreateOffscreenPlainSurface(p,a,b,c,d,e,f)	(p)->lpVtbl->CreateOffscreenPlainSurface(p,a,b,c,d,e,f)
-#define IDirect3DDevice9_SetRenderTarget(p,a,b)	(p)->lpVtbl->SetRenderTarget(p,a,b)
-#define IDirect3DDevice9_GetRenderTarget(p,a,b)	(p)->lpVtbl->GetRenderTarget(p,a,b)
-#define IDirect3DDevice9_SetDepthStencilSurface(p,a)	(p)->lpVtbl->SetDepthStencilSurface(p,a)
-#define IDirect3DDevice9_GetDepthStencilSurface(p,a)	(p)->lpVtbl->GetDepthStencilSurface(p,a)
-#define IDirect3DDevice9_BeginScene(p)	(p)->lpVtbl->BeginScene(p)
-#define IDirect3DDevice9_EndScene(p)	(p)->lpVtbl->EndScene(p)
-#define IDirect3DDevice9_Clear(p,a,b,c,d,e,f)	(p)->lpVtbl->Clear(p,a,b,c,d,e,f)
-#define IDirect3DDevice9_SetTransform(p,a,b)	(p)->lpVtbl->SetTransform(p,a,b)
-#define IDirect3DDevice9_GetTransform(p,a,b)	(p)->lpVtbl->GetTransform(p,a,b)
-#define IDirect3DDevice9_MultiplyTransform(p,a,b)	(p)->lpVtbl->MultiplyTransform(p,a,b)
-#define IDirect3DDevice9_SetViewport(p,a)	(p)->lpVtbl->SetViewport(p,a)
-#define IDirect3DDevice9_GetViewport(p,a)	(p)->lpVtbl->GetViewport(p,a)
-#define IDirect3DDevice9_SetMaterial(p,a)	(p)->lpVtbl->SetMaterial(p,a)
-#define IDirect3DDevice9_GetMaterial(p,a)	(p)->lpVtbl->GetMaterial(p,a)
-#define IDirect3DDevice9_SetLight(p,a,b)	(p)->lpVtbl->SetLight(p,a,b)
-#define IDirect3DDevice9_GetLight(p,a,b)	(p)->lpVtbl->GetLight(p,a,b)
-#define IDirect3DDevice9_LightEnable(p,a,b)	(p)->lpVtbl->LightEnable(p,a,b)
-#define IDirect3DDevice9_GetLightEnable(p,a,b)	(p)->lpVtbl->GetLightEnable(p,a,b)
-#define IDirect3DDevice9_SetClipPlane(p,a,b)	(p)->lpVtbl->SetClipPlane(p,a,b)
-#define IDirect3DDevice9_GetClipPlane(p,a,b)	(p)->lpVtbl->GetClipPlane(p,a,b)
-#define IDirect3DDevice9_SetRenderState(p,a,b)	(p)->lpVtbl->SetRenderState(p,a,b)
-#define IDirect3DDevice9_GetRenderState(p,a,b)	(p)->lpVtbl->GetRenderState(p,a,b)
-#define IDirect3DDevice9_CreateStateBlock(p,a,b)	(p)->lpVtbl->CreateStateBlock(p,a,b)
-#define IDirect3DDevice9_BeginStateBlock(p)	(p)->lpVtbl->BeginStateBlock(p)
-#define IDirect3DDevice9_EndStateBlock(p,a)	(p)->lpVtbl->EndStateBlock(p,a)
-#define IDirect3DDevice9_SetClipStatus(p,a)	(p)->lpVtbl->SetClipStatus(p,a)
-#define IDirect3DDevice9_GetClipStatus(p,a)	(p)->lpVtbl->GetClipStatus(p,a)
-#define IDirect3DDevice9_GetTexture(p,a,b)	(p)->lpVtbl->GetTexture(p,a,b)
-#define IDirect3DDevice9_SetTexture(p,a,b)	(p)->lpVtbl->SetTexture(p,a,b)
-#define IDirect3DDevice9_GetTextureStageState(p,a,b,c)	(p)->lpVtbl->GetTextureStageState(p,a,b,c)
-#define IDirect3DDevice9_SetTextureStageState(p,a,b,c)	(p)->lpVtbl->SetTextureStageState(p,a,b,c)
-#define IDirect3DDevice9_GetSamplerState(p,a,b,c)	(p)->lpVtbl->GetSamplerState(p,a,b,c)
-#define IDirect3DDevice9_SetSamplerState(p,a,b,c)	(p)->lpVtbl->SetSamplerState(p,a,b,c)
-#define IDirect3DDevice9_ValidateDevice(p,a)	(p)->lpVtbl->ValidateDevice(p,a)
-#define IDirect3DDevice9_SetPaletteEntries(p,a,b)	(p)->lpVtbl->SetPaletteEntries(p,a,b)
-#define IDirect3DDevice9_GetPaletteEntries(p,a,b)	(p)->lpVtbl->GetPaletteEntries(p,a,b)
-#define IDirect3DDevice9_SetCurrentTexturePalette(p,a)	(p)->lpVtbl->SetCurrentTexturePalette(p,a)
-#define IDirect3DDevice9_GetCurrentTexturePalette(p,a)	(p)->lpVtbl->GetCurrentTexturePalette(p,a)
-#define IDirect3DDevice9_SetScissorRect(p,a)	(p)->lpVtbl->SetScissorRect(p,a)
-#define IDirect3DDevice9_GetScissorRect(p,a)	(p)->lpVtbl->GetScissorRect(p,a)
-#define IDirect3DDevice9_SetSoftwareVertexProcessing(p,a)	(p)->lpVtbl->SetSoftwareVertexProcessing(p,a)
-#define IDirect3DDevice9_GetSoftwareVertexProcessing(p)	(p)->lpVtbl->GetSoftwareVertexProcessing(p)
-#define IDirect3DDevice9_SetNPatchMode(p,a)	(p)->lpVtbl->SetNPatchMode(p,a)
-#define IDirect3DDevice9_GetNPatchMode(p)	(p)->lpVtbl->GetNPatchMode(p)
-#define IDirect3DDevice9_DrawPrimitive(p,a,b,c)	(p)->lpVtbl->DrawPrimitive(p,a,b,c)
-#define IDirect3DDevice9_DrawIndexedPrimitive(p,a,b,c,d,e,f)	(p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f)
-#define IDirect3DDevice9_DrawPrimitiveUP(p,a,b,c,d)	(p)->lpVtbl->DrawPrimitiveUP(p,a,b,c,d)
-#define IDirect3DDevice9_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)	(p)->lpVtbl->DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_ProcessVertices(p,a,b,c,d,e,f)	(p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f)
-#define IDirect3DDevice9_CreateVertexDeclaration(p,a,b)	(p)->lpVtbl->CreateVertexDeclaration(p,a,b)
-#define IDirect3DDevice9_SetVertexDeclaration(p,a)	(p)->lpVtbl->SetVertexDeclaration(p,a)
-#define IDirect3DDevice9_GetVertexDeclaration(p,a)	(p)->lpVtbl->GetVertexDeclaration(p,a)
-#define IDirect3DDevice9_SetFVF(p,a)	(p)->lpVtbl->SetFVF(p,a)
-#define IDirect3DDevice9_GetFVF(p,a)	(p)->lpVtbl->GetFVF(p,a)
-#define IDirect3DDevice9_CreateVertexShader(p,a,b)	(p)->lpVtbl->CreateVertexShader(p,a,b)
-#define IDirect3DDevice9_SetVertexShader(p,a)	(p)->lpVtbl->SetVertexShader(p,a)
-#define IDirect3DDevice9_GetVertexShader(p,a)	(p)->lpVtbl->GetVertexShader(p,a)
-#define IDirect3DDevice9_SetVertexShaderConstantF(p,a,b,c)	(p)->lpVtbl->SetVertexShaderConstantF(p,a,b,c)
-#define IDirect3DDevice9_GetVertexShaderConstantF(p,a,b,c)	(p)->lpVtbl->GetVertexShaderConstantF(p,a,b,c)
-#define IDirect3DDevice9_SetVertexShaderConstantI(p,a,b,c)	(p)->lpVtbl->SetVertexShaderConstantI(p,a,b,c)
-#define IDirect3DDevice9_GetVertexShaderConstantI(p,a,b,c)	(p)->lpVtbl->GetVertexShaderConstantI(p,a,b,c)
-#define IDirect3DDevice9_SetVertexShaderConstantB(p,a,b,c)	(p)->lpVtbl->SetVertexShaderConstantB(p,a,b,c)
-#define IDirect3DDevice9_GetVertexShaderConstantB(p,a,b,c)	(p)->lpVtbl->GetVertexShaderConstantB(p,a,b,c)
-#define IDirect3DDevice9_SetStreamSource(p,a,b,c,d)	(p)->lpVtbl->SetStreamSource(p,a,b,c,d)
-#define IDirect3DDevice9_GetStreamSource(p,a,b,c,d)	(p)->lpVtbl->GetStreamSource(p,a,b,c,d)
-#define IDirect3DDevice9_SetStreamSourceFreq(p,a,b)	(p)->lpVtbl->SetStreamSourceFreq(p,a,b)
-#define IDirect3DDevice9_GetStreamSourceFreq(p,a,b)	(p)->lpVtbl->GetStreamSourceFreq(p,a,b)
-#define IDirect3DDevice9_SetIndices(p,a)	(p)->lpVtbl->SetIndices(p,a)
-#define IDirect3DDevice9_GetIndices(p,a)	(p)->lpVtbl->GetIndices(p,a)
-#define IDirect3DDevice9_CreatePixelShader(p,a,b)	(p)->lpVtbl->CreatePixelShader(p,a,b)
-#define IDirect3DDevice9_SetPixelShader(p,a)	(p)->lpVtbl->SetPixelShader(p,a)
-#define IDirect3DDevice9_GetPixelShader(p,a)	(p)->lpVtbl->GetPixelShader(p,a)
-#define IDirect3DDevice9_SetPixelShaderConstantF(p,a,b,c)	(p)->lpVtbl->SetPixelShaderConstantF(p,a,b,c)
-#define IDirect3DDevice9_GetPixelShaderConstantF(p,a,b,c)	(p)->lpVtbl->GetPixelShaderConstantF(p,a,b,c)
-#define IDirect3DDevice9_SetPixelShaderConstantI(p,a,b,c)	(p)->lpVtbl->SetPixelShaderConstantI(p,a,b,c)
-#define IDirect3DDevice9_GetPixelShaderConstantI(p,a,b,c)	(p)->lpVtbl->GetPixelShaderConstantI(p,a,b,c)
-#define IDirect3DDevice9_SetPixelShaderConstantB(p,a,b,c)	(p)->lpVtbl->SetPixelShaderConstantB(p,a,b,c)
-#define IDirect3DDevice9_GetPixelShaderConstantB(p,a,b,c)	(p)->lpVtbl->GetPixelShaderConstantB(p,a,b,c)
-#define IDirect3DDevice9_DrawRectPatch(p,a,b,c)	(p)->lpVtbl->DrawRectPatch(p,a,b,c)
-#define IDirect3DDevice9_DrawTriPatch(p,a,b,c)	(p)->lpVtbl->DrawTriPatch(p,a,b,c)
-#define IDirect3DDevice9_DeletePatch(p,a)	(p)->lpVtbl->DeletePatch(p,a)
-#define IDirect3DDevice9_CreateQuery(p,a,b)	(p)->lpVtbl->CreateQuery(p,a,b)
-#else
-#define IDirect3DDevice9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DDevice9_AddRef(p)	(p)->AddRef()
-#define IDirect3DDevice9_Release(p)	(p)->Release()
-#define IDirect3DDevice9_TestCooperativeLevel(p)	(p)->TestCooperativeLevel()
-#define IDirect3DDevice9_GetAvailableTextureMem(p)	(p)->GetAvailableTextureMem()
-#define IDirect3DDevice9_EvictManagedResources(p)	(p)->EvictManagedResources()
-#define IDirect3DDevice9_GetDirect3D(p,a)	(p)->GetDirect3D(a)
-#define IDirect3DDevice9_GetDeviceCaps(p,a)	(p)->GetDeviceCaps(a)
-#define IDirect3DDevice9_GetDisplayMode(p,a,b)	(p)->GetDisplayMode(a,b)
-#define IDirect3DDevice9_GetCreationParameters(p,a)	(p)->GetCreationParameters(a)
-#define IDirect3DDevice9_SetCursorProperties(p,a,b,c)	(p)->SetCursorProperties(a,b,c)
-#define IDirect3DDevice9_SetCursorPosition(p,a,b,c)	(p)->SetCursorPosition(a,b,c)
-#define IDirect3DDevice9_ShowCursor(p,a)	(p)->ShowCursor(a)
-#define IDirect3DDevice9_CreateAdditionalSwapChain(p,a,b)	(p)->CreateAdditionalSwapChain(a,b)
-#define IDirect3DDevice9_GetSwapChain(p,a,b)	(p)->GetSwapChain(a,b)
-#define IDirect3DDevice9_GetNumberOfSwapChains(p)	(p)->GetNumberOfSwapChains()
-#define IDirect3DDevice9_Reset(p,a)	(p)->Reset(a)
-#define IDirect3DDevice9_Present(p,a,b,c,d)	(p)->Present(a,b,c,d)
-#define IDirect3DDevice9_GetBackBuffer(p,a,b,c,d)	(p)->GetBackBuffer(a,b,c,d)
-#define IDirect3DDevice9_GetRasterStatus(p,a,b)	(p)->GetRasterStatus(a,b)
-#define IDirect3DDevice9_SetDialogBoxMode(p,a)	(p)->SetDialogBoxMode(a)
-#define IDirect3DDevice9_SetGammaRamp(p,a,b,c)	(p)->SetGammaRamp(a,b,c)
-#define IDirect3DDevice9_GetGammaRamp(p,a,b)	(p)->GetGammaRamp(a,b)
-#define IDirect3DDevice9_CreateTexture(p,a,b,c,d,e,f,g,h)	(p)->CreateTexture(a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)	(p)->CreateVolumeTexture(a,b,c,d,e,f,g,h,i)
-#define IDirect3DDevice9_CreateCubeTexture(p,a,b,c,d,e,f,g)	(p)->CreateCubeTexture(a,b,c,d,e,f,g)
-#define IDirect3DDevice9_CreateVertexBuffer(p,a,b,c,d,e,f)	(p)->CreateVertexBuffer(a,b,c,d,e,f)
-#define IDirect3DDevice9_CreateIndexBuffer(p,a,b,c,d,e,f)	(p)->CreateIndexBuffer(a,b,c,d,e,f)
-#define IDirect3DDevice9_CreateRenderTarget(p,a,b,c,d,e,f,g,h)	(p)->CreateRenderTarget(a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)	(p)->CreateDepthStencilSurface(a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_UpdateSurface(p,a,b,c,d)	(p)->UpdateSurface(a,b,c,d)
-#define IDirect3DDevice9_UpdateTexture(p,a,b)	(p)->UpdateTexture(a,b)
-#define IDirect3DDevice9_GetRenderTargetData(p,a,b)	(p)->GetRenderTargetData(a,b)
-#define IDirect3DDevice9_GetFrontBufferData(p,a,b)	(p)->GetFrontBufferData(a,b)
-#define IDirect3DDevice9_StretchRect(p,a,b,c,d,e)	(p)->StretchRect(a,b,c,d,e)
-#define IDirect3DDevice9_ColorFill(p,a,b,c)	(p)->ColorFill(a,b,c)
-#define IDirect3DDevice9_CreateOffscreenPlainSurface(p,a,b,c,d,e,f)	(p)->CreateOffscreenPlainSurface(a,b,c,d,e,f)
-#define IDirect3DDevice9_SetRenderTarget(p,a,b)	(p)->SetRenderTarget(a,b)
-#define IDirect3DDevice9_GetRenderTarget(p,a,b)	(p)->GetRenderTarget(a,b)
-#define IDirect3DDevice9_SetDepthStencilSurface(p,a)	(p)->SetDepthStencilSurface(a)
-#define IDirect3DDevice9_GetDepthStencilSurface(p,a)	(p)->GetDepthStencilSurface(a)
-#define IDirect3DDevice9_BeginScene(p)	(p)->BeginScene()
-#define IDirect3DDevice9_EndScene(p)	(p)->EndScene()
-#define IDirect3DDevice9_Clear(p,a,b,c,d,e,f)	(p)->Clear(a,b,c,d,e,f)
-#define IDirect3DDevice9_SetTransform(p,a,b)	(p)->SetTransform(a,b)
-#define IDirect3DDevice9_GetTransform(p,a,b)	(p)->GetTransform(a,b)
-#define IDirect3DDevice9_MultiplyTransform(p,a,b)	(p)->MultiplyTransform(a,b)
-#define IDirect3DDevice9_SetViewport(p,a)	(p)->SetViewport(a)
-#define IDirect3DDevice9_GetViewport(p,a)	(p)->GetViewport(a)
-#define IDirect3DDevice9_SetMaterial(p,a)	(p)->SetMaterial(a)
-#define IDirect3DDevice9_GetMaterial(p,a)	(p)->GetMaterial(a)
-#define IDirect3DDevice9_SetLight(p,a,b)	(p)->SetLight(a,b)
-#define IDirect3DDevice9_GetLight(p,a,b)	(p)->GetLight(a,b)
-#define IDirect3DDevice9_LightEnable(p,a,b)	(p)->LightEnable(a,b)
-#define IDirect3DDevice9_GetLightEnable(p,a,b)	(p)->GetLightEnable(a,b)
-#define IDirect3DDevice9_SetClipPlane(p,a,b)	(p)->SetClipPlane(a,b)
-#define IDirect3DDevice9_GetClipPlane(p,a,b)	(p)->GetClipPlane(a,b)
-#define IDirect3DDevice9_SetRenderState(p,a,b)	(p)->SetRenderState(a,b)
-#define IDirect3DDevice9_GetRenderState(p,a,b)	(p)->GetRenderState(a,b)
-#define IDirect3DDevice9_CreateStateBlock(p,a,b)	(p)->CreateStateBlock(a,b)
-#define IDirect3DDevice9_BeginStateBlock(p)	(p)->BeginStateBlock()
-#define IDirect3DDevice9_EndStateBlock(p,a)	(p)->EndStateBlock(a)
-#define IDirect3DDevice9_SetClipStatus(p,a)	(p)->SetClipStatus(a)
-#define IDirect3DDevice9_GetClipStatus(p,a)	(p)->GetClipStatus(a)
-#define IDirect3DDevice9_GetTexture(p,a,b)	(p)->GetTexture(a,b)
-#define IDirect3DDevice9_SetTexture(p,a,b)	(p)->SetTexture(a,b)
-#define IDirect3DDevice9_GetTextureStageState(p,a,b,c)	(p)->GetTextureStageState(a,b,c)
-#define IDirect3DDevice9_SetTextureStageState(p,a,b,c)	(p)->SetTextureStageState(a,b,c)
-#define IDirect3DDevice9_GetSamplerState(p,a,b,c)	(p)->GetSamplerState(a,b,c)
-#define IDirect3DDevice9_SetSamplerState(p,a,b,c)	(p)->SetSamplerState(a,b,c)
-#define IDirect3DDevice9_ValidateDevice(p,a)	(p)->ValidateDevice(a)
-#define IDirect3DDevice9_SetPaletteEntries(p,a,b)	(p)->SetPaletteEntries(a,b)
-#define IDirect3DDevice9_GetPaletteEntries(p,a,b)	(p)->GetPaletteEntries(a,b)
-#define IDirect3DDevice9_SetCurrentTexturePalette(p,a)	(p)->SetCurrentTexturePalette(a)
-#define IDirect3DDevice9_GetCurrentTexturePalette(p,a)	(p)->GetCurrentTexturePalette(a)
-#define IDirect3DDevice9_SetScissorRect(p,a)	(p)->SetScissorRect(a)
-#define IDirect3DDevice9_GetScissorRect(p,a)	(p)->GetScissorRect(a)
-#define IDirect3DDevice9_SetSoftwareVertexProcessing(p,a)	(p)->SetSoftwareVertexProcessing(a)
-#define IDirect3DDevice9_GetSoftwareVertexProcessing(p)	(p)->GetSoftwareVertexProcessing()
-#define IDirect3DDevice9_SetNPatchMode(p,a)	(p)->SetNPatchMode(a)
-#define IDirect3DDevice9_GetNPatchMode(p)	(p)->GetNPatchMode()
-#define IDirect3DDevice9_DrawPrimitive(p,a,b,c)	(p)->DrawPrimitive(a,b,c)
-#define IDirect3DDevice9_DrawIndexedPrimitive(p,a,b,c,d,e,f)	(p)->DrawIndexedPrimitive(a,b,c,d,e,f)
-#define IDirect3DDevice9_DrawPrimitiveUP(p,a,b,c,d)	(p)->DrawPrimitiveUP(a,b,c,d)
-#define IDirect3DDevice9_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)	(p)->DrawIndexedPrimitiveUP(a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_ProcessVertices(p,a,b,c,d,e,f)	(p)->ProcessVertices(a,b,c,d,e,f)
-#define IDirect3DDevice9_CreateVertexDeclaration(p,a,b)	(p)->CreateVertexDeclaration(a,b)
-#define IDirect3DDevice9_SetVertexDeclaration(p,a)	(p)->SetVertexDeclaration(a)
-#define IDirect3DDevice9_GetVertexDeclaration(p,a)	(p)->GetVertexDeclaration(a)
-#define IDirect3DDevice9_SetFVF(p,a)	(p)->SetFVF(a)
-#define IDirect3DDevice9_GetFVF(p,a)	(p)->GetFVF(a)
-#define IDirect3DDevice9_CreateVertexShader(p,a,b)	(p)->CreateVertexShader(a,b)
-#define IDirect3DDevice9_SetVertexShader(p,a)	(p)->SetVertexShader(a)
-#define IDirect3DDevice9_GetVertexShader(p,a)	(p)->GetVertexShader(a)
-#define IDirect3DDevice9_SetVertexShaderConstantF(p,a,b,c)	(p)->SetVertexShaderConstantF(a,b,c)
-#define IDirect3DDevice9_GetVertexShaderConstantF(p,a,b,c)	(p)->GetVertexShaderConstantF(a,b,c)
-#define IDirect3DDevice9_SetVertexShaderConstantI(p,a,b,c)	(p)->SetVertexShaderConstantI(a,b,c)
-#define IDirect3DDevice9_GetVertexShaderConstantI(p,a,b,c)	(p)->GetVertexShaderConstantI(a,b,c)
-#define IDirect3DDevice9_SetVertexShaderConstantB(p,a,b,c)	(p)->SetVertexShaderConstantB(a,b,c)
-#define IDirect3DDevice9_GetVertexShaderConstantB(p,a,b,c)	(p)->GetVertexShaderConstantB(a,b,c)
-#define IDirect3DDevice9_SetStreamSource(p,a,b,c,d)	(p)->SetStreamSource(a,b,c,d)
-#define IDirect3DDevice9_GetStreamSource(p,a,b,c,d)	(p)->GetStreamSource(a,b,c,d)
-#define IDirect3DDevice9_SetStreamSourceFreq(p,a,b)	(p)->SetStreamSourceFreq(a,b)
-#define IDirect3DDevice9_GetStreamSourceFreq(p,a,b)	(p)->GetStreamSourceFreq(a,b)
-#define IDirect3DDevice9_SetIndices(p,a)	(p)->SetIndices(a)
-#define IDirect3DDevice9_GetIndices(p,a)	(p)->GetIndices(a)
-#define IDirect3DDevice9_CreatePixelShader(p,a,b)	(p)->CreatePixelShader(a,b)
-#define IDirect3DDevice9_SetPixelShader(p,a)	(p)->SetPixelShader(a)
-#define IDirect3DDevice9_GetPixelShader(p,a)	(p)->GetPixelShader(a)
-#define IDirect3DDevice9_SetPixelShaderConstantF(p,a,b,c)	(p)->SetPixelShaderConstantF(a,b,c)
-#define IDirect3DDevice9_GetPixelShaderConstantF(p,a,b,c)	(p)->GetPixelShaderConstantF(a,b,c)
-#define IDirect3DDevice9_SetPixelShaderConstantI(p,a,b,c)	(p)->SetPixelShaderConstantI(a,b,c)
-#define IDirect3DDevice9_GetPixelShaderConstantI(p,a,b,c)	(p)->GetPixelShaderConstantI(a,b,c)
-#define IDirect3DDevice9_SetPixelShaderConstantB(p,a,b,c)	(p)->SetPixelShaderConstantB(a,b,c)
-#define IDirect3DDevice9_GetPixelShaderConstantB(p,a,b,c)	(p)->GetPixelShaderConstantB(a,b,c)
-#define IDirect3DDevice9_DrawRectPatch(p,a,b,c)	(p)->DrawRectPatch(a,b,c)
-#define IDirect3DDevice9_DrawTriPatch(p,a,b,c)	(p)->DrawTriPatch(a,b,c)
-#define IDirect3DDevice9_DeletePatch(p,a)	(p)->DeletePatch(a)
-#define IDirect3DDevice9_CreateQuery(p,a,b)	(p)->CreateQuery(a,b)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DVolume9
-DECLARE_INTERFACE_(IDirect3DVolume9,IUnknown)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
-	STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
-	STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
-	STDMETHOD(GetContainer)(THIS_ REFIID,void**) PURE;
-	STDMETHOD(GetDesc)(THIS_ D3DVOLUME_DESC*) PURE;
-	STDMETHOD(LockBox)(THIS_ D3DLOCKED_BOX*,CONST D3DBOX*,DWORD) PURE;
-	STDMETHOD(UnlockBox)(THIS) PURE;
-};
-typedef struct IDirect3DVolume9 *LPDIRECT3DVOLUME9, *PDIRECT3DVOLUME9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DVolume9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DVolume9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DVolume9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DVolume9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DVolume9_SetPrivateData(p,a,b,c,d)	(p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DVolume9_GetPrivateData(p,a,b,c)	(p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DVolume9_FreePrivateData(p,a)	(p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DVolume9_GetContainer(p,a,b)	(p)->lpVtbl->GetContainer(p,a,b)
-#define IDirect3DVolume9_GetDesc(p,a)	(p)->lpVtbl->GetDesc(p,a)
-#define IDirect3DVolume9_LockBox(p,a,b,c)	(p)->lpVtbl->LockBox(p,a,b,c)
-#define IDirect3DVolume9_UnlockBox(p)	(p)->lpVtbl->UnlockBox(p)
-#else
-#define IDirect3DVolume9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DVolume9_AddRef(p)	(p)->AddRef()
-#define IDirect3DVolume9_Release(p)	(p)->Release()
-#define IDirect3DVolume9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DVolume9_SetPrivateData(p,a,b,c,d)	(p)->SetPrivateData(a,b,c,d)
-#define IDirect3DVolume9_GetPrivateData(p,a,b,c)	(p)->GetPrivateData(a,b,c)
-#define IDirect3DVolume9_FreePrivateData(p,a)	(p)->FreePrivateData(a)
-#define IDirect3DVolume9_GetContainer(p,a,b)	(p)->GetContainer(a,b)
-#define IDirect3DVolume9_GetDesc(p,a)	(p)->GetDesc(a)
-#define IDirect3DVolume9_LockBox(p,a,b,c)	(p)->LockBox(a,b,c)
-#define IDirect3DVolume9_UnlockBox(p)	(p)->UnlockBox()
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DSwapChain9
-DECLARE_INTERFACE_(IDirect3DSwapChain9,IUnknown)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(Present)(THIS_ CONST RECT*,CONST RECT*,HWND,CONST RGNDATA*,DWORD) PURE;
-	STDMETHOD(GetFrontBufferData)(THIS_ IDirect3DSurface9*) PURE;
-	STDMETHOD(GetBackBuffer)(THIS_ UINT,D3DBACKBUFFER_TYPE,IDirect3DSurface9**) PURE;
-	STDMETHOD(GetRasterStatus)(THIS_ D3DRASTER_STATUS*) PURE;
-	STDMETHOD(GetDisplayMode)(THIS_ D3DDISPLAYMODE*) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(GetPresentParameters)(THIS_ D3DPRESENT_PARAMETERS*) PURE;
-};
-typedef struct IDirect3DSwapChain9 *LPDIRECT3DSWAPCHAIN9, *PDIRECT3DSWAPCHAIN9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DSwapChain9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DSwapChain9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DSwapChain9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DSwapChain9_Present(p,a,b,c,d,e)	(p)->lpVtbl->Present(p,a,b,c,d,e)
-#define IDirect3DSwapChain9_GetFrontBufferData(p,a)	(p)->lpVtbl->GetFrontBufferData(p,a)
-#define IDirect3DSwapChain9_GetBackBuffer(p,a,b,c)	(p)->lpVtbl->GetBackBuffer(p,a,b,c)
-#define IDirect3DSwapChain9_GetRasterStatus(p,a)	(p)->lpVtbl->GetRasterStatus(p,a)
-#define IDirect3DSwapChain9_GetDisplayMode(p,a)	(p)->lpVtbl->GetDisplayMode(p,a)
-#define IDirect3DSwapChain9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DSwapChain9_GetPresentParameters(p,a)	(p)->lpVtbl->GetPresentParameters(p,a)
-#else
-#define IDirect3DSwapChain9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DSwapChain9_AddRef(p)	(p)->AddRef()
-#define IDirect3DSwapChain9_Release(p)	(p)->Release()
-#define IDirect3DSwapChain9_Present(p,a,b,c,d,e)	(p)->Present(a,b,c,d,e)
-#define IDirect3DSwapChain9_GetFrontBufferData(p,a)	(p)->GetFrontBufferData(a)
-#define IDirect3DSwapChain9_GetBackBuffer(p,a,b,c)	(p)->GetBackBuffer(a,b,c)
-#define IDirect3DSwapChain9_GetRasterStatus(p,a)	(p)->GetRasterStatus(a)
-#define IDirect3DSwapChain9_GetDisplayMode(p,a)	(p)->GetDisplayMode(a)
-#define IDirect3DSwapChain9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DSwapChain9_GetPresentParameters(p,a)	(p)->GetPresentParameters(a)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DResource9
-DECLARE_INTERFACE_(IDirect3DResource9,IUnknown)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
-	STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
-	STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
-	STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
-	STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
-	STDMETHOD_(void,PreLoad)(THIS) PURE;
-	STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
-};
-typedef struct IDirect3DResource9 *LPDIRECT3DRESOURCE9, *PDIRECT3DRESOURCE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DResource9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DResource9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DResource9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DResource9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DResource9_SetPrivateData(p,a,b,c,d)	(p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DResource9_GetPrivateData(p,a,b,c)	(p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DResource9_FreePrivateData(p,a)	(p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DResource9_SetPriority(p,a)	(p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DResource9_GetPriority(p)	(p)->lpVtbl->GetPriority(p)
-#define IDirect3DResource9_PreLoad(p)	(p)->lpVtbl->PreLoad(p)
-#define IDirect3DResource9_GetType(p)	(p)->lpVtbl->GetType(p)
-#else
-#define IDirect3DResource9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DResource9_AddRef(p)	(p)->AddRef()
-#define IDirect3DResource9_Release(p)	(p)->Release()
-#define IDirect3DResource9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DResource9_SetPrivateData(p,a,b,c,d)	(p)->SetPrivateData(a,b,c,d)
-#define IDirect3DResource9_GetPrivateData(p,a,b,c)	(p)->GetPrivateData(a,b,c)
-#define IDirect3DResource9_FreePrivateData(p,a)	(p)->FreePrivateData(a)
-#define IDirect3DResource9_SetPriority(p,a)	(p)->SetPriority(a)
-#define IDirect3DResource9_GetPriority(p)	(p)->GetPriority()
-#define IDirect3DResource9_PreLoad(p)	(p)->PreLoad()
-#define IDirect3DResource9_GetType(p)	(p)->GetType()
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DSurface9
-DECLARE_INTERFACE_(IDirect3DSurface9,IDirect3DResource9)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
-	STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
-	STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
-	STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
-	STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
-	STDMETHOD_(void,PreLoad)(THIS) PURE;
-	STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
-	STDMETHOD(GetContainer)(THIS_ REFIID,void**) PURE;
-	STDMETHOD(GetDesc)(THIS_ D3DSURFACE_DESC*) PURE;
-	STDMETHOD(LockRect)(THIS_ D3DLOCKED_RECT*,CONST RECT*,DWORD) PURE;
-	STDMETHOD(UnlockRect)(THIS) PURE;
-	STDMETHOD(GetDC)(THIS_ HDC*) PURE;
-	STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
-};
-typedef struct IDirect3DSurface9 *LPDIRECT3DSURFACE9, *PDIRECT3DSURFACE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DSurface9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DSurface9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DSurface9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DSurface9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DSurface9_SetPrivateData(p,a,b,c,d)	(p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DSurface9_GetPrivateData(p,a,b,c)	(p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DSurface9_FreePrivateData(p,a)	(p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DSurface9_SetPriority(p,a)	(p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DSurface9_GetPriority(p)	(p)->lpVtbl->GetPriority(p)
-#define IDirect3DSurface9_PreLoad(p)	(p)->lpVtbl->PreLoad(p)
-#define IDirect3DSurface9_GetType(p)	(p)->lpVtbl->GetType(p)
-#define IDirect3DSurface9_GetContainer(p,a,b)	(p)->lpVtbl->GetContainer(p,a,b)
-#define IDirect3DSurface9_GetDesc(p,a)	(p)->lpVtbl->GetDesc(p,a)
-#define IDirect3DSurface9_LockRect(p,a,b,c)	(p)->lpVtbl->LockRect(p,a,b,c)
-#define IDirect3DSurface9_UnlockRect(p)	(p)->lpVtbl->UnlockRect(p)
-#define IDirect3DSurface9_GetDC(p,a)	(p)->lpVtbl->GetDC(p,a)
-#define IDirect3DSurface9_ReleaseDC(p,a)	(p)->lpVtbl->ReleaseDC(p,a)
-#else
-#define IDirect3DSurface9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DSurface9_AddRef(p)	(p)->AddRef()
-#define IDirect3DSurface9_Release(p)	(p)->Release()
-#define IDirect3DSurface9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DSurface9_SetPrivateData(p,a,b,c,d)	(p)->SetPrivateData(a,b,c,d)
-#define IDirect3DSurface9_GetPrivateData(p,a,b,c)	(p)->GetPrivateData(a,b,c)
-#define IDirect3DSurface9_FreePrivateData(p,a)	(p)->FreePrivateData(a)
-#define IDirect3DSurface9_SetPriority(p,a)	(p)->SetPriority(a)
-#define IDirect3DSurface9_GetPriority(p)	(p)->GetPriority()
-#define IDirect3DSurface9_PreLoad(p)	(p)->PreLoad()
-#define IDirect3DSurface9_GetType(p)	(p)->GetType()
-#define IDirect3DSurface9_GetContainer(p,a,b)	(p)->GetContainer(a,b)
-#define IDirect3DSurface9_GetDesc(p,a)	(p)->GetDesc(a)
-#define IDirect3DSurface9_LockRect(p,a,b,c)	(p)->LockRect(a,b,c)
-#define IDirect3DSurface9_UnlockRect(p)	(p)->UnlockRect()
-#define IDirect3DSurface9_GetDC(p,a)	(p)->GetDC(a)
-#define IDirect3DSurface9_ReleaseDC(p,a)	(p)->ReleaseDC(a)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DVertexBuffer9
-DECLARE_INTERFACE_(IDirect3DVertexBuffer9,IDirect3DResource9)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
-	STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
-	STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
-	STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
-	STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
-	STDMETHOD_(void,PreLoad)(THIS) PURE;
-	STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
-	STDMETHOD(Lock)(THIS_ UINT,UINT,void**,DWORD) PURE;
-	STDMETHOD(Unlock)(THIS) PURE;
-	STDMETHOD(GetDesc)(THIS_ D3DVERTEXBUFFER_DESC*) PURE;
-};
-typedef struct IDirect3DVertexBuffer9 *LPDIRECT3DVERTEXBUFFER9, *PDIRECT3DVERTEXBUFFER9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DVertexBuffer9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DVertexBuffer9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DVertexBuffer9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DVertexBuffer9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DVertexBuffer9_SetPrivateData(p,a,b,c,d)	(p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DVertexBuffer9_GetPrivateData(p,a,b,c)	(p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DVertexBuffer9_FreePrivateData(p,a)	(p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DVertexBuffer9_SetPriority(p,a)	(p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DVertexBuffer9_GetPriority(p)	(p)->lpVtbl->GetPriority(p)
-#define IDirect3DVertexBuffer9_PreLoad(p)	(p)->lpVtbl->PreLoad(p)
-#define IDirect3DVertexBuffer9_GetType(p)	(p)->lpVtbl->GetType(p)
-#define IDirect3DVertexBuffer9_Lock(p,a,b,c,d)	(p)->lpVtbl->Lock(p,a,b,c,d)
-#define IDirect3DVertexBuffer9_Unlock(p)	(p)->lpVtbl->Unlock(p)
-#define IDirect3DVertexBuffer9_GetDesc(p,a)	(p)->lpVtbl->GetDesc(p,a)
-#else
-#define IDirect3DVertexBuffer9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DVertexBuffer9_AddRef(p)	(p)->AddRef()
-#define IDirect3DVertexBuffer9_Release(p)	(p)->Release()
-#define IDirect3DVertexBuffer9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DVertexBuffer9_SetPrivateData(p,a,b,c,d)	(p)->SetPrivateData(a,b,c,d)
-#define IDirect3DVertexBuffer9_GetPrivateData(p,a,b,c)	(p)->GetPrivateData(a,b,c)
-#define IDirect3DVertexBuffer9_FreePrivateData(p,a)	(p)->FreePrivateData(a)
-#define IDirect3DVertexBuffer9_SetPriority(p,a)	(p)->SetPriority(a)
-#define IDirect3DVertexBuffer9_GetPriority(p)	(p)->GetPriority()
-#define IDirect3DVertexBuffer9_PreLoad(p)	(p)->PreLoad()
-#define IDirect3DVertexBuffer9_GetType(p)	(p)->GetType()
-#define IDirect3DVertexBuffer9_Lock(p,a,b,c,d)	(p)->Lock(a,b,c,d)
-#define IDirect3DVertexBuffer9_Unlock(p)	(p)->Unlock()
-#define IDirect3DVertexBuffer9_GetDesc(p,a)	(p)->GetDesc(a)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DIndexBuffer9
-DECLARE_INTERFACE_(IDirect3DIndexBuffer9,IDirect3DResource9)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
-	STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
-	STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
-	STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
-	STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
-	STDMETHOD_(void,PreLoad)(THIS) PURE;
-	STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
-	STDMETHOD(Lock)(THIS_ UINT,UINT,void**,DWORD) PURE;
-	STDMETHOD(Unlock)(THIS) PURE;
-	STDMETHOD(GetDesc)(THIS_ D3DINDEXBUFFER_DESC*) PURE;
-};
-typedef struct IDirect3DIndexBuffer9 *LPDIRECT3DINDEXBUFFER9, *PDIRECT3DINDEXBUFFER9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DIndexBuffer9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DIndexBuffer9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DIndexBuffer9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DIndexBuffer9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DIndexBuffer9_SetPrivateData(p,a,b,c,d)	(p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DIndexBuffer9_GetPrivateData(p,a,b,c)	(p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DIndexBuffer9_FreePrivateData(p,a)	(p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DIndexBuffer9_SetPriority(p,a)	(p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DIndexBuffer9_GetPriority(p)	(p)->lpVtbl->GetPriority(p)
-#define IDirect3DIndexBuffer9_PreLoad(p)	(p)->lpVtbl->PreLoad(p)
-#define IDirect3DIndexBuffer9_GetType(p)	(p)->lpVtbl->GetType(p)
-#define IDirect3DIndexBuffer9_Lock(p,a,b,c,d)	(p)->lpVtbl->Lock(p,a,b,c,d)
-#define IDirect3DIndexBuffer9_Unlock(p)	(p)->lpVtbl->Unlock(p)
-#define IDirect3DIndexBuffer9_GetDesc(p,a)	(p)->lpVtbl->GetDesc(p,a)
-#else
-#define IDirect3DIndexBuffer9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DIndexBuffer9_AddRef(p)	(p)->AddRef()
-#define IDirect3DIndexBuffer9_Release(p)	(p)->Release()
-#define IDirect3DIndexBuffer9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DIndexBuffer9_SetPrivateData(p,a,b,c,d)	(p)->SetPrivateData(a,b,c,d)
-#define IDirect3DIndexBuffer9_GetPrivateData(p,a,b,c)	(p)->GetPrivateData(a,b,c)
-#define IDirect3DIndexBuffer9_FreePrivateData(p,a)	(p)->FreePrivateData(a)
-#define IDirect3DIndexBuffer9_SetPriority(p,a)	(p)->SetPriority(a)
-#define IDirect3DIndexBuffer9_GetPriority(p)	(p)->GetPriority()
-#define IDirect3DIndexBuffer9_PreLoad(p)	(p)->PreLoad()
-#define IDirect3DIndexBuffer9_GetType(p)	(p)->GetType()
-#define IDirect3DIndexBuffer9_Lock(p,a,b,c,d)	(p)->Lock(a,b,c,d)
-#define IDirect3DIndexBuffer9_Unlock(p)	(p)->Unlock()
-#define IDirect3DIndexBuffer9_GetDesc(p,a)	(p)->GetDesc(a)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DBaseTexture9
-DECLARE_INTERFACE_(IDirect3DBaseTexture9,IDirect3DResource9)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
-	STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
-	STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
-	STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
-	STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
-	STDMETHOD_(void,PreLoad)(THIS) PURE;
-	STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
-	STDMETHOD_(DWORD,SetLOD)(THIS_ DWORD) PURE;
-	STDMETHOD_(DWORD,GetLOD)(THIS) PURE;
-	STDMETHOD_(DWORD,GetLevelCount)(THIS) PURE;
-	STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE) PURE;
-	STDMETHOD_(D3DTEXTUREFILTERTYPE,GetAutoGenFilterType)(THIS) PURE;
-	STDMETHOD_(void,GenerateMipSubLevels)(THIS) PURE;
-};
-typedef struct IDirect3DBaseTexture9 *LPDIRECT3DBASETEXTURE9, *PDIRECT3DBASETEXTURE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DBaseTexture9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DBaseTexture9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DBaseTexture9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DBaseTexture9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DBaseTexture9_SetPrivateData(p,a,b,c,d)	(p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DBaseTexture9_GetPrivateData(p,a,b,c)	(p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DBaseTexture9_FreePrivateData(p,a)	(p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DBaseTexture9_SetPriority(p,a)	(p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DBaseTexture9_GetPriority(p)	(p)->lpVtbl->GetPriority(p)
-#define IDirect3DBaseTexture9_PreLoad(p)	(p)->lpVtbl->PreLoad(p)
-#define IDirect3DBaseTexture9_GetType(p)	(p)->lpVtbl->GetType(p)
-#define IDirect3DBaseTexture9_SetLOD(p,a)	(p)->lpVtbl->SetLOD(p,a)
-#define IDirect3DBaseTexture9_GetLOD(p)	(p)->lpVtbl->GetLOD(p)
-#define IDirect3DBaseTexture9_GetLevelCount(p)	(p)->lpVtbl->GetLevelCount(p)
-#define IDirect3DBaseTexture9_SetAutoGenFilterType(p,a)	(p)->lpVtbl->SetAutoGenFilterType(p,a)
-#define IDirect3DBaseTexture9_GetAutoGenFilterType(p)	(p)->lpVtbl->GetAutoGenFilterType(p)
-#define IDirect3DBaseTexture9_GenerateMipSubLevels(p)	(p)->lpVtbl->GenerateMipSubLevels(p)
-#else
-#define IDirect3DBaseTexture9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DBaseTexture9_AddRef(p)	(p)->AddRef()
-#define IDirect3DBaseTexture9_Release(p)	(p)->Release()
-#define IDirect3DBaseTexture9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DBaseTexture9_SetPrivateData(p,a,b,c,d)	(p)->SetPrivateData(a,b,c,d)
-#define IDirect3DBaseTexture9_GetPrivateData(p,a,b,c)	(p)->GetPrivateData(a,b,c)
-#define IDirect3DBaseTexture9_FreePrivateData(p,a)	(p)->FreePrivateData(a)
-#define IDirect3DBaseTexture9_SetPriority(p,a)	(p)->SetPriority(a)
-#define IDirect3DBaseTexture9_GetPriority(p)	(p)->GetPriority()
-#define IDirect3DBaseTexture9_PreLoad(p)	(p)->PreLoad()
-#define IDirect3DBaseTexture9_GetType(p)	(p)->GetType()
-#define IDirect3DBaseTexture9_SetLOD(p,a)	(p)->SetLOD(a)
-#define IDirect3DBaseTexture9_GetLOD(p)	(p)->GetLOD()
-#define IDirect3DBaseTexture9_GetLevelCount(p)	(p)->GetLevelCount()
-#define IDirect3DBaseTexture9_SetAutoGenFilterType(p,a)	(p)->SetAutoGenFilterType(a)
-#define IDirect3DBaseTexture9_GetAutoGenFilterType(p)	(p)->GetAutoGenFilterType()
-#define IDirect3DBaseTexture9_GenerateMipSubLevels(p)	(p)->GenerateMipSubLevels()
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DCubeTexture9
-DECLARE_INTERFACE_(IDirect3DCubeTexture9,IDirect3DBaseTexture9)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
-	STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
-	STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
-	STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
-	STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
-	STDMETHOD_(void,PreLoad)(THIS) PURE;
-	STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
-	STDMETHOD_(DWORD,SetLOD)(THIS_ DWORD) PURE;
-	STDMETHOD_(DWORD,GetLOD)(THIS) PURE;
-	STDMETHOD_(DWORD,GetLevelCount)(THIS) PURE;
-	STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE) PURE;
-	STDMETHOD_(D3DTEXTUREFILTERTYPE,GetAutoGenFilterType)(THIS) PURE;
-	STDMETHOD_(void,GenerateMipSubLevels)(THIS) PURE;
-	STDMETHOD(GetLevelDesc)(THIS_ UINT,D3DSURFACE_DESC*) PURE; \
-	STDMETHOD(GetCubeMapSurface)(THIS_ D3DCUBEMAP_FACES,UINT,IDirect3DSurface9**) PURE; \
-	STDMETHOD(LockRect)(THIS_ D3DCUBEMAP_FACES,UINT,D3DLOCKED_RECT*,CONST RECT*,DWORD) PURE; \
-	STDMETHOD(UnlockRect)(THIS_ D3DCUBEMAP_FACES,UINT) PURE; \
-	STDMETHOD(AddDirtyRect)(THIS_ D3DCUBEMAP_FACES,CONST RECT*) PURE;
-};
-typedef struct IDirect3DCubeTexture9 *LPDIRECT3DCUBETEXTURE9, *PDIRECT3DCUBETEXTURE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DCubeTexture9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DCubeTexture9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DCubeTexture9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DCubeTexture9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DCubeTexture9_SetPrivateData(p,a,b,c,d)	(p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DCubeTexture9_GetPrivateData(p,a,b,c)	(p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DCubeTexture9_FreePrivateData(p,a)	(p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DCubeTexture9_SetPriority(p,a)	(p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DCubeTexture9_GetPriority(p)	(p)->lpVtbl->GetPriority(p)
-#define IDirect3DCubeTexture9_PreLoad(p)	(p)->lpVtbl->PreLoad(p)
-#define IDirect3DCubeTexture9_GetType(p)	(p)->lpVtbl->GetType(p)
-#define IDirect3DCubeTexture9_SetLOD(p,a)	(p)->lpVtbl->SetLOD(p,a)
-#define IDirect3DCubeTexture9_GetLOD(p)	(p)->lpVtbl->GetLOD(p)
-#define IDirect3DCubeTexture9_GetLevelCount(p)	(p)->lpVtbl->GetLevelCount(p)
-#define IDirect3DCubeTexture9_SetAutoGenFilterType(p,a)	(p)->lpVtbl->SetAutoGenFilterType(p,a)
-#define IDirect3DCubeTexture9_GetAutoGenFilterType(p)	(p)->lpVtbl->GetAutoGenFilterType(p)
-#define IDirect3DCubeTexture9_GenerateMipSubLevels(p)	(p)->lpVtbl->GenerateMipSubLevels(p)
-#define IDirect3DCubeTexture9_GetLevelDesc(p,a,b)	(p)->lpVtbl->GetLevelDesc(p,a,b)
-#define IDirect3DCubeTexture9_GetCubeMapSurface(p,a,b,c)	(p)->lpVtbl->GetCubeMapSurface(p,a,b,c)
-#define IDirect3DCubeTexture9_LockRect(p,a,b,c,d,e)	(p)->lpVtbl->LockRect(p,a,b,c,d,e)
-#define IDirect3DCubeTexture9_UnlockRect(p,a,b)	(p)->lpVtbl->UnlockRect(p,a,b)
-#define IDirect3DCubeTexture9_AddDirtyRect(p,a,b)	(p)->lpVtbl->AddDirtyRect(p,a,b)
-#else
-#define IDirect3DCubeTexture9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DCubeTexture9_AddRef(p)	(p)->AddRef()
-#define IDirect3DCubeTexture9_Release(p)	(p)->Release()
-#define IDirect3DCubeTexture9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DCubeTexture9_SetPrivateData(p,a,b,c,d)	(p)->SetPrivateData(a,b,c,d)
-#define IDirect3DCubeTexture9_GetPrivateData(p,a,b,c)	(p)->GetPrivateData(a,b,c)
-#define IDirect3DCubeTexture9_FreePrivateData(p,a)	(p)->FreePrivateData(a)
-#define IDirect3DCubeTexture9_SetPriority(p,a)	(p)->SetPriority(a)
-#define IDirect3DCubeTexture9_GetPriority(p)	(p)->GetPriority()
-#define IDirect3DCubeTexture9_PreLoad(p)	(p)->PreLoad()
-#define IDirect3DCubeTexture9_GetType(p)	(p)->GetType()
-#define IDirect3DCubeTexture9_SetLOD(p,a)	(p)->SetLOD(a)
-#define IDirect3DCubeTexture9_GetLOD(p)	(p)->GetLOD()
-#define IDirect3DCubeTexture9_GetLevelCount(p)	(p)->GetLevelCount()
-#define IDirect3DCubeTexture9_SetAutoGenFilterType(p,a)	(p)->SetAutoGenFilterType(a)
-#define IDirect3DCubeTexture9_GetAutoGenFilterType(p)	(p)->GetAutoGenFilterType()
-#define IDirect3DCubeTexture9_GenerateMipSubLevels(p)	(p)->GenerateMipSubLevels()
-#define IDirect3DCubeTexture9_GetLevelDesc(p,a,b)	(p)->GetLevelDesc(a,b)
-#define IDirect3DCubeTexture9_GetCubeMapSurface(p,a,b,c)	(p)->GetCubeMapSurface(a,b,c)
-#define IDirect3DCubeTexture9_LockRect(p,a,b,c,d,e)	(p)->LockRect(a,b,c,d,e)
-#define IDirect3DCubeTexture9_UnlockRect(p,a,b)	(p)->UnlockRect(a,b)
-#define IDirect3DCubeTexture9_AddDirtyRect(p,a,b)	(p)->AddDirtyRect(a,b)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DTexture9
-DECLARE_INTERFACE_(IDirect3DTexture9,IDirect3DBaseTexture9)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
-	STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
-	STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
-	STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
-	STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
-	STDMETHOD_(void,PreLoad)(THIS) PURE;
-	STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
-	STDMETHOD_(DWORD,SetLOD)(THIS_ DWORD) PURE;
-	STDMETHOD_(DWORD,GetLOD)(THIS) PURE;
-	STDMETHOD_(DWORD,GetLevelCount)(THIS) PURE;
-	STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE) PURE;
-	STDMETHOD_(D3DTEXTUREFILTERTYPE,GetAutoGenFilterType)(THIS) PURE;
-	STDMETHOD_(void,GenerateMipSubLevels)(THIS) PURE;
-	STDMETHOD(GetLevelDesc)(THIS_ UINT,D3DSURFACE_DESC*) PURE;
-	STDMETHOD(GetSurfaceLevel)(THIS_ UINT,IDirect3DSurface9**) PURE;
-	STDMETHOD(LockRect)(THIS_ UINT,D3DLOCKED_RECT*,CONST RECT*,DWORD) PURE;
-	STDMETHOD(UnlockRect)(THIS_ UINT) PURE;
-	STDMETHOD(AddDirtyRect)(THIS_ CONST RECT*) PURE;
-};
-typedef struct IDirect3DTexture9 *LPDIRECT3DTEXTURE9, *PDIRECT3DTEXTURE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DTexture9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DTexture9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DTexture9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DTexture9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DTexture9_SetPrivateData(p,a,b,c,d)	(p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DTexture9_GetPrivateData(p,a,b,c)	(p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DTexture9_FreePrivateData(p,a)	(p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DTexture9_SetPriority(p,a)	(p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DTexture9_GetPriority(p)	(p)->lpVtbl->GetPriority(p)
-#define IDirect3DTexture9_PreLoad(p)	(p)->lpVtbl->PreLoad(p)
-#define IDirect3DTexture9_GetType(p)	(p)->lpVtbl->GetType(p)
-#define IDirect3DTexture9_SetLOD(p,a)	(p)->lpVtbl->SetLOD(p,a)
-#define IDirect3DTexture9_GetLOD(p)	(p)->lpVtbl->GetLOD(p)
-#define IDirect3DTexture9_GetLevelCount(p)	(p)->lpVtbl->GetLevelCount(p)
-#define IDirect3DTexture9_SetAutoGenFilterType(p,a)	(p)->lpVtbl->SetAutoGenFilterType(p,a)
-#define IDirect3DTexture9_GetAutoGenFilterType(p)	(p)->lpVtbl->GetAutoGenFilterType(p)
-#define IDirect3DTexture9_GenerateMipSubLevels(p)	(p)->lpVtbl->GenerateMipSubLevels(p)
-#define IDirect3DTexture9_GetLevelDesc(p,a,b)	(p)->lpVtbl->GetLevelDesc(p,a,b)
-#define IDirect3DTexture9_GetSurfaceLevel(p,a,b)	(p)->lpVtbl->GetSurfaceLevel(p,a,b)
-#define IDirect3DTexture9_LockRect(p,a,b,c,d)	(p)->lpVtbl->LockRect(p,a,b,c,d)
-#define IDirect3DTexture9_UnlockRect(p,a)	(p)->lpVtbl->UnlockRect(p,a)
-#define IDirect3DTexture9_AddDirtyRect(p,a)	(p)->lpVtbl->AddDirtyRect(p,a)
-#else
-#define IDirect3DTexture9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DTexture9_AddRef(p)	(p)->AddRef()
-#define IDirect3DTexture9_Release(p)	(p)->Release()
-#define IDirect3DTexture9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DTexture9_SetPrivateData(p,a,b,c,d)	(p)->SetPrivateData(a,b,c,d)
-#define IDirect3DTexture9_GetPrivateData(p,a,b,c)	(p)->GetPrivateData(a,b,c)
-#define IDirect3DTexture9_FreePrivateData(p,a)	(p)->FreePrivateData(a)
-#define IDirect3DTexture9_SetPriority(p,a)	(p)->SetPriority(a)
-#define IDirect3DTexture9_GetPriority(p)	(p)->GetPriority()
-#define IDirect3DTexture9_PreLoad(p)	(p)->PreLoad()
-#define IDirect3DTexture9_GetType(p)	(p)->GetType()
-#define IDirect3DTexture9_SetLOD(p,a)	(p)->SetLOD(a)
-#define IDirect3DTexture9_GetLOD(p)	(p)->GetLOD()
-#define IDirect3DTexture9_GetLevelCount(p)	(p)->GetLevelCount()
-#define IDirect3DTexture9_SetAutoGenFilterType(p,a)	(p)->SetAutoGenFilterType(a)
-#define IDirect3DTexture9_GetAutoGenFilterType(p)	(p)->GetAutoGenFilterType()
-#define IDirect3DTexture9_GenerateMipSubLevels(p)	(p)->GenerateMipSubLevels()
-#define IDirect3DTexture9_GetLevelDesc(p,a,b)	(p)->GetLevelDesc(a,b)
-#define IDirect3DTexture9_GetSurfaceLevel(p,a,b)	(p)->GetSurfaceLevel(a,b)
-#define IDirect3DTexture9_LockRect(p,a,b,c,d)	(p)->LockRect(a,b,c,d)
-#define IDirect3DTexture9_UnlockRect(p,a)	(p)->UnlockRect(a)
-#define IDirect3DTexture9_AddDirtyRect(p,a)	(p)->AddDirtyRect(a)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DVolumeTexture9
-DECLARE_INTERFACE_(IDirect3DVolumeTexture9,IDirect3DBaseTexture9)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
-	STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
-	STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
-	STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
-	STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
-	STDMETHOD_(void,PreLoad)(THIS) PURE;
-	STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
-	STDMETHOD_(DWORD,SetLOD)(THIS_ DWORD) PURE;
-	STDMETHOD_(DWORD,GetLOD)(THIS) PURE;
-	STDMETHOD_(DWORD,GetLevelCount)(THIS) PURE;
-	STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE) PURE;
-	STDMETHOD_(D3DTEXTUREFILTERTYPE,GetAutoGenFilterType)(THIS) PURE;
-	STDMETHOD_(void,GenerateMipSubLevels)(THIS) PURE;
-    STDMETHOD(GetLevelDesc)(THIS_ UINT,D3DVOLUME_DESC*) PURE;
-    STDMETHOD(GetVolumeLevel)(THIS_ UINT,IDirect3DVolume9**) PURE;
-    STDMETHOD(LockBox)(THIS_ UINT,D3DLOCKED_BOX*,CONST D3DBOX*,DWORD) PURE;
-    STDMETHOD(UnlockBox)(THIS_ UINT) PURE;
-    STDMETHOD(AddDirtyBox)(THIS_ CONST D3DBOX*) PURE;
-};
-typedef struct IDirect3DVolumeTexture9 *LPDIRECT3DVOLUMETEXTURE9, *PDIRECT3DVOLUMETEXTURE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DVolumeTexture9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DVolumeTexture9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DVolumeTexture9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DVolumeTexture9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DVolumeTexture9_SetPrivateData(p,a,b,c,d)	(p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DVolumeTexture9_GetPrivateData(p,a,b,c)	(p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DVolumeTexture9_FreePrivateData(p,a)	(p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DVolumeTexture9_SetPriority(p,a)	(p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DVolumeTexture9_GetPriority(p)	(p)->lpVtbl->GetPriority(p)
-#define IDirect3DVolumeTexture9_PreLoad(p)	(p)->lpVtbl->PreLoad(p)
-#define IDirect3DVolumeTexture9_GetType(p)	(p)->lpVtbl->GetType(p)
-#define IDirect3DVolumeTexture9_SetLOD(p,a)	(p)->lpVtbl->SetLOD(p,a)
-#define IDirect3DVolumeTexture9_GetLOD(p)	(p)->lpVtbl->GetLOD(p)
-#define IDirect3DVolumeTexture9_GetLevelCount(p)	(p)->lpVtbl->GetLevelCount(p)
-#define IDirect3DVolumeTexture9_SetAutoGenFilterType(p,a)	(p)->lpVtbl->SetAutoGenFilterType(p,a)
-#define IDirect3DVolumeTexture9_GetAutoGenFilterType(p)	(p)->lpVtbl->GetAutoGenFilterType(p)
-#define IDirect3DVolumeTexture9_GenerateMipSubLevels(p)	(p)->lpVtbl->GenerateMipSubLevels(p)
-#define IDirect3DVolumeTexture9_GetLevelDesc(p,a,b)	(p)->lpVtbl->GetLevelDesc(p,a,b)
-#define IDirect3DVolumeTexture9_GetVolumeLevel(p,a,b)	(p)->lpVtbl->GetVolumeLevel(p,a,b)
-#define IDirect3DVolumeTexture9_LockBox(p,a,b,c,d)	(p)->lpVtbl->LockBox(p,a,b,c,d)
-#define IDirect3DVolumeTexture9_UnlockBox(p,a)	(p)->lpVtbl->UnlockBox(p,a)
-#define IDirect3DVolumeTexture9_AddDirtyBox(p,a)	(p)->lpVtbl->AddDirtyBox(p,a)
-#else
-#define IDirect3DVolumeTexture9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DVolumeTexture9_AddRef(p)	(p)->AddRef()
-#define IDirect3DVolumeTexture9_Release(p)	(p)->Release()
-#define IDirect3DVolumeTexture9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DVolumeTexture9_SetPrivateData(p,a,b,c,d)	(p)->SetPrivateData(a,b,c,d)
-#define IDirect3DVolumeTexture9_GetPrivateData(p,a,b,c)	(p)->GetPrivateData(a,b,c)
-#define IDirect3DVolumeTexture9_FreePrivateData(p,a)	(p)->FreePrivateData(a)
-#define IDirect3DVolumeTexture9_SetPriority(p,a)	(p)->SetPriority(a)
-#define IDirect3DVolumeTexture9_GetPriority(p)	(p)->GetPriority()
-#define IDirect3DVolumeTexture9_PreLoad(p)	(p)->PreLoad()
-#define IDirect3DVolumeTexture9_GetType(p)	(p)->GetType()
-#define IDirect3DVolumeTexture9_SetLOD(p,a)	(p)->SetLOD(a)
-#define IDirect3DVolumeTexture9_GetLOD(p)	(p)->GetLOD()
-#define IDirect3DVolumeTexture9_GetLevelCount(p)	(p)->GetLevelCount()
-#define IDirect3DVolumeTexture9_SetAutoGenFilterType(p,a)	(p)->SetAutoGenFilterType(a)
-#define IDirect3DVolumeTexture9_GetAutoGenFilterType(p)	(p)->GetAutoGenFilterType()
-#define IDirect3DVolumeTexture9_GenerateMipSubLevels(p)	(p)->GenerateMipSubLevels()
-#define IDirect3DVolumeTexture9_GetLevelDesc(p,a,b)	(p)->GetLevelDesc(a,b)
-#define IDirect3DVolumeTexture9_GetVolumeLevel(p,a,b)	(p)->GetVolumeLevel(a,b)
-#define IDirect3DVolumeTexture9_LockBox(p,a,b,c,d)	(p)->LockBox(a,b,c,d)
-#define IDirect3DVolumeTexture9_UnlockBox(p,a)	(p)->UnlockBox(a)
-#define IDirect3DVolumeTexture9_AddDirtyBox(p,a)	(p)->AddDirtyBox(a)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DVertexDeclaration9
-DECLARE_INTERFACE_(IDirect3DVertexDeclaration9,IUnknown)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9*,UINT*) PURE;
-};
-typedef struct IDirect3DVertexDeclaration9 *LPDIRECT3DVERTEXDECLARATION9, *PDIRECT3DVERTEXDECLARATION9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DVertexDeclaration9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DVertexDeclaration9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DVertexDeclaration9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DVertexDeclaration9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DVertexDeclaration9_GetDeclaration(p,a,b)	(p)->lpVtbl->GetDeclaration(p,a,b)
-#else
-#define IDirect3DVertexDeclaration9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DVertexDeclaration9_AddRef(p)	(p)->AddRef()
-#define IDirect3DVertexDeclaration9_Release(p)	(p)->Release()
-#define IDirect3DVertexDeclaration9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DVertexDeclaration9_GetDeclaration(p,a,b)	(p)->GetDeclaration(a,b)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DVertexShader9
-DECLARE_INTERFACE_(IDirect3DVertexShader9,IUnknown)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(GetFunction)(THIS_ void*,UINT*) PURE;
-};
-typedef struct IDirect3DVertexShader9 *LPDIRECT3DVERTEXSHADER9, *PDIRECT3DVERTEXSHADER9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DVertexShader9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DVertexShader9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DVertexShader9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DVertexShader9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DVertexShader9_GetFunction(p,a,b)	(p)->lpVtbl->GetFunction(p,a,b)
-#else
-#define IDirect3DVertexShader9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DVertexShader9_AddRef(p)	(p)->AddRef()
-#define IDirect3DVertexShader9_Release(p)	(p)->Release()
-#define IDirect3DVertexShader9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DVertexShader9_GetFunction(p,a,b)	(p)->GetFunction(a,b)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DPixelShader9
-DECLARE_INTERFACE_(IDirect3DPixelShader9,IUnknown)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(GetFunction)(THIS_ void*,UINT*) PURE;
-};
-typedef struct IDirect3DPixelShader9 *LPDIRECT3DPIXELSHADER9, *PDIRECT3DPIXELSHADER9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DPixelShader9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DPixelShader9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DPixelShader9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DPixelShader9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DPixelShader9_GetFunction(p,a,b)	(p)->lpVtbl->GetFunction(p,a,b)
-#else
-#define IDirect3DPixelShader9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DPixelShader9_AddRef(p)	(p)->AddRef()
-#define IDirect3DPixelShader9_Release(p)	(p)->Release()
-#define IDirect3DPixelShader9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DPixelShader9_GetFunction(p,a,b)	(p)->GetFunction(a,b)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DStateBlock9
-DECLARE_INTERFACE_(IDirect3DStateBlock9,IUnknown)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD(Capture)(THIS) PURE;
-	STDMETHOD(Apply)(THIS) PURE;
-};
-typedef struct IDirect3DStateBlock9 *LPDIRECT3DSTATEBLOCK9, *PDIRECT3DSTATEBLOCK9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DStateBlock9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DStateBlock9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DStateBlock9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DStateBlock9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DStateBlock9_Capture(p)	(p)->lpVtbl->Capture(p)
-#define IDirect3DStateBlock9_Apply(p)	(p)->lpVtbl->Apply(p)
-#else
-#define IDirect3DStateBlock9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DStateBlock9_AddRef(p)	(p)->AddRef()
-#define IDirect3DStateBlock9_Release(p)	(p)->Release()
-#define IDirect3DStateBlock9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DStateBlock9_Capture(p)	(p)->Capture()
-#define IDirect3DStateBlock9_Apply(p)	(p)->Apply()
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DQuery9
-DECLARE_INTERFACE_(IDirect3DQuery9,IUnknown)
-{
-	STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-	STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-	STDMETHOD_(ULONG,Release)(THIS) PURE;
-	STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
-	STDMETHOD_(D3DQUERYTYPE, GetType)(THIS) PURE;
-	STDMETHOD_(DWORD, GetDataSize)(THIS) PURE;
-	STDMETHOD(Issue)(THIS_ DWORD) PURE;
-	STDMETHOD(GetData)(THIS_ void*,DWORD,DWORD) PURE;
-};
-typedef struct IDirect3DQuery9 *LPDIRECT3DQUERY9, *PDIRECT3DQUERY9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DQuery9_QueryInterface(p,a,b)	(p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DQuery9_AddRef(p)	(p)->lpVtbl->AddRef(p)
-#define IDirect3DQuery9_Release(p)	(p)->lpVtbl->Release(p)
-#define IDirect3DQuery9_GetDevice(p,a)	(p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DQuery9_GetType(p)	(p)->lpVtbl->GetType(p)
-#define IDirect3DQuery9_GetDataSize(p)	(p)->lpVtbl->GetDataSize(p)
-#define IDirect3DQuery9_Issue(p,a)	(p)->lpVtbl->Issue(p,a)
-#define IDirect3DQuery9_GetData(p,a,b,c)	(p)->lpVtbl->GetData(p,a,b,c)
-#else
-#define IDirect3DQuery9_QueryInterface(p,a,b)	(p)->QueryInterface(a,b)
-#define IDirect3DQuery9_AddRef(p)	(p)->AddRef()
-#define IDirect3DQuery9_Release(p)	(p)->Release()
-#define IDirect3DQuery9_GetDevice(p,a)	(p)->GetDevice(a)
-#define IDirect3DQuery9_GetType(p)	(p)->GetType()
-#define IDirect3DQuery9_GetDataSize(p)	(p)->GetDataSize()
-#define IDirect3DQuery9_Issue(p,a)	(p)->Issue(a)
-#define IDirect3DQuery9_GetData(p,a,b,c)	(p)->GetData(a,b,c)
-#endif
-
-#ifdef __cplusplus
-extern "C" IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion);
-#else
-extern IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion);
-#endif
-
-#endif
-#endif
--- a/include/d3d9caps.h	Mon Dec 14 10:57:20 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,338 +0,0 @@
-/*
-
-	d3d9caps.h - Header file for the Direct3D9 API
-
-	Written by Filip Navara <xnavara@volny.cz>
-
-	This library is distributed in the hope that it will be useful,
-	but WITHOUT ANY WARRANTY; without even the implied warranty of
-	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#ifndef _D3D9_CAPS_H
-#define _D3D9_CAPS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef DIRECT3D_VERSION
-#define DIRECT3D_VERSION  0x0900
-#endif
-
-#if (DIRECT3D_VERSION >= 0x0900)
-
-#define D3DCURSORCAPS_COLOR	1
-#define D3DCURSORCAPS_LOWRES	2
-#define D3DDEVCAPS_EXECUTESYSTEMMEMORY	0x10
-#define D3DDEVCAPS_EXECUTEVIDEOMEMORY	0x20
-#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY	0x40
-#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY	0x80
-#define D3DDEVCAPS_TEXTURESYSTEMMEMORY	0x100
-#define D3DDEVCAPS_TEXTUREVIDEOMEMORY	0x200
-#define D3DDEVCAPS_DRAWPRIMTLVERTEX	0x400
-#define D3DDEVCAPS_CANRENDERAFTERFLIP	0x800
-#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM	0x1000
-#define D3DDEVCAPS_DRAWPRIMITIVES2	0x2000
-#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES	0x4000
-#define D3DDEVCAPS_DRAWPRIMITIVES2EX	0x8000
-#define D3DDEVCAPS_HWTRANSFORMANDLIGHT	0x10000
-#define D3DDEVCAPS_CANBLTSYSTONONLOCAL	0x20000
-#define D3DDEVCAPS_HWRASTERIZATION	0x80000
-#define D3DDEVCAPS_PUREDEVICE	0x100000
-#define D3DDEVCAPS_QUINTICRTPATCHES	0x200000
-#define D3DDEVCAPS_RTPATCHES	0x400000
-#define D3DDEVCAPS_RTPATCHHANDLEZERO	0x800000
-#define D3DDEVCAPS_NPATCHES	0x1000000
-#define D3DDEVCAPS2_STREAMOFFSET	0x01
-#define D3DDEVCAPS2_DMAPNPATCH	0x02
-#define D3DDEVCAPS2_ADAPTIVETESSRTPATCH	0x04
-#define D3DDEVCAPS2_ADAPTIVETESSNPATCH	0x08
-#define D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES	0x10
-#define D3DDEVCAPS2_PRESAMPLEDDMAPNPATCH	0x20
-#define D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET	0x40
-#define D3DFVFCAPS_TEXCOORDCOUNTMASK	0xFFFF
-#define D3DFVFCAPS_DONOTSTRIPELEMENTS	0x80000
-#define D3DFVFCAPS_PSIZE	0x100000
-#define D3DLINECAPS_TEXTURE	0x01
-#define D3DLINECAPS_ZTEST	0x02
-#define D3DLINECAPS_BLEND	0x04
-#define D3DLINECAPS_ALPHACMP	0x08
-#define D3DLINECAPS_FOG	0x10
-#define D3DLINECAPS_ANTIALIAS	0x20
-#define D3DPBLENDCAPS_ZERO	0x01
-#define D3DPBLENDCAPS_ONE	0x02
-#define D3DPBLENDCAPS_SRCCOLOR	0x04
-#define D3DPBLENDCAPS_INVSRCCOLOR	0x08
-#define D3DPBLENDCAPS_SRCALPHA	0x10
-#define D3DPBLENDCAPS_INVSRCALPHA	0x20
-#define D3DPBLENDCAPS_DESTALPHA	0x40
-#define D3DPBLENDCAPS_INVDESTALPHA	0x80
-#define D3DPBLENDCAPS_DESTCOLOR	0x100
-#define D3DPBLENDCAPS_INVDESTCOLOR	0x200
-#define D3DPBLENDCAPS_SRCALPHASAT	0x400
-#define D3DPBLENDCAPS_BOTHSRCALPHA	0x800
-#define D3DPBLENDCAPS_BOTHINVSRCALPHA	0x1000
-#define D3DPBLENDCAPS_BLENDFACTOR	0x2000
-#define D3DPCMPCAPS_NEVER	0x01
-#define D3DPCMPCAPS_LESS	0x02
-#define D3DPCMPCAPS_EQUAL	0x04
-#define D3DPCMPCAPS_LESSEQUAL	0x08
-#define D3DPCMPCAPS_GREATER	0x10
-#define D3DPCMPCAPS_NOTEQUAL	0x20
-#define D3DPCMPCAPS_GREATEREQUAL	0x40
-#define D3DPCMPCAPS_ALWAYS	0x80
-#define D3DPMISCCAPS_MASKZ	0x02
-#define D3DPMISCCAPS_CULLNONE	0x10
-#define D3DPMISCCAPS_CULLCW	0x20
-#define D3DPMISCCAPS_CULLCCW	0x40
-#define D3DPMISCCAPS_COLORWRITEENABLE	0x80
-#define D3DPMISCCAPS_CLIPPLANESCALEDPOINTS	0x100
-#define D3DPMISCCAPS_CLIPTLVERTS	0x200
-#define D3DPMISCCAPS_TSSARGTEMP	0x400
-#define D3DPMISCCAPS_BLENDOP	0x800
-#define D3DPMISCCAPS_NULLREFERENCE	0x1000
-#define D3DPMISCCAPS_INDEPENDENTWRITEMASKS	0x4000
-#define D3DPMISCCAPS_PERSTAGECONSTANT	0x8000
-#define D3DPMISCCAPS_FOGANDSPECULARALPHA	0x10000
-#define D3DPMISCCAPS_SEPARATEALPHABLEND	0x20000
-#define D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS	0x40000
-#define D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING	0x80000
-#define D3DPMISCCAPS_FOGVERTEXCLAMPED	0x100000
-#define D3DPRASTERCAPS_DITHER	0x01
-#define D3DPRASTERCAPS_ZTEST	0x10
-#define D3DPRASTERCAPS_FOGVERTEX	0x80
-#define D3DPRASTERCAPS_FOGTABLE	0x100
-#define D3DPRASTERCAPS_MIPMAPLODBIAS	0x2000
-#define D3DPRASTERCAPS_ZBUFFERLESSHSR	0x8000
-#define D3DPRASTERCAPS_FOGRANGE	0x10000
-#define D3DPRASTERCAPS_ANISOTROPY	0x20000
-#define D3DPRASTERCAPS_WBUFFER	0x40000
-#define D3DPRASTERCAPS_WFOG	0x100000
-#define D3DPRASTERCAPS_ZFOG	0x200000
-#define D3DPRASTERCAPS_COLORPERSPECTIVE	0x400000
-#define D3DPRASTERCAPS_SCISSORTEST	0x1000000
-#define D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS	0x2000000
-#define D3DPRASTERCAPS_DEPTHBIAS	0x4000000 
-#define D3DPRASTERCAPS_MULTISAMPLE_TOGGLE	0x8000000
-#define D3DPRESENT_INTERVAL_DEFAULT	0x00
-#define D3DPRESENT_INTERVAL_ONE	0x01
-#define D3DPRESENT_INTERVAL_TWO	0x02
-#define D3DPRESENT_INTERVAL_THREE	0x04
-#define D3DPRESENT_INTERVAL_FOUR	0x08
-#define D3DPRESENT_INTERVAL_IMMEDIATE	0x80000000L
-#define D3DPSHADECAPS_COLORGOURAUDRGB	0x08
-#define D3DPSHADECAPS_SPECULARGOURAUDRGB	0x200
-#define D3DPSHADECAPS_ALPHAGOURAUDBLEND	0x4000
-#define D3DPSHADECAPS_FOGGOURAUD	0x80000
-#define D3DPTADDRESSCAPS_WRAP	0x01
-#define D3DPTADDRESSCAPS_MIRROR	0x02
-#define D3DPTADDRESSCAPS_CLAMP	0x04
-#define D3DPTADDRESSCAPS_BORDER	0x08
-#define D3DPTADDRESSCAPS_INDEPENDENTUV	0x10
-#define D3DPTADDRESSCAPS_MIRRORONCE	0x20
-#define D3DPTEXTURECAPS_PERSPECTIVE	0x01
-#define D3DPTEXTURECAPS_POW2	0x02
-#define D3DPTEXTURECAPS_ALPHA	0x04
-#define D3DPTEXTURECAPS_SQUAREONLY	0x20
-#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE	0x40
-#define D3DPTEXTURECAPS_ALPHAPALETTE	0x80
-#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL	0x100
-#define D3DPTEXTURECAPS_PROJECTED	0x400
-#define D3DPTEXTURECAPS_CUBEMAP	0x800
-#define D3DPTEXTURECAPS_VOLUMEMAP	0x2000
-#define D3DPTEXTURECAPS_MIPMAP	0x4000
-#define D3DPTEXTURECAPS_MIPVOLUMEMAP	0x8000
-#define D3DPTEXTURECAPS_MIPCUBEMAP	0x10000
-#define D3DPTEXTURECAPS_CUBEMAP_POW2	0x20000
-#define D3DPTEXTURECAPS_VOLUMEMAP_POW2	0x40000
-#define D3DPTEXTURECAPS_NOPROJECTEDBUMPENV	0x200000
-#define D3DPTFILTERCAPS_MINFPOINT	0x100
-#define D3DPTFILTERCAPS_MINFLINEAR	0x200
-#define D3DPTFILTERCAPS_MINFANISOTROPIC	0x400
-#define D3DPTFILTERCAPS_MINFPYRAMIDALQUAD	0x800
-#define D3DPTFILTERCAPS_MINFGAUSSIANQUAD	0x1000
-#define D3DPTFILTERCAPS_MIPFPOINT	0x10000
-#define D3DPTFILTERCAPS_MIPFLINEAR	0x20000
-#define D3DPTFILTERCAPS_MAGFPOINT	0x1000000
-#define D3DPTFILTERCAPS_MAGFLINEAR	0x2000000
-#define D3DPTFILTERCAPS_MAGFANISOTROPIC	0x4000000
-#define D3DPTFILTERCAPS_MAGFPYRAMIDALQUAD	0x8000000
-#define D3DPTFILTERCAPS_MAGFGAUSSIANQUAD	0x10000000
-#define D3DSTENCILCAPS_KEEP	0x01
-#define D3DSTENCILCAPS_ZERO	0x02
-#define D3DSTENCILCAPS_REPLACE	0x04
-#define D3DSTENCILCAPS_INCRSAT	0x08
-#define D3DSTENCILCAPS_DECRSAT	0x10
-#define D3DSTENCILCAPS_INVERT	0x20
-#define D3DSTENCILCAPS_INCR	0x40
-#define D3DSTENCILCAPS_DECR	0x80
-#define D3DSTENCILCAPS_TWOSIDED	0x100
-#define D3DTEXOPCAPS_DISABLE	0x01
-#define D3DTEXOPCAPS_SELECTARG1	0x02
-#define D3DTEXOPCAPS_SELECTARG2	0x04
-#define D3DTEXOPCAPS_MODULATE	0x08
-#define D3DTEXOPCAPS_MODULATE2X	0x10
-#define D3DTEXOPCAPS_MODULATE4X	0x20
-#define D3DTEXOPCAPS_ADD	0x40
-#define D3DTEXOPCAPS_ADDSIGNED	0x80
-#define D3DTEXOPCAPS_ADDSIGNED2X	0x100
-#define D3DTEXOPCAPS_SUBTRACT	0x200
-#define D3DTEXOPCAPS_ADDSMOOTH	0x400
-#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA	0x800
-#define D3DTEXOPCAPS_BLENDTEXTUREALPHA	0x1000
-#define D3DTEXOPCAPS_BLENDFACTORALPHA	0x2000
-#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM	0x4000
-#define D3DTEXOPCAPS_BLENDCURRENTALPHA	0x8000
-#define D3DTEXOPCAPS_PREMODULATE	0x10000
-#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR	0x20000
-#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA	0x40000
-#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR	0x80000
-#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA	0x100000
-#define D3DTEXOPCAPS_BUMPENVMAP	0x200000
-#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE	0x400000
-#define D3DTEXOPCAPS_DOTPRODUCT3	0x800000
-#define D3DTEXOPCAPS_MULTIPLYADD	0x1000000
-#define D3DTEXOPCAPS_LERP	0x2000000
-#define D3DVTXPCAPS_TEXGEN	0x01
-#define D3DVTXPCAPS_MATERIALSOURCE7	0x02
-#define D3DVTXPCAPS_DIRECTIONALLIGHTS	0x08
-#define D3DVTXPCAPS_POSITIONALLIGHTS	0x10
-#define D3DVTXPCAPS_LOCALVIEWER	0x20
-#define D3DVTXPCAPS_TWEENING	0x40
-#define D3DVTXPCAPS_TEXGEN_SPHEREMAP	0x100
-#define D3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER	0x200
-#define D3DCAPS_READ_SCANLINE	0x20000
-#define D3DCAPS2_FULLSCREENGAMMA	0x20000L
-#define D3DCAPS2_CANCALIBRATEGAMMA	0x100000L
-#define D3DCAPS2_RESERVED	0x2000000L
-#define D3DCAPS2_CANMANAGERESOURCE	0x10000000L
-#define D3DCAPS2_DYNAMICTEXTURES	0x20000000L
-#define D3DCAPS2_CANAUTOGENMIPMAP	0x40000000L
-#define D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD	0x20
-#define D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION	0x80
-#define D3DCAPS3_COPY_TO_VIDMEM	0x100
-#define D3DCAPS3_COPY_TO_SYSTEMMEM	0x200
-#define D3DCAPS3_RESERVED	0x8000001fL
-#define D3DDTCAPS_UBYTE4	0x01
-#define D3DDTCAPS_UBYTE4N	0x02
-#define D3DDTCAPS_SHORT2N	0x04
-#define D3DDTCAPS_SHORT4N	0x08
-#define D3DDTCAPS_USHORT2N	0x10
-#define D3DDTCAPS_USHORT4N	0x20
-#define D3DDTCAPS_UDEC3	0x40
-#define D3DDTCAPS_DEC3N	0x80
-#define D3DDTCAPS_FLOAT16_2	0x100
-#define D3DDTCAPS_FLOAT16_4	0x200
-#define D3DMIN30SHADERINSTRUCTIONS	512
-#define D3DMAX30SHADERINSTRUCTIONS	32768
-#define D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH	24
-#define D3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH	0
-#define D3DPS20_MAX_NUMTEMPS	32
-#define D3DPS20_MIN_NUMTEMPS	12
-#define D3DPS20_MAX_STATICFLOWCONTROLDEPTH	4
-#define D3DPS20_MIN_STATICFLOWCONTROLDEPTH	0
-#define D3DPS20_MAX_NUMINSTRUCTIONSLOTS	512
-#define D3DPS20_MIN_NUMINSTRUCTIONSLOTS	96
-#define D3DPS20CAPS_ARBITRARYSWIZZLE	0x1
-#define D3DPS20CAPS_GRADIENTINSTRUCTIONS	0x2
-#define D3DPS20CAPS_PREDICATION	0x4
-#define D3DPS20CAPS_NODEPENDENTREADLIMIT	0x8
-#define D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT	0x10
-#define D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH	24
-#define D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH	0
-#define D3DVS20_MAX_NUMTEMPS	32
-#define D3DVS20_MIN_NUMTEMPS	12
-#define D3DVS20_MAX_STATICFLOWCONTROLDEPTH	4
-#define D3DVS20_MIN_STATICFLOWCONTROLDEPTH	1
-#define D3DVS20CAPS_PREDICATION	1
-
-typedef struct _D3DVSHADERCAPS2_0 {
-	DWORD Caps;
-	INT DynamicFlowControlDepth;
-	INT NumTemps;
-	INT StaticFlowControlDepth;
-} D3DVSHADERCAPS2_0;
-
-typedef struct _D3DPSHADERCAPS2_0 {
-	DWORD Caps;
-	INT DynamicFlowControlDepth;
-	INT NumTemps;
-	INT StaticFlowControlDepth;
-	INT NumInstructionSlots;
-} D3DPSHADERCAPS2_0;
-
-typedef struct _D3DCAPS9 {
-	D3DDEVTYPE DeviceType;
-	UINT AdapterOrdinal;
-	DWORD Caps;
-	DWORD Caps2;
-	DWORD Caps3;
-	DWORD PresentationIntervals;
-	DWORD CursorCaps;
-	DWORD DevCaps;
-	DWORD PrimitiveMiscCaps;
-	DWORD RasterCaps;
-	DWORD ZCmpCaps;
-	DWORD SrcBlendCaps;
-	DWORD DestBlendCaps;
-	DWORD AlphaCmpCaps;
-	DWORD ShadeCaps;
-	DWORD TextureCaps;
-	DWORD TextureFilterCaps;
-	DWORD CubeTextureFilterCaps;
-	DWORD VolumeTextureFilterCaps;
-	DWORD TextureAddressCaps;
-	DWORD VolumeTextureAddressCaps;
-	DWORD LineCaps;
-	DWORD MaxTextureWidth;
-	DWORD MaxTextureHeight;
-	DWORD MaxVolumeExtent;
-	DWORD MaxTextureRepeat;
-	DWORD MaxTextureAspectRatio;
-	DWORD MaxAnisotropy;
-	float MaxVertexW;
-	float GuardBandLeft;
-	float GuardBandTop;
-	float GuardBandRight;
-	float GuardBandBottom;
-	float ExtentsAdjust;
-	DWORD StencilCaps;
-	DWORD FVFCaps;
-	DWORD TextureOpCaps;
-	DWORD MaxTextureBlendStages;
-	DWORD MaxSimultaneousTextures;
-	DWORD VertexProcessingCaps;
-	DWORD MaxActiveLights;
-	DWORD MaxUserClipPlanes;
-	DWORD MaxVertexBlendMatrices;
-	DWORD MaxVertexBlendMatrixIndex;
-	float MaxPointSize;
-	DWORD MaxPrimitiveCount;
-	DWORD MaxVertexIndex;
-	DWORD MaxStreams;
-	DWORD MaxStreamStride;
-	DWORD VertexShaderVersion;
-	DWORD MaxVertexShaderConst;
-	DWORD PixelShaderVersion;
-	float PixelShader1xMaxValue;
-	DWORD DevCaps2;
-	float MaxNpatchTessellationLevel;
-	DWORD Reserved5;
-	UINT MasterAdapterOrdinal;   
-	UINT AdapterOrdinalInGroup;  
-	UINT NumberOfAdaptersInGroup;
-	DWORD DeclTypes;              
-	DWORD NumSimultaneousRTs;     
-	DWORD StretchRectFilterCaps;  
-	D3DVSHADERCAPS2_0 VS20Caps;
-	D3DPSHADERCAPS2_0 PS20Caps;
-	DWORD VertexTextureFilterCaps;
-	DWORD MaxVShaderInstructionsExecuted;
-	DWORD MaxPShaderInstructionsExecuted;
-	DWORD MaxVertexShader30InstructionSlots; 
-	DWORD MaxPixelShader30InstructionSlots;
-} D3DCAPS9;
-
-#endif
-#endif
--- a/include/d3d9types.h	Mon Dec 14 10:57:20 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1272 +0,0 @@
-/*
-
-	d3d9types.h - Header file for the Direct3D9 API
-
-	Written by Filip Navara <xnavara@volny.cz>
-
-	This library is distributed in the hope that it will be useful,
-	but WITHOUT ANY WARRANTY; without even the implied warranty of
-	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#ifndef _D3D9_TYPES_H
-#define _D3D9_TYPES_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef DIRECT3D_VERSION
-#define DIRECT3D_VERSION  0x0900
-#endif
-
-#if (DIRECT3D_VERSION >= 0x0900)
-
-#include <pshpack4.h>
-
-#define D3DCLEAR_TARGET	0x01
-#define D3DCLEAR_ZBUFFER	0x02
-#define D3DCLEAR_STENCIL	0x04
-#define D3DCLIPPLANE0	0x01
-#define D3DCLIPPLANE1	0x02
-#define D3DCLIPPLANE2	0x04
-#define D3DCLIPPLANE3	0x08
-#define D3DCLIPPLANE4	0x10
-#define D3DCLIPPLANE5	0x20
-#define D3DCOLOR_ARGB(a,r,g,b)	((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
-#define D3DCOLOR_COLORVALUE(r,g,b,a)	D3DCOLOR_RGBA((DWORD)((r)*255.f),(DWORD)((g)*255.f),(DWORD)((b)*255.f),(DWORD)((a)*255.f))
-#define D3DCOLOR_RGBA(r,g,b,a)	D3DCOLOR_ARGB(a,r,g,b)
-#define D3DCOLOR_XRGB(r,g,b)	D3DCOLOR_ARGB(0xff,r,g,b)
-#define D3DCOLOR_XYUV(y,u,v)	D3DCOLOR_ARGB(0xff,y,u,v)
-#define D3DCOLOR_AYUV(a,y,u,v)	D3DCOLOR_ARGB(a,y,u,v)
-#define D3DCOLORWRITEENABLE_RED	0x01
-#define D3DCOLORWRITEENABLE_GREEN	0x02
-#define D3DCOLORWRITEENABLE_BLUE	0x04
-#define D3DCOLORWRITEENABLE_ALPHA	0x08
-#define D3DCS_LEFT	0x01
-#define D3DCS_RIGHT	0x02
-#define D3DCS_TOP	0x04
-#define D3DCS_BOTTOM	0x08
-#define D3DCS_FRONT	0x10
-#define D3DCS_BACK	0x20
-#define D3DCS_PLANE0	0x40
-#define D3DCS_PLANE1	0x80
-#define D3DCS_PLANE2	0x100
-#define D3DCS_PLANE3	0x200
-#define D3DCS_PLANE4	0x400
-#define D3DCS_PLANE5	0x800
-#define D3DCS_ALL	(D3DCS_LEFT|D3DCS_RIGHT|D3DCS_TOP|D3DCS_BOTTOM|D3DCS_FRONT|D3DCS_BACK|D3DCS_PLANE0|D3DCS_PLANE1|D3DCS_PLANE2|D3DCS_PLANE3|D3DCS_PLANE4|D3DCS_PLANE5)
-#define D3DDECL_END()	{0xff,0,D3DDECLTYPE_UNUSED,0,0,0}
-#define D3DDP_MAXTEXCOORD	8
-#define D3DPV_DONOTCOPYDATA	0x01
-#define D3DTA_SELECTMASK	0x0f
-#define D3DTA_DIFFUSE	0x00
-#define D3DTA_CURRENT	0x01
-#define D3DTA_TEXTURE	0x02
-#define D3DTA_TFACTOR	0x03
-#define D3DTA_SPECULAR	0x04
-#define D3DTA_TEMP	0x05
-#define D3DTA_CONSTANT	0x06
-#define D3DTA_COMPLEMENT	0x10
-#define D3DTA_ALPHAREPLICATE	0x20
-#define D3DFVF_RESERVED0	0x01
-#define D3DFVF_POSITION_MASK	0x4000E
-#define D3DFVF_XYZ	0x02
-#define D3DFVF_XYZRHW	0x04
-#define D3DFVF_XYZB1	0x06
-#define D3DFVF_XYZB2	0x08
-#define D3DFVF_XYZB3	0x0a
-#define D3DFVF_XYZB4	0x0c
-#define D3DFVF_XYZB5	0x0e
-#define D3DFVF_XYZW	0x4002
-#define D3DFVF_NORMAL	0x10
-#define D3DFVF_PSIZE	0x20
-#define D3DFVF_DIFFUSE	0x40
-#define D3DFVF_SPECULAR	0x80
-#define D3DFVF_TEXCOUNT_MASK	0xf00
-#define D3DFVF_TEXCOUNT_SHIFT	8
-#define D3DFVF_TEX0	0x0000
-#define D3DFVF_TEX1	0x0100
-#define D3DFVF_TEX2	0x0200
-#define D3DFVF_TEX3	0x0300
-#define D3DFVF_TEX4	0x0400
-#define D3DFVF_TEX5	0x0500
-#define D3DFVF_TEX6	0x0600
-#define D3DFVF_TEX7	0x0700
-#define D3DFVF_TEX8	0x0800
-#define D3DFVF_TEXCOORDSIZE1(i) (D3DFVF_TEXTUREFORMAT1 << (i * 2 + 16))
-#define D3DFVF_TEXCOORDSIZE2(i) (D3DFVF_TEXTUREFORMAT2)
-#define D3DFVF_TEXCOORDSIZE3(i) (D3DFVF_TEXTUREFORMAT3 << (i * 2 + 16))
-#define D3DFVF_TEXCOORDSIZE4(i) (D3DFVF_TEXTUREFORMAT4 << (i * 2 + 16))
-#define D3DFVF_TEXTUREFORMAT1	3
-#define D3DFVF_TEXTUREFORMAT2	0
-#define D3DFVF_TEXTUREFORMAT3	1
-#define D3DFVF_TEXTUREFORMAT4	2
-#define D3DFVF_LASTBETA_UBYTE4	0x1000
-#define D3DFVF_LASTBETA_D3DCOLOR	0x8000
-#define D3DFVF_RESERVED2	0x6000
-#define D3DDMAPSAMPLER	256
-#define D3DVERTEXTEXTURESAMPLER0	(D3DDMAPSAMPLER+1)
-#define D3DVERTEXTEXTURESAMPLER1	(D3DDMAPSAMPLER+2)
-#define D3DVERTEXTEXTURESAMPLER2	(D3DDMAPSAMPLER+3)
-#define D3DVERTEXTEXTURESAMPLER3	(D3DDMAPSAMPLER+4)
-#define D3DVS_ADDRESSMODE_SHIFT	13
-#define D3DVS_ADDRESSMODE_MASK	(1 << D3DVS_ADDRESSMODE_SHIFT)
-#define D3DVS_SWIZZLE_SHIFT     16
-#define D3DVS_SWIZZLE_MASK      0x00FF0000
-#define D3DVS_X_X	(0 << D3DVS_SWIZZLE_SHIFT)
-#define D3DVS_X_Y	(1 << D3DVS_SWIZZLE_SHIFT)
-#define D3DVS_X_Z	(2 << D3DVS_SWIZZLE_SHIFT)
-#define D3DVS_X_W	(3 << D3DVS_SWIZZLE_SHIFT)
-#define D3DVS_Y_X	(0 << (D3DVS_SWIZZLE_SHIFT + 2))
-#define D3DVS_Y_Y	(1 << (D3DVS_SWIZZLE_SHIFT + 2))
-#define D3DVS_Y_Z	(2 << (D3DVS_SWIZZLE_SHIFT + 2))
-#define D3DVS_Y_W	(3 << (D3DVS_SWIZZLE_SHIFT + 2))
-#define D3DVS_Z_X	(0 << (D3DVS_SWIZZLE_SHIFT + 4))
-#define D3DVS_Z_Y	(1 << (D3DVS_SWIZZLE_SHIFT + 4))
-#define D3DVS_Z_Z	(2 << (D3DVS_SWIZZLE_SHIFT + 4))
-#define D3DVS_Z_W	(3 << (D3DVS_SWIZZLE_SHIFT + 4))
-#define D3DVS_W_X	(0 << (D3DVS_SWIZZLE_SHIFT + 6))
-#define D3DVS_W_Y	(1 << (D3DVS_SWIZZLE_SHIFT + 6))
-#define D3DVS_W_Z	(2 << (D3DVS_SWIZZLE_SHIFT + 6))
-#define D3DVS_W_W	(3 << (D3DVS_SWIZZLE_SHIFT + 6))
-#define D3DVS_NOSWIZZLE	(D3DVS_X_X|D3DVS_Y_Y|D3DVS_Z_Z|D3DVS_W_W)
-#define D3DPRESENT_RATE_DEFAULT	0
-#define D3DRENDERSTATE_WRAPBIAS	128UL
-#define D3DSHADER_ADDRESSMODE_SHIFT	13
-#define D3DSHADER_ADDRESSMODE_MASK	(1 << D3DSHADER_ADDRESSMODE_SHIFT)
-#define D3DSHADER_COMPARISON_SHIFT	D3DSP_OPCODESPECIFICCONTROL_SHIFT
-#define D3DSHADER_COMPARISON_MASK	(0x07 << D3DSHADER_COMPARISON_SHIFT)
-#define D3DSHADER_INSTRUCTION_PREDICATED	0x10000000
-#define D3DSI_COISSUE	0x40000000
-#define D3DSI_COMMENTSIZE_SHIFT	16
-#define D3DSI_COMMENTSIZE_MASK	0x7fff0000
-#define D3DSI_OPCODE_MASK	0xffff
-#define D3DSI_INSTLENGTH_MASK	0xf000000
-#define D3DSI_INSTLENGTH_SHIFT	24
-#define D3DSI_TEXLD_PROJECT	(0x01 << D3DSP_OPCODESPECIFICCONTROL_SHIFT)
-#define D3DSI_TEXLD_BIAS	(0x02 << D3DSP_OPCODESPECIFICCONTROL_SHIFT)
-#define D3DSINCOSCONST1	-1.5500992e-006f, -2.1701389e-005f, 0.0026041667f, 0.00026041668f
-#define D3DSINCOSCONST2	-0.020833334f, -0.12500000f, 1.0f, 0.50000000f
-#define D3DSP_OPCODESPECIFICCONTROL_MASK	0xff0000
-#define D3DSP_OPCODESPECIFICCONTROL_SHIFT	16
-#define D3DSP_DCL_USAGE_SHIFT	0
-#define D3DSP_DCL_USAGE_MASK	0x0000000f
-#define D3DSP_DCL_USAGEINDEX_SHIFT	16
-#define D3DSP_DCL_USAGEINDEX_MASK	0x000f0000
-#define D3DSP_TEXTURETYPE_SHIFT	27
-#define D3DSP_TEXTURETYPE_MASK	0x78000000
-#define D3DSP_REGNUM_MASK	0x7ff
-#define D3DSP_WRITEMASK_0	0x10000
-#define D3DSP_WRITEMASK_1	0x20000
-#define D3DSP_WRITEMASK_2	0x40000
-#define D3DSP_WRITEMASK_3	0x80000
-#define D3DSP_WRITEMASK_ALL	0xf0000
-#define D3DSP_DSTMOD_SHIFT	20
-#define D3DSP_DSTMOD_MASK	0xf00000
-#define D3DSPDM_NONE	0
-#define D3DSPDM_SATURATE	(1 << D3DSP_DSTMOD_SHIFT)
-#define D3DSPDM_PARTIALPRECISION	(2 << D3DSP_DSTMOD_SHIFT)
-#define D3DSPDM_MSAMPCENTROID	(4 << D3DSP_DSTMOD_SHIFT)
-#define D3DSP_DSTSHIFT_SHIFT	24
-#define D3DSP_DSTSHIFT_MASK	0xf000000
-#define D3DSP_NOSWIZZLE	((0 << (D3DSP_SWIZZLE_SHIFT + 0)) | (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | (2 << (D3DSP_SWIZZLE_SHIFT + 4)) | (3 << (D3DSP_SWIZZLE_SHIFT + 6)))
-#define D3DSP_REPLICATERED	0
-#define D3DSP_REPLICATEGREEN	((1 << (D3DSP_SWIZZLE_SHIFT + 0)) | (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | (1 << (D3DSP_SWIZZLE_SHIFT + 4)) | (1 << (D3DSP_SWIZZLE_SHIFT + 6)))
-#define D3DSP_REPLICATEBLUE	((2 << (D3DSP_SWIZZLE_SHIFT + 0)) | (2 << (D3DSP_SWIZZLE_SHIFT + 2)) | (2 << (D3DSP_SWIZZLE_SHIFT + 4)) | (2 << (D3DSP_SWIZZLE_SHIFT + 6)))
-#define D3DSP_REPLICATEALPHA	((3 << (D3DSP_SWIZZLE_SHIFT + 0)) | (3 << (D3DSP_SWIZZLE_SHIFT + 2)) | (3 << (D3DSP_SWIZZLE_SHIFT + 4)) | (3 << (D3DSP_SWIZZLE_SHIFT + 6)))
-#define D3DSP_REGTYPE_SHIFT	28
-#define D3DSP_REGTYPE_SHIFT2	8
-#define D3DSP_REGTYPE_MASK	0x70000000
-#define D3DSP_REGTYPE_MASK2	0x1800
-#define D3DSP_SRCMOD_SHIFT	24
-#define D3DSP_SRCMOD_MASK	0xf000000
-#define D3DSP_SWIZZLE_SHIFT	16
-#define D3DSP_SWIZZLE_MASK	0xff0000
-#define D3DTS_WORLDMATRIX(index)	(D3DTRANSFORMSTATETYPE)(index + 256)
-#define D3DTS_WORLD	D3DTS_WORLDMATRIX(0)
-#define D3DTS_WORLD1	D3DTS_WORLDMATRIX(1)
-#define D3DTS_WORLD2	D3DTS_WORLDMATRIX(2)
-#define D3DTS_WORLD3	D3DTS_WORLDMATRIX(3)
-#define D3DTSS_TCI_PASSTHRU	0x00
-#define D3DTSS_TCI_CAMERASPACENORMAL	0x10000
-#define D3DTSS_TCI_CAMERASPACEPOSITION	0x20000
-#define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR	0x30000
-#define D3DTSS_TCI_SPHEREMAP	0x40000
-#define D3DUSAGE_RENDERTARGET	0x01
-#define D3DUSAGE_DEPTHSTENCIL	0x02
-#define D3DUSAGE_WRITEONLY	0x08
-#define D3DUSAGE_SOFTWAREPROCESSING	0x10
-#define D3DUSAGE_DONOTCLIP	0x20
-#define D3DUSAGE_POINTS	0x40
-#define D3DUSAGE_RTPATCHES	0x80
-#define D3DUSAGE_NPATCHES	0x100
-#define D3DUSAGE_DYNAMIC	0x200
-#define D3DUSAGE_AUTOGENMIPMAP	0x400
-#define D3DUSAGE_DMAP	0x4000
-#define D3DUSAGE_QUERY_LEGACYBUMPMAP	0x8000
-#define D3DUSAGE_QUERY_SRGBREAD	0x10000
-#define D3DUSAGE_QUERY_FILTER	0x20000
-#define D3DUSAGE_QUERY_SRGBWRITE	0x40000
-#define D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING	0x80000
-#define D3DUSAGE_QUERY_VERTEXTEXTURE	0x100000
-#define D3DWRAP_U	0x01
-#define D3DWRAP_V	0x02
-#define D3DWRAP_W	0x04
-#define D3DWRAPCOORD_0	0x01
-#define D3DWRAPCOORD_1	0x02
-#define D3DWRAPCOORD_2	0x04
-#define D3DWRAPCOORD_3	0x08
-#define MAX_DEVICE_IDENTIFIER_STRING	512
-#define MAXD3DDECLLENGTH	64
-#define MAXD3DDECLMETHOD	D3DDECLMETHOD_LOOKUPPRESAMPLED
-#define MAXD3DDECLTYPE	D3DDECLTYPE_UNUSED
-#define MAXD3DDECLUSAGE	D3DDECLUSAGE_SAMPLE
-#define MAXD3DDECLUSAGEINDEX	15
-#define D3DMAXUSERCLIPPLANES	32
-#define D3D_MAX_SIMULTANEOUS_RENDERTARGETS	4
-#define D3DPS_VERSION(major,minor)	(0xffff0000 | ((major) << 8) | (minor))
-#define D3DVS_VERSION(major,minor)	(0xfffe0000 | ((major) << 8) | (minor))
-#define D3DSHADER_VERSION_MAJOR(version)	(((version) >> 8) & 0xff)
-#define D3DSHADER_VERSION_MINOR(version)	(((version) >> 0) & 0xff)
-#define D3DSHADER_COMMENT(s)	((((s) << D3DSI_COMMENTSIZE_SHIFT) & D3DSI_COMMENTSIZE_MASK) | D3DSIO_COMMENT)
-#define D3DPS_END()	0xffff
-#define D3DVS_END()	0xffff
-#define D3DPRESENTFLAG_LOCKABLE_BACKBUFFER	0x01
-#define D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL	0x02
-#define D3DPRESENTFLAG_DEVICECLIP	0x04
-#define D3DPRESENTFLAG_VIDEO	0x10
-#define D3DLOCK_READONLY	0x10
-#define D3DLOCK_NOSYSLOCK	0x800
-#define D3DLOCK_NOOVERWRITE	0x1000
-#define D3DLOCK_DISCARD	0x2000
-#define D3DLOCK_DONOTWAIT	0x4000
-#define D3DLOCK_NO_DIRTY_UPDATE	0x8000
-#define D3DISSUE_END	0x01
-#define D3DISSUE_BEGIN	0x02
-#define D3DGETDATA_FLUSH	0x01
-#define D3DRTYPECOUNT	(D3DRTYPE_INDEXBUFFER+1)
-
-#define MAKEFOURCC(a,b,c,d)  \
-	((DWORD)(BYTE)(a) | ((DWORD)(BYTE)(b) << 8) |  \
-	((DWORD)(BYTE)(c) << 16) | ((DWORD)(BYTE)(d) << 24 ))
-
-typedef DWORD D3DCOLOR;
-
-typedef enum _D3DBACKBUFFER_TYPE {
-	D3DBACKBUFFER_TYPE_MONO = 0,
-	D3DBACKBUFFER_TYPE_LEFT = 1,
-	D3DBACKBUFFER_TYPE_RIGHT = 2,
-	D3DBACKBUFFER_TYPE_FORCE_DWORD = 0xffffffff
-} D3DBACKBUFFER_TYPE;
-
-typedef enum _D3DBASISTYPE {
-	D3DBASIS_BEZIER = 0,
-	D3DBASIS_BSPLINE = 1,
-	D3DBASIS_INTERPOLATE = 2,
-	D3DBASIS_FORCE_DWORD = 0xffffffff
-} D3DBASISTYPE;
-
-typedef enum _D3DBLEND {
-	D3DBLEND_ZERO = 1,
-	D3DBLEND_ONE = 2,
-	D3DBLEND_SRCCOLOR = 3,
-	D3DBLEND_INVSRCCOLOR = 4,
-	D3DBLEND_SRCALPHA = 5,
-	D3DBLEND_INVSRCALPHA = 6,
-	D3DBLEND_DESTALPHA = 7,
-	D3DBLEND_INVDESTALPHA = 8,
-	D3DBLEND_DESTCOLOR = 9,
-	D3DBLEND_INVDESTCOLOR = 10,
-	D3DBLEND_SRCALPHASAT = 11,
-	D3DBLEND_BOTHSRCALPHA = 12,
-	D3DBLEND_BOTHINVSRCALPHA = 13,
-	D3DBLEND_BLENDFACTOR = 14,
-	D3DBLEND_INVBLENDFACTOR = 15,
-	D3DBLEND_FORCE_DWORD = 0xffffffff
-} D3DBLEND;
-
-typedef enum _D3DBLENDOP {
-	D3DBLENDOP_ADD = 1,
-	D3DBLENDOP_SUBTRACT = 2,
-	D3DBLENDOP_REVSUBTRACT = 3,
-	D3DBLENDOP_MIN = 4,
-	D3DBLENDOP_MAX = 5,
-	D3DBLENDOP_FORCE_DWORD = 0x7fffffff
-} D3DBLENDOP;
-
-typedef enum _D3DCMPFUNC {
-	D3DCMP_NEVER = 1,
-	D3DCMP_LESS = 2,
-	D3DCMP_EQUAL = 3,
-	D3DCMP_LESSEQUAL = 4,
-	D3DCMP_GREATER = 5,
-	D3DCMP_NOTEQUAL = 6,
-	D3DCMP_GREATEREQUAL = 7,
-	D3DCMP_ALWAYS = 8,
-	D3DCMP_FORCE_DWORD = 0xffffffff
-} D3DCMPFUNC;
-
-typedef enum _D3DCUBEMAP_FACES {
-	D3DCUBEMAP_FACE_POSITIVE_X = 0,
-	D3DCUBEMAP_FACE_NEGATIVE_X = 1,
-	D3DCUBEMAP_FACE_POSITIVE_Y = 2,
-	D3DCUBEMAP_FACE_NEGATIVE_Y = 3,
-	D3DCUBEMAP_FACE_POSITIVE_Z = 4,
-	D3DCUBEMAP_FACE_NEGATIVE_Z = 5,
-	D3DCUBEMAP_FACE_FORCE_DWORD = 0xffffffff
-} D3DCUBEMAP_FACES;
-
-typedef enum _D3DCULL {
-	D3DCULL_NONE = 1,
-	D3DCULL_CW = 2,
-	D3DCULL_CCW = 3,
-	D3DCULL_FORCE_DWORD = 0xffffffff
-} D3DCULL;
-
-typedef enum _D3DDEBUGMONITORTOKENS {
-	D3DDMT_ENABLE = 0,
-	D3DDMT_DISABLE = 1,
-	D3DDMT_FORCE_DWORD = 0xffffffff
-} D3DDEBUGMONITORTOKENS;
-
-typedef enum _D3DDECLMETHOD
-{
-	D3DDECLMETHOD_DEFAULT = 0,
-	D3DDECLMETHOD_PARTIALU = 1,
-	D3DDECLMETHOD_PARTIALV = 2,
-	D3DDECLMETHOD_CROSSUV = 3,
-	D3DDECLMETHOD_UV = 4,
-	D3DDECLMETHOD_LOOKUP = 5,
-	D3DDECLMETHOD_LOOKUPPRESAMPLED = 6
-} D3DDECLMETHOD;
-
-typedef enum _D3DDECLTYPE
-{
-	D3DDECLTYPE_FLOAT1 = 0,
-	D3DDECLTYPE_FLOAT2 = 1,
-	D3DDECLTYPE_FLOAT3 = 2,
-	D3DDECLTYPE_FLOAT4 = 3,
-	D3DDECLTYPE_D3DCOLOR = 4,
-	D3DDECLTYPE_UBYTE4 = 5,
-	D3DDECLTYPE_SHORT2 = 6,
-	D3DDECLTYPE_SHORT4 = 7,
-	D3DDECLTYPE_UBYTE4N = 8,
-	D3DDECLTYPE_SHORT2N = 9,
-	D3DDECLTYPE_SHORT4N = 10,
-	D3DDECLTYPE_USHORT2N = 11,
-	D3DDECLTYPE_USHORT4N = 12,
-	D3DDECLTYPE_UDEC3 = 13,
-	D3DDECLTYPE_DEC3N = 14,
-	D3DDECLTYPE_FLOAT16_2 = 15,
-	D3DDECLTYPE_FLOAT16_4 = 16,
-	D3DDECLTYPE_UNUSED = 17,
-} D3DDECLTYPE;
-
-typedef enum _D3DDECLUSAGE
-{
-	D3DDECLUSAGE_POSITION = 0,
-	D3DDECLUSAGE_BLENDWEIGHT = 1,
-	D3DDECLUSAGE_BLENDINDICES = 2,
-	D3DDECLUSAGE_NORMAL = 3,
-	D3DDECLUSAGE_PSIZE = 4,
-	D3DDECLUSAGE_TEXCOORD = 5,
-	D3DDECLUSAGE_TANGENT = 6,
-	D3DDECLUSAGE_BINORMAL = 7,
-	D3DDECLUSAGE_TESSFACTOR = 8,
-	D3DDECLUSAGE_POSITIONT = 9,
-	D3DDECLUSAGE_COLOR = 10,
-	D3DDECLUSAGE_FOG = 11,
-	D3DDECLUSAGE_DEPTH = 12,
-	D3DDECLUSAGE_SAMPLE = 13
-} D3DDECLUSAGE;
-
-typedef enum _D3DDEGREETYPE {
-	D3DDEGREE_LINEAR = 1,
-	D3DDEGREE_QUADRATIC = 2,
-	D3DDEGREE_CUBIC = 3,
-	D3DDEGREE_QUINTIC = 5,
-	D3DDEGREE_FORCE_DWORD = 0xffffffff,
-} D3DDEGREETYPE;
-
-typedef enum _D3DDEVTYPE {
-	D3DDEVTYPE_HAL = 1,
-	D3DDEVTYPE_REF = 2,
-	D3DDEVTYPE_SW = 3,
-	D3DDEVTYPE_FORCE_DWORD = 0xffffffff
-} D3DDEVTYPE;
-
-typedef enum _D3DFILLMODE {
-	D3DFILL_POINT = 1,
-	D3DFILL_WIREFRAME = 2,
-	D3DFILL_SOLID = 3,
-	D3DFILL_FORCE_DWORD = 0xffffffff
-} D3DFILLMODE;
-
-typedef enum _D3DFOGMODE {
-	D3DFOG_NONE = 0,
-	D3DFOG_EXP = 1,
-	D3DFOG_EXP2 = 2,
-	D3DFOG_LINEAR = 3,
-	D3DFOG_FORCE_DWORD = 0xffffffff
-} D3DFOGMODE;
-
-typedef enum _D3DFORMAT {
-	D3DFMT_UNKNOWN = 0,
-	D3DFMT_R8G8B8 = 20,
-	D3DFMT_A8R8G8B8 = 21,
-	D3DFMT_X8R8G8B8 = 22,
-	D3DFMT_R5G6B5 = 23,
-	D3DFMT_X1R5G5B5 = 24,
-	D3DFMT_A1R5G5B5 = 25,
-	D3DFMT_A4R4G4B4 = 26,
-	D3DFMT_R3G3B2 = 27,
-	D3DFMT_A8 = 28,
-	D3DFMT_A8R3G3B2 = 29,
-	D3DFMT_X4R4G4B4 = 30,
-	D3DFMT_A2B10G10R10 = 31,
-	D3DFMT_A8B8G8R8 = 32,
-	D3DFMT_X8B8G8R8 = 33,
-	D3DFMT_G16R16 = 34,
-	D3DFMT_A2R10G10B10 = 35,
-	D3DFMT_A16B16G16R16 = 36,
-	D3DFMT_A8P8 = 40,
-	D3DFMT_P8 = 41,
-	D3DFMT_L8 = 50,
-	D3DFMT_A8L8 = 51,
-	D3DFMT_A4L4 = 52,
-	D3DFMT_V8U8 = 60,
-	D3DFMT_L6V5U5 = 61,
-	D3DFMT_X8L8V8U8 = 62,
-	D3DFMT_Q8W8V8U8 = 63,
-	D3DFMT_V16U16 = 64,
-    D3DFMT_A2W10V10U10 = 67,
-	D3DFMT_UYVY = MAKEFOURCC('U','Y','V','Y'),
-	D3DFMT_R8G8_B8G8 = MAKEFOURCC('R','G','B','G'),
-	D3DFMT_YUY2 = MAKEFOURCC('Y','U','Y','2'),
-	D3DFMT_G8R8_G8B8 = MAKEFOURCC('G','R','G','B'),
-	D3DFMT_DXT1 = MAKEFOURCC('D','X','T','1'),
-	D3DFMT_DXT2 = MAKEFOURCC('D','X','T','2'),
-	D3DFMT_DXT3 = MAKEFOURCC('D','X','T','3'),
-	D3DFMT_DXT4 = MAKEFOURCC('D','X','T','4'),
-	D3DFMT_DXT5 = MAKEFOURCC('D','X','T','5'),
-	D3DFMT_D16_LOCKABLE = 70,
-	D3DFMT_D32 = 71,
-	D3DFMT_D15S1 = 73,
-	D3DFMT_D24S8 = 75,
-	D3DFMT_D24X8 = 77,
-	D3DFMT_D24X4S4 = 79,
-	D3DFMT_D16 = 80,
-	D3DFMT_L16 = 81,
-	D3DFMT_D32F_LOCKABLE = 82,
-	D3DFMT_D24FS8 = 83,
-	D3DFMT_VERTEXDATA = 100,
-	D3DFMT_INDEX16 = 101,
-	D3DFMT_INDEX32 = 102,
-	D3DFMT_Q16W16V16U16 = 110,
-	D3DFMT_MULTI2_ARGB8 = MAKEFOURCC('M','E','T','1'),
-	D3DFMT_R16F = 111,
-	D3DFMT_G16R16F = 112,
-	D3DFMT_A16B16G16R16F = 113,
-	D3DFMT_R32F = 114,
-	D3DFMT_G32R32F = 115,
-	D3DFMT_A32B32G32R32F = 116,
-	D3DFMT_CxV8U8 = 117,
-	D3DFMT_FORCE_DWORD = 0xffffffff
-} D3DFORMAT;
-
-typedef enum _D3DLIGHTTYPE {
-	D3DLIGHT_POINT = 1,
-	D3DLIGHT_SPOT = 2,
-	D3DLIGHT_DIRECTIONAL = 3,
-	D3DLIGHT_FORCE_DWORD = 0xffffffff
-} D3DLIGHTTYPE;
-
-typedef enum _D3DMATERIALCOLORSOURCE
-{
-	D3DMCS_MATERIAL = 0,
-	D3DMCS_COLOR1 = 1,
-	D3DMCS_COLOR2 = 2,
-	D3DMCS_FORCE_DWORD = 0xffffffff
-} D3DMATERIALCOLORSOURCE;
-
-typedef enum _D3DMULTISAMPLE_TYPE {
-	D3DMULTISAMPLE_NONE = 0,
-	D3DMULTISAMPLE_NONMASKABLE = 1,
-	D3DMULTISAMPLE_2_SAMPLES = 2,
-	D3DMULTISAMPLE_3_SAMPLES = 3,
-	D3DMULTISAMPLE_4_SAMPLES = 4,
-	D3DMULTISAMPLE_5_SAMPLES = 5,
-	D3DMULTISAMPLE_6_SAMPLES = 6,
-	D3DMULTISAMPLE_7_SAMPLES = 7,
-	D3DMULTISAMPLE_8_SAMPLES = 8,
-	D3DMULTISAMPLE_9_SAMPLES = 9,
-	D3DMULTISAMPLE_10_SAMPLES = 10,
-	D3DMULTISAMPLE_11_SAMPLES = 11,
-	D3DMULTISAMPLE_12_SAMPLES = 12,
-	D3DMULTISAMPLE_13_SAMPLES = 13,
-	D3DMULTISAMPLE_14_SAMPLES = 14,
-	D3DMULTISAMPLE_15_SAMPLES = 15,
-	D3DMULTISAMPLE_16_SAMPLES = 16,
-	D3DMULTISAMPLE_FORCE_DWORD = 0xffffffff
-} D3DMULTISAMPLE_TYPE;
-
-typedef enum _D3DORDERTYPE {
-	D3DORDER_LINEAR = 1,
-	D3DORDER_QUADRATIC = 2,
-	D3DORDER_CUBIC = 3,
-	D3DORDER_QUINTIC = 5,
-	D3DORDER_FORCE_DWORD = 0xffffffff
-} D3DORDERTYPE;
-
-typedef enum _D3DPATCHEDGESTYLE
-{
-	D3DPATCHEDGE_DISCRETE = 0,
-	D3DPATCHEDGE_CONTINUOUS = 1,
-	D3DPATCHEDGE_FORCE_DWORD = 0xffffffff
-} D3DPATCHEDGESTYLE;
-
-typedef enum _D3DPOOL {
-	D3DPOOL_DEFAULT = 0,
-	D3DPOOL_MANAGED = 1,
-	D3DPOOL_SYSTEMMEM = 2,
-	D3DPOOL_SCRATCH = 3,
-	D3DPOOL_FORCE_DWORD = 0xffffffff
-} D3DPOOL;
-
-typedef enum _D3DPRIMITIVETYPE {
-	D3DPT_POINTLIST = 1,
-	D3DPT_LINELIST = 2,
-	D3DPT_LINESTRIP = 3,
-	D3DPT_TRIANGLELIST = 4,
-	D3DPT_TRIANGLESTRIP = 5,
-	D3DPT_TRIANGLEFAN = 6,
-	D3DPT_FORCE_DWORD = 0xffffffff
-} D3DPRIMITIVETYPE;
-
-typedef enum _D3DQUERYTYPE {
-	D3DQUERYTYPE_VCACHE = 4, 
-	D3DQUERYTYPE_RESOURCEMANAGER = 5, 
-	D3DQUERYTYPE_VERTEXSTATS = 6, 
-	D3DQUERYTYPE_EVENT = 8, 
-	D3DQUERYTYPE_OCCLUSION = 9
-} D3DQUERYTYPE;
-
-typedef enum _D3DRENDERSTATETYPE {
-	D3DRS_ZENABLE = 7,
-	D3DRS_FILLMODE = 8,
-	D3DRS_SHADEMODE = 9,
-	D3DRS_ZWRITEENABLE = 14,
-	D3DRS_ALPHATESTENABLE = 15,
-	D3DRS_LASTPIXEL = 16,
-	D3DRS_SRCBLEND = 19,
-	D3DRS_DESTBLEND = 20,
-	D3DRS_CULLMODE = 22,
-	D3DRS_ZFUNC = 23,
-	D3DRS_ALPHAREF = 24,
-	D3DRS_ALPHAFUNC = 25,
-	D3DRS_DITHERENABLE = 26,
-	D3DRS_ALPHABLENDENABLE = 27,
-	D3DRS_FOGENABLE = 28,
-	D3DRS_SPECULARENABLE = 29,
-	D3DRS_FOGCOLOR = 34,
-	D3DRS_FOGTABLEMODE = 35,
-	D3DRS_FOGSTART = 36,
-	D3DRS_FOGEND = 37,
-	D3DRS_FOGDENSITY = 38,
-	D3DRS_RANGEFOGENABLE = 48,
-	D3DRS_STENCILENABLE = 52,
-	D3DRS_STENCILFAIL = 53,
-	D3DRS_STENCILZFAIL = 54,
-	D3DRS_STENCILPASS = 55,
-	D3DRS_STENCILFUNC = 56,
-	D3DRS_STENCILREF = 57,
-	D3DRS_STENCILMASK = 58,
-	D3DRS_STENCILWRITEMASK = 59,
-	D3DRS_TEXTUREFACTOR = 60,
-	D3DRS_WRAP0 = 128,
-	D3DRS_WRAP1 = 129,
-	D3DRS_WRAP2 = 130,
-	D3DRS_WRAP3 = 131,
-	D3DRS_WRAP4 = 132,
-	D3DRS_WRAP5 = 133,
-	D3DRS_WRAP6 = 134,
-	D3DRS_WRAP7 = 135,
-	D3DRS_CLIPPING = 136,
-	D3DRS_LIGHTING = 137,
-	D3DRS_AMBIENT = 139,
-	D3DRS_FOGVERTEXMODE = 140,
-	D3DRS_COLORVERTEX = 141,
-	D3DRS_LOCALVIEWER = 142,
-	D3DRS_NORMALIZENORMALS = 143,
-	D3DRS_DIFFUSEMATERIALSOURCE = 145,
-	D3DRS_SPECULARMATERIALSOURCE = 146,
-	D3DRS_AMBIENTMATERIALSOURCE = 147,
-	D3DRS_EMISSIVEMATERIALSOURCE = 148,
-	D3DRS_VERTEXBLEND = 151,
-	D3DRS_CLIPPLANEENABLE = 152,
-	D3DRS_POINTSIZE = 154,
-	D3DRS_POINTSIZE_MIN = 155,
-	D3DRS_POINTSPRITEENABLE = 156,
-	D3DRS_POINTSCALEENABLE = 157,
-	D3DRS_POINTSCALE_A = 158,
-	D3DRS_POINTSCALE_B = 159,
-	D3DRS_POINTSCALE_C = 160,
-	D3DRS_MULTISAMPLEANTIALIAS = 161,
-	D3DRS_MULTISAMPLEMASK = 162,
-	D3DRS_PATCHEDGESTYLE = 163,
-	D3DRS_DEBUGMONITORTOKEN = 165,
-	D3DRS_POINTSIZE_MAX = 166,
-	D3DRS_INDEXEDVERTEXBLENDENABLE = 167,
-	D3DRS_COLORWRITEENABLE = 168,
-	D3DRS_TWEENFACTOR = 170,
-	D3DRS_BLENDOP = 171,
-	D3DRS_POSITIONDEGREE = 172,
-	D3DRS_NORMALDEGREE = 173,
-	D3DRS_SCISSORTESTENABLE = 174,
-	D3DRS_SLOPESCALEDEPTHBIAS = 175,
-	D3DRS_ANTIALIASEDLINEENABLE = 176,
-	D3DRS_MINTESSELLATIONLEVEL = 178,
-	D3DRS_MAXTESSELLATIONLEVEL = 179,
-	D3DRS_ADAPTIVETESS_X = 180,
-	D3DRS_ADAPTIVETESS_Y = 181,
-	D3DRS_ADAPTIVETESS_Z = 182,
-	D3DRS_ADAPTIVETESS_W = 183,
-	D3DRS_ENABLEADAPTIVETESSELLATION = 184,
-	D3DRS_TWOSIDEDSTENCILMODE = 185,
-	D3DRS_CCW_STENCILFAIL = 186,
-	D3DRS_CCW_STENCILZFAIL = 187,
-	D3DRS_CCW_STENCILPASS = 188,
-	D3DRS_CCW_STENCILFUNC = 189,
-	D3DRS_COLORWRITEENABLE1 = 190,
-	D3DRS_COLORWRITEENABLE2 = 191,
-	D3DRS_COLORWRITEENABLE3 = 192,
-	D3DRS_BLENDFACTOR = 193,
-	D3DRS_SRGBWRITEENABLE = 194,
-	D3DRS_DEPTHBIAS = 195,
-	D3DRS_WRAP8 = 198,
-	D3DRS_WRAP9 = 199,
-	D3DRS_WRAP10 = 200,
-	D3DRS_WRAP11 = 201,
-	D3DRS_WRAP12 = 202,
-	D3DRS_WRAP13 = 203,
-	D3DRS_WRAP14 = 204,
-	D3DRS_WRAP15 = 205,
-	D3DRS_SEPARATEALPHABLENDENABLE = 206,
-	D3DRS_SRCBLENDALPHA = 207,
-	D3DRS_DESTBLENDALPHA = 208,
-	D3DRS_BLENDOPALPHA = 209,
-	D3DRS_FORCE_DWORD = 0xffffffff
-} D3DRENDERSTATETYPE;
-
-typedef enum _D3DRESOURCETYPE {
-	D3DRTYPE_SURFACE = 1,
-	D3DRTYPE_VOLUME = 2,
-	D3DRTYPE_TEXTURE = 3,
-	D3DRTYPE_VOLUMETEXTURE = 4,
-	D3DRTYPE_CUBETEXTURE = 5,
-	D3DRTYPE_VERTEXBUFFER = 6,
-	D3DRTYPE_INDEXBUFFER = 7,
-	D3DRTYPE_FORCE_DWORD = 0xffffffff
-} D3DRESOURCETYPE;
-
-typedef enum _D3DSAMPLER_TEXTURE_TYPE
-{
-	D3DSTT_UNKNOWN = 0 << D3DSP_TEXTURETYPE_SHIFT,
-	D3DSTT_2D = 2 << D3DSP_TEXTURETYPE_SHIFT,
-	D3DSTT_CUBE = 3 << D3DSP_TEXTURETYPE_SHIFT,
-	D3DSTT_VOLUME = 4 << D3DSP_TEXTURETYPE_SHIFT,
-	D3DSTT_FORCE_DWORD = 0xffffffff
-} D3DSAMPLER_TEXTURE_TYPE;
-
-typedef enum _D3DSAMPLERSTATETYPE {
-	D3DSAMP_ADDRESSU = 1,
-	D3DSAMP_ADDRESSV = 2,
-	D3DSAMP_ADDRESSW = 3,
-	D3DSAMP_BORDERCOLOR = 4,
-	D3DSAMP_MAGFILTER = 5,
-	D3DSAMP_MINFILTER = 6,
-	D3DSAMP_MIPFILTER = 7,
-	D3DSAMP_MIPMAPLODBIAS = 8,
-	D3DSAMP_MAXMIPLEVEL = 9,
-	D3DSAMP_MAXANISOTROPY = 10,
-	D3DSAMP_SRGBTEXTURE = 11,
-	D3DSAMP_ELEMENTINDEX = 12,
-	D3DSAMP_DMAPOFFSET = 13,
-	D3DSAMP_FORCE_DWORD = 0xffffffff,
-} D3DSAMPLERSTATETYPE;
-
-typedef enum _D3DSHADEMODE {
-	D3DSHADE_FLAT = 1,
-	D3DSHADE_GOURAUD = 2,
-	D3DSHADE_PHONG = 3,
-	D3DSHADE_FORCE_DWORD = 0xffffffff
-} D3DSHADEMODE;
-
-typedef enum _D3DSHADER_ADDRESSMODE_TYPE
-{
-	D3DSHADER_ADDRMODE_ABSOLUTE = (0 << D3DSHADER_ADDRESSMODE_SHIFT),
-	D3DSHADER_ADDRMODE_RELATIVE = (1 << D3DSHADER_ADDRESSMODE_SHIFT),
-	D3DSHADER_ADDRMODE_FORCE_DWORD = 0xffffffff
-} D3DSHADER_ADDRESSMODE_TYPE;
-
-typedef enum _D3DSHADER_COMPARISON
-{
-	D3DSPC_RESERVED0 = 0,
-	D3DSPC_GT = 1,
-	D3DSPC_EQ = 2,
-	D3DSPC_GE = 3,
-	D3DSPC_LT = 4,
-	D3DSPC_NE = 5,
-	D3DSPC_LE = 6,
-	D3DSPC_RESERVED1 = 7
-} D3DSHADER_COMPARISON;
-
-typedef enum _D3DSHADER_INSTRUCTION_OPCODE_TYPE
-{
-	D3DSIO_NOP = 0,
-	D3DSIO_MOV = 1,
-	D3DSIO_ADD = 2,
-	D3DSIO_SUB = 3,
-	D3DSIO_MAD = 4,
-	D3DSIO_MUL = 5,
-	D3DSIO_RCP = 6,
-	D3DSIO_RSQ = 7,
-	D3DSIO_DP3 = 8,
-	D3DSIO_DP4 = 9,
-	D3DSIO_MIN = 10,
-	D3DSIO_MAX = 11,
-	D3DSIO_SLT = 12,
-	D3DSIO_SGE = 13,
-	D3DSIO_EXP = 14,
-	D3DSIO_LOG = 15,
-	D3DSIO_LIT = 16,
-	D3DSIO_DST = 17,
-	D3DSIO_LRP = 18,
-	D3DSIO_FRC = 19,
-	D3DSIO_M4x4 = 20,
-	D3DSIO_M4x3 = 21,
-	D3DSIO_M3x4 = 22,
-	D3DSIO_M3x3 = 23,
-	D3DSIO_M3x2 = 24,
-	D3DSIO_CALL = 25,
-	D3DSIO_CALLNZ = 26,
-	D3DSIO_LOOP = 27,
-	D3DSIO_RET = 28,
-	D3DSIO_ENDLOOP = 29,
-	D3DSIO_LABEL = 30,
-	D3DSIO_DCL = 31,
-	D3DSIO_POW = 32,
-	D3DSIO_CRS = 33,
-	D3DSIO_SGN = 34,
-	D3DSIO_ABS = 35,
-	D3DSIO_NRM = 36,
-	D3DSIO_SINCOS = 37,
-	D3DSIO_REP = 38,
-	D3DSIO_ENDREP = 39,
-	D3DSIO_IF = 40,
-	D3DSIO_IFC = 41,
-	D3DSIO_ELSE = 42,
-	D3DSIO_ENDIF = 43,
-	D3DSIO_BREAK = 44,
-	D3DSIO_BREAKC = 45,
-	D3DSIO_MOVA = 46,
-	D3DSIO_DEFB = 47,
-	D3DSIO_DEFI = 48,
-	D3DSIO_TEXCOORD = 64,
-	D3DSIO_TEXKILL = 65,
-	D3DSIO_TEX = 66,
-	D3DSIO_TEXBEM = 67,
-	D3DSIO_TEXBEML = 68,
-	D3DSIO_TEXREG2AR = 69,
-	D3DSIO_TEXREG2GB = 70,
-	D3DSIO_TEXM3x2PAD = 71,
-	D3DSIO_TEXM3x2TEX = 72,
-	D3DSIO_TEXM3x3PAD = 73,
-	D3DSIO_TEXM3x3TEX = 74,
-	D3DSIO_RESERVED0 = 75,
-	D3DSIO_TEXM3x3SPEC = 76,
-	D3DSIO_TEXM3x3VSPEC = 77,
-	D3DSIO_EXPP = 78,
-	D3DSIO_LOGP = 79,
-	D3DSIO_CND = 80,
-	D3DSIO_DEF = 81,
-	D3DSIO_TEXREG2RGB = 82,
-	D3DSIO_TEXDP3TEX = 83,
-	D3DSIO_TEXM3x2DEPTH = 84,
-	D3DSIO_TEXDP3 = 85,
-	D3DSIO_TEXM3x3 = 86,
-	D3DSIO_TEXDEPTH = 87,
-	D3DSIO_CMP = 88,
-	D3DSIO_BEM = 89,
-	D3DSIO_DP2ADD = 90,
-	D3DSIO_DSX = 91,
-	D3DSIO_DSY = 92,
-	D3DSIO_TEXLDD = 93,
-	D3DSIO_SETP = 94,
-	D3DSIO_TEXLDL = 95,
-	D3DSIO_BREAKP = 96,
-	D3DSIO_PHASE = 0xfffd,
-	D3DSIO_COMMENT = 0xfffe,
-	D3DSIO_END = 0xffff,
-	D3DSIO_FORCE_DWORD = 0xffffffff
-} D3DSHADER_INSTRUCTION_OPCODE_TYPE;
-
-typedef enum _D3DSHADER_MISCTYPE_OFFSETS
-{
-	D3DSMO_POSITION = 0,
-	D3DSMO_FACE = 1
-} D3DSHADER_MISCTYPE_OFFSETS;
-
-typedef enum _D3DSHADER_PARAM_REGISTER_TYPE
-{
-	D3DSPR_TEMP = 0,
-	D3DSPR_INPUT = 1,
-	D3DSPR_CONST = 2,
-	D3DSPR_ADDR = 3,
-	D3DSPR_TEXTURE = 3,
-	D3DSPR_RASTOUT = 4,
-	D3DSPR_ATTROUT = 5,
-	D3DSPR_TEXCRDOUT = 6,
-	D3DSPR_OUTPUT = 6,
-	D3DSPR_CONSTINT = 7,
-	D3DSPR_COLOROUT = 8,
-	D3DSPR_DEPTHOUT = 9,
-	D3DSPR_SAMPLER = 10,
-	D3DSPR_CONST2 = 11,
-	D3DSPR_CONST3 = 12,
-	D3DSPR_CONST4 = 13,
-	D3DSPR_CONSTBOOL = 14,
-	D3DSPR_LOOP = 15,
-	D3DSPR_TEMPFLOAT16 = 16,
-	D3DSPR_MISCTYPE = 17,
-	D3DSPR_LABEL = 18,
-	D3DSPR_PREDICATE = 19,
-	D3DSPR_FORCE_DWORD = 0xffffffff
-} D3DSHADER_PARAM_REGISTER_TYPE;
-
-typedef enum _D3DSHADER_PARAM_SRCMOD_TYPE
-{
-	D3DSPSM_NONE = 0 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_NEG = 1 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_BIAS = 2 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_BIASNEG = 3 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_SIGN = 4 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_SIGNNEG = 5 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_COMP = 6 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_X2 = 7 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_X2NEG = 8 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_DZ = 9 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_DW = 10 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_ABS = 11 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_ABSNEG = 12 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_NOT = 13 << D3DSP_SRCMOD_SHIFT,
-	D3DSPSM_FORCE_DWORD = 0xffffffff
-} D3DSHADER_PARAM_SRCMOD_TYPE;
-
-typedef enum _D3DVS_ADDRESSMODE_TYPE
-{
-	D3DVS_ADDRMODE_ABSOLUTE = (0 << D3DVS_ADDRESSMODE_SHIFT),
-	D3DVS_ADDRMODE_RELATIVE = (1 << D3DVS_ADDRESSMODE_SHIFT),
-	D3DVS_ADDRMODE_FORCE_DWORD = 0xffffffff
-} D3DVS_ADDRESSMODE_TYPE;
-
-typedef enum _D3DVS_RASTOUT_OFFSETS
-{
-	D3DSRO_POSITION = 0,
-	D3DSRO_FOG = 1,
-	D3DSRO_POINT_SIZE = 2,
-	D3DSRO_FORCE_DWORD = 0xffffffff
-} D3DVS_RASTOUT_OFFSETS;
-
-typedef enum _D3DSTENCILOP {
-	D3DSTENCILOP_KEEP = 1,
-	D3DSTENCILOP_ZERO = 2,
-	D3DSTENCILOP_REPLACE = 3,
-	D3DSTENCILOP_INCRSAT = 4,
-	D3DSTENCILOP_DECRSAT = 5,
-	D3DSTENCILOP_INVERT = 6,
-	D3DSTENCILOP_INCR = 7,
-	D3DSTENCILOP_DECR = 8,
-	D3DSTENCILOP_FORCE_DWORD = 0x7fffffff
-} D3DSTENCILOP;
-
-typedef enum _D3DSTATEBLOCKTYPE {
-	D3DSBT_ALL = 1,
-	D3DSBT_PIXELSTATE = 2,
-	D3DSBT_VERTEXSTATE = 3,
-	D3DSBT_FORCE_DWORD = 0xffffffff
-} D3DSTATEBLOCKTYPE;
-
-typedef enum _D3DSWAPEFFECT {
-	D3DSWAPEFFECT_DISCARD = 1,
-	D3DSWAPEFFECT_FLIP = 2,
-	D3DSWAPEFFECT_COPY = 3,
-	D3DSWAPEFFECT_COPY_VSYNC = 4,
-	D3DSWAPEFFECT_FORCE_DWORD = 0xffffffff
-} D3DSWAPEFFECT;
-
-typedef enum _D3DTEXTUREADDRESS {
-	D3DTADDRESS_WRAP = 1,
-	D3DTADDRESS_MIRROR = 2,
-	D3DTADDRESS_CLAMP = 3,
-	D3DTADDRESS_BORDER = 4,
-	D3DTADDRESS_MIRRORONCE = 5,
-	D3DTADDRESS_FORCE_DWORD = 0xffffffff
-} D3DTEXTUREADDRESS;
-
-typedef enum _D3DTEXTUREFILTERTYPE {
-	D3DTEXF_NONE = 0,
-	D3DTEXF_POINT = 1,
-	D3DTEXF_LINEAR = 2,
-	D3DTEXF_ANISOTROPIC = 3,
-	D3DTEXF_PYRAMIDALQUAD = 6,
-	D3DTEXF_GAUSSIANQUAD = 7,
-	D3DTEXF_FORCE_DWORD = 0xffffffff
-} D3DTEXTUREFILTERTYPE;
-
-typedef enum _D3DTEXTURESTAGESTATETYPE {
-	D3DTSS_COLOROP = 1,
-	D3DTSS_COLORARG1 = 2,
-	D3DTSS_COLORARG2 = 3,
-	D3DTSS_ALPHAOP = 4,
-	D3DTSS_ALPHAARG1 = 5,
-	D3DTSS_ALPHAARG2 = 6,
-	D3DTSS_BUMPENVMAT00 = 7,
-	D3DTSS_BUMPENVMAT01 = 8,
-	D3DTSS_BUMPENVMAT10 = 9,
-	D3DTSS_BUMPENVMAT11 = 10,
-	D3DTSS_TEXCOORDINDEX = 11,
-	D3DTSS_BUMPENVLSCALE = 22,
-	D3DTSS_BUMPENVLOFFSET = 23,
-	D3DTSS_TEXTURETRANSFORMFLAGS = 24,
-	D3DTSS_ADDRESSW = 25,
-	D3DTSS_COLORARG0 = 26,
-	D3DTSS_ALPHAARG0 = 27,
-	D3DTSS_RESULTARG = 28,
-	D3DTSS_CONSTANT = 32,
-	D3DTSS_FORCE_DWORD = 0xffffffff
-} D3DTEXTURESTAGESTATETYPE;
-
-typedef enum _D3DTEXTUREOP {
-	D3DTOP_DISABLE = 1,
-	D3DTOP_SELECTARG1 = 2,
-	D3DTOP_SELECTARG2 = 3,
-	D3DTOP_MODULATE = 4,
-	D3DTOP_MODULATE2X = 5,
-	D3DTOP_MODULATE4X = 6,
-	D3DTOP_ADD = 7,
-	D3DTOP_ADDSIGNED = 8,
-	D3DTOP_ADDSIGNED2X = 9,
-	D3DTOP_SUBTRACT = 10,
-	D3DTOP_ADDSMOOTH = 11,
-	D3DTOP_BLENDDIFFUSEALPHA = 12,
-	D3DTOP_BLENDTEXTUREALPHA = 13,
-	D3DTOP_BLENDFACTORALPHA = 14,
-	D3DTOP_BLENDTEXTUREALPHAPM = 15,
-	D3DTOP_BLENDCURRENTALPHA = 16,
-	D3DTOP_PREMODULATE = 17,
-	D3DTOP_MODULATEALPHA_ADDCOLOR = 18,
-	D3DTOP_MODULATECOLOR_ADDALPHA = 19,
-	D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20,
-	D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21,
-	D3DTOP_BUMPENVMAP = 22,
-	D3DTOP_BUMPENVMAPLUMINANCE = 23,
-	D3DTOP_DOTPRODUCT3 = 24,
-	D3DTOP_MULTIPLYADD = 25,
-	D3DTOP_LERP = 26,
-	D3DTOP_FORCE_DWORD = 0xffffffff,
-} D3DTEXTUREOP;
-
-typedef enum _D3DTEXTURETRANSFORMFLAGS {
-	D3DTTFF_DISABLE = 0,
-	D3DTTFF_COUNT1 = 1,
-	D3DTTFF_COUNT2 = 2,
-	D3DTTFF_COUNT3 = 3,
-	D3DTTFF_COUNT4 = 4,
-	D3DTTFF_PROJECTED = 256,
-	D3DTTFF_FORCE_DWORD = 0xffffffff,
-} D3DTEXTURETRANSFORMFLAGS;
-
-typedef enum _D3DTRANSFORMSTATETYPE {
-	D3DTS_VIEW = 2,
-	D3DTS_PROJECTION = 3,
-	D3DTS_TEXTURE0 = 16,
-	D3DTS_TEXTURE1 = 17,
-	D3DTS_TEXTURE2 = 18,
-	D3DTS_TEXTURE3 = 19,
-	D3DTS_TEXTURE4 = 20,
-	D3DTS_TEXTURE5 = 21,
-	D3DTS_TEXTURE6 = 22,
-	D3DTS_TEXTURE7 = 23,
-	D3DTS_FORCE_DWORD = 0xffffffff
-} D3DTRANSFORMSTATETYPE;
-
-typedef enum _D3DVERTEXBLENDFLAGS
-{
-	D3DVBF_DISABLE = 0,
-	D3DVBF_1WEIGHTS = 1,
-	D3DVBF_2WEIGHTS = 2,
-	D3DVBF_3WEIGHTS = 3,
-	D3DVBF_TWEENING = 255,
-	D3DVBF_0WEIGHTS = 256,
-	D3DVBF_FORCE_DWORD = 0xffffffff
-} D3DVERTEXBLENDFLAGS;
-
-typedef enum _D3DZBUFFERTYPE {
-	D3DZB_FALSE = 0,
-	D3DZB_TRUE = 1,
-	D3DZB_USEW = 2,
-	D3DZB_FORCE_DWORD = 0xffffffff
-} D3DZBUFFERTYPE;
-
-typedef struct _D3DADAPTER_IDENTIFIER9 {
-	char Driver[MAX_DEVICE_IDENTIFIER_STRING];
-	char Description[MAX_DEVICE_IDENTIFIER_STRING];
-	char DeviceName[32];
-	LARGE_INTEGER DriverVersion; 
-    DWORD VendorId;
-    DWORD DeviceId;
-    DWORD SubSysId;
-    DWORD Revision;
-    GUID DeviceIdentifier;
-    DWORD WHQLLevel;
-} D3DADAPTER_IDENTIFIER9;
-
-typedef struct _D3DBOX {
-	UINT Left;
-	UINT Top;
-	UINT Right;
-	UINT Bottom;
-	UINT Front;
-	UINT Back;
-} D3DBOX;
-
-typedef struct _D3DCLIPSTATUS9 {
-	DWORD ClipUnion;
-	DWORD ClipIntersection;
-} D3DCLIPSTATUS9;
-
-typedef struct _D3DCOLORVALUE {
-	float r;
-	float g;
-	float b;
-	float a;
-} D3DCOLORVALUE;
-
-typedef struct _D3DRESOURCESTATS
-{
-	BOOL bThrashing;
-	DWORD ApproxBytesDownloaded;
-	DWORD NumEvicts;
-	DWORD NumVidCreates;
-	DWORD LastPri;
-	DWORD NumUsed;
-	DWORD NumUsedInVidMem;
-	DWORD WorkingSet;
-	DWORD WorkingSetBytes;
-	DWORD TotalManaged;
-	DWORD TotalBytes;
-} D3DRESOURCESTATS;
-
-typedef struct _D3DDEVICE_CREATION_PARAMETERS {
-	UINT AdapterOrdinal;
-	D3DDEVTYPE DeviceType;
-	HWND hFocusWindow;
-	DWORD BehaviorFlags;
-} D3DDEVICE_CREATION_PARAMETERS;
-
-typedef struct _D3DDEVINFO_RESOURCEMANAGER {
-	D3DRESOURCESTATS stats[D3DRTYPECOUNT];
-} D3DDEVINFO_RESOURCEMANAGER, *LPD3DDEVINFO_RESOURCEMANAGER;
-
-typedef struct _D3DDEVINFO_D3DVERTEXSTATS {
-	DWORD NumRenderedTriangles;
-	DWORD NumExtraClippingTriangles;
-} D3DDEVINFO_D3DVERTEXSTATS, *LPD3DDEVINFO_D3DVERTEXSTATS;
-
-typedef struct _D3DDEVINFO_VCACHE {
-	DWORD Pattern;
-	DWORD OptMethod;
-	DWORD CacheSize;
-	DWORD MagicNumber;
-} D3DDEVINFO_VCACHE, *LPD3DDEVINFO_VCACHE;
-
-typedef struct _D3DDISPLAYMODE {
-	UINT Width;
-	UINT Height;
-	UINT RefreshRate;
-	D3DFORMAT Format;
-} D3DDISPLAYMODE;
-
-typedef struct _D3DGAMMARAMP {
-	WORD red[256];
-	WORD green[256];
-	WORD blue[256];
-} D3DGAMMARAMP;
-
-typedef struct _D3DINDEXBUFFER_DESC {
-	D3DFORMAT Format;
-	D3DRESOURCETYPE Type;
-	DWORD Usage;
-	D3DPOOL Pool;
-	UINT Size;
-} D3DINDEXBUFFER_DESC;
-
-typedef struct _D3DVECTOR {
-	float x;
-	float y;
-	float z;
-} D3DVECTOR;
-
-typedef struct _D3DLIGHT9 {
-	D3DLIGHTTYPE Type;
-	D3DCOLORVALUE Diffuse;
-	D3DCOLORVALUE Specular;
-	D3DCOLORVALUE Ambient;
-	D3DVECTOR Position;
-	D3DVECTOR Direction;
-	float Range;
-	float Falloff;
-	float Attenuation0;
-	float Attenuation1;
-	float Attenuation2;
-	float Theta;
-	float Phi;
-} D3DLIGHT9;
-
-typedef struct _D3DLOCKED_BOX {
-	INT RowPitch;
-	INT SlicePitch;
-	void *pBits;
-} D3DLOCKED_BOX;
-
-typedef struct _D3DLOCKED_RECT {
-	INT Pitch;
-	void *pBits;
-} D3DLOCKED_RECT;
-
-typedef struct _D3DMATERIAL9 {
-	D3DCOLORVALUE Diffuse;
-	D3DCOLORVALUE Ambient;
-	D3DCOLORVALUE Specular;
-	D3DCOLORVALUE Emissive;
-	float Power;
-} D3DMATERIAL9;
-
-typedef struct _D3DMATRIX {
-	union {
-		struct {
-			float _11, _12, _13, _14;
-			float _21, _22, _23, _24;
-			float _31, _32, _33, _34;
-			float _41, _42, _43, _44;
-		};
-		float m[4][4];
-	};
-} D3DMATRIX;
-
-typedef struct _D3DPRESENT_PARAMETERS {
-	UINT BackBufferWidth;
-	UINT BackBufferHeight;
-	D3DFORMAT BackBufferFormat;
-	UINT BackBufferCount;
-	D3DMULTISAMPLE_TYPE MultiSampleType;
-	DWORD MultiSampleQuality;
-	D3DSWAPEFFECT SwapEffect;
-	HWND hDeviceWindow;
-	BOOL Windowed;
-	BOOL EnableAutoDepthStencil;
-	D3DFORMAT AutoDepthStencilFormat;
-	DWORD Flags;
-	UINT FullScreen_RefreshRateInHz;
-	UINT PresentationInterval;
-} D3DPRESENT_PARAMETERS;
-
-typedef struct _D3DRANGE
-{
-	UINT Offset;
-	UINT Size;
-} D3DRANGE;
-
-typedef struct _D3DRASTER_STATUS {
-	BOOL InVBlank;
-	UINT ScanLine;
-} D3DRASTER_STATUS;
-
-typedef struct _D3DRECT {
-	LONG x1;
-	LONG y1;
-	LONG x2;
-	LONG y2;
-} D3DRECT;
-
-typedef struct _D3DRECTPATCH_INFO {
-	UINT StartVertexOffsetWidth;
-	UINT StartVertexOffsetHeight;
-	UINT Width;
-	UINT Height;
-	UINT Stride;
-	D3DBASISTYPE Basis;
-	D3DORDERTYPE Order;
-} D3DRECTPATCH_INFO;
-
-typedef struct _D3DSURFACE_DESC {
-	D3DFORMAT Format;
-	D3DRESOURCETYPE Type;
-	DWORD Usage;
-	D3DPOOL Pool;
-	UINT Size;
-	D3DMULTISAMPLE_TYPE MultiSampleType;
-	UINT Width;
-	UINT Height;
-} D3DSURFACE_DESC;
-
-typedef struct _D3DTRIPATCH_INFO {
-	UINT StartVertexOffset;
-	UINT NumVertices;
-	D3DBASISTYPE Basis;
-	D3DORDERTYPE Order;
-} D3DTRIPATCH_INFO;
-
-typedef struct _D3DVERTEXBUFFER_DESC {
-	D3DFORMAT Format;
-	D3DRESOURCETYPE Type;
-	DWORD Usage;
-	D3DPOOL Pool;
-	UINT Size;
-	DWORD FVF;
-} D3DVERTEXBUFFER_DESC;
-
-typedef struct _D3DVERTEXELEMENT9 {
-	WORD Stream;
-	WORD Offset;
-	BYTE Type;
-	BYTE Method;
-	BYTE Usage;
-	BYTE UsageIndex;
-} D3DVERTEXELEMENT9, *LPD3DVERTEXELEMENT9;
-
-typedef struct _D3DVIEWPORT9 {
-	DWORD X;
-	DWORD Y;
-	DWORD Width;
-	DWORD Height;
-	float MinZ;
-	float MaxZ;
-} D3DVIEWPORT9;
-
-typedef struct _D3DVOLUME_DESC {
-	D3DFORMAT Format;
-	D3DRESOURCETYPE Type;
-	DWORD Usage;
-	D3DPOOL Pool;
-	UINT Width;
-	UINT Height;
-	UINT Depth;
-} D3DVOLUME_DESC;
-
-#include <poppack.h>
-
-#endif
-#endif
--- a/include/ddeml.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/ddeml.h	Mon Dec 14 11:52:08 2009 -0500
@@ -259,8 +259,8 @@
 HCONV WINAPI DdeConnect(DWORD,HSZ,HSZ,PCONVCONTEXT);
 HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,PCONVCONTEXT);
 HDDEDATA WINAPI DdeCreateDataHandle(DWORD,PBYTE,DWORD,DWORD,HSZ,UINT,UINT);
-HSZ WINAPI DdeCreateStringHandleA(DWORD,LPSTR,int);
-HSZ WINAPI DdeCreateStringHandleW(DWORD,LPWSTR,int);
+HSZ WINAPI DdeCreateStringHandleA(DWORD,LPCSTR,int);
+HSZ WINAPI DdeCreateStringHandleW(DWORD,LPCWSTR,int);
 BOOL WINAPI DdeDisconnect(HCONV);
 BOOL WINAPI DdeDisconnectList(HCONVLIST);
 BOOL WINAPI DdeEnableCallback(DWORD,HCONV,UINT);
--- a/include/ddk/batclass.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/ddk/batclass.h	Mon Dec 14 11:52:08 2009 -0500
@@ -187,41 +187,41 @@
 
 typedef NTSTATUS DDKAPI
 (*BCLASS_DISABLE_STATUS_NOTIFY)(
-  IN PVOID  Context);
+  /*IN*/ PVOID  Context);
 
 typedef NTSTATUS DDKAPI
 (*BCLASS_QUERY_INFORMATION)(
-  IN PVOID  Context,
-  IN ULONG  BatteryTag,
-  IN BATTERY_QUERY_INFORMATION_LEVEL  Level,
-  IN LONG  AtRate  OPTIONAL,
-  OUT PVOID  Buffer,
-  IN ULONG  BufferLength,
-  OUT PULONG  ReturnedLength);
+  /*IN*/ PVOID  Context,
+  /*IN*/ ULONG  BatteryTag,
+  /*IN*/ BATTERY_QUERY_INFORMATION_LEVEL  Level,
+  /*IN*/ LONG  AtRate  /*OPTIONAL*/,
+  /*OUT*/ PVOID  Buffer,
+  /*IN*/ ULONG  BufferLength,
+  /*OUT*/ PULONG  ReturnedLength);
 
 typedef NTSTATUS DDKAPI
 (*BCLASS_QUERY_STATUS)(
-  IN PVOID  Context,
-  IN ULONG  BatteryTag,
-  OUT PBATTERY_STATUS  BatteryStatus);
+  /*IN*/ PVOID  Context,
+  /*IN*/ ULONG  BatteryTag,
+  /*OUT*/ PBATTERY_STATUS  BatteryStatus);
 
 typedef NTSTATUS DDKAPI
 (*BCLASS_QUERY_TAG)(
-  IN PVOID  Context,
-  OUT PULONG  BatteryTag);
+  /*IN*/ PVOID  Context,
+  /*OUT*/ PULONG  BatteryTag);
 
 typedef NTSTATUS DDKAPI
 (*BCLASS_SET_INFORMATION)(
-  IN PVOID  Context,
-  IN ULONG  BatteryTag,
-  IN BATTERY_SET_INFORMATION_LEVEL  Level,
-  IN PVOID  Buffer  OPTIONAL);
+  /*IN*/ PVOID  Context,
+  /*IN*/ ULONG  BatteryTag,
+  /*IN*/ BATTERY_SET_INFORMATION_LEVEL  Level,
+  /*IN*/ PVOID  Buffer  /*OPTIONAL*/);
 
 typedef NTSTATUS DDKAPI
 (*BCLASS_SET_STATUS_NOTIFY)(
-  IN PVOID  Context,
-  IN ULONG  BatteryTag,
-  IN PBATTERY_NOTIFY  BatteryNotify);
+  /*IN*/ PVOID  Context,
+  /*IN*/ ULONG  BatteryTag,
+  /*IN*/ PBATTERY_NOTIFY  BatteryNotify);
 
 
 typedef struct _BATTERY_MINIPORT_INFO {
@@ -247,49 +247,49 @@
 NTSTATUS
 DDKAPI
 BatteryClassInitializeDevice(
-  IN PBATTERY_MINIPORT_INFO  MiniportInfo,
-  IN PVOID  *ClassData);
+  /*IN*/ PBATTERY_MINIPORT_INFO  MiniportInfo,
+  /*IN*/ PVOID  *ClassData);
 
 BCLASSAPI
 NTSTATUS
 DDKAPI
 BatteryClassIoctl(
-  IN PVOID  ClassData,
-  IN PIRP  Irp);
+  /*IN*/ PVOID  ClassData,
+  /*IN*/ PIRP  Irp);
 
 BCLASSAPI
 NTSTATUS
 DDKAPI
 BatteryClassQueryWmiDataBlock(
-  IN PVOID  ClassData,
-  IN PDEVICE_OBJECT  DeviceObject,
-  IN PIRP  Irp,
-  IN ULONG  GuidIndex,
-  IN OUT PULONG  InstanceLengthArray,
-  IN ULONG  OutBufferSize,
-  OUT PUCHAR  Buffer);
+  /*IN*/ PVOID  ClassData,
+  /*IN*/ PDEVICE_OBJECT  DeviceObject,
+  /*IN*/ PIRP  Irp,
+  /*IN*/ ULONG  GuidIndex,
+  /*IN OUT*/ PULONG  InstanceLengthArray,
+  /*IN*/ ULONG  OutBufferSize,
+  /*OUT*/ PUCHAR  Buffer);
 
 BCLASSAPI
 NTSTATUS
 DDKAPI
 BatteryClassStatusNotify(
-  IN PVOID  ClassData);
+  /*IN*/ PVOID  ClassData);
 
 BCLASSAPI
 NTSTATUS
 DDKAPI
 BatteryClassSystemControl(
-  IN  PVOID  ClassData,
-  IN  PWMILIB_CONTEXT  WmiLibContext,
-  IN  PDEVICE_OBJECT  DeviceObject,
-  IN  PIRP  Irp,
-  OUT PSYSCTL_IRP_DISPOSITION  Disposition);
+  /*IN*/ PVOID  ClassData,
+  /*IN*/ PWMILIB_CONTEXT  WmiLibContext,
+  /*IN*/ PDEVICE_OBJECT  DeviceObject,
+  /*IN*/ PIRP  Irp,
+  /*OUT*/ PSYSCTL_IRP_DISPOSITION  Disposition);
 
 BCLASSAPI
 NTSTATUS
 DDKAPI
 BatteryClassUnload(
-  IN PVOID  ClassData);
+  /*IN*/ PVOID  ClassData);
 
 #ifdef __cplusplus
 }
--- a/include/ddk/cfgmgr32.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/ddk/cfgmgr32.h	Mon Dec 14 11:52:08 2009 -0500
@@ -571,20 +571,20 @@
 CONFIGRET
 WINAPI
 CM_Add_Empty_Log_Conf(
-  OUT PLOG_CONF  plcLogConf,
-  IN DEVINST  dnDevInst,
-  IN PRIORITY  Priority,
-  IN ULONG  ulFlags);
+  /*OUT*/ PLOG_CONF  plcLogConf,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ PRIORITY  Priority,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Add_Empty_Log_Conf_Ex(
-  OUT PLOG_CONF  plcLogConf,
-  IN DEVINST  dnDevInst,
-  IN PRIORITY  Priority,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PLOG_CONF  plcLogConf,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ PRIORITY  Priority,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 /* CM_Add_ID.ulFlags constants */
 #define CM_ADD_ID_HARDWARE              	0x00000000
@@ -595,37 +595,37 @@
 CONFIGRET
 WINAPI
 CM_Add_IDA(
-  IN DEVINST  dnDevInst,
-  IN PSTR  pszID,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ PSTR  pszID,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Add_ID_ExA(
-  IN DEVINST  dnDevInst,
-  IN PSTR  pszID,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ PSTR  pszID,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Add_ID_ExW(
-  IN DEVINST  dnDevInst,
-  IN PWSTR  pszID,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ PWSTR  pszID,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Add_IDW(
-  IN DEVINST  dnDevInst,
-  IN PWSTR  pszID,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ PWSTR  pszID,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 #ifdef UNICODE
 #define CM_Add_ID CM_Add_IDW
@@ -641,38 +641,38 @@
 CONFIGRET
 WINAPI
 CM_Add_Res_Des(
-  OUT PRES_DES  prdResDes,
-  IN LOG_CONF  lcLogConf,
-  IN RESOURCEID  ResourceID,
-  IN PCVOID  ResourceData,
-  IN ULONG  ResourceLen,
-  IN ULONG  ulFlags);
+  /*OUT*/ PRES_DES  prdResDes,
+  /*IN*/ LOG_CONF  lcLogConf,
+  /*IN*/ RESOURCEID  ResourceID,
+  /*IN*/ PCVOID  ResourceData,
+  /*IN*/ ULONG  ResourceLen,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Add_Res_Des_Ex(
-  OUT PRES_DES  prdResDes,
-  IN LOG_CONF  lcLogConf,
-  IN RESOURCEID  ResourceID,
-  IN PCVOID  ResourceData,
-  IN ULONG  ResourceLen,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PRES_DES  prdResDes,
+  /*IN*/ LOG_CONF  lcLogConf,
+  /*IN*/ RESOURCEID  ResourceID,
+  /*IN*/ PCVOID  ResourceData,
+  /*IN*/ ULONG  ResourceLen,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Connect_MachineA(
-  IN PCSTR  UNCServerName,
-  OUT PHMACHINE  phMachine);
+  /*IN*/ PCSTR  UNCServerName,
+  /*OUT*/ PHMACHINE  phMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Connect_MachineW(
-  IN PCWSTR  UNCServerName,
-  OUT PHMACHINE  phMachine);
+  /*IN*/ PCWSTR  UNCServerName,
+  /*OUT*/ PHMACHINE  phMachine);
 
 #ifdef UNICODE
 #define CM_Connect_Machine CM_Connect_MachineW
@@ -697,7 +697,7 @@
 CONFIGRET
 WINAPI
 CM_Disconnect_Machine(
-  IN HMACHINE  hMachine); 
+  /*IN*/ HMACHINE  hMachine); 
 
 /* FIXME: Obsolete CM_Enable_DevNode */
 /* FIXME: Obsolete CM_Enable_DevNodeEx */
@@ -706,56 +706,56 @@
 CONFIGRET
 WINAPI
 CM_Enumerate_Classes(
-  IN ULONG  ulClassIndex,
-  OUT LPGUID  ClassGuid,
-  IN ULONG  ulFlags);
+  /*IN*/ ULONG  ulClassIndex,
+  /*OUT*/ LPGUID  ClassGuid,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Enumerate_Classes_Ex(
-  IN ULONG  ulClassIndex,
-  OUT LPGUID  ClassGuid,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ ULONG  ulClassIndex,
+  /*OUT*/ LPGUID  ClassGuid,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Enumerate_EnumeratorsA(
-  IN ULONG  ulEnumIndex,
-  OUT PCHAR  Buffer,
-  IN OUT PULONG  pulLength,
-  IN ULONG  ulFlags);
+  /*IN*/ ULONG  ulEnumIndex,
+  /*OUT*/ PCHAR  Buffer,
+  /*IN OUT*/ PULONG  pulLength,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Enumerate_Enumerators_ExA(
-  IN ULONG  ulEnumIndex,
-  OUT PCHAR  Buffer,
-  IN OUT PULONG  pulLength,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ ULONG  ulEnumIndex,
+  /*OUT*/ PCHAR  Buffer,
+  /*IN OUT*/ PULONG  pulLength,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Enumerate_Enumerators_ExW(
-  IN ULONG  ulEnumIndex,
-  OUT PWCHAR  Buffer,
-  IN OUT PULONG  pulLength,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ ULONG  ulEnumIndex,
+  /*OUT*/ PWCHAR  Buffer,
+  /*IN OUT*/ PULONG  pulLength,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Enumerate_EnumeratorsW(
-  IN ULONG  ulEnumIndex,
-  OUT PWCHAR  Buffer,
-  IN OUT PULONG  pulLength,
-  IN ULONG  ulFlags);
+  /*IN*/ ULONG  ulEnumIndex,
+  /*OUT*/ PWCHAR  Buffer,
+  /*IN OUT*/ PULONG  pulLength,
+  /*IN*/ ULONG  ulFlags);
 
 #ifdef UNICODE
 #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsW
@@ -772,22 +772,22 @@
 CONFIGRET
 WINAPI
 CM_Free_Log_Conf(
-  IN LOG_CONF  lcLogConfToBeFreed,
-  IN ULONG  ulFlags);
+  /*IN*/ LOG_CONF  lcLogConfToBeFreed,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Free_Log_Conf_Ex(
-  IN LOG_CONF  lcLogConfToBeFreed,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ LOG_CONF  lcLogConfToBeFreed,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Free_Log_Conf_Handle(
-  IN LOG_CONF  lcLogConf);
+  /*IN*/ LOG_CONF  lcLogConf);
 
 /* FIXME: Obsolete CM_Free_Range_List */
 
@@ -795,47 +795,47 @@
 CONFIGRET
 WINAPI
 CM_Free_Res_Des(
-  OUT PRES_DES  prdResDes,
-  IN RES_DES  rdResDes,
-  IN ULONG  ulFlags);
+  /*OUT*/ PRES_DES  prdResDes,
+  /*IN*/ RES_DES  rdResDes,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Free_Res_Des_Ex(
-  OUT PRES_DES  prdResDes,
-  IN RES_DES  rdResDes,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PRES_DES  prdResDes,
+  /*IN*/ RES_DES  rdResDes,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Free_Res_Des_Handle(
-  IN RES_DES  rdResDes);
+  /*IN*/ RES_DES  rdResDes);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Free_Resource_Conflict_Handle(
-  IN CONFLICT_LIST  clConflictList);
+  /*IN*/ CONFLICT_LIST  clConflictList);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Child(
-  OUT PDEVINST  pdnDevInst,
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags);
+  /*OUT*/ PDEVINST  pdnDevInst,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Child_Ex(
-  OUT PDEVINST  pdnDevInst,
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PDEVINST  pdnDevInst,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 /* FIXME: Obsolete CM_Get_Class_Name */
 /* FIXME: Obsolete CM_Get_Class_Name_Ex */
@@ -847,56 +847,56 @@
 CONFIGRET
 WINAPI
 CM_Get_Depth(
-  OUT PULONG  pulDepth,
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags);
+  /*OUT*/ PULONG  pulDepth,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Depth_Ex(
-  OUT PULONG  pulDepth,
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PULONG  pulDepth,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Device_IDA(
-  IN DEVINST  dnDevInst,
-  OUT PCHAR  Buffer,
-  IN ULONG  BufferLen,
-  IN ULONG  ulFlags);
+  /*IN*/ DEVINST  dnDevInst,
+  /*OUT*/ PCHAR  Buffer,
+  /*IN*/ ULONG  BufferLen,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Device_ID_ExA(
-  IN DEVINST  dnDevInst,
-  OUT PCHAR  Buffer,
-  IN ULONG  BufferLen,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ DEVINST  dnDevInst,
+  /*OUT*/ PCHAR  Buffer,
+  /*IN*/ ULONG  BufferLen,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Device_ID_ExW(
-  IN DEVINST  dnDevInst,
-  OUT PWCHAR  Buffer,
-  IN ULONG  BufferLen,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ DEVINST  dnDevInst,
+  /*OUT*/ PWCHAR  Buffer,
+  /*IN*/ ULONG  BufferLen,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Device_IDW(
-  IN DEVINST  dnDevInst,
-  OUT PWCHAR  Buffer,
-  IN ULONG  BufferLen,
-  IN ULONG  ulFlags);
+  /*IN*/ DEVINST  dnDevInst,
+  /*OUT*/ PWCHAR  Buffer,
+  /*IN*/ ULONG  BufferLen,
+  /*IN*/ ULONG  ulFlags);
 
 #ifdef UNICODE
 #define CM_Get_Device_ID CM_Get_Device_IDW
@@ -910,39 +910,39 @@
 CONFIGRET
 WINAPI
 CM_Get_Device_ID_ListA(
-  IN PCSTR  pszFilter,  OPTIONAL
-  OUT PCHAR  Buffer,
-  IN ULONG  BufferLen,
-  IN ULONG  ulFlags);
+  /*IN*/ PCSTR  pszFilter, /*OPTIONAL*/
+  /*OUT*/ PCHAR  Buffer,
+  /*IN*/ ULONG  BufferLen,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Device_ID_List_ExA(
-  IN PCSTR  pszFilter,  OPTIONAL
-  OUT PCHAR  Buffer,
-  IN ULONG  BufferLen,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ PCSTR  pszFilter, /*OPTIONAL*/
+  /*OUT*/ PCHAR  Buffer,
+  /*IN*/ ULONG  BufferLen,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Device_ID_List_ExW(
-  IN PCWSTR  pszFilter,  OPTIONAL
-  OUT PWCHAR  Buffer,
-  IN ULONG  BufferLen,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ PCWSTR  pszFilter, /*OPTIONAL*/
+  /*OUT*/ PWCHAR  Buffer,
+  /*IN*/ ULONG  BufferLen,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Device_ID_ListW(
-  IN PCWSTR  pszFilter,  OPTIONAL
-  OUT PWCHAR  Buffer,
-  IN ULONG  BufferLen,
-  IN ULONG  ulFlags);
+  /*IN*/ PCWSTR  pszFilter, /*OPTIONAL*/
+  /*OUT*/ PWCHAR  Buffer,
+  /*IN*/ ULONG  BufferLen,
+  /*IN*/ ULONG  ulFlags);
 
 #ifdef UNICODE
 #define CM_Get_Device_ID_List CM_Get_Device_ID_ListW
@@ -956,35 +956,35 @@
 CONFIGRET
 WINAPI
 CM_Get_Device_ID_List_SizeA(
-  OUT PULONG  pulLen,
-  IN PCSTR  pszFilter,  OPTIONAL
-  IN ULONG  ulFlags);
+  /*OUT*/ PULONG  pulLen,
+  /*IN*/ PCSTR  pszFilter, /*OPTIONAL*/
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Device_ID_List_Size_ExA(
-  OUT PULONG  pulLen,
-  IN PCSTR  pszFilter,  OPTIONAL
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PULONG  pulLen,
+  /*IN*/ PCSTR  pszFilter, /*OPTIONAL*/
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Device_ID_List_Size_ExW(
-  OUT PULONG  pulLen,
-  IN PCWSTR  pszFilter,  OPTIONAL
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PULONG  pulLen,
+  /*IN*/ PCWSTR  pszFilter, /*OPTIONAL*/
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Device_ID_List_SizeW(
-  OUT PULONG  pulLen,
-  IN PCWSTR  pszFilter,  OPTIONAL
-  IN ULONG  ulFlags);
+  /*OUT*/ PULONG  pulLen,
+  /*IN*/ PCWSTR  pszFilter, /*OPTIONAL*/
+  /*IN*/ ULONG  ulFlags);
 
 #ifdef UNICODE
 #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeW
@@ -998,18 +998,18 @@
 CONFIGRET
 WINAPI
 CM_Get_Device_ID_Size(
-  OUT PULONG  pulLen,
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags);
+  /*OUT*/ PULONG  pulLen,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Device_ID_Size_Ex(
-  OUT PULONG  pulLen,
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PULONG  pulLen,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 /* FIXME: Obsolete CM_Get_Device_Interface_Alias */
 /* FIXME: Obsolete CM_Get_Device_Interface_Alias_Ex */
@@ -1025,20 +1025,20 @@
 CONFIGRET
 WINAPI
 CM_Get_DevNode_Status(
-  OUT PULONG  pulStatus,
-  OUT PULONG  pulProblemNumber,
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags);
+  /*OUT*/ PULONG  pulStatus,
+  /*OUT*/ PULONG  pulProblemNumber,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_DevNode_Status_Ex(
-  OUT PULONG  pulStatus,
-  OUT PULONG  pulProblemNumber,
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PULONG  pulStatus,
+  /*OUT*/ PULONG  pulProblemNumber,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 #define CM_Get_DevInst_Status CM_Get_DevNode_Status
 #define CM_Get_DevInst_Status_Ex CM_Get_DevNode_Status_Ex
@@ -1057,18 +1057,18 @@
 CONFIGRET
 WINAPI
 CM_Get_First_Log_Conf(
-  OUT PLOG_CONF  plcLogConf,  OPTIONAL
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags);
+  /*OUT*/ PLOG_CONF  plcLogConf, /*OPTIONAL*/
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_First_Log_Conf_Ex(
-  OUT PLOG_CONF  plcLogConf,  OPTIONAL
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PLOG_CONF  plcLogConf, /*OPTIONAL*/
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 /* FIXME: Obsolete CM_Get_Global_State */
 /* FIXME: Obsolete CM_Get_Global_State_Ex */
@@ -1081,132 +1081,132 @@
 CONFIGRET
 WINAPI
 CM_Get_Log_Conf_Priority(
-  IN LOG_CONF  lcLogConf,
-  OUT PPRIORITY  pPriority,
-  IN ULONG  ulFlags);
+  /*IN*/ LOG_CONF  lcLogConf,
+  /*OUT*/ PPRIORITY  pPriority,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Log_Conf_Priority_Ex(
-  IN LOG_CONF  lcLogConf,
-  OUT PPRIORITY  pPriority,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ LOG_CONF  lcLogConf,
+  /*OUT*/ PPRIORITY  pPriority,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Next_Log_Conf(
-  OUT PLOG_CONF  plcLogConf,  OPTIONAL
-  IN LOG_CONF  lcLogConf,
-  IN ULONG  ulFlags);
+  /*OUT*/ PLOG_CONF  plcLogConf, /*OPTIONAL*/
+  /*IN*/ LOG_CONF  lcLogConf,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Next_Log_Conf_Ex(
-  OUT PLOG_CONF  plcLogConf,  OPTIONAL
-  IN LOG_CONF  lcLogConf,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PLOG_CONF  plcLogConf, /*OPTIONAL*/
+  /*IN*/ LOG_CONF  lcLogConf,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Next_Res_Des(
-  OUT PRES_DES  prdResDes,
-  IN RES_DES  rdResDes,
-  IN RESOURCEID  ForResource,
-  OUT PRESOURCEID  pResourceID,
-  IN ULONG  ulFlags);
+  /*OUT*/ PRES_DES  prdResDes,
+  /*IN*/ RES_DES  rdResDes,
+  /*IN*/ RESOURCEID  ForResource,
+  /*OUT*/ PRESOURCEID  pResourceID,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Next_Res_Des_Ex(
-  OUT PRES_DES  prdResDes,
-  IN RES_DES  rdResDes,
-  IN RESOURCEID  ForResource,
-  OUT PRESOURCEID  pResourceID,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PRES_DES  prdResDes,
+  /*IN*/ RES_DES  rdResDes,
+  /*IN*/ RESOURCEID  ForResource,
+  /*OUT*/ PRESOURCEID  pResourceID,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Parent(
-  OUT PDEVINST  pdnDevInst,
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags);
+  /*OUT*/ PDEVINST  pdnDevInst,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Parent_Ex(
-  OUT PDEVINST  pdnDevInst,
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PDEVINST  pdnDevInst,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Res_Des_Data(
-  IN RES_DES  rdResDes,
-  OUT PVOID  Buffer,
-  IN ULONG  BufferLen,
-  IN ULONG  ulFlags);
+  /*IN*/ RES_DES  rdResDes,
+  /*OUT*/ PVOID  Buffer,
+  /*IN*/ ULONG  BufferLen,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Res_Des_Data_Ex(
-  IN RES_DES  rdResDes,
-  OUT PVOID  Buffer,
-  IN ULONG  BufferLen,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ RES_DES  rdResDes,
+  /*OUT*/ PVOID  Buffer,
+  /*IN*/ ULONG  BufferLen,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Res_Des_Data_Size(
-  OUT PULONG  pulSize,
-  IN RES_DES  rdResDes,
-  IN ULONG  ulFlags);
+  /*OUT*/ PULONG  pulSize,
+  /*IN*/ RES_DES  rdResDes,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Res_Des_Data_Size_Ex(
-  OUT PULONG  pulSize,
-  IN RES_DES  rdResDes,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PULONG  pulSize,
+  /*IN*/ RES_DES  rdResDes,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Resource_Conflict_Count(
-  IN CONFLICT_LIST  clConflictList,
-  OUT PULONG  pulCount);
+  /*IN*/ CONFLICT_LIST  clConflictList,
+  /*OUT*/ PULONG  pulCount);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Resource_Conflict_DetailsA(
-  IN CONFLICT_LIST  clConflictList,
-  IN ULONG  ulIndex,
-  IN OUT PCONFLICT_DETAILS_A  pConflictDetails);
+  /*IN*/ CONFLICT_LIST  clConflictList,
+  /*IN*/ ULONG  ulIndex,
+  /*IN OUT*/ PCONFLICT_DETAILS_A  pConflictDetails);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Resource_Conflict_DetailsW(
-  IN CONFLICT_LIST  clConflictList,
-  IN ULONG  ulIndex,
-  IN OUT PCONFLICT_DETAILS_W  pConflictDetails);
+  /*IN*/ CONFLICT_LIST  clConflictList,
+  /*IN*/ ULONG  ulIndex,
+  /*IN OUT*/ PCONFLICT_DETAILS_W  pConflictDetails);
 
 #ifdef UNICODE
 #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsW
@@ -1218,18 +1218,18 @@
 CONFIGRET
 WINAPI
 CM_Get_Sibling(
-  OUT PDEVINST  pdnDevInst,
-  IN DEVINST  DevInst,
-  IN ULONG  ulFlags);
+  /*OUT*/ PDEVINST  pdnDevInst,
+  /*IN*/ DEVINST  DevInst,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Get_Sibling_Ex(
-  OUT PDEVINST  pdnDevInst,
-  IN DEVINST  DevInst,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PDEVINST  pdnDevInst,
+  /*IN*/ DEVINST  DevInst,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 WORD
@@ -1241,7 +1241,7 @@
 WORD
 WINAPI
 CM_Get_Version_Ex(
-  IN HMACHINE  hMachine);
+  /*IN*/ HMACHINE  hMachine);
 
 /* FIXME: Obsolete CM_Intersect_Range_List */
 /* FIXME: Obsolete CM_Invert_Range_List */
@@ -1265,35 +1265,35 @@
 CONFIGRET
 WINAPI
 CM_Locate_DevNodeA(
-  OUT PDEVINST  pdnDevInst,
-  IN DEVINSTID_A  pDeviceID,  OPTIONAL
-  IN ULONG  ulFlags);
+  /*OUT*/ PDEVINST  pdnDevInst,
+  /*IN*/ DEVINSTID_A  pDeviceID, /*OPTIONAL*/
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Locate_DevNode_ExA(
-  OUT PDEVINST  pdnDevInst,
-  IN DEVINSTID_A  pDeviceID,  OPTIONAL
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PDEVINST  pdnDevInst,
+  /*IN*/ DEVINSTID_A  pDeviceID, /*OPTIONAL*/
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Locate_DevNode_ExW(
-  OUT PDEVINST  pdnDevInst,
-  IN DEVINSTID_W  pDeviceID,  OPTIONAL
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PDEVINST  pdnDevInst,
+  /*IN*/ DEVINSTID_W  pDeviceID, /*OPTIONAL*/
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Locate_DevNodeW(
-  OUT PDEVINST  pdnDevInst,
-  IN DEVINSTID_W  pDeviceID,  OPTIONAL
-  IN ULONG  ulFlags);
+  /*OUT*/ PDEVINST  pdnDevInst,
+  /*IN*/ DEVINSTID_W  pDeviceID, /*OPTIONAL*/
+  /*IN*/ ULONG  ulFlags);
 
 #define CM_Locate_DevInstA CM_Locate_DevNodeA
 #define CM_Locate_DevInstW CM_Locate_DevNodeW
@@ -1318,24 +1318,24 @@
 CONFIGRET
 WINAPI
 CM_Modify_Res_Des(
-  OUT PRES_DES  prdResDes,
-  IN RES_DES  rdResDes,
-  IN RESOURCEID  ResourceID,
-  IN PCVOID  ResourceData,
-  IN ULONG  ResourceLen,
-  IN ULONG  ulFlags);
+  /*OUT*/ PRES_DES  prdResDes,
+  /*IN*/ RES_DES  rdResDes,
+  /*IN*/ RESOURCEID  ResourceID,
+  /*IN*/ PCVOID  ResourceData,
+  /*IN*/ ULONG  ResourceLen,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Modify_Res_Des_Ex(
-  OUT PRES_DES  prdResDes,
-  IN RES_DES  rdResDes,
-  IN RESOURCEID  ResourceID,
-  IN PCVOID  ResourceData,
-  IN ULONG  ResourceLen,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PRES_DES  prdResDes,
+  /*IN*/ RES_DES  rdResDes,
+  /*IN*/ RESOURCEID  ResourceID,
+  /*IN*/ PCVOID  ResourceData,
+  /*IN*/ ULONG  ResourceLen,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 /* FIXME: Obsolete CM_Move_DevNode */
 /* FIXME: Obsolete CM_Move_DevNode_Ex */
@@ -1355,43 +1355,43 @@
 CONFIGRET
 WINAPI
 CM_Query_And_Remove_SubTreeA(
-  IN  DEVINST dnAncestor,
-  OUT PPNP_VETO_TYPE pVetoType,
-  OUT LPSTR pszVetoName,
-  IN  ULONG ulNameLength,
-  IN  ULONG ulFlags);
+  /*IN*/ DEVINST dnAncestor,
+  /*OUT*/ PPNP_VETO_TYPE pVetoType,
+  /*OUT*/ LPSTR pszVetoName,
+  /*IN*/ ULONG ulNameLength,
+  /*IN*/ ULONG ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Query_And_Remove_SubTreeW(
-  IN  DEVINST dnAncestor,
-  OUT PPNP_VETO_TYPE pVetoType,
-  OUT LPWSTR pszVetoName,
-  IN  ULONG ulNameLength,
-  IN  ULONG ulFlags);
+  /*IN*/ DEVINST dnAncestor,
+  /*OUT*/ PPNP_VETO_TYPE pVetoType,
+  /*OUT*/ LPWSTR pszVetoName,
+  /*IN*/ ULONG ulNameLength,
+  /*IN*/ ULONG ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Query_And_Remove_SubTree_ExA(
-  IN  DEVINST dnAncestor,
-  OUT PPNP_VETO_TYPE pVetoType,
-  OUT LPSTR pszVetoName,
-  IN  ULONG ulNameLength,
-  IN  ULONG ulFlags,
-  IN  HMACHINE hMachine);
+  /*IN*/ DEVINST dnAncestor,
+  /*OUT*/ PPNP_VETO_TYPE pVetoType,
+  /*OUT*/ LPSTR pszVetoName,
+  /*IN*/ ULONG ulNameLength,
+  /*IN*/ ULONG ulFlags,
+  /*IN*/ HMACHINE hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Query_And_Remove_SubTree_ExW(
-  IN  DEVINST dnAncestor,
-  OUT PPNP_VETO_TYPE pVetoType,
-  OUT LPWSTR pszVetoName,
-  IN  ULONG ulNameLength,
-  IN  ULONG ulFlags,
-  IN  HMACHINE hMachine);
+  /*IN*/ DEVINST dnAncestor,
+  /*OUT*/ PPNP_VETO_TYPE pVetoType,
+  /*OUT*/ LPWSTR pszVetoName,
+  /*IN*/ ULONG ulNameLength,
+  /*IN*/ ULONG ulFlags,
+  /*IN*/ HMACHINE hMachine);
 
 /* FIXME: Obsolete CM_Query_Arbitrator_Free_Data */
 /* FIXME: Obsolete CM_Query_Arbitrator_Free_Data_Ex */
@@ -1405,13 +1405,13 @@
 CONFIGRET
 WINAPI
 CM_Query_Resource_Conflict_List(
-  OUT PCONFLICT_LIST  pclConflictList,
-  IN DEVINST  dnDevInst,
-  IN RESOURCEID  ResourceID,
-  IN PCVOID  ResourceData,
-  IN ULONG  ResourceLen,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*OUT*/ PCONFLICT_LIST  pclConflictList,
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ RESOURCEID  ResourceID,
+  /*IN*/ PCVOID  ResourceData,
+  /*IN*/ ULONG  ResourceLen,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 /* CM_Reenumerate_DevNode.ulFlags constants */
 #define CM_REENUMERATE_NORMAL             0x00000000
@@ -1424,16 +1424,16 @@
 CONFIGRET
 WINAPI
 CM_Reenumerate_DevNode(
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags);
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Reenumerate_DevNode_Ex(
-  IN DEVINST  dnDevInst,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ DEVINST  dnDevInst,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 #define CM_Reenumerate_DevInst CM_Reenumerate_DevNode
 #define CM_Reenumerate_DevInst_Ex CM_Reenumerate_DevNode_Ex
@@ -1449,43 +1449,43 @@
 CONFIGRET
 WINAPI
 CM_Request_Device_EjectA(
-  IN DEVINST  dnDevInst,
-  OUT PPNP_VETO_TYPE  pVetoType,
-  OUT LPSTR  pszVetoName,
-  IN ULONG  ulNameLength,
-  IN ULONG  ulFlags);
+  /*IN*/ DEVINST  dnDevInst,
+  /*OUT*/ PPNP_VETO_TYPE  pVetoType,
+  /*OUT*/ LPSTR  pszVetoName,
+  /*IN*/ ULONG  ulNameLength,
+  /*IN*/ ULONG  ulFlags);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Request_Device_Eject_ExW(
-  IN DEVINST  dnDevInst,
-  OUT PPNP_VETO_TYPE  pVetoType,
-  OUT LPWSTR  pszVetoName,
-  IN ULONG  ulNameLength,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ DEVINST  dnDevInst,
+  /*OUT*/ PPNP_VETO_TYPE  pVetoType,
+  /*OUT*/ LPWSTR  pszVetoName,
+  /*IN*/ ULONG  ulNameLength,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Request_Device_Eject_ExA(
-  IN DEVINST  dnDevInst,
-  OUT PPNP_VETO_TYPE  pVetoType,
-  OUT LPSTR  pszVetoName,
-  IN ULONG  ulNameLength,
-  IN ULONG  ulFlags,
-  IN HMACHINE  hMachine);
+  /*IN*/ DEVINST  dnDevInst,
+  /*OUT*/ PPNP_VETO_TYPE  pVetoType,
+  /*OUT*/ LPSTR  pszVetoName,
+  /*IN*/ ULONG  ulNameLength,
+  /*IN*/ ULONG  ulFlags,
+  /*IN*/ HMACHINE  hMachine);
 
 CMAPI
 CONFIGRET
 WINAPI
 CM_Request_Device_EjectW(
-  IN DEVINST  dnDevInst,
-  OUT PPNP_VETO_TYPE  pVetoType,
-  OUT LPWSTR  pszVetoName,
-  IN ULONG  ulNameLength,
-  IN ULONG  ulFlags);
+  /*IN*/ DEVINST  dnDevInst,
+  /*OUT*/ PPNP_VETO_TYPE  pVetoType,
+  /*OUT*/ LPWSTR  pszVetoName,
+  /*IN*/ ULONG  ulNameLength,
+  /*IN*/ ULONG  ulFlags);
 
 #ifdef UNICODE
 #define CM_Request_Device_Eject CM_Request_Device_EjectW
@@ -1522,7 +1522,7 @@
 DWORD
 WINAPI
 CMP_WaitNoPendingInstallEvents(
-  IN DWORD dwTimeout);
+  /*IN*/ DWORD dwTimeout);
 
 #include <poppack.h>
 
--- a/include/ddk/ddkmapi.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/ddk/ddkmapi.h	Mon Dec 14 11:52:08 2009 -0500
@@ -43,11 +43,11 @@
 DWORD
 FAR PASCAL
 DxApi(
-  IN DWORD  dwFunctionNum,
-  IN LPVOID  lpvInBuffer,
-  IN DWORD  cbInBuffer,
-  OUT LPVOID  lpvOutBuffer,
-  OUT DWORD  cbOutBuffer);
+  /*IN*/ DWORD  dwFunctionNum,
+  /*IN*/ LPVOID  lpvInBuffer,
+  /*IN*/ DWORD  cbInBuffer,
+  /*OUT*/ LPVOID  lpvOutBuffer,
+  /*OUT*/ DWORD  cbOutBuffer);
 
 typedef DWORD (FAR PASCAL *LPDXAPI)(
   DWORD  dwFunctionNum,
--- a/include/ddk/hidclass.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/ddk/hidclass.h	Mon Dec 14 11:52:08 2009 -0500
@@ -92,8 +92,8 @@
   enum DeviceObjectState  State);
 
 typedef NTSTATUS DDKAPI (*PHIDP_GETCAPS)(
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  OUT PHIDP_CAPS  Capabilities);
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*OUT*/ PHIDP_CAPS  Capabilities);
 
 typedef struct _HID_COLLECTION_INFORMATION {
   ULONG  DescriptorSize;
--- a/include/ddk/hidpi.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/ddk/hidpi.h	Mon Dec 14 11:52:08 2009 -0500
@@ -75,9 +75,9 @@
 } HIDP_KEYBOARD_MODIFIER_STATE, *PHIDP_KEYBOARD_MODIFIER_STATE;
 
 typedef BOOLEAN (DDKAPI *PHIDP_INSERT_SCANCODES)(
-  IN PVOID  Context,
-  IN PCHAR  NewScanCodes,
-  IN ULONG  Length);
+  /*IN*/ PVOID  Context,
+  /*IN*/ PCHAR  NewScanCodes,
+  /*IN*/ ULONG  Length);
 
 typedef struct _USAGE_AND_PAGE {
   USAGE  Usage;
@@ -88,23 +88,23 @@
 NTSTATUS
 DDKAPI
 HidP_TranslateUsageAndPagesToI8042ScanCodes(
-  IN PUSAGE_AND_PAGE  ChangedUsageList,
-  IN ULONG  UsageListLength,
-  IN HIDP_KEYBOARD_DIRECTION  KeyAction,
-  IN OUT PHIDP_KEYBOARD_MODIFIER_STATE  ModifierState,
-  IN PHIDP_INSERT_SCANCODES  InsertCodesProcedure,
-  IN PVOID  InsertCodesContext);
+  /*IN*/ PUSAGE_AND_PAGE  ChangedUsageList,
+  /*IN*/ ULONG  UsageListLength,
+  /*IN*/ HIDP_KEYBOARD_DIRECTION  KeyAction,
+  /*IN OUT*/ PHIDP_KEYBOARD_MODIFIER_STATE  ModifierState,
+  /*IN*/ PHIDP_INSERT_SCANCODES  InsertCodesProcedure,
+  /*IN*/ PVOID  InsertCodesContext);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_TranslateUsagesToI8042ScanCodes(
-  IN PUSAGE  ChangedUsageList,
-  IN ULONG  UsageListLength,
-  IN HIDP_KEYBOARD_DIRECTION  KeyAction,
-  IN OUT PHIDP_KEYBOARD_MODIFIER_STATE  ModifierState,
-  IN PHIDP_INSERT_SCANCODES  InsertCodesProcedure,
-  IN PVOID  InsertCodesContext);
+  /*IN*/ PUSAGE  ChangedUsageList,
+  /*IN*/ ULONG  UsageListLength,
+  /*IN*/ HIDP_KEYBOARD_DIRECTION  KeyAction,
+  /*IN OUT*/ PHIDP_KEYBOARD_MODIFIER_STATE  ModifierState,
+  /*IN*/ PHIDP_INSERT_SCANCODES  InsertCodesProcedure,
+  /*IN*/ PVOID  InsertCodesContext);
 
 typedef struct _HIDP_BUTTON_CAPS {
   USAGE  UsagePage;
@@ -260,10 +260,10 @@
 /*
  * NTSTATUS
  * HidP_GetButtonCaps(
- *   IN HIDP_REPORT_TYPE  ReportType,
- *   OUT PHIDP_BUTTON_CAPS  ButtonCaps,
- *   IN OUT PULONG  ButtonCapsLength,
- *   IN PHIDP_PREPARSED_DATA  PreparsedData);
+ * IN HIDP_REPORT_TYPE  ReportType,
+ * OUT PHIDP_BUTTON_CAPS  ButtonCaps,
+ * IN OUT PULONG  ButtonCapsLength,
+ * IN PHIDP_PREPARSED_DATA  PreparsedData);
  */
 #define HidP_GetButtonCaps(_Type_, _Caps_, _Len_, _Data_) \
   HidP_GetSpecificButtonCaps(_Type_, 0, 0, 0, _Caps_, _Len_, _Data_)
@@ -271,14 +271,14 @@
 /*
  * NTSTATUS
  * HidP_GetButtons(
- *   IN HIDP_REPORT_TYPE  ReportType,
- *   IN USAGE  UsagePage,
- *   IN USHORT  LinkCollection,
- *   OUT USAGE  *UsageList,
- *   IN OUT ULONG  *UsageLength,
- *   IN PHIDP_PREPARSED_DATA  PreparsedData,
- *   IN PCHAR  Report,
- *   IN ULONG  ReportLength);
+ * IN HIDP_REPORT_TYPE  ReportType,
+ * IN USAGE  UsagePage,
+ * IN USHORT  LinkCollection,
+ * OUT USAGE  *UsageList,
+ * IN OUT ULONG  *UsageLength,
+ * IN PHIDP_PREPARSED_DATA  PreparsedData,
+ * IN PCHAR  Report,
+ * IN ULONG  ReportLength);
  */
 #define HidP_GetButtons(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe) \
   HidP_GetUsages(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe)
@@ -290,13 +290,13 @@
 /*
  * NTSTATUS
  * HidP_GetButtonsEx(
- *   IN HIDP_REPORT_TYPE  ReportType,
- *   IN USHORT  LinkCollection,
- *   OUT PUSAGE_AND_PAGE  ButtonList,
- *   IN OUT ULONG  *UsageLength,
- *   IN PHIDP_PREPARSED_DATA  PreparsedData,
- *   IN PCHAR  Report,
- *   IN ULONG  ReportLength);
+ * IN HIDP_REPORT_TYPE  ReportType,
+ * IN USHORT  LinkCollection,
+ * OUT PUSAGE_AND_PAGE  ButtonList,
+ * IN OUT ULONG  *UsageLength,
+ * IN PHIDP_PREPARSED_DATA  PreparsedData,
+ * IN PCHAR  Report,
+ * IN ULONG  ReportLength);
  */
 #define HidP_GetButtonsEx(RT, LC, BL, UL, PD, R, RL)  \
   HidP_GetUsagesEx(RT, LC, BL, UL, PD, R, RL)
@@ -305,134 +305,134 @@
 NTSTATUS
 DDKAPI
 HidP_GetCaps(
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  OUT PHIDP_CAPS  Capabilities);
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*OUT*/ PHIDP_CAPS  Capabilities);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_GetData(
-  IN HIDP_REPORT_TYPE  ReportType,
-  OUT PHIDP_DATA  DataList,
-  IN OUT PULONG  DataLength,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  IN PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*OUT*/ PHIDP_DATA  DataList,
+  /*IN OUT*/ PULONG  DataLength,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*IN*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_GetExtendedAttributes(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USHORT  DataIndex,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  OUT PHIDP_EXTENDED_ATTRIBUTES  Attributes,
-  IN OUT PULONG  LengthAttributes);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USHORT  DataIndex,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*OUT*/ PHIDP_EXTENDED_ATTRIBUTES  Attributes,
+  /*IN OUT*/ PULONG  LengthAttributes);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_GetLinkCollectionNodes(
-  OUT PHIDP_LINK_COLLECTION_NODE  LinkCollectionNodes,
-  IN OUT PULONG  LinkCollectionNodesLength,
-  IN PHIDP_PREPARSED_DATA  PreparsedData);
+  /*OUT*/ PHIDP_LINK_COLLECTION_NODE  LinkCollectionNodes,
+  /*IN OUT*/ PULONG  LinkCollectionNodesLength,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_GetScaledUsageValue(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USAGE  UsagePage,
-  IN USHORT  LinkCollection  OPTIONAL,
-  IN USAGE  Usage,
-  OUT PLONG  UsageValue,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  IN PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USAGE  UsagePage,
+  /*IN*/ USHORT  LinkCollection  /*OPTIONAL*/,
+  /*IN*/ USAGE  Usage,
+  /*OUT*/ PLONG  UsageValue,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*IN*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_GetSpecificButtonCaps(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USAGE  UsagePage,
-  IN USHORT  LinkCollection,
-  IN USAGE  Usage,
-  OUT PHIDP_BUTTON_CAPS  ButtonCaps,
-  IN OUT PULONG  ButtonCapsLength,
-  IN PHIDP_PREPARSED_DATA  PreparsedData);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USAGE  UsagePage,
+  /*IN*/ USHORT  LinkCollection,
+  /*IN*/ USAGE  Usage,
+  /*OUT*/ PHIDP_BUTTON_CAPS  ButtonCaps,
+  /*IN OUT*/ PULONG  ButtonCapsLength,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_GetSpecificValueCaps(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USAGE  UsagePage,
-  IN USHORT  LinkCollection,
-  IN USAGE  Usage,
-  OUT PHIDP_VALUE_CAPS  ValueCaps,
-  IN OUT PULONG  ValueCapsLength,
-  IN PHIDP_PREPARSED_DATA  PreparsedData);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USAGE  UsagePage,
+  /*IN*/ USHORT  LinkCollection,
+  /*IN*/ USAGE  Usage,
+  /*OUT*/ PHIDP_VALUE_CAPS  ValueCaps,
+  /*IN OUT*/ PULONG  ValueCapsLength,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_GetUsages(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USAGE  UsagePage,
-  IN USHORT  LinkCollection  OPTIONAL,
-  OUT USAGE  *UsageList,
-  IN OUT ULONG  *UsageLength,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  IN PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USAGE  UsagePage,
+  /*IN*/ USHORT  LinkCollection  /*OPTIONAL*/,
+  /*OUT*/ USAGE  *UsageList,
+  /*IN OUT*/ ULONG  *UsageLength,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*IN*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_GetUsagesEx(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USHORT  LinkCollection,
-  OUT PUSAGE_AND_PAGE  ButtonList,
-  IN OUT ULONG  *UsageLength,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  IN PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USHORT  LinkCollection,
+  /*OUT*/ PUSAGE_AND_PAGE  ButtonList,
+  /*IN OUT*/ ULONG  *UsageLength,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*IN*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_GetUsageValue(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USAGE  UsagePage,
-  IN USHORT  LinkCollection,
-  IN USAGE  Usage,
-  OUT PULONG  UsageValue,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  IN PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USAGE  UsagePage,
+  /*IN*/ USHORT  LinkCollection,
+  /*IN*/ USAGE  Usage,
+  /*OUT*/ PULONG  UsageValue,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*IN*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_GetUsageValueArray(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USAGE  UsagePage,
-  IN USHORT  LinkCollection  OPTIONAL,
-  IN USAGE  Usage,
-  OUT PCHAR  UsageValue,
-  IN USHORT  UsageValueByteLength,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  IN PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USAGE  UsagePage,
+  /*IN*/ USHORT  LinkCollection  /*OPTIONAL*/,
+  /*IN*/ USAGE  Usage,
+  /*OUT*/ PCHAR  UsageValue,
+  /*IN*/ USHORT  UsageValueByteLength,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*IN*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 /*
  * NTSTATUS
  * HidP_GetValueCaps(
- *   IN HIDP_REPORT_TYPE  ReportType,
- *   OUT PHIDP_VALUE_CAPS  ValueCaps,
- *   IN OUT PULONG  ValueCapsLength,
- *   IN PHIDP_PREPARSED_DATA  PreparsedData);
+ * IN HIDP_REPORT_TYPE  ReportType,
+ * OUT PHIDP_VALUE_CAPS  ValueCaps,
+ * IN OUT PULONG  ValueCapsLength,
+ * IN PHIDP_PREPARSED_DATA  PreparsedData);
  */
 #define HidP_GetValueCaps(_Type_, _Caps_, _Len_, _Data_) \
   HidP_GetSpecificValueCaps (_Type_, 0, 0, 0, _Caps_, _Len_, _Data_)
@@ -441,11 +441,11 @@
 NTSTATUS
 DDKAPI
 HidP_InitializeReportForID(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN UCHAR  ReportID,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  IN OUT PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ UCHAR  ReportID,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*IN OUT*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 /*
  * BOOLEAN
@@ -459,28 +459,28 @@
 ULONG
 DDKAPI
 HidP_MaxDataListLength(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN PHIDP_PREPARSED_DATA  PreparsedData);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData);
 
 HIDAPI
 ULONG
 DDKAPI
 HidP_MaxUsageListLength(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USAGE  UsagePage  OPTIONAL,
-  IN PHIDP_PREPARSED_DATA  PreparsedData);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USAGE  UsagePage  /*OPTIONAL*/,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData);
 
 /*
  * NTSTATUS
  * HidP_SetButtons(
- *   IN HIDP_REPORT_TYPE  ReportType,
- *   IN USAGE  UsagePage,
- *   IN USHORT  LinkCollection,
- *   IN PUSAGE  UsageList,
- *   IN OUT PULONG  UsageLength,
- *   IN PHIDP_PREPARSED_DATA  PreparsedData,
- *   IN OUT PCHAR  Report,
- *   IN ULONG  ReportLength);
+ * IN HIDP_REPORT_TYPE  ReportType,
+ * IN USAGE  UsagePage,
+ * IN USHORT  LinkCollection,
+ * IN PUSAGE  UsageList,
+ * IN OUT PULONG  UsageLength,
+ * IN PHIDP_PREPARSED_DATA  PreparsedData,
+ * IN OUT PCHAR  Report,
+ * IN ULONG  ReportLength);
  */
 #define HidP_SetButtons(RT, UP, LC, UL1, UL2, PD, R, RL) \
   HidP_SetUsages(RT, UP, LC, UL1, UL2, PD, R, RL)
@@ -489,77 +489,77 @@
 NTSTATUS
 DDKAPI
 HidP_SetData(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN PHIDP_DATA  DataList,
-  IN OUT PULONG  DataLength,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  IN OUT PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ PHIDP_DATA  DataList,
+  /*IN OUT*/ PULONG  DataLength,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*IN OUT*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_SetScaledUsageValue(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USAGE  UsagePage, 
-  IN USHORT  LinkCollection  OPTIONAL,
-  IN USAGE  Usage,
-  IN LONG  UsageValue,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  IN OUT PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USAGE  UsagePage, 
+  /*IN*/ USHORT  LinkCollection  /*OPTIONAL*/,
+  /*IN*/ USAGE  Usage,
+  /*IN*/ LONG  UsageValue,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*IN OUT*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_SetUsages(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USAGE  UsagePage,
-  IN USHORT  LinkCollection, /* Optional */
-  IN PUSAGE  UsageList,
-  IN OUT PULONG  UsageLength,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  IN OUT PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USAGE  UsagePage,
+  /*IN*/ USHORT  LinkCollection /*OPTIONAL*/,
+  /*IN*/ PUSAGE  UsageList,
+  /*IN OUT*/ PULONG  UsageLength,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*IN OUT*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_SetUsageValue(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USAGE  UsagePage,
-  IN USHORT  LinkCollection,
-  IN USAGE  Usage,
-  IN ULONG  UsageValue,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  IN OUT PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USAGE  UsagePage,
+  /*IN*/ USHORT  LinkCollection,
+  /*IN*/ USAGE  Usage,
+  /*IN*/ ULONG  UsageValue,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*IN OUT*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_SetUsageValueArray(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USAGE  UsagePage,
-  IN USHORT  LinkCollection  OPTIONAL,
-  IN USAGE  Usage,
-  IN PCHAR  UsageValue,
-  IN USHORT  UsageValueByteLength,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  OUT PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USAGE  UsagePage,
+  /*IN*/ USHORT  LinkCollection  /*OPTIONAL*/,
+  /*IN*/ USAGE  Usage,
+  /*IN*/ PCHAR  UsageValue,
+  /*IN*/ USHORT  UsageValueByteLength,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*OUT*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 /*
  * NTSTATUS
  * HidP_UnsetButtons(
- *   IN HIDP_REPORT_TYPE  ReportType,
- *   IN USAGE  UsagePage,
- *   IN USHORT  LinkCollection,
- *   IN PUSAGE  UsageList,
- *   IN OUT PULONG  UsageLength,
- *   IN PHIDP_PREPARSED_DATA  PreparsedData,
- *   IN OUT PCHAR  Report,
- *   IN ULONG  ReportLength);
+ * IN HIDP_REPORT_TYPE  ReportType,
+ * IN USAGE  UsagePage,
+ * IN USHORT  LinkCollection,
+ * IN PUSAGE  UsageList,
+ * IN OUT PULONG  UsageLength,
+ * IN PHIDP_PREPARSED_DATA  PreparsedData,
+ * IN OUT PCHAR  Report,
+ * IN ULONG  ReportLength);
  */
 #define HidP_UnsetButtons(RT, UP, LC, UL1, UL2, PD, R, RL) \
   HidP_UnsetUsages(RT, UP, LC, UL1, UL2, PD, R, RL)
@@ -568,34 +568,34 @@
 NTSTATUS
 DDKAPI
 HidP_UnsetUsages(
-  IN HIDP_REPORT_TYPE  ReportType,
-  IN USAGE  UsagePage,
-  IN USHORT  LinkCollection,
-  IN PUSAGE  UsageList,
-  IN OUT PULONG  UsageLength,
-  IN PHIDP_PREPARSED_DATA  PreparsedData,
-  IN OUT PCHAR  Report,
-  IN ULONG  ReportLength);
+  /*IN*/ HIDP_REPORT_TYPE  ReportType,
+  /*IN*/ USAGE  UsagePage,
+  /*IN*/ USHORT  LinkCollection,
+  /*IN*/ PUSAGE  UsageList,
+  /*IN OUT*/ PULONG  UsageLength,
+  /*IN*/ PHIDP_PREPARSED_DATA  PreparsedData,
+  /*IN OUT*/ PCHAR  Report,
+  /*IN*/ ULONG  ReportLength);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_UsageAndPageListDifference(
-  IN PUSAGE_AND_PAGE  PreviousUsageList,
-  IN PUSAGE_AND_PAGE  CurrentUsageList,
-  OUT PUSAGE_AND_PAGE  BreakUsageList,
-  OUT PUSAGE_AND_PAGE  MakeUsageList,
-  IN ULONG  UsageListLength);
+  /*IN*/ PUSAGE_AND_PAGE  PreviousUsageList,
+  /*IN*/ PUSAGE_AND_PAGE  CurrentUsageList,
+  /*OUT*/ PUSAGE_AND_PAGE  BreakUsageList,
+  /*OUT*/ PUSAGE_AND_PAGE  MakeUsageList,
+  /*IN*/ ULONG  UsageListLength);
 
 HIDAPI
 NTSTATUS
 DDKAPI
 HidP_UsageListDifference(
-  IN PUSAGE  PreviousUsageList,
-  IN PUSAGE  CurrentUsageList,
-  OUT PUSAGE  BreakUsageList,
-  OUT PUSAGE  MakeUsageList,
-  IN ULONG  UsageListLength);
+  /*IN*/ PUSAGE  PreviousUsageList,
+  /*IN*/ PUSAGE  CurrentUsageList,
+  /*OUT*/ PUSAGE  BreakUsageList,
+  /*OUT*/ PUSAGE  MakeUsageList,
+  /*IN*/ ULONG  UsageListLength);
 
 #ifdef __cplusplus
 }
--- a/include/ddk/kbdmou.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/ddk/kbdmou.h	Mon Dec 14 11:52:08 2009 -0500
@@ -83,9 +83,9 @@
 
 typedef VOID
 (STDAPICALLTYPE *PSERVICE_CALLBACK_ROUTINE)(
-	IN PVOID NormalContext,
-	IN PVOID SystemArgument1,
-	IN PVOID SystemArgument2,
-	IN OUT PVOID SystemArgument3);
+  /*IN*/ PVOID NormalContext,
+  /*IN*/ PVOID SystemArgument1,
+  /*IN*/ PVOID SystemArgument2,
+  /*IN OUT*/ PVOID SystemArgument3);
 
 #endif /* __KBDMOU_H */
--- a/include/ddk/mcd.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/ddk/mcd.h	Mon Dec 14 11:52:08 2009 -0500
@@ -58,8 +58,8 @@
 PVOID
 DDKAPI
 ChangerClassAllocatePool(
-  IN POOL_TYPE  PoolType,
-  IN ULONG  NumberOfBytes);
+  /*IN*/ POOL_TYPE  PoolType,
+  /*IN*/ ULONG  NumberOfBytes);
 
 VOID
 ChangerClassDebugPrint(
@@ -71,22 +71,22 @@
 PVOID
 DDKAPI
 ChangerClassFreePool(
-  IN PVOID  PoolToFree);
+  /*IN*/ PVOID  PoolToFree);
 
 CHANGERAPI
 NTSTATUS
 DDKAPI
 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 DDKAPI
 (*CHANGER_INITIALIZE)(
-  IN PDEVICE_OBJECT  DeviceObject);
+  /*IN*/ PDEVICE_OBJECT  DeviceObject);
 
 typedef ULONG DDKAPI
 (*CHANGER_EXTENSION_SIZE)(
@@ -101,13 +101,13 @@
 
 typedef NTSTATUS DDKAPI
 (*CHANGER_COMMAND_ROUTINE)(
-  IN PDEVICE_OBJECT  DeviceObject,
-  IN PIRP  Irp);
+  /*IN*/ PDEVICE_OBJECT  DeviceObject,
+  /*IN*/ PIRP  Irp);
 
 typedef NTSTATUS DDKAPI
 (*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;
@@ -132,9 +132,9 @@
 NTSTATUS
 DDKAPI
 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
 }
--- a/include/ddk/miniport.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/ddk/miniport.h	Mon Dec 14 11:52:08 2009 -0500
@@ -66,9 +66,9 @@
 
 typedef VOID DDKAPI
 (*PBANKED_SECTION_ROUTINE)(
-  IN ULONG  ReadBank,
-  IN ULONG  WriteBank,
-  IN PVOID  Context);
+  /*IN*/ ULONG  ReadBank,
+  /*IN*/ ULONG  WriteBank,
+  /*IN*/ PVOID  Context);
 
 #ifdef __cplusplus
 }
--- a/include/ddk/minitape.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/ddk/minitape.h	Mon Dec 14 11:52:08 2009 -0500
@@ -158,30 +158,30 @@
 
 typedef BOOLEAN DDKAPI
 (*TAPE_VERIFY_INQUIRY_ROUTINE)(
-	IN PINQUIRYDATA  InquiryData,
-	IN PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage);
+  /*IN*/ PINQUIRYDATA  InquiryData,
+  /*IN*/ PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage);
 
 typedef VOID DDKAPI
 (*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 DDKAPI
 (*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 DDKAPI
 (*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
@@ -206,7 +206,7 @@
   TAPE_PROCESS_COMMAND_ROUTINE  SetMediaParameters; 
   TAPE_PROCESS_COMMAND_ROUTINE  SetPosition; 
   TAPE_PROCESS_COMMAND_ROUTINE  WriteMarks; 
-  TAPE_PROCESS_COMMAND_ROUTINE  PreProcessReadWrite; /* optional */
+  TAPE_PROCESS_COMMAND_ROUTINE  PreProcessReadWrite /* OPTIONAL */;
 } TAPE_INIT_DATA, *PTAPE_INIT_DATA; 
 
 typedef struct _TAPE_PHYS_POSITION {
--- a/include/ddk/ndis.h	Mon Dec 14 10:57:20 2009 -0500
+++ b/include/ddk/ndis.h	Mon Dec 14 11:52:08 2009 -0500
@@ -52,12 +52,16 @@
 #if defined(NDIS50_MINIPORT)
 #ifndef NDIS50
 #define NDIS50
+#define NDIS_MINIPORT_MAJOR_VERSION 5
+#define NDIS_MINIPORT_MINOR_VERSION 0
 #endif
 #endif /* NDIS50_MINIPORT */
 
 #if defined(NDIS51_MINIPORT)
 #ifndef NDIS51
 #define NDIS51
+#define NDIS_MINIPORT_MAJOR_VERSION 5
+#define NDIS_MINIPORT_MINOR_VERSION 1
 #endif
 #endif /* NDIS51_MINIPORT */
 
@@ -254,10 +258,10 @@
 
 typedef VOID DDKAPI
 (*PNDIS_TIMER_FUNCTION)(
-	IN PVOID  SystemSpecific1,
-	IN PVOID  FunctionContext,
-	IN PVOID  SystemSpecific2,
-	IN PVOID  SystemSpecific3);
+  /*IN*/ PVOID  SystemSpecific1,
+  /*IN*/ PVOID  FunctionContext,
+  /*IN*/ PVOID  SystemSpecific2,
+  /*IN*/ PVOID  SystemSpecific3);
 
 typedef struct _NDIS_TIMER {
   KTIMER  Timer;
@@ -399,19 +403,19 @@
 
 typedef struct _NDIS_PACKET {
   NDIS_PACKET_PRIVATE  Private;
-  union {
-    struct {
+  _ANONYMOUS_UNION union {
+    _ANONYMOUS_STRUCT struct {
       UCHAR  MiniportReserved[2 * sizeof(PVOID)];
       UCHAR  WrapperReserved[2 * sizeof(PVOID)];
-    } s1;
-    struct {
+    } DUMMYSTRUCTNAME;
+    _ANONYMOUS_STRUCT struct {
       UCHAR  MiniportReservedEx[3 * sizeof(PVOID)];
       UCHAR  WrapperReservedEx[sizeof(PVOID)];
-    } s2;
-    struct {
+    } DUMMYSTRUCTNAME;
+    _ANONYMOUS_STRUCT struct {
       UCHAR  MacReserved[4 * sizeof(PVOID)];
-    } s3;
-  } u;
+    } DUMMYSTRUCTNAME;
+  } DUMMYUNIONNAME;
   ULONG_PTR  Reserved[2];
   UCHAR  ProtocolReserved[1];
 } NDIS_PACKET, *PNDIS_PACKET, **PPNDIS_PACKET;
@@ -605,7 +609,7 @@
   NDIS_WAN_QUALITY  Quality;
   USHORT  SendWindow;
   UCHAR  RemoteAddress[6];
-  OUT UCHAR  LocalAddress[6];
+  /*OUT*/ UCHAR  LocalAddress[6];
   ULONG  ProtocolBufferLength;
   PUCHAR  ProtocolBuffer;
   USHORT  ProtocolType;
@@ -615,7 +619,7 @@
 
 typedef VOID DDKAPI
 (*ADAPTER_SHUTDOWN_HANDLER)(
-  IN PVOID  ShutdownContext);
+  /*IN*/ PVOID  ShutdownContext);
 
 
 typedef struct _OID_LIST    OID_LIST, *POID_LIST;
@@ -829,7 +833,7 @@
 /*
  * PNDIS_PACKET
  * NDIS_GET_ORIGINAL_PACKET(
- *   IN PNDIS_PACKET  Packet);
+ * IN PNDIS_PACKET  Packet);
  */
 #define NDIS_GET_ORIGINAL_PACKET(Packet) \
   NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, OriginalPacketInfo)
@@ -837,7 +841,7 @@
 /*
  * PVOID
  * NDIS_GET_PACKET_CANCEL_ID(
- *   IN PNDIS_PACKET  Packet);
+ * IN PNDIS_PACKET  Packet);
  */
 #define NDIS_GET_PACKET_CANCEL_ID(Packet) \
   NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, PacketCancelId)
@@ -845,7 +849,7 @@
 /*
  * PNDIS_PACKET_EXTENSION
  * NDIS_PACKET_EXTENSION_FROM_PACKET(
- *   IN PNDIS_PACKET  Packet);
+ * IN PNDIS_PACKET  Packet);
  */
 #define NDIS_PACKET_EXTENSION_FROM_PACKET(Packet) \
   ((PNDIS_PACKET_EXTENSION)((PUCHAR)(Packet) \
@@ -854,8 +858,8 @@
 /*
  * PVOID
  * NDIS_PER_PACKET_INFO_FROM_PACKET(
- *   IN OUT  PNDIS_PACKET  Packet,
- *   IN NDIS_PER_PACKET_INFO  InfoType);
+ * IN OUT  PNDIS_PACKET  Packet,
+ * IN NDIS_PER_PACKET_INFO  InfoType);
  */
 #define NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, InfoType) \
   ((PNDIS_PACKET_EXTENSION)((PUCHAR)(Packet) + (Packet)->Private.NdisPacketOobOffset \
@@ -864,8 +868,8 @@
 /*
  * VOID
  * NDIS_SET_ORIGINAL_PACKET(
- *   IN OUT  PNDIS_PACKET  Packet,
- *   IN PNDIS_PACKET  OriginalPacket);
+ * IN OUT  PNDIS_PACKET  Packet,
+ * IN PNDIS_PACKET  OriginalPacket);
  */
 #define NDIS_SET_ORIGINAL_PACKET(Packet, OriginalPacket) \
   NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, OriginalPacketInfo) = (OriginalPacket)
@@ -873,8 +877,8 @@
 /*
  * VOID
  * NDIS_SET_PACKET_CANCEL_ID(
- *  IN PNDIS_PACKET  Packet
- *  IN ULONG_PTR  CancelId);
+ * IN PNDIS_PACKET  Packet
+ * IN ULONG_PTR  CancelId);
  */
 #define NDIS_SET_PACKET_CANCEL_ID(Packet, CancelId) \
   NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, PacketCancelId) = (CancelId)
@@ -915,18 +919,6 @@
   } V4ESP;
 } NDIS_TASK_IPSEC, *PNDIS_TASK_IPSEC;
 
-typedef struct _NDIS_TASK_OFFLOAD {
-  ULONG  Version;
-  ULONG  Size;
-  NDIS_TASK  Task;
-  ULONG  OffsetNextTask;
-  ULONG  TaskBufferLength;
-  UCHAR  TaskBuffer[1];
-} NDIS_TASK_OFFLOAD, *PNDIS_TASK_OFFLOAD;
-
-/* NDIS_TASK_OFFLOAD_HEADER.Version constants */
-#define NDIS_TASK_OFFLOAD_VERSION 1
-
 typedef enum _NDIS_ENCAPSULATION {
   UNSPECIFIED_Encapsulation,
   NULL_Encapsulation,
@@ -945,6 +937,27 @@
   ULONG  EncapsulationHeaderSize;
 } NDIS_ENCAPSULATION_FORMAT, *PNDIS_ENCAPSULATION_FORMAT;
 
+typedef struct _NDIS_TASK_OFFLOAD_HEADER
+{
+  ULONG Version;
+  ULONG Size;
+  ULONG Reserved;
+  UCHAR OffsetFirstTask;
+  NDIS_ENCAPSULATION_FORMAT EncapsulationFormat;
+} NDIS_TASK_OFFLOAD_HEADER, *PNDIS_TASK_OFFLOAD_HEADER;
+
+typedef struct _NDIS_TASK_OFFLOAD {
+  ULONG  Version;
+  ULONG  Size;
+  NDIS_TASK  Task;
+  ULONG  OffsetNextTask;
+  ULONG  TaskBufferLength;
+  UCHAR  TaskBuffer[1];
+} NDIS_TASK_OFFLOAD, *PNDIS_TASK_OFFLOAD;
+
+/* NDIS_TASK_OFFLOAD_HEADER.Version constants */
+#define NDIS_TASK_OFFLOAD_VERSION 1
+
 typedef struct _NDIS_TASK_TCP_IP_CHECKSUM {
   struct {
     ULONG  IpOptionsSupported:1;
@@ -1028,99 +1041,99 @@
 
 typedef VOID DDKAPI
 (*CM_ACTIVATE_VC_COMPLETE_HANDLER)(
-  IN NDIS_STATUS  Status,
-  IN NDIS_HANDLE  CallMgrVcContext,
-  IN PCO_CALL_PARAMETERS  CallParameters);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  CallMgrVcContext,
+  /*IN*/ PCO_CALL_PARAMETERS  CallParameters);
 
 typedef NDIS_STATUS DDKAPI
 (*CM_ADD_PARTY_HANDLER)(
-  IN NDIS_HANDLE  CallMgrVcContext,
-  IN OUT PCO_CALL_PARAMETERS  CallParameters,
-  IN NDIS_HANDLE  NdisPartyHandle,
-  OUT PNDIS_HANDLE  CallMgrPartyContext);
+  /*IN*/ NDIS_HANDLE  CallMgrVcContext,
+  /*IN OUT*/ PCO_CALL_PARAMETERS  CallParameters,
+  /*IN*/ NDIS_HANDLE  NdisPartyHandle,
+  /*OUT*/ PNDIS_HANDLE  CallMgrPartyContext);
 
 typedef NDIS_STATUS DDKAPI
 (*CM_CLOSE_AF_HANDLER)(
-  IN NDIS_HANDLE  CallMgrAfContext);
+  /*IN*/ NDIS_HANDLE  CallMgrAfContext);
 
 typedef NDIS_STATUS DDKAPI
 (*CM_CLOSE_CALL_HANDLER)(
-  IN NDIS_HANDLE  CallMgrVcContext,
-  IN NDIS_HANDLE  CallMgrPartyContext  OPTIONAL,
-  IN PVOID  CloseData  OPTIONAL,
-  IN UINT  Size  OPTIONAL);
+  /*IN*/ NDIS_HANDLE  CallMgrVcContext,
+  /*IN*/ NDIS_HANDLE  CallMgrPartyContext  /*OPTIONAL*/,
+  /*IN*/ PVOID  CloseData  /*OPTIONAL*/,
+  /*IN*/ UINT  Size  /*OPTIONAL*/);
 
 typedef NDIS_STATUS DDKAPI
 (*CM_DEREG_SAP_HANDLER)(
-  IN NDIS_HANDLE  CallMgrSapContext);
+  /*IN*/ NDIS_HANDLE  CallMgrSapContext);
 
 typedef VOID DDKAPI
 (*CM_DEACTIVATE_VC_COMPLETE_HANDLER)(
-	IN NDIS_STATUS  Status,
-	IN NDIS_HANDLE  CallMgrVcContext);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  CallMgrVcContext);
 
 typedef NDIS_STATUS DDKAPI
 (*CM_DROP_PARTY_HANDLER)(
-  IN NDIS_HANDLE  CallMgrPartyContext,
-  IN PVOID  CloseData  OPTIONAL,
-  IN UINT  Size  OPTIONAL);
+  /*IN*/ NDIS_HANDLE  CallMgrPartyContext,
+  /*IN*/ PVOID  CloseData  /*OPTIONAL*/,
+  /*IN*/ UINT  Size  /*OPTIONAL*/);
 
 typedef VOID DDKAPI
 (*CM_INCOMING_CALL_COMPLETE_HANDLER)(
-  IN NDIS_STATUS  Status,
-  IN NDIS_HANDLE  CallMgrVcContext,
-  IN PCO_CALL_PARAMETERS  CallParameters);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  CallMgrVcContext,
+  /*IN*/ PCO_CALL_PARAMETERS  CallParameters);
 
 typedef NDIS_STATUS DDKAPI
 (*CM_MAKE_CALL_HANDLER)(
-  IN NDIS_HANDLE  CallMgrVcContext,
-  IN OUT PCO_CALL_PARAMETERS  CallParameters,
-  IN NDIS_HANDLE  NdisPartyHandle	OPTIONAL,
-  OUT PNDIS_HANDLE  CallMgrPartyContext  OPTIONAL);
+  /*IN*/ NDIS_HANDLE  CallMgrVcContext,
+  /*IN OUT*/ PCO_CALL_PARAMETERS  CallParameters,
+  /*IN*/ NDIS_HANDLE  NdisPartyHandle	/*OPTIONAL*/,
+  /*OUT*/ PNDIS_HANDLE  CallMgrPartyContext  /*OPTIONAL*/);
 
 typedef NDIS_STATUS DDKAPI
 (*CM_MODIFY_CALL_QOS_HANDLER)(
-  IN NDIS_HANDLE  CallMgrVcContext,
-  IN PCO_CALL_PARAMETERS  CallParameters);
+  /*IN*/ NDIS_HANDLE  CallMgrVcContext,
+  /*IN*/ PCO_CALL_PARAMETERS  CallParameters);
 
 typedef NDIS_STATUS DDKAPI
 (*CM_OPEN_AF_HANDLER)(
-	IN NDIS_HANDLE  CallMgrBindingContext,
-	IN PCO_ADDRESS_FAMILY  AddressFamily,
-	IN NDIS_HANDLE  NdisAfHandle,
-	OUT PNDIS_HANDLE  CallMgrAfContext);
+  /*IN*/ NDIS_HANDLE  CallMgrBindingContext,
+  /*IN*/ PCO_ADDRESS_FAMILY  AddressFamily,
+  /*IN*/ NDIS_HANDLE  NdisAfHandle,
+  /*OUT*/ PNDIS_HANDLE  CallMgrAfContext);
 
 typedef NDIS_STATUS DDKAPI
 (*CM_REG_SAP_HANDLER)(
-  IN NDIS_HANDLE  CallMgrAfContext,
-  IN PCO_SAP  Sap,
-  IN NDIS_HANDLE  NdisSapHandle,
-  OUT	PNDIS_HANDLE  CallMgrSapContext);
+  /*IN*/ NDIS_HANDLE  CallMgrAfContext,
+  /*IN*/ PCO_SAP  Sap,
+  /*IN*/ NDIS_HANDLE  NdisSapHandle,
+  /*OUT*/ PNDIS_HANDLE  CallMgrSapContext);
 
 typedef NDIS_STATUS DDKAPI
 (*CO_CREATE_VC_HANDLER)(
-  IN NDIS_HANDLE  ProtocolAfContext,
-  IN NDIS_HANDLE  NdisVcHandle,
-  OUT PNDIS_HANDLE  ProtocolVcContext);
+  /*IN*/ NDIS_HANDLE  ProtocolAfContext,
+  /*IN*/ NDIS_HANDLE  NdisVcHandle,
+  /*OUT*/ PNDIS_HANDLE  ProtocolVcContext);
 
 typedef NDIS_STATUS DDKAPI
 (*CO_DELETE_VC_HANDLER)(
-  IN NDIS_HANDLE  ProtocolVcContext);
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext);
 
 typedef VOID DDKAPI
 (*CO_REQUEST_COMPLETE_HANDLER)(
-  IN NDIS_STATUS  Status,
-  IN NDIS_HANDLE  ProtocolAfContext  OPTIONAL,
-  IN NDIS_HANDLE  ProtocolVcContext  OPTIONAL,
-  IN NDIS_HANDLE  ProtocolPartyContext  OPTIONAL,
-  IN PNDIS_REQUEST  NdisRequest);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  ProtocolAfContext  /*OPTIONAL*/,
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext  /*OPTIONAL*/,
+  /*IN*/ NDIS_HANDLE  ProtocolPartyContext  /*OPTIONAL*/,
+  /*IN*/ PNDIS_REQUEST  NdisRequest);
 
 typedef NDIS_STATUS DDKAPI
 (*CO_REQUEST_HANDLER)(
-  IN NDIS_HANDLE  ProtocolAfContext,
-  IN NDIS_HANDLE  ProtocolVcContext  OPTIONAL,
-  IN NDIS_HANDLE	ProtocolPartyContext  OPTIONAL,
-  IN OUT PNDIS_REQUEST  NdisRequest);
+  /*IN*/ NDIS_HANDLE  ProtocolAfContext,
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext  /*OPTIONAL*/,
+  /*IN*/ NDIS_HANDLE	ProtocolPartyContext  /*OPTIONAL*/,
+  /*IN OUT*/ PNDIS_REQUEST  NdisRequest);
 
 typedef struct _NDIS_CALL_MANAGER_CHARACTERISTICS {
 	UCHAR  MajorVersion;
@@ -1150,86 +1163,86 @@
 /* Call Manager clients */
 
 typedef VOID (*CL_OPEN_AF_COMPLETE_HANDLER)(
-  IN NDIS_STATUS Status,
-  IN NDIS_HANDLE ProtocolAfContext,
-  IN NDIS_HANDLE NdisAfHandle);
+  /*IN*/ NDIS_STATUS Status,
+  /*IN*/ NDIS_HANDLE ProtocolAfContext,
+  /*IN*/ NDIS_HANDLE NdisAfHandle);
 
 typedef VOID DDKAPI
 (*CL_CLOSE_AF_COMPLETE_HANDLER)(
-  IN NDIS_STATUS  Status,
-  IN NDIS_HANDLE  ProtocolAfContext);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  ProtocolAfContext);
 
 typedef VOID DDKAPI
 (*CL_REG_SAP_COMPLETE_HANDLER)(
-  IN NDIS_STATUS  Status,
-  IN NDIS_HANDLE  ProtocolSapContext,
-  IN PCO_SAP  Sap,
-  IN NDIS_HANDLE  NdisSapHandle);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  ProtocolSapContext,
+  /*IN*/ PCO_SAP  Sap,
+  /*IN*/ NDIS_HANDLE  NdisSapHandle);
 
 typedef VOID DDKAPI
 (*CL_DEREG_SAP_COMPLETE_HANDLER)(
-  IN NDIS_STATUS  Status,
-  IN NDIS_HANDLE  ProtocolSapContext);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  ProtocolSapContext);
 
 typedef VOID DDKAPI
 (*CL_MAKE_CALL_COMPLETE_HANDLER)(
-  IN NDIS_STATUS  Status,
-  IN NDIS_HANDLE  ProtocolVcContext,
-  IN NDIS_HANDLE  NdisPartyHandle  OPTIONAL,
-  IN PCO_CALL_PARAMETERS  CallParameters);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext,
+  /*IN*/ NDIS_HANDLE  NdisPartyHandle  /*OPTIONAL*/,
+  /*IN*/ PCO_CALL_PARAMETERS  CallParameters);
 
 typedef VOID DDKAPI
 (*CL_MODIFY_CALL_QOS_COMPLETE_HANDLER)(
-  IN NDIS_STATUS  Status,
-  IN NDIS_HANDLE  ProtocolVcContext,
-  IN PCO_CALL_PARAMETERS  CallParameters);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext,
+  /*IN*/ PCO_CALL_PARAMETERS  CallParameters);
 
 typedef VOID DDKAPI
 (*CL_CLOSE_CALL_COMPLETE_HANDLER)(
-  IN NDIS_STATUS  Status,
-  IN NDIS_HANDLE  ProtocolVcContext,
-  IN NDIS_HANDLE  ProtocolPartyContext  OPTIONAL);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext,
+  /*IN*/ NDIS_HANDLE  ProtocolPartyContext  /*OPTIONAL*/);
 
 typedef VOID DDKAPI
 (*CL_ADD_PARTY_COMPLETE_HANDLER)(
-  IN NDIS_STATUS  Status,
-  IN NDIS_HANDLE  ProtocolPartyContext,
-  IN NDIS_HANDLE  NdisPartyHandle,
-  IN PCO_CALL_PARAMETERS  CallParameters);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  ProtocolPartyContext,
+  /*IN*/ NDIS_HANDLE  NdisPartyHandle,
+  /*IN*/ PCO_CALL_PARAMETERS  CallParameters);
 
 typedef VOID DDKAPI
 (*CL_DROP_PARTY_COMPLETE_HANDLER)(
-  IN NDIS_STATUS  Status,
-  IN NDIS_HANDLE  ProtocolPartyContext);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  ProtocolPartyContext);
 
 typedef NDIS_STATUS DDKAPI
 (*CL_INCOMING_CALL_HANDLER)(
-  IN NDIS_HANDLE  ProtocolSapContext,
-  IN NDIS_HANDLE  ProtocolVcContext,
-  IN OUT PCO_CALL_PARAMETERS  CallParameters);
+  /*IN*/ NDIS_HANDLE  ProtocolSapContext,
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext,
+  /*IN OUT*/ PCO_CALL_PARAMETERS  CallParameters);
 
 typedef VOID DDKAPI
 (*CL_INCOMING_CALL_QOS_CHANGE_HANDLER)(
-  IN NDIS_HANDLE  ProtocolVcContext,
-  IN PCO_CALL_PARAMETERS  CallParameters);
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext,
+  /*IN*/ PCO_CALL_PARAMETERS  CallParameters);
 
 typedef VOID DDKAPI
 (*CL_INCOMING_CLOSE_CALL_HANDLER)(
-  IN NDIS_STATUS  CloseStatus,
-  IN NDIS_HANDLE  ProtocolVcContext,
-  IN PVOID  CloseData  OPTIONAL,
-  IN UINT  Size  OPTIONAL);
+  /*IN*/ NDIS_STATUS  CloseStatus,
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext,
+  /*IN*/ PVOID  CloseData  /*OPTIONAL*/,
+  /*IN*/ UINT  Size  /*OPTIONAL*/);
 
 typedef VOID DDKAPI
 (*CL_INCOMING_DROP_PARTY_HANDLER)(
-  IN NDIS_STATUS  DropStatus,
-  IN NDIS_HANDLE  ProtocolPartyContext,
-  IN PVOID  CloseData  OPTIONAL,
-  IN UINT  Size  OPTIONAL);
+  /*IN*/ NDIS_STATUS  DropStatus,
+  /*IN*/ NDIS_HANDLE  ProtocolPartyContext,
+  /*IN*/ PVOID  CloseData  /*OPTIONAL*/,
+  /*IN*/ UINT  Size  /*OPTIONAL*/);
 
 typedef VOID DDKAPI
 (*CL_CALL_CONNECTED_HANDLER)(
-  IN NDIS_HANDLE  ProtocolVcContext);
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext);
 
 
 typedef struct _NDIS_CLIENT_CHARACTERISTICS {
@@ -1264,55 +1277,55 @@
 
 typedef VOID DDKAPI
 (*OPEN_ADAPTER_COMPLETE_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN NDIS_STATUS  Status,
-  IN NDIS_STATUS  OpenErrorStatus);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_STATUS  OpenErrorStatus);
 
 typedef VOID DDKAPI
 (*CLOSE_ADAPTER_COMPLETE_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN NDIS_STATUS  Status);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ NDIS_STATUS  Status);
 
 typedef VOID DDKAPI
 (*RESET_COMPLETE_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN NDIS_STATUS  Status);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ NDIS_STATUS  Status);
 
 typedef VOID DDKAPI
 (*REQUEST_COMPLETE_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN PNDIS_REQUEST  NdisRequest,
-  IN NDIS_STATUS  Status);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ PNDIS_REQUEST  NdisRequest,
+  /*IN*/ NDIS_STATUS  Status);
 
 typedef VOID DDKAPI
 (*STATUS_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN NDIS_STATUS  GeneralStatus,
-  IN PVOID  StatusBuffer,
-  IN UINT  StatusBufferSize);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ NDIS_STATUS  GeneralStatus,
+  /*IN*/ PVOID  StatusBuffer,
+  /*IN*/ UINT  StatusBufferSize);
 
 typedef VOID DDKAPI
 (*STATUS_COMPLETE_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext);
 
 typedef VOID DDKAPI
 (*SEND_COMPLETE_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN PNDIS_PACKET  Packet,
-  IN NDIS_STATUS  Status);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ PNDIS_PACKET  Packet,
+  /*IN*/ NDIS_STATUS  Status);
 
 typedef VOID DDKAPI
 (*WAN_SEND_COMPLETE_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN PNDIS_WAN_PACKET  Packet,
-  IN NDIS_STATUS  Status);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ PNDIS_WAN_PACKET  Packet,
+  /*IN*/ NDIS_STATUS  Status);
 
 typedef VOID DDKAPI
 (*TRANSFER_DATA_COMPLETE_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN PNDIS_PACKET  Packet,
-  IN NDIS_STATUS  Status,
-  IN UINT  BytesTransferred);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ PNDIS_PACKET  Packet,
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ UINT  BytesTransferred);
 
 typedef VOID DDKAPI
 (*WAN_TRANSFER_DATA_COMPLETE_HANDLER)(
@@ -1321,23 +1334,23 @@
 
 typedef NDIS_STATUS DDKAPI
 (*RECEIVE_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN NDIS_HANDLE  MacReceiveContext,
-  IN PVOID  HeaderBuffer,
-  IN UINT  HeaderBufferSize,
-  IN PVOID  LookAheadBuffer,
-  IN UINT  LookaheadBufferSize,
-  IN UINT  PacketSize);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ NDIS_HANDLE  MacReceiveContext,
+  /*IN*/ PVOID  HeaderBuffer,
+  /*IN*/ UINT  HeaderBufferSize,
+  /*IN*/ PVOID  LookAheadBuffer,
+  /*IN*/ UINT  LookaheadBufferSize,
+  /*IN*/ UINT  PacketSize);
 
 typedef NDIS_STATUS DDKAPI
 (*WAN_RECEIVE_HANDLER)(
-  IN NDIS_HANDLE  NdisLinkHandle,
-  IN PUCHAR  Packet,
-  IN ULONG  PacketSize);
+  /*IN*/ NDIS_HANDLE  NdisLinkHandle,
+  /*IN*/ PUCHAR  Packet,
+  /*IN*/ ULONG  PacketSize);
 
 typedef VOID DDKAPI
 (*RECEIVE_COMPLETE_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext);
 
 
 /* Protocol characteristics for NDIS 3.0 protocols */
@@ -1379,27 +1392,27 @@
 
 typedef INT DDKAPI
 (*RECEIVE_PACKET_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN PNDIS_PACKET  Packet);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ PNDIS_PACKET  Packet);
 
 typedef VOID DDKAPI
 (*BIND_HANDLER)(
-  OUT PNDIS_STATUS  Status,
-  IN NDIS_HANDLE  BindContext,
-  IN PNDIS_STRING  DeviceName,
-  IN PVOID  SystemSpecific1,
-  IN PVOID  SystemSpecific2);
+  /*OUT*/ PNDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  BindContext,
+  /*IN*/ PNDIS_STRING  DeviceName,
+  /*IN*/ PVOID  SystemSpecific1,
+  /*IN*/ PVOID  SystemSpecific2);
 
 typedef VOID DDKAPI
 (*UNBIND_HANDLER)(
-  OUT PNDIS_STATUS  Status,
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN NDIS_HANDLE  UnbindContext);
+  /*OUT*/ PNDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ NDIS_HANDLE  UnbindContext);
 
 typedef NDIS_STATUS DDKAPI
 (*PNP_EVENT_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN PNET_PNP_EVENT  NetPnPEvent);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ PNET_PNP_EVENT  NetPnPEvent);
 
 typedef VOID DDKAPI
 (*UNLOAD_PROTOCOL_HANDLER)(
@@ -1438,28 +1451,28 @@
 
 typedef VOID DDKAPI
 (*CO_SEND_COMPLETE_HANDLER)(
-  IN NDIS_STATUS  Status,
-  IN NDIS_HANDLE  ProtocolVcContext,
-  IN PNDIS_PACKET  Packet);
+  /*IN*/ NDIS_STATUS  Status,
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext,
+  /*IN*/ PNDIS_PACKET  Packet);
 
 typedef VOID DDKAPI
 (*CO_STATUS_HANDLER)(
-	IN NDIS_HANDLE  ProtocolBindingContext,
-	IN NDIS_HANDLE  ProtocolVcContext  OPTIONAL,
-	IN NDIS_STATUS  GeneralStatus,
-	IN PVOID  StatusBuffer,
-	IN UINT  StatusBufferSize);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext  /*OPTIONAL*/,
+  /*IN*/ NDIS_STATUS  GeneralStatus,
+  /*IN*/ PVOID  StatusBuffer,
+  /*IN*/ UINT  StatusBufferSize);
 
 typedef UINT DDKAPI
 (*CO_RECEIVE_PACKET_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN NDIS_HANDLE  ProtocolVcContext,
-  IN PNDIS_PACKET  Packet);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ NDIS_HANDLE  ProtocolVcContext,
+  /*IN*/ PNDIS_PACKET  Packet);
 
 typedef VOID DDKAPI
 (*CO_AF_REGISTER_NOTIFY_HANDLER)(
-  IN NDIS_HANDLE  ProtocolBindingContext,
-  IN PCO_ADDRESS_FAMILY  AddressFamily);
+  /*IN*/ NDIS_HANDLE  ProtocolBindingContext,
+  /*IN*/ PCO_ADDRESS_FAMILY  AddressFamily);
 
 #ifdef __cplusplus \
 
@@ -1511,203 +1524,205 @@
 VOID
 DDKAPI
 NdisAllocateBuffer(
-  OUT PNDIS_STATUS  Status,
-  OUT PNDIS_BUFFER  *Buffer,
-  IN NDIS_HANDLE  PoolHandle,
-  IN PVOID  VirtualAddress,
-  IN UINT  Length);
+  /*OUT*/ PNDIS_STATUS  Status,
+  /*OUT*/ PNDIS_BUFFER  *Buffer,
+  /*IN*/ NDIS_HANDLE  PoolHandle,
+  /*IN*/ PVOID  VirtualAddress,
+  /*IN*/ UINT  Length);
 
 
 NDISAPI
 VOID
 DDKAPI
 NdisAllocateBufferPool(
-  OUT PNDIS_STATUS  Status,
-  OUT PNDIS_HANDLE  PoolHandle,
-  IN UINT  NumberOfDescriptors);
+  /*OUT*/ PNDIS_STATUS  Status,
+  /*OUT*/ PNDIS_HANDLE  PoolHandle,
+  /*IN*/ UINT  NumberOfDescriptors);
 
 NDISAPI
 VOID
 DDKAPI
 NdisAllocatePacket(
-  OUT PNDIS_STATUS  Status,
-  OUT PNDIS_PACKET  *Packet,
-  IN NDIS_HANDLE  PoolHandle);