Anda di halaman 1dari 159

/**

* @file kbdmou.h
* Copyright 2012, 2013 MinGW.org project
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/* Created by Casper S. Hornstrup <chorns@users.sourceforge.net> */
#ifndef __KBDMOU_H
#define __KBDMOU_H
#pragma GCC system_header
#include <_mingw.h>
/*
* Structures and definitions for Keyboard/Mouse class and port drivers.
*/
#include <ddk/ntddkbd.h>
#include <ddk/ntddmou.h>
#define
#define
#define
#define
#define
#define

DD_KEYBOARD_PORT_DEVICE_NAME
DD_KEYBOARD_PORT_DEVICE_NAME_U
DD_KEYBOARD_PORT_BASE_NAME_U
DD_POINTER_PORT_DEVICE_NAME
DD_POINTER_PORT_DEVICE_NAME_U
DD_POINTER_PORT_BASE_NAME_U

#define DD_KEYBOARD_CLASS_BASE_NAME_U
#define DD_POINTER_CLASS_BASE_NAME_U

"\\Device\\KeyboardPort"
L"\\Device\\KeyboardPort"
L"KeyboardPort"
"\\Device\\PointerPort"
L"\\Device\\PointerPort"
L"PointerPort"
L"KeyboardClass"
L"PointerClass"

#define DD_KEYBOARD_RESOURCE_CLASS_NAME_U
L"Keyboard"
#define DD_POINTER_RESOURCE_CLASS_NAME_U
L"Pointer"
#define DD_KEYBOARD_MOUSE_COMBO_RESOURCE_CLASS_NAME_U L"Keyboard/Pointer"
#define POINTER_PORTS_MAXIMUM
#define KEYBOARD_PORTS_MAXIMUM

8
8

#define
#define
#define
#define

0x0000
0x0001
0x0002
0x0004

KBDMOU_COULD_NOT_SEND_COMMAND
KBDMOU_COULD_NOT_SEND_PARAM
KBDMOU_NO_RESPONSE
KBDMOU_INCORRECT_RESPONSE

#define I8042_ERROR_VALUE_BASE
#define INPORT_ERROR_VALUE_BASE

1000
2000

#define SERIAL_MOUSE_ERROR_VALUE_BASE

3000

#define IOCTL_INTERNAL_KEYBOARD_CONNECT \
CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_INTERNAL_KEYBOARD_DISCONNECT \
CTL_CODE(FILE_DEVICE_KEYBOARD,0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_INTERNAL_KEYBOARD_ENABLE \
CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_INTERNAL_KEYBOARD_DISABLE \
CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_INTERNAL_MOUSE_CONNECT \
CTL_CODE(FILE_DEVICE_MOUSE, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_INTERNAL_MOUSE_DISCONNECT \
CTL_CODE(FILE_DEVICE_MOUSE, 0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_INTERNAL_MOUSE_ENABLE \
CTL_CODE(FILE_DEVICE_MOUSE, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_INTERNAL_MOUSE_DISABLE \
CTL_CODE(FILE_DEVICE_MOUSE, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS)
typedef struct _CONNECT_DATA {
PDEVICE_OBJECT ClassDeviceObject;
PVOID ClassService;
} CONNECT_DATA, *PCONNECT_DATA;
typedef VOID
(STDAPICALLTYPE *PSERVICE_CALLBACK_ROUTINE)(
/*IN*/ PVOID NormalContext,
/*IN*/ PVOID SystemArgument1,
/*IN*/ PVOID SystemArgument2,
/*IN OUT*/ PVOID SystemArgument3);
#endif /* __KBDMOU_H */
2:( B  lJFIFHHAdobed   

p"?

 

3!1AQa"q 2 B#$Rb34r C% Scs5 &D TdEt6Ue uF' Vfv

7GWgw

?

11x
jkso\
l h qUJck*6ME
Eu ` c?f M*27Mjc
 C"]k7t
n ?=&PbOc   K [= z

 $.' ",#(7),01444'9=82<.342C

2!!22222222222222222222222222222222222222222222222222
 "
}!1AQa"q2 #BR$3br
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz
w!1AQaq"2B
#3Rbr
$4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz

?(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(

(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(

(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(

(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(

(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(

(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
j %r > u'R j7{ $ cj
-K/Z I+ ;6zE v "[g v

onV= >~F5k<K[-C

1S  w la v i|P1
GB m\oQ^qRS)d
clnW<
f'.[j_2
?d V
V+
W
dN
vWyj_
mQY>i
zW SfX
?%G:I>WY
1 W7 <)
Ct}{J
GQY (  c } =

~\g ] Z _*  W Rvl +)[ (0 B`

Vg(2 M] kZn do5K`<>

Y Q RW6s]/ ?|>0g 8 n7;A z*pTF J

( 9B ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC 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. See the
GNU General Public License for more details.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef _IMMINTRIN_H_INCLUDED
# error "Never use <fmaintrin.h> directly; include <immintrin.h> instead."
#endif
#ifndef _FMAINTRIN_H_INCLUDED
#define _FMAINTRIN_H_INCLUDED
#ifndef __FMA__
# error "FMA instruction set not enabled"
#else
extern __inline __m128d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fmadd_pd (__m128d __A, __m128d __B, __m128d __C)
{
return (__m128d)__builtin_ia32_vfmaddpd ((__v2df)__A, (__v2df)__B,
(__v2df)__C);
}
extern __inline __m256d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm256_fmadd_pd (__m256d __A, __m256d __B, __m256d __C)
{
return (__m256d)__builtin_ia32_vfmaddpd256 ((__v4df)__A, (__v4df)__B,
(__v4df)__C);
}
extern __inline __m128
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fmadd_ps (__m128 __A, __m128 __B, __m128 __C)
{
return (__m128)__builtin_ia32_vfmaddps ((__v4sf)__A, (__v4sf)__B,
(__v4sf)__C);
}
extern __inline __m256
__attribute__((__gnu_inline__, __always_inline__, __artificial__))

_mm256_fmadd_ps (__m256 __A, __m256 __B, __m256 __C)


{
return (__m256)__builtin_ia32_vfmaddps256 ((__v8sf)__A, (__v8sf)__B,
(__v8sf)__C);
}
extern __inline __m128d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fmadd_sd (__m128d __A, __m128d __B, __m128d __C)
{
return (__m128d) __builtin_ia32_vfmaddsd3 ((__v2df)__A, (__v2df)__B,
(__v2df)__C);
}
extern __inline __m128
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fmadd_ss (__m128 __A, __m128 __B, __m128 __C)
{
return (__m128) __builtin_ia32_vfmaddss3 ((__v4sf)__A, (__v4sf)__B,
(__v4sf)__C);
}
extern __inline __m128d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fmsub_pd (__m128d __A, __m128d __B, __m128d __C)
{
return (__m128d)__builtin_ia32_vfmaddpd ((__v2df)__A, (__v2df)__B,
-(__v2df)__C);
}
extern __inline __m256d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm256_fmsub_pd (__m256d __A, __m256d __B, __m256d __C)
{
return (__m256d)__builtin_ia32_vfmaddpd256 ((__v4df)__A, (__v4df)__B,
-(__v4df)__C);
}
extern __inline __m128
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fmsub_ps (__m128 __A, __m128 __B, __m128 __C)
{
return (__m128)__builtin_ia32_vfmaddps ((__v4sf)__A, (__v4sf)__B,
-(__v4sf)__C);
}
extern __inline __m256
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm256_fmsub_ps (__m256 __A, __m256 __B, __m256 __C)
{
return (__m256)__builtin_ia32_vfmaddps256 ((__v8sf)__A, (__v8sf)__B,
-(__v8sf)__C);
}
extern __inline __m128d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fmsub_sd (__m128d __A, __m128d __B, __m128d __C)
{
return (__m128d)__builtin_ia32_vfmaddsd3 ((__v2df)__A, (__v2df)__B,
-(__v2df)__C);

}
extern __inline __m128
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fmsub_ss (__m128 __A, __m128 __B, __m128 __C)
{
return (__m128)__builtin_ia32_vfmaddss3 ((__v4sf)__A, (__v4sf)__B,
-(__v4sf)__C);
}
extern __inline __m128d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fnmadd_pd (__m128d __A, __m128d __B, __m128d __C)
{
return (__m128d)__builtin_ia32_vfmaddpd (-(__v2df)__A, (__v2df)__B,
(__v2df)__C);
}
extern __inline __m256d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm256_fnmadd_pd (__m256d __A, __m256d __B, __m256d __C)
{
return (__m256d)__builtin_ia32_vfmaddpd256 (-(__v4df)__A, (__v4df)__B,
(__v4df)__C);
}
extern __inline __m128
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fnmadd_ps (__m128 __A, __m128 __B, __m128 __C)
{
return (__m128)__builtin_ia32_vfmaddps (-(__v4sf)__A, (__v4sf)__B,
(__v4sf)__C);
}
extern __inline __m256
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm256_fnmadd_ps (__m256 __A, __m256 __B, __m256 __C)
{
return (__m256)__builtin_ia32_vfmaddps256 (-(__v8sf)__A, (__v8sf)__B,
(__v8sf)__C);
}
extern __inline __m128d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fnmadd_sd (__m128d __A, __m128d __B, __m128d __C)
{
return (__m128d)__builtin_ia32_vfmaddsd3 ((__v2df)__A, -(__v2df)__B,
(__v2df)__C);
}
extern __inline __m128
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fnmadd_ss (__m128 __A, __m128 __B, __m128 __C)
{
return (__m128)__builtin_ia32_vfmaddss3 ((__v4sf)__A, -(__v4sf)__B,
(__v4sf)__C);
}
extern __inline __m128d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))

_mm_fnmsub_pd (__m128d __A, __m128d __B, __m128d __C)


{
return (__m128d)__builtin_ia32_vfmaddpd (-(__v2df)__A, (__v2df)__B,
-(__v2df)__C);
}
extern __inline __m256d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm256_fnmsub_pd (__m256d __A, __m256d __B, __m256d __C)
{
return (__m256d)__builtin_ia32_vfmaddpd256 (-(__v4df)__A, (__v4df)__B,
-(__v4df)__C);
}
extern __inline __m128
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fnmsub_ps (__m128 __A, __m128 __B, __m128 __C)
{
return (__m128)__builtin_ia32_vfmaddps (-(__v4sf)__A, (__v4sf)__B,
-(__v4sf)__C);
}
extern __inline __m256
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm256_fnmsub_ps (__m256 __A, __m256 __B, __m256 __C)
{
return (__m256)__builtin_ia32_vfmaddps256 (-(__v8sf)__A, (__v8sf)__B,
-(__v8sf)__C);
}
extern __inline __m128d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fnmsub_sd (__m128d __A, __m128d __B, __m128d __C)
{
return (__m128d)__builtin_ia32_vfmaddsd3 ((__v2df)__A, -(__v2df)__B,
-(__v2df)__C);
}
extern __inline __m128
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fnmsub_ss (__m128 __A, __m128 __B, __m128 __C)
{
return (__m128)__builtin_ia32_vfmaddss3 ((__v4sf)__A, -(__v4sf)__B,
-(__v4sf)__C);
}
extern __inline __m128d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fmaddsub_pd (__m128d __A, __m128d __B, __m128d __C)
{
return (__m128d)__builtin_ia32_vfmaddsubpd ((__v2df)__A, (__v2df)__B,
(__v2df)__C);
}
extern __inline __m256d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm256_fmaddsub_pd (__m256d __A, __m256d __B, __m256d __C)
{
return (__m256d)__builtin_ia32_vfmaddsubpd256 ((__v4df)__A,
(__v4df)__B,

(__v4df)__C);

extern __inline __m128


__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fmaddsub_ps (__m128 __A, __m128 __B, __m128 __C)
{
return (__m128)__builtin_ia32_vfmaddsubps ((__v4sf)__A, (__v4sf)__B,
(__v4sf)__C);
}
extern __inline __m256
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm256_fmaddsub_ps (__m256 __A, __m256 __B, __m256 __C)
{
return (__m256)__builtin_ia32_vfmaddsubps256 ((__v8sf)__A,
(__v8sf)__B,
(__v8sf)__C);
}
extern __inline __m128d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fmsubadd_pd (__m128d __A, __m128d __B, __m128d __C)
{
return (__m128d)__builtin_ia32_vfmaddsubpd ((__v2df)__A, (__v2df)__B,
-(__v2df)__C);
}
extern __inline __m256d
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm256_fmsubadd_pd (__m256d __A, __m256d __B, __m256d __C)
{
return (__m256d)__builtin_ia32_vfmaddsubpd256 ((__v4df)__A,
(__v4df)__B,
-(__v4df)__C);
}
extern __inline __m128
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_fmsubadd_ps (__m128 __A, __m128 __B, __m128 __C)
{
return (__m128)__builtin_ia32_vfmaddsubps ((__v4sf)__A, (__v4sf)__B,
-(__v4sf)__C);
}
extern __inline __m256
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm256_fmsubadd_ps (__m256 __A, __m256 __B, __m256 __C)
{
return (__m256)__builtin_ia32_vfmaddsubps256 ((__v8sf)__A,
(__v8sf)__B,
-(__v8sf)__C);
}
#endif
#endif


? ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (

vv\H6a

2`;W#i0f > dt k? M_O fx]=O[RM6k;~ya@?p

;T |
s
K~&k
?
~_4_/`$xGe\B
h  v
|WA
*</? k mt 3# j m
s? 9QKmq%O1I# J08 x" $ T A ;SS+

OW[y#M
x
bFI
H]
8%B
F{dgSBgTWj
## cXS~ k 
y 7Z! { xX6OT8#>q= P "24 s3
]
Nr1 ;QE1Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q

j^ J Ts vCJ7Z

*1l
@3{t g5{Y

;Le H 6 8H

d'Z( ( ( ( ( ( ( ( ( ( ( ( ( ( (

A
l@
K)'1r+:/f
y;Z= & ds  2  
\qX2
++MF/a
Z WA09SW
o?4.S
( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (

#8>n4
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
u6 MQZ

Q @Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q

s?;
ghQ Am(ig
< gD A]
@;8
x =
ZjA
ip;t
ud#

ew-
yL[$:d|Xg
FqME S$E
(j :(
__ -8( ( ( (m 5} 1"K ?Mk g

?tF
p
l{ s [[A<
U`
~{
|p9zm
QPPQE
L"I
QEQE
QEoK%5{-JQ
b'jU']
.#Y*Y0dz6ihz
a q
HA
{nH Ul
cym
 Fx L

1'

#<2j &$nT `:*9$ aH


G> igk 6dPF''
8  5j6&ESQEQEQE0>3t wP|;w2[ vs g3Tk~=i_f6 "Bylbm  Fq?.;
jQE
(
(
(
._xWu ) 9F/A/A =t4
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
u6 MQZ Q @Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q// Custom pointer adapter and sample storage pol
//
//
//
//
//
//
//

Copyright (C) 2008-2013 Free Software Foundation, Inc.

//
//
//
//

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. See the
GNU General Public License for more details.

This file is part of the GNU ISO C++ Library. This library is free
software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the
Free Software Foundation; either version 3, or (at your option)
any later version.

// Under Section 7 of GPL version 3, you are granted additional


// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
//
//
//

You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>.

/**
* @file ext/pointer.h
* This file is a GNU extension to the Standard C++ Library.
*
* @author Bob Walters
*
* Provides reusable _Pointer_adapter for assisting in the development of
* custom pointer types that can be used with the standard containers via
* the allocator::pointer and allocator::const_pointer typedefs.
*/
#ifndef _POINTER_H

#define _POINTER_H 1
#pragma GCC system_header
#include <iosfwd>
#include <bits/stl_iterator_base_types.h>
#include <ext/cast.h>
#include <ext/type_traits.h>
#if __cplusplus >= 201103L
# include <bits/move.h>
# include <bits/ptr_traits.h>
#endif
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @brief A storage policy for use with _Pointer_adapter<> which yields a
*
standard pointer.
*
* A _Storage_policy is required to provide 4 things:
*
1) A get() API for returning the stored pointer value.
*
2) An set() API for storing a pointer value.
*
3) An element_type typedef to define the type this points to.
*
4) An operator<() to support pointer comparison.
*
5) An operator==() to support pointer comparison.
*/
template<typename _Tp>
class _Std_pointer_impl
{
public:
// the type this pointer points to.
typedef _Tp element_type;
// A method to fetch the pointer value as a standard T* value;
inline _Tp*
get() const
{ return _M_value; }
// A method to set the pointer value, from a standard T* value;
inline void
set(element_type* __arg)
{ _M_value = __arg; }
// Comparison of pointers
inline bool
operator<(const _Std_pointer_impl& __rarg) const
{ return (_M_value < __rarg._M_value); }
inline bool
operator==(const _Std_pointer_impl& __rarg) const
{ return (_M_value == __rarg._M_value); }
private:
element_type* _M_value;
};
/**
* @brief A storage policy for use with _Pointer_adapter<> which stores

*
the pointer's address as an offset value which is relative to
*
its own address.
*
* This is intended for pointers within shared memory regions which
* might be mapped at different addresses by different processes.
* For null pointers, a value of 1 is used. (0 is legitimate
* sometimes for nodes in circularly linked lists) This value was
* chosen as the least likely to generate an incorrect null, As
* there is no reason why any normal pointer would point 1 byte into
* its own pointer address.
*/
template<typename _Tp>
class _Relative_pointer_impl
{
public:
typedef _Tp element_type;
_Tp*
get() const
{
if (_M_diff == 1)
return 0;
else
return reinterpret_cast<_Tp*>(reinterpret_cast<_UIntPtrType>(this)
+ _M_diff);
}
void
set(_Tp* __arg)
{
if (!__arg)
_M_diff = 1;
else
_M_diff = reinterpret_cast<_UIntPtrType>(__arg)
- reinterpret_cast<_UIntPtrType>(this);
}
// Comparison of pointers
inline bool
operator<(const _Relative_pointer_impl& __rarg) const
{ return (reinterpret_cast<_UIntPtrType>(this->get())
< reinterpret_cast<_UIntPtrType>(__rarg.get())); }
inline bool
operator==(const _Relative_pointer_impl& __rarg) const
{ return (reinterpret_cast<_UIntPtrType>(this->get())
== reinterpret_cast<_UIntPtrType>(__rarg.get())); }
private:
#ifdef _GLIBCXX_USE_LONG_LONG
typedef __gnu_cxx::__conditional_type<
(sizeof(unsigned long) >= sizeof(void*)),
unsigned long, unsigned long long>::__type _UIntPtrType;
#else
typedef unsigned long _UIntPtrType;
#endif
_UIntPtrType _M_diff;
};
/**

* Relative_pointer_impl needs a specialization for const T because of


* the casting done during pointer arithmetic.
*/
template<typename _Tp>
class _Relative_pointer_impl<const _Tp>
{
public:
typedef const _Tp element_type;
const _Tp*
get() const
{
if (_M_diff == 1)
return 0;
else
return reinterpret_cast<const _Tp*>
(reinterpret_cast<_UIntPtrType>(this) + _M_diff);
}
void
set(const _Tp* __arg)
{
if (!__arg)
_M_diff = 1;
else
_M_diff = reinterpret_cast<_UIntPtrType>(__arg)
- reinterpret_cast<_UIntPtrType>(this);
}
// Comparison of pointers
inline bool
operator<(const _Relative_pointer_impl& __rarg) const
{ return (reinterpret_cast<_UIntPtrType>(this->get())
< reinterpret_cast<_UIntPtrType>(__rarg.get())); }
inline bool
operator==(const _Relative_pointer_impl& __rarg) const
{ return (reinterpret_cast<_UIntPtrType>(this->get())
== reinterpret_cast<_UIntPtrType>(__rarg.get())); }
private:
#ifdef _GLIBCXX_USE_LONG_LONG
typedef __gnu_cxx::__conditional_type<
(sizeof(unsigned long) >= sizeof(void*)),
unsigned long, unsigned long long>::__type _UIntPtrType;
#else
typedef unsigned long _UIntPtrType;
#endif
_UIntPtrType _M_diff;
};
/**
* The specialization on this type helps resolve the problem of
* reference to void, and eliminates the need to specialize
* _Pointer_adapter for cases of void*, const void*, and so on.
*/
struct _Invalid_type { };
template<typename _Tp>
struct _Reference_type

{ typedef _Tp& reference; };


template<>
struct _Reference_type<void>
{ typedef _Invalid_type& reference; };
template<>
struct _Reference_type<const void>
{ typedef const _Invalid_type& reference; };
template<>
struct _Reference_type<volatile void>
{ typedef volatile _Invalid_type& reference; };
template<>
struct _Reference_type<volatile const void>
{ typedef const volatile _Invalid_type& reference; };
/**
* This structure accommodates the way in which
* std::iterator_traits<> is normally specialized for const T*, so
* that value_type is still T.
*/
template<typename _Tp>
struct _Unqualified_type
{ typedef _Tp type; };
template<typename _Tp>
struct _Unqualified_type<const _Tp>
{ typedef _Tp type; };
/**
* The following provides an 'alternative pointer' that works with
* the containers when specified as the pointer typedef of the
* allocator.
*
* The pointer type used with the containers doesn't have to be this
* class, but it must support the implicit conversions, pointer
* arithmetic, comparison operators, etc. that are supported by this
* class, and avoid raising compile-time ambiguities. Because
* creating a working pointer can be challenging, this pointer
* template was designed to wrapper an easier storage policy type,
* so that it becomes reusable for creating other pointer types.
*
* A key point of this class is also that it allows container
* writers to 'assume' Allocator::pointer is a typedef for a normal
* pointer. This class supports most of the conventions of a true
* pointer, and can, for instance handle implicit conversion to
* const and base class pointer types. The only impositions on
* container writers to support extended pointers are: 1) use the
* Allocator::pointer typedef appropriately for pointer types. 2)
* if you need pointer casting, use the __pointer_cast<> functions
* from ext/cast.h. This allows pointer cast operations to be
* overloaded as necessary by custom pointers.
*
* Note: The const qualifier works with this pointer adapter as
* follows:
*
* _Tp*
== _Pointer_adapter<_Std_pointer_impl<_Tp> >;
* const _Tp*
== _Pointer_adapter<_Std_pointer_impl<const _Tp> >;

* _Tp* const
== const _Pointer_adapter<_Std_pointer_impl<_Tp> >;
* const _Tp* const == const _Pointer_adapter<_Std_pointer_impl<const _Tp> >;
*/
template<typename _Storage_policy>
class _Pointer_adapter : public _Storage_policy
{
public:
typedef typename _Storage_policy::element_type element_type;
// These are needed for iterator_traits
typedef std::random_access_iterator_tag
iterator_category;
typedef typename _Unqualified_type<element_type>::type value_type;
typedef std::ptrdiff_t
difference_type;
typedef _Pointer_adapter
pointer;
typedef typename _Reference_type<element_type>::reference reference;
// Reminder: 'const' methods mean that the method is valid when the
// pointer is immutable, and has nothing to do with whether the
// 'pointee' is const.
// Default Constructor (Convert from element_type*)
_Pointer_adapter(element_type* __arg = 0)
{ _Storage_policy::set(__arg); }
// Copy constructor from _Pointer_adapter of same type.
_Pointer_adapter(const _Pointer_adapter& __arg)
{ _Storage_policy::set(__arg.get()); }
// Convert from _Up* if conversion to element_type* is valid.
template<typename _Up>
_Pointer_adapter(_Up* __arg)
{ _Storage_policy::set(__arg); }
// Conversion from another _Pointer_adapter if _Up if static cast is
// valid.
template<typename _Up>
_Pointer_adapter(const _Pointer_adapter<_Up>& __arg)
{ _Storage_policy::set(__arg.get()); }
// Destructor
~_Pointer_adapter() { }
// Assignment operator
_Pointer_adapter&
operator=(const _Pointer_adapter& __arg)
{
_Storage_policy::set(__arg.get());
return *this;
}
template<typename _Up>
_Pointer_adapter&
operator=(const _Pointer_adapter<_Up>& __arg)
{
_Storage_policy::set(__arg.get());
return *this;
}
template<typename _Up>
_Pointer_adapter&

operator=(_Up* __arg)
{
_Storage_policy::set(__arg);
return *this;
}
// Operator*, returns element_type&
inline reference
operator*() const
{ return *(_Storage_policy::get()); }
// Operator->, returns element_type*
inline element_type*
operator->() const
{ return _Storage_policy::get(); }
// Operator[], returns a element_type& to the item at that loc.
inline reference
operator[](std::ptrdiff_t __index) const
{ return _Storage_policy::get()[__index]; }
// To allow implicit conversion to "bool", for "if (ptr)..."
private:
typedef element_type*(_Pointer_adapter::*__unspecified_bool_type)() const;
public:
operator __unspecified_bool_type() const
{
return _Storage_policy::get() == 0 ? 0 :
&_Pointer_adapter::operator->;
}
// ! operator (for: if (!ptr)...)
inline bool
operator!() const
{ return (_Storage_policy::get() == 0); }
// Pointer differences
inline friend std::ptrdiff_t
operator-(const _Pointer_adapter& __lhs, element_type* __rhs)
{ return (__lhs.get() - __rhs); }
inline friend std::ptrdiff_t
operator-(element_type* __lhs, const _Pointer_adapter& __rhs)
{ return (__lhs - __rhs.get()); }
template<typename _Up>
inline friend std::ptrdiff_t
operator-(const _Pointer_adapter& __lhs, _Up* __rhs)
{ return (__lhs.get() - __rhs); }
template<typename _Up>
inline friend std::ptrdiff_t
operator-(_Up* __lhs, const _Pointer_adapter& __rhs)
{ return (__lhs - __rhs.get()); }
template<typename _Up>
inline std::ptrdiff_t
operator-(const _Pointer_adapter<_Up>& __rhs) const
{ return (_Storage_policy::get() - __rhs.get()); }

//
//
//
//
//
//

Pointer math
Note: There is a reason for all this overloading based on different
integer types. In some libstdc++-v3 test cases, a templated
operator+ is declared which can match any types. This operator
tends to "steal" the recognition of _Pointer_adapter's own operator+
unless the integer type matches perfectly.

#define _CXX_POINTER_ARITH_OPERATOR_SET(INT_TYPE) \
inline friend _Pointer_adapter \
operator+(const _Pointer_adapter& __lhs, INT_TYPE __offset) \
{ return _Pointer_adapter(__lhs.get() + __offset); } \
\
inline friend _Pointer_adapter \
operator+(INT_TYPE __offset, const _Pointer_adapter& __rhs) \
{ return _Pointer_adapter(__rhs.get() + __offset); } \
\
inline friend _Pointer_adapter \
operator-(const _Pointer_adapter& __lhs, INT_TYPE __offset) \
{ return _Pointer_adapter(__lhs.get() - __offset); } \
\
inline _Pointer_adapter& \
operator+=(INT_TYPE __offset) \
{ \
_Storage_policy::set(_Storage_policy::get() + __offset); \
return *this; \
} \
\
inline _Pointer_adapter& \
operator-=(INT_TYPE __offset) \
{ \
_Storage_policy::set(_Storage_policy::get() - __offset); \
return *this; \
} \
// END of _CXX_POINTER_ARITH_OPERATOR_SET macro
// Expand into the various pointer arithmetic operators needed.
_CXX_POINTER_ARITH_OPERATOR_SET(short);
_CXX_POINTER_ARITH_OPERATOR_SET(unsigned short);
_CXX_POINTER_ARITH_OPERATOR_SET(int);
_CXX_POINTER_ARITH_OPERATOR_SET(unsigned int);
_CXX_POINTER_ARITH_OPERATOR_SET(long);
_CXX_POINTER_ARITH_OPERATOR_SET(unsigned long);
// Mathematical Manipulators
inline _Pointer_adapter&
operator++()
{
_Storage_policy::set(_Storage_policy::get() + 1);
return *this;
}
inline _Pointer_adapter
operator++(int)
{
_Pointer_adapter tmp(*this);
_Storage_policy::set(_Storage_policy::get() + 1);
return tmp;
}

inline _Pointer_adapter&
operator--()
{
_Storage_policy::set(_Storage_policy::get() - 1);
return *this;
}
inline _Pointer_adapter
operator--(int)
{
_Pointer_adapter tmp(*this);
_Storage_policy::set(_Storage_policy::get() - 1);
return tmp;
}
}; // class _Pointer_adapter
#define _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(OPERATOR) \
template<typename _Tp1, typename _Tp2> \
inline bool \
operator OPERATOR(const _Pointer_adapter<_Tp1>& __lhs, _Tp2 __rhs) \
{ return __lhs.get() OPERATOR __rhs; } \
\
template<typename _Tp1, typename _Tp2> \
inline bool \
operator OPERATOR(_Tp1 __lhs, const _Pointer_adapter<_Tp2>& __rhs) \
{ return __lhs OPERATOR __rhs.get(); } \
\
template<typename _Tp1, typename _Tp2> \
inline bool \
operator OPERATOR(const _Pointer_adapter<_Tp1>& __lhs, \
const _Pointer_adapter<_Tp2>& __rhs) \
{ return __lhs.get() OPERATOR __rhs.get(); } \
\
// End GCC_CXX_POINTER_COMPARISON_OPERATION_SET Macro
// Expand into the various comparison operators needed.
_GCC_CXX_POINTER_COMPARISON_OPERATION_SET(==)
_GCC_CXX_POINTER_COMPARISON_OPERATION_SET(!=)
_GCC_CXX_POINTER_COMPARISON_OPERATION_SET(<)
_GCC_CXX_POINTER_COMPARISON_OPERATION_SET(<=)
_GCC_CXX_POINTER_COMPARISON_OPERATION_SET(>)
_GCC_CXX_POINTER_COMPARISON_OPERATION_SET(>=)
// These are here for expressions like "ptr == 0", "ptr != 0"
template<typename _Tp>
inline bool
operator==(const _Pointer_adapter<_Tp>& __lhs, int __rhs)
{ return __lhs.get() == reinterpret_cast<void*>(__rhs); }
template<typename _Tp>
inline bool
operator==(int __lhs, const _Pointer_adapter<_Tp>& __rhs)
{ return __rhs.get() == reinterpret_cast<void*>(__lhs); }
template<typename _Tp>
inline bool
operator!=(const _Pointer_adapter<_Tp>& __lhs, int __rhs)
{ return __lhs.get() != reinterpret_cast<void*>(__rhs); }

template<typename _Tp>
inline bool
operator!=(int __lhs, const _Pointer_adapter<_Tp>& __rhs)
{ return __rhs.get() != reinterpret_cast<void*>(__lhs); }
/**
* Comparison operators for _Pointer_adapter defer to the base class'
* comparison operators, when possible.
*/
template<typename _Tp>
inline bool
operator==(const _Pointer_adapter<_Tp>& __lhs,
const _Pointer_adapter<_Tp>& __rhs)
{ return __lhs._Tp::operator==(__rhs); }
template<typename _Tp>
inline bool
operator<=(const _Pointer_adapter<_Tp>& __lhs,
const _Pointer_adapter<_Tp>& __rhs)
{ return __lhs._Tp::operator<(__rhs) || __lhs._Tp::operator==(__rhs); }
template<typename _Tp>
inline bool
operator!=(const _Pointer_adapter<_Tp>& __lhs,
const _Pointer_adapter<_Tp>& __rhs)
{ return !(__lhs._Tp::operator==(__rhs)); }
template<typename _Tp>
inline bool
operator>(const _Pointer_adapter<_Tp>& __lhs,
const _Pointer_adapter<_Tp>& __rhs)
{ return !(__lhs._Tp::operator<(__rhs) || __lhs._Tp::operator==(__rhs)); }
template<typename _Tp>
inline bool
operator>=(const _Pointer_adapter<_Tp>& __lhs,
const _Pointer_adapter<_Tp>& __rhs)
{ return !(__lhs._Tp::operator<(__rhs)); }
template<typename _CharT, typename _Traits, typename _StoreT>
inline std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
const _Pointer_adapter<_StoreT>& __p)
{ return (__os << __p.get()); }
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#if __cplusplus >= 201103L
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Storage_policy>
struct pointer_traits<__gnu_cxx::_Pointer_adapter<_Storage_policy>>
{
/// The pointer type
typedef __gnu_cxx::_Pointer_adapter<_Storage_policy>
pointer;
/// The type pointed to

typedef typename pointer::element_type


element_type;
/// Type used to represent the difference between two pointers
typedef typename pointer::difference_type
difference_type;
template<typename _Up>
using rebind = typename __gnu_cxx::_Pointer_adapter<
typename pointer_traits<_Storage_policy>::rebind<_Up>>;
static pointer pointer_to(typename pointer::reference __r) noexcept
{ return pointer(std::addressof(__r)); }

};

_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif
#endif // _POINTER_H
 k o K*s.v`0yB 8R H l KQN P 320 n

XVlm  2$Pwfh I4DCS^ W

0|"imH4PvgZ fkD
xab$# ;

T &M7M [.K| V;;;) il6 $ $("bR>,

'~=0b>
6%&7qGO8
(TjNV C\;B \?QV)n x"bQR
]OL vZC
4  }wM
*CC
 2 +d
2|<jO
EE YXI
L +
=Q H"El F cO  (;A qh


qaF91{FL^y@u-8
 J |C1  ' K
i& <B tN *8fZIMVdHF;]Ig iVC / 6J bSn"pe Rh *bD^ i :m
Z9k2 Q*X;cL$R )S'3 Z YS vzX} 9 ] UeY"ZWG;8G{ Y=>= 6 5;`|

cd>rG  <!5k % (H


!w58
s ["90p2-F
M 6_b qaF
g [ GyoOu%?xz
Lnlse_t

EA 3O/}3 }sut Nm S b>k

d <f8>(IH)(3 H * aasXf ?U4>R Mv

N B y.slbcs XG y

 a V
 
2-L
*h t
C";I r < cS O>Vh"i
{
C[|GKx!xGO-q?(p ~&EcqiXP :FR` E^[-< !8Xc2\

c0u'Y d+

)  [$ OfP< V,KAI H \kb LH&l  ZY'- A m.YgHq/ 3 W$e9p@  Q 1 H)=Kt/E


.Gvf
5m B 3 DP[)aBw2Hj cH@ fl0V

q

I@c%` n$RI-={  7WY C

U ZB.O ess{e$c^ H< N4Z' $V\+md_hZ) < %Jy

DIr2

$ Y<i N4b QQ

b2 d !5A
e
< ` Q.]

  / oUZ\#\6Le>hV P u ]Y QY @h|MD-| oP4{ 

 s",\'O g-2/K(Y=p
tb
%b !7+%
6RhtS2
 J
 %,% / ;o X HjF] E |n  @tmb
 #aw  - Z. k2D' 3ou>r s 9d674q8 tX:>=37I{ ,k

ER"C/ "}1S Z)ZP %Jt(\A@&fM

_'J.G{.1
`VWd q$ k i:c2 rTd# o>By_C6 = |O v &T ; hT*fz*an
C6so5Z8J 3 ' S  M 2 *' \  #"Xt_ p &,^v> ]?<n`^egw bNOy

-,rs
{ s&u
bA
Brp

r~ `
 ga_eG dkjhE4k V" 1s'7sA /\  4U| { N
80 <} M  M 8! z <T x# ps sE#&kV *

AI>]
6
Ash
%#
/H"
l!z
~
;;%
6_e
L
e
v-
/ Yz>(2h(i
hI wdES~=}$
t;
i
%t

Cj  tk
9{y
%%
U&
M %v
hq|
s N jqX
|
E182
P: x hmA KS =h 7>B g exw
[j , W~:]54 G R4' f.

Y ^eIn> <) /v\0 Qu%~ | /**


* @file d3d9.h
* Copyright 2012, 2013 MinGW.org project
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/* Written by Filip Navara <xnavara@volny.cz> */
#ifndef _D3D9_H
#define _D3D9_H
#pragma GCC system_header
#include <_mingw.h>
#ifndef DIRECT3D_VERSION
#define DIRECT3D_VERSION 0x0900
#endif
#if (DIRECT3D_VERSION >= 0x0900)
#include <objbase.h>
#include "d3d9types.h"
#include "d3d9caps.h"
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define

D3D_SDK_VERSION 31
D3DCREATE_FPU_PRESERVE 0x02
D3DCREATE_MULTITHREADED 0x04
D3DCREATE_PUREDEVICE
0x10
D3DCREATE_SOFTWARE_VERTEXPROCESSING
0x20
D3DCREATE_HARDWARE_VERTEXPROCESSING
0x40
D3DCREATE_MIXED_VERTEXPROCESSING
0x80
D3DSPD_IUNKNOWN 1
D3DSGR_NO_CALIBRATION 0
D3DSGR_CALIBRATE
1
MAKE_D3DHRESULT(code) MAKE_HRESULT(1,0x876,code)
MAKE_D3DSTATUS(code)
MAKE_HRESULT(0,0x876,code)
D3D_OK 0
D3DOK_NOAUTOGEN MAKE_D3DSTATUS(2159)
D3DERR_WRONGTEXTUREFORMAT
MAKE_D3DHRESULT(2072)
D3DERR_UNSUPPORTEDCOLOROPERATION
MAKE_D3DHRESULT(2073)
D3DERR_UNSUPPORTEDCOLORARG
MAKE_D3DHRESULT(2074)
D3DERR_UNSUPPORTEDALPHAOPERATION
MAKE_D3DHRESULT(2075)
D3DERR_UNSUPPORTEDALPHAARG
MAKE_D3DHRESULT(2076)
D3DERR_TOOMANYOPERATIONS
MAKE_D3DHRESULT(2077)
D3DERR_CONFLICTINGTEXTUREFILTER MAKE_D3DHRESULT(2078)

#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define

D3DERR_UNSUPPORTEDFACTORVALUE MAKE_D3DHRESULT(2079)
D3DERR_CONFLICTINGRENDERSTATE MAKE_D3DHRESULT(2081)
D3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_D3DHRESULT(2082)
D3DERR_CONFLICTINGTEXTUREPALETTE
MAKE_D3DHRESULT(2086)
D3DERR_DRIVERINTERNALERROR
MAKE_D3DHRESULT(2087)
D3DERR_NOTFOUND MAKE_D3DHRESULT(2150)
D3DERR_MOREDATA MAKE_D3DHRESULT(2151)
D3DERR_DEVICELOST
MAKE_D3DHRESULT(2152)
D3DERR_DEVICENOTRESET MAKE_D3DHRESULT(2153)
D3DERR_NOTAVAILABLE
MAKE_D3DHRESULT(2154)
D3DERR_OUTOFVIDEOMEMORY MAKE_D3DHRESULT(380)
D3DERR_INVALIDDEVICE
MAKE_D3DHRESULT(2155)
D3DERR_INVALIDCALL
MAKE_D3DHRESULT(2156)
D3DERR_DRIVERINVALIDCALL
MAKE_D3DHRESULT(2157)
D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540)
D3DADAPTER_DEFAULT
0
D3DCURSOR_IMMEDIATE_UPDATE
1
D3DENUM_HOST_ADAPTER
1
D3DPRESENTFLAG_LOCKABLE_BACKBUFFER
1
D3DPV_DONOTCOPYDATA
1
D3DENUM_NO_WHQL_LEVEL 2
D3DPRESENT_BACK_BUFFERS_MAX
3
VALID_D3DENUM_FLAGS
3
D3DMAXNUMPRIMITIVES
0xFFFF
D3DMAXNUMVERTICES
0xFFFF
D3DCURRENT_DISPLAY_MODE 0xEFFFFF

#ifdef __cplusplus
extern "C" {
#endif
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern
extern

const
const
const
const
const
const
const
const
const
const
const
const
const
const
const
const
const

GUID
GUID
GUID
GUID
GUID
GUID
GUID
GUID
GUID
GUID
GUID
GUID
GUID
GUID
GUID
GUID
GUID

IID_IDirect3D9;
IID_IDirect3DDevice9;
IID_IDirect3DVolume9;
IID_IDirect3DSwapChain9;
IID_IDirect3DResource9;
IID_IDirect3DSurface9;
IID_IDirect3DVertexBuffer9;
IID_IDirect3DIndexBuffer9;
IID_IDirect3DBaseTexture9;
IID_IDirect3DCubeTexture9;
IID_IDirect3DTexture9;
IID_IDirect3DVolumeTexture9;
IID_IDirect3DVertexDeclaration9;
IID_IDirect3DVertexShader9;
IID_IDirect3DPixelShader9;
IID_IDirect3DStateBlock9;
IID_IDirect3DQuery9;

#ifdef __cplusplus
};
#endif
typedef
typedef
typedef
typedef
typedef
typedef
typedef

_COM_interface
_COM_interface
_COM_interface
_COM_interface
_COM_interface
_COM_interface
_COM_interface

IDirect3D9 IDirect3D9;
IDirect3DDevice9 IDirect3DDevice9;
IDirect3DVolume9 IDirect3DVolume9;
IDirect3DSwapChain9 IDirect3DSwapChain9;
IDirect3DResource9 IDirect3DResource9;
IDirect3DSurface9 IDirect3DSurface9;
IDirect3DVertexBuffer9 IDirect3DVertexBuffer9;

typedef
typedef
typedef
typedef
typedef
typedef
typedef
typedef
typedef
typedef

_COM_interface
_COM_interface
_COM_interface
_COM_interface
_COM_interface
_COM_interface
_COM_interface
_COM_interface
_COM_interface
_COM_interface

IDirect3DIndexBuffer9 IDirect3DIndexBuffer9;
IDirect3DBaseTexture9 IDirect3DBaseTexture9;
IDirect3DCubeTexture9 IDirect3DCubeTexture9;
IDirect3DTexture9 IDirect3DTexture9;
IDirect3DVolumeTexture9 IDirect3DVolumeTexture9;
IDirect3DVertexDeclaration9 IDirect3DVertexDeclaration9;
IDirect3DVertexShader9 IDirect3DVertexShader9;
IDirect3DPixelShader9 IDirect3DPixelShader9;
IDirect3DStateBlock9 IDirect3DStateBlock9;
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*) P
URE;
STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT,D3DDISPLAYMODE*) PURE;
STDMETHOD(CheckDeviceType)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,D3DFORMAT,BOO
L) PURE;
STDMETHOD(CheckDeviceFormat)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,DWORD,D3DRE
SOURCETYPE,D3DFORMAT) PURE;
STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,BO
OL,D3DMULTISAMPLE_TYPE,DWORD*) PURE;
STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,D3DFOR
MAT,D3DFORMAT) PURE;
STDMETHOD(CheckDeviceFormatConversion)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,D
3DFORMAT) PURE;
STDMETHOD(GetDeviceCaps)(THIS_ UINT,D3DDEVTYPE,D3DCAPS9*) PURE;
STDMETHOD_(HMONITOR,GetAdapterMonitor)(THIS_ UINT) PURE;
STDMETHOD(CreateDevice)(THIS_ UINT,D3DDEVTYPE,HWND,DWORD,D3DPRESENT_PARA
METERS*,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->RegisterSoftwareDev
ice(p,a)
#define IDirect3D9_GetAdapterCount(p) (p)->lpVtbl->GetAdapterCount(p)
#define IDirect3D9_GetAdapterIdentifier(p,a,b,c)
(p)->lpVtbl->GetAdapterI
dentifier(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->GetAdapterDisplayMo
de(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->CheckDevice
Format(p,a,b,c,d,e,f)
#define IDirect3D9_CheckDeviceMultiSampleType(p,a,b,c,d,e,f)
(p)->lpVtbl->Che
ckDeviceMultiSampleType(p,a,b,c,d,e,f)
#define IDirect3D9_CheckDepthStencilMatch(p,a,b,c,d,e) (p)->lpVtbl->CheckDepthS
tencilMatch(p,a,b,c,d,e)
#define IDirect3D9_CheckDeviceFormatConversion(p,a,b,c,d)
(p)->lpVtbl->Che
ckDeviceFormatConversion(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)->GetAdapterIdentifie
r(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)->CheckDevice
MultiSampleType(a,b,c,d,e,f)
#define IDirect3D9_CheckDepthStencilMatch(p,a,b,c,d,e) (p)->CheckDepthStencilMa
tch(a,b,c,d,e)
#define IDirect3D9_CheckDeviceFormatConversion(p,a,b,c,d)
(p)->CheckDevice
FormatConversion(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*) P
URE;
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*,IDirec
t3DSwapChain9**) PURE;

RE;

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*) PU

STDMETHOD(GetBackBuffer)(THIS_ UINT,UINT,D3DBACKBUFFER_TYPE,IDirect3DSur
face9**) 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,ID
irect3DTexture9**,HANDLE*) PURE;
STDMETHOD(CreateVolumeTexture)(THIS_ UINT,UINT,UINT,UINT,DWORD,D3DFORMAT
,D3DPOOL,IDirect3DVolumeTexture9**,HANDLE*) PURE;
STDMETHOD(CreateCubeTexture)(THIS_ UINT,UINT,DWORD,D3DFORMAT,D3DPOOL,IDi
rect3DCubeTexture9**, HANDLE*) PURE;
STDMETHOD(CreateVertexBuffer)(THIS_ UINT,DWORD,DWORD,D3DPOOL,IDirect3DVe
rtexBuffer9**, HANDLE*) PURE;
STDMETHOD(CreateIndexBuffer)(THIS_ UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3
DIndexBuffer9**,HANDLE*) PURE;
STDMETHOD(CreateRenderTarget)(THIS_ UINT,UINT,D3DFORMAT,D3DMULTISAMPLE_T
YPE,DWORD,BOOL,IDirect3DSurface9**,HANDLE*) PURE;
STDMETHOD(CreateDepthStencilSurface)(THIS_ UINT,UINT,D3DFORMAT,D3DMULTIS
AMPLE_TYPE,DWORD,BOOL,IDirect3DSurface9**,HANDLE*) PURE;
STDMETHOD(UpdateSurface)(THIS_ IDirect3DSurface9*,CONST RECT*,IDirect3DS
urface9*,CONST POINT*) PURE;
STDMETHOD(UpdateTexture)(THIS_ IDirect3DBaseTexture9*,IDirect3DBaseTextu
re9*) PURE;
STDMETHOD(GetRenderTargetData)(THIS_ IDirect3DSurface9*,IDirect3DSurface
9*) PURE;
STDMETHOD(GetFrontBufferData)(THIS_ UINT,IDirect3DSurface9*) PURE;
STDMETHOD(StretchRect)(THIS_ IDirect3DSurface9*,CONST RECT*,IDirect3DSur
face9*,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*) PU
RE;
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,DWO
RD*) PURE;
STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWO
RD) 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,UIN
T,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*,IDirec
t3DVertexDeclaration9**) PURE;
STDMETHOD(SetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9*) PURE
;
STDMETHOD(GetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9**) PUR
E;
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*,UIN
T*) PURE;

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**)

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->TestCoopera
tiveLevel(p)
#define IDirect3DDevice9_GetAvailableTextureMem(p)
(p)->lpVtbl->GetAvailabl
eTextureMem(p)
#define IDirect3DDevice9_EvictManagedResources(p)
(p)->lpVtbl->EvictManage
dResources(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->GetCreation
Parameters(p,a)
#define IDirect3DDevice9_SetCursorProperties(p,a,b,c) (p)->lpVtbl->SetCursorPr
operties(p,a,b,c)
#define IDirect3DDevice9_SetCursorPosition(p,a,b,c)
(p)->lpVtbl->SetCursorPo
sition(p,a,b,c)
#define IDirect3DDevice9_ShowCursor(p,a)
(p)->lpVtbl->ShowCursor(p,a)
#define IDirect3DDevice9_CreateAdditionalSwapChain(p,a,b)
(p)->lpVtbl->Cre
ateAdditionalSwapChain(p,a,b)
#define IDirect3DDevice9_GetSwapChain(p,a,b)
(p)->lpVtbl->GetSwapChain(p,a,b)
#define IDirect3DDevice9_GetNumberOfSwapChains(p)
(p)->lpVtbl->GetNumberOf
SwapChains(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->GetBackBuff
er(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->Cre
ateTexture(p,a,b,c,d,e,f,g,h)
#define IDirect3DDevice9_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)
(p)->lpV
tbl->CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)
#define IDirect3DDevice9_CreateCubeTexture(p,a,b,c,d,e,f,g)
(p)->lpVtbl->Cre
ateCubeTexture(p,a,b,c,d,e,f,g)
#define IDirect3DDevice9_CreateVertexBuffer(p,a,b,c,d,e,f)
(p)->lpVtbl->Cre
ateVertexBuffer(p,a,b,c,d,e,f)
#define IDirect3DDevice9_CreateIndexBuffer(p,a,b,c,d,e,f)
(p)->lpVtbl->Cre
ateIndexBuffer(p,a,b,c,d,e,f)
#define IDirect3DDevice9_CreateRenderTarget(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Cre
ateRenderTarget(p,a,b,c,d,e,f,g,h)
#define IDirect3DDevice9_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h) (p)->lpV
tbl->CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)
#define IDirect3DDevice9_UpdateSurface(p,a,b,c,d)
(p)->lpVtbl->UpdateSurfa
ce(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->GetRenderTa
rgetData(p,a,b)
#define IDirect3DDevice9_GetFrontBufferData(p,a,b)
(p)->lpVtbl->GetFrontBuf
ferData(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)->lpV
tbl->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->SetDepthSte
ncilSurface(p,a)
#define IDirect3DDevice9_GetDepthStencilSurface(p,a)
(p)->lpVtbl->GetDepthSte
ncilSurface(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->MultiplyTra
nsform(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->CreateState

Block(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->GetTextureS
tageState(p,a,b,c)
#define IDirect3DDevice9_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureS
tageState(p,a,b,c)
#define IDirect3DDevice9_GetSamplerState(p,a,b,c)
(p)->lpVtbl->GetSamplerS
tate(p,a,b,c)
#define IDirect3DDevice9_SetSamplerState(p,a,b,c)
(p)->lpVtbl->SetSamplerS
tate(p,a,b,c)
#define IDirect3DDevice9_ValidateDevice(p,a)
(p)->lpVtbl->ValidateDevice(p,a)
#define IDirect3DDevice9_SetPaletteEntries(p,a,b)
(p)->lpVtbl->SetPaletteE
ntries(p,a,b)
#define IDirect3DDevice9_GetPaletteEntries(p,a,b)
(p)->lpVtbl->GetPaletteE
ntries(p,a,b)
#define IDirect3DDevice9_SetCurrentTexturePalette(p,a) (p)->lpVtbl->SetCurrentT
exturePalette(p,a)
#define IDirect3DDevice9_GetCurrentTexturePalette(p,a) (p)->lpVtbl->GetCurrentT
exturePalette(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->Set
SoftwareVertexProcessing(p,a)
#define IDirect3DDevice9_GetSoftwareVertexProcessing(p) (p)->lpVtbl->GetSoftware
VertexProcessing(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->Dra
wIndexedPrimitive(p,a,b,c,d,e,f)
#define IDirect3DDevice9_DrawPrimitiveUP(p,a,b,c,d)
(p)->lpVtbl->DrawPrimiti
veUP(p,a,b,c,d)
#define IDirect3DDevice9_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)
(p)->lpV
tbl->DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)
#define IDirect3DDevice9_ProcessVertices(p,a,b,c,d,e,f) (p)->lpVtbl->ProcessVert
ices(p,a,b,c,d,e,f)
#define IDirect3DDevice9_CreateVertexDeclaration(p,a,b) (p)->lpVtbl->CreateVerte
xDeclaration(p,a,b)
#define IDirect3DDevice9_SetVertexDeclaration(p,a)
(p)->lpVtbl->SetVertexDe
claration(p,a)
#define IDirect3DDevice9_GetVertexDeclaration(p,a)
(p)->lpVtbl->GetVertexDe
claration(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->CreateVerte
xShader(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->Set
VertexShaderConstantF(p,a,b,c)
#define IDirect3DDevice9_GetVertexShaderConstantF(p,a,b,c)
(p)->lpVtbl->Get
VertexShaderConstantF(p,a,b,c)

#define IDirect3DDevice9_SetVertexShaderConstantI(p,a,b,c)
(p)->lpVtbl->Set
VertexShaderConstantI(p,a,b,c)
#define IDirect3DDevice9_GetVertexShaderConstantI(p,a,b,c)
(p)->lpVtbl->Get
VertexShaderConstantI(p,a,b,c)
#define IDirect3DDevice9_SetVertexShaderConstantB(p,a,b,c)
(p)->lpVtbl->Set
VertexShaderConstantB(p,a,b,c)
#define IDirect3DDevice9_GetVertexShaderConstantB(p,a,b,c)
(p)->lpVtbl->Get
VertexShaderConstantB(p,a,b,c)
#define IDirect3DDevice9_SetStreamSource(p,a,b,c,d)
(p)->lpVtbl->SetStreamSo
urce(p,a,b,c,d)
#define IDirect3DDevice9_GetStreamSource(p,a,b,c,d)
(p)->lpVtbl->GetStreamSo
urce(p,a,b,c,d)
#define IDirect3DDevice9_SetStreamSourceFreq(p,a,b)
(p)->lpVtbl->SetStreamSo
urceFreq(p,a,b)
#define IDirect3DDevice9_GetStreamSourceFreq(p,a,b)
(p)->lpVtbl->GetStreamSo
urceFreq(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->CreatePixel
Shader(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->Set
PixelShaderConstantF(p,a,b,c)
#define IDirect3DDevice9_GetPixelShaderConstantF(p,a,b,c)
(p)->lpVtbl->Get
PixelShaderConstantF(p,a,b,c)
#define IDirect3DDevice9_SetPixelShaderConstantI(p,a,b,c)
(p)->lpVtbl->Set
PixelShaderConstantI(p,a,b,c)
#define IDirect3DDevice9_GetPixelShaderConstantI(p,a,b,c)
(p)->lpVtbl->Get
PixelShaderConstantI(p,a,b,c)
#define IDirect3DDevice9_SetPixelShaderConstantB(p,a,b,c)
(p)->lpVtbl->Set
PixelShaderConstantB(p,a,b,c)
#define IDirect3DDevice9_GetPixelShaderConstantB(p,a,b,c)
(p)->lpVtbl->Get
PixelShaderConstantB(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)->TestCooperativeLeve
l()
#define IDirect3DDevice9_GetAvailableTextureMem(p)
(p)->GetAvailableTexture
Mem()
#define IDirect3DDevice9_EvictManagedResources(p)
(p)->EvictManagedResourc
es()
#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)->GetCreationParamete
rs(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)->CreateAddit
ionalSwapChain(a,b)
#define IDirect3DDevice9_GetSwapChain(p,a,b)
(p)->GetSwapChain(a,b)
#define IDirect3DDevice9_GetNumberOfSwapChains(p)
(p)->GetNumberOfSwapChai
ns()
#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)->CreateTextu
re(a,b,c,d,e,f,g,h)
#define IDirect3DDevice9_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)
(p)->Cre
ateVolumeTexture(a,b,c,d,e,f,g,h,i)
#define IDirect3DDevice9_CreateCubeTexture(p,a,b,c,d,e,f,g)
(p)->CreateCubeT
exture(a,b,c,d,e,f,g)
#define IDirect3DDevice9_CreateVertexBuffer(p,a,b,c,d,e,f)
(p)->CreateVerte
xBuffer(a,b,c,d,e,f)
#define IDirect3DDevice9_CreateIndexBuffer(p,a,b,c,d,e,f)
(p)->CreateIndex
Buffer(a,b,c,d,e,f)
#define IDirect3DDevice9_CreateRenderTarget(p,a,b,c,d,e,f,g,h) (p)->CreateRende
rTarget(a,b,c,d,e,f,g,h)
#define IDirect3DDevice9_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h) (p)->Cre
ateDepthStencilSurface(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)->Cre
ateOffscreenPlainSurface(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)->SetDepthStencilSurf
ace(a)
#define IDirect3DDevice9_GetDepthStencilSurface(p,a)
(p)->GetDepthStencilSurf
ace(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)->GetTextureStageStat
e(a,b,c)
#define IDirect3DDevice9_SetTextureStageState(p,a,b,c) (p)->SetTextureStageStat
e(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)->SetCurrentTexturePa
lette(a)
#define IDirect3DDevice9_GetCurrentTexturePalette(p,a) (p)->GetCurrentTexturePa
lette(a)
#define IDirect3DDevice9_SetScissorRect(p,a)
(p)->SetScissorRect(a)
#define IDirect3DDevice9_GetScissorRect(p,a)
(p)->GetScissorRect(a)
#define IDirect3DDevice9_SetSoftwareVertexProcessing(p,a)
(p)->SetSoftware
VertexProcessing(a)
#define IDirect3DDevice9_GetSoftwareVertexProcessing(p) (p)->GetSoftwareVertexPr
ocessing()
#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)->DrawIndexed
Primitive(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)->Dra
wIndexedPrimitiveUP(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)->CreateVertexDeclara
tion(a,b)
#define IDirect3DDevice9_SetVertexDeclaration(p,a)
(p)->SetVertexDeclaratio
n(a)
#define IDirect3DDevice9_GetVertexDeclaration(p,a)
(p)->GetVertexDeclaratio
n(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)->SetVertexSh
aderConstantF(a,b,c)

#define IDirect3DDevice9_GetVertexShaderConstantF(p,a,b,c)
(p)->GetVertexSh
aderConstantF(a,b,c)
#define IDirect3DDevice9_SetVertexShaderConstantI(p,a,b,c)
(p)->SetVertexSh
aderConstantI(a,b,c)
#define IDirect3DDevice9_GetVertexShaderConstantI(p,a,b,c)
(p)->GetVertexSh
aderConstantI(a,b,c)
#define IDirect3DDevice9_SetVertexShaderConstantB(p,a,b,c)
(p)->SetVertexSh
aderConstantB(a,b,c)
#define IDirect3DDevice9_GetVertexShaderConstantB(p,a,b,c)
(p)->GetVertexSh
aderConstantB(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)->SetPixelSha
derConstantF(a,b,c)
#define IDirect3DDevice9_GetPixelShaderConstantF(p,a,b,c)
(p)->GetPixelSha
derConstantF(a,b,c)
#define IDirect3DDevice9_SetPixelShaderConstantI(p,a,b,c)
(p)->SetPixelSha
derConstantI(a,b,c)
#define IDirect3DDevice9_GetPixelShaderConstantI(p,a,b,c)
(p)->GetPixelSha
derConstantI(a,b,c)
#define IDirect3DDevice9_SetPixelShaderConstantB(p,a,b,c)
(p)->SetPixelSha
derConstantB(a,b,c)
#define IDirect3DDevice9_GetPixelShaderConstantB(p,a,b,c)
(p)->GetPixelSha
derConstantB(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->SetPrivateD
ata(p,a,b,c,d)
#define IDirect3DVolume9_GetPrivateData(p,a,b,c)
(p)->lpVtbl->GetPrivateD
ata(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*,DWO
RD) 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->QueryInterf
ace(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->GetFrontBuf
ferData(p,a)

#define IDirect3DSwapChain9_GetBackBuffer(p,a,b,c)
(p)->lpVtbl->GetBackBuff
er(p,a,b,c)
#define IDirect3DSwapChain9_GetRasterStatus(p,a)
(p)->lpVtbl->GetRasterSt
atus(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->GetPresentP
arameters(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)->GetPresentParameter
s(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->QueryInterf
ace(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->SetPrivateD
ata(p,a,b,c,d)
#define IDirect3DResource9_GetPrivateData(p,a,b,c)
(p)->lpVtbl->GetPrivateD
ata(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
#define
#define
#define
c,d)
#define
c)
#define
#define
#define
#define
#define
#endif

IDirect3DResource9_AddRef(p)
(p)->AddRef()
IDirect3DResource9_Release(p) (p)->Release()
IDirect3DResource9_GetDevice(p,a)
(p)->GetDevice(a)
IDirect3DResource9_SetPrivateData(p,a,b,c,d)
(p)->SetPrivateData(a,b,
IDirect3DResource9_GetPrivateData(p,a,b,c)

(p)->GetPrivateData(a,b,

IDirect3DResource9_FreePrivateData(p,a) (p)->FreePrivateData(a)
IDirect3DResource9_SetPriority(p,a)
(p)->SetPriority(a)
IDirect3DResource9_GetPriority(p)
(p)->GetPriority()
IDirect3DResource9_PreLoad(p) (p)->PreLoad()
IDirect3DResource9_GetType(p) (p)->GetType()

#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->SetPrivateD
ata(p,a,b,c,d)
#define IDirect3DSurface9_GetPrivateData(p,a,b,c)
(p)->lpVtbl->GetPrivateD
ata(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
#define
#define
#define
#define
c,d)
#define
c)
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#endif

IDirect3DSurface9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
IDirect3DSurface9_AddRef(p)
(p)->AddRef()
IDirect3DSurface9_Release(p)
(p)->Release()
IDirect3DSurface9_GetDevice(p,a)
(p)->GetDevice(a)
IDirect3DSurface9_SetPrivateData(p,a,b,c,d)
(p)->SetPrivateData(a,b,
IDirect3DSurface9_GetPrivateData(p,a,b,c)

(p)->GetPrivateData(a,b,

IDirect3DSurface9_FreePrivateData(p,a) (p)->FreePrivateData(a)
IDirect3DSurface9_SetPriority(p,a)
(p)->SetPriority(a)
IDirect3DSurface9_GetPriority(p)
(p)->GetPriority()
IDirect3DSurface9_PreLoad(p)
(p)->PreLoad()
IDirect3DSurface9_GetType(p)
(p)->GetType()
IDirect3DSurface9_GetContainer(p,a,b) (p)->GetContainer(a,b)
IDirect3DSurface9_GetDesc(p,a) (p)->GetDesc(a)
IDirect3DSurface9_LockRect(p,a,b,c)
(p)->LockRect(a,b,c)
IDirect3DSurface9_UnlockRect(p) (p)->UnlockRect()
IDirect3DSurface9_GetDC(p,a)
(p)->GetDC(a)
IDirect3DSurface9_ReleaseDC(p,a)
(p)->ReleaseDC(a)

#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, *PDIRECT3DVERTEX
BUFFER9;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DVertexBuffer9_QueryInterface(p,a,b)
(p)->lpVtbl->QueryInterf
ace(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->Set
PrivateData(p,a,b,c,d)
#define IDirect3DVertexBuffer9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateD
ata(p,a,b,c)
#define IDirect3DVertexBuffer9_FreePrivateData(p,a)
(p)->lpVtbl->FreePrivate
Data(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)->SetPrivateD
ata(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, *PDIRECT3DINDEXBUF
FER9;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DIndexBuffer9_QueryInterface(p,a,b)
(p)->lpVtbl->QueryInterf
ace(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->SetPrivateD
ata(p,a,b,c,d)
#define IDirect3DIndexBuffer9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateD
ata(p,a,b,c)
#define IDirect3DIndexBuffer9_FreePrivateData(p,a)
(p)->lpVtbl->FreePrivate
Data(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
#define
#define
#else
#define
#define
#define
#define
#define
c,d)
#define
c)
#define
#define
#define
#define
#define
#define
#define
#define
#endif

IDirect3DIndexBuffer9_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
IDirect3DIndexBuffer9_Unlock(p) (p)->lpVtbl->Unlock(p)
IDirect3DIndexBuffer9_GetDesc(p,a)
(p)->lpVtbl->GetDesc(p,a)
IDirect3DIndexBuffer9_QueryInterface(p,a,b)
(p)->QueryInterface(a,b)
IDirect3DIndexBuffer9_AddRef(p) (p)->AddRef()
IDirect3DIndexBuffer9_Release(p)
(p)->Release()
IDirect3DIndexBuffer9_GetDevice(p,a)
(p)->GetDevice(a)
IDirect3DIndexBuffer9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,
IDirect3DIndexBuffer9_GetPrivateData(p,a,b,c)

(p)->GetPrivateData(a,b,

IDirect3DIndexBuffer9_FreePrivateData(p,a)
(p)->FreePrivateData(a)
IDirect3DIndexBuffer9_SetPriority(p,a) (p)->SetPriority(a)
IDirect3DIndexBuffer9_GetPriority(p)
(p)->GetPriority()
IDirect3DIndexBuffer9_PreLoad(p)
(p)->PreLoad()
IDirect3DIndexBuffer9_GetType(p)
(p)->GetType()
IDirect3DIndexBuffer9_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
IDirect3DIndexBuffer9_Unlock(p) (p)->Unlock()
IDirect3DIndexBuffer9_GetDesc(p,a)
(p)->GetDesc(a)

#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, *PDIRECT3DBASETEXT
URE9;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DBaseTexture9_QueryInterface(p,a,b)
(p)->lpVtbl->QueryInterf
ace(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)->lpV

Anda mungkin juga menyukai