ReactOS  0.4.13-dev-247-g0f29b3f
d3d9_baseobject.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS ReactX
4  * FILE: dll/directx/d3d9/d3d9_baseobject.h
5  * PURPOSE: Direct3D9's base object
6  * PROGRAMERS: Gregor Gullwi <gbrunmar (dot) ros (at) gmail (dot) com>
7  */
8 #ifndef _D3D9_BASEOBJECT_H_
9 #define _D3D9_BASEOBJECT_H_
10 
11 #include "d3d9_common.h"
12 #include <d3d9.h>
13 
14 struct _D3D9BaseObject;
16 
18 {
22 };
23 
24 typedef struct _D3D9BaseObjectVtbl
25 {
26  VOID (*Destroy)(struct _D3D9BaseObject* pBaseObject, BOOL bFreeThis);
28 
29 typedef struct _D3D9BaseObject
30 {
32 /* 0x0004 */ LONG lRefCnt;
33 /* 0x0008 */ DWORD dwNumUsed;
34 /* 0x000c */ IUnknown* pUnknown;
35 /* 0x0010 */ DWORD dwUnknown0010; // Index? Unique id?
36 /* 0x0014 */ HANDLE hKernelHandle;
37 /* 0x0018 */ LPDWORD dwUnknown0018;
38 /* 0x001c */ enum REF_TYPE RefType;
40 
41 VOID InitD3D9BaseObject(D3D9BaseObject* pBaseObject, enum REF_TYPE RefType, IUnknown* pUnknown);
42 
45 HRESULT D3D9BaseObject_GetDevice(D3D9BaseObject* pBaseObject, IDirect3DDevice9** ppDevice);
49 
50 #endif // _D3D9_BASEOBJECT_H_
VOID(* Destroy)(struct _D3D9BaseObject *pBaseObject, BOOL bFreeThis)
ID3D9BaseObjectVtbl * lpVtbl
IUnknown * pUnknown
VOID D3D9BaseObject_LockDevice(D3D9BaseObject *pBaseObject)
struct _D3D9BaseObjectVtbl ID3D9BaseObjectVtbl
VOID D3D9BaseObject_UnlockDevice(D3D9BaseObject *pBaseObject)
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
VOID InitD3D9BaseObject(D3D9BaseObject *pBaseObject, enum REF_TYPE RefType, IUnknown *pUnknown)
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
ULONG D3D9BaseObject_AddRef(D3D9BaseObject *pBaseObject)
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
REF_TYPE
#define VOID
Definition: acefi.h:82
struct _D3D9BaseObject D3D9BaseObject
HRESULT D3D9BaseObject_GetDeviceInt(D3D9BaseObject *pBaseObject, struct _Direct3DDevice9_INT **ppDevice)
ULONG D3D9BaseObject_Release(D3D9BaseObject *pBaseObject)
uint32_t * LPDWORD
Definition: typedefs.h:57
unsigned int ULONG
Definition: retypes.h:1
HRESULT D3D9BaseObject_GetDevice(D3D9BaseObject *pBaseObject, IDirect3DDevice9 **ppDevice)
enum REF_TYPE RefType