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(LPDIRECT3D iface, REFIID riid, LPVOID * ppvObj); 19 ULONG WINAPI Main_D3D_AddRef(LPDIRECT3D iface); 20 ULONG WINAPI Main_D3D_Release(LPDIRECT3D iface); 21 HRESULT WINAPI Main_D3D_Initialize(LPDIRECT3D iface, REFIID refiid); 22 HRESULT WINAPI Main_D3D_EnumDevices(LPDIRECT3D iface, LPD3DENUMDEVICESCALLBACK Callback, LPVOID Context); 23 HRESULT WINAPI Main_D3D_CreateLight(LPDIRECT3D iface, LPDIRECT3DLIGHT* Light,IUnknown* pUnkOuter); 24 HRESULT WINAPI Main_D3D_CreateMaterial(LPDIRECT3D iface,LPDIRECT3DMATERIAL* Direct3DLight,IUnknown* pUnkOuter); 25 HRESULT WINAPI Main_D3D_CreateViewport(LPDIRECT3D iface, LPDIRECT3DVIEWPORT* Viewport,IUnknown* pUnkOuter); 26 HRESULT WINAPI Main_D3D_FindDevice(LPDIRECT3D iface, LPD3DFINDDEVICESEARCH D3DDFS, LPD3DFINDDEVICERESULT D3DFDR); 27 28 IDirect3DVtbl IDirect3D_Vtbl = 29 { 30 Main_D3D_QueryInterface, 31 Main_D3D_AddRef, 32 Main_D3D_Release, 33 Main_D3D_Initialize, 34 Main_D3D_EnumDevices, 35 Main_D3D_CreateLight, 36 Main_D3D_CreateMaterial, 37 Main_D3D_CreateViewport, 38 Main_D3D_FindDevice 39 }; 40 41