0
votes

So. I have found nice Open Source project here to hook old game called GTA Vice City (I want to draw some images on game screen like HUD) I have just installed DOT NET 2002 and try to compile the d3d8 library project (Visual Studio have already DirectX 8.1 libraries and headers included), but I'm getting few errors. Some people compiled it well, some can't because of these errors:

c:\Documents and Settings\Administrator\Moje dokumenty\Downloads\sahud_src\IDirect3D8Hook.h(18) : error C2259: 'IDirect3DDevice8Hook' : cannot instantiate abstract class
        due to following members:
        'void IDirect3DDevice8::SetCursorPosition(UINT,UINT,DWORD)' : pure virtual function was not defined
        c:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\prerelease\d3d8.h(263) : see declaration of 'IDirect3DDevice8::SetCursorPosition'
IDirect3DDevice8Hook.cpp
c:\Documents and Settings\Administrator\Moje dokumenty\Downloads\sahud_src\IDirect3D8Hook.h(18) : error C2259: 'IDirect3DDevice8Hook' : cannot instantiate abstract class
        due to following members:
        'void IDirect3DDevice8::SetCursorPosition(UINT,UINT,DWORD)' : pure virtual function was not defined
        c:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\prerelease\d3d8.h(263) : see declaration of 'IDirect3DDevice8::SetCursorPosition'
IDirect3D8Hook.cpp
c:\Documents and Settings\Administrator\Moje dokumenty\Downloads\sahud_src\IDirect3D8Hook.h(18) : error C2259: 'IDirect3DDevice8Hook' : cannot instantiate abstract class
        due to following members:
        'void IDirect3DDevice8::SetCursorPosition(UINT,UINT,DWORD)' : pure virtual function was not defined
        c:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\prerelease\d3d8.h(263) : see declaration of 'IDirect3DDevice8::SetCursorPosition'

To be more clear: c:...\IDirect3D8Hook.h(18): error C2259: 'IDirect3DDevice8Hook' : cannot instantiate abstract class

Then, if I replace

int to UINT in header

 STDMETHOD_(void, SetCursorPosition)(THIS_ int X,int Y,DWORD Flags);

and here

void __stdcall IDirect3DDevice8Hook::SetCursorPosition(int X, int Y, DWORD Flags)
{
    pD3DDevice->SetCursorPosition(X, Y, Flags);
}

It compile, but then after saving output DLL as d3d8.dll in folder with game and running, I'm getting error like application was not run properly 0xC0000005

What's wrong? Some bad configuration of Visual Studio?

  • Some buddy said, that 0xC0000005 is because some ASM instruction load/store to wrong memory address. But how if this project is finished and ready to compile?
1
You need to understand COM to use it. Sorry, but that's the deal. - IInspectable
I believe you not even checked that code. As I said this project is ready to compile. - user3163529

1 Answers

0
votes

I have fixed it. There was a bug in Speedo.cpp, which tried to load wrong files, it results problems with Symbol files.