1 #include <windows.h> 2 #include <stdio.h> 3 #include <ddraw.h> 4 #include <ddrawi.h> 5 #include <d3dhal.h> 6 #include <ddrawgdi.h> 7 8 #if defined(_WIN32) && !defined(_NO_COM ) 9 #define COM_NO_WINDOWS_H 10 #include <objbase.h> 11 #else 12 #define IUnknown void 13 #if !defined(NT_BUILD_ENVIRONMENT) && !defined(WINNT) 14 #define CO_E_NOTINITIALIZED 0x800401F0 15 #endif 16 #endif 17 18 HRESULT WINAPI Main_D3D_QueryInterface(LPDIRECT3D7 iface, REFIID riid, LPVOID * ppvObject); 19 ULONG WINAPI Main_D3D_AddRef(LPDIRECT3D7 iface); 20 ULONG WINAPI Main_D3D_Release(LPDIRECT3D7 iface); 21 HRESULT WINAPI Main_D3D_EnumDevices(LPDIRECT3D7 iface, LPD3DENUMDEVICESCALLBACK7 lpEnumDevicesCallback, LPVOID lpUserArg); 22 HRESULT WINAPI Main_D3D_CreateDevice7(LPDIRECT3D7 iface, REFCLSID rclsid,LPDIRECTDRAWSURFACE7 lpDDS, LPDIRECT3DDEVICE7 *lplpD3DDevice); 23 HRESULT WINAPI Main_D3D_CreateVertexBuffer7(LPDIRECT3D7 iface, LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc, LPDIRECT3DVERTEXBUFFER7 *lplpD3DVertBuf,DWORD dwFlags); 24 HRESULT WINAPI Main_D3D_EnumZBufferFormats(LPDIRECT3D7 iface, REFCLSID riidDevice, LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,LPVOID lpContext); 25 HRESULT WINAPI Main_D3D_EvictManagedTextures(LPDIRECT3D7 iface); 26 27 IDirect3D7Vtbl IDirect3D7_Vtbl = 28 { 29 Main_D3D_QueryInterface, 30 Main_D3D_AddRef, 31 Main_D3D_Release, 32 Main_D3D_EnumDevices, 33 Main_D3D_CreateDevice7, 34 Main_D3D_CreateVertexBuffer7, 35 Main_D3D_EnumZBufferFormats, 36 Main_D3D_EvictManagedTextures 37 }; 38 39