OldSchoolHack

Registrieren / Anmelden Deutsch

error LNK2001


icon error LNK2001 #1

Anmeldungsdatum: Sep 2013

Beiträge: 5

Benutzer-Bewertung:

1 positiv
0 negativ
error 
LNK2001


: unresolved external symbol "public: __thiscall OSHGui:rawing::RendererDX9::RendererDX9(struct IDirect3DDevice9 *)" (??0RendererDX9@Drawing@OSHGui@@QAE@PAUIDirect3DDevice9@@@Z)
TEXT Code:
  1. #define WIN32_LEAN_AND_MEAN
  2. #define NOMINMAX
  3. #include <windows.h>
  4. #include <Shellapi.h>
  5. #include <d3dx9.h>
  6.  
  7. #undef MessageBox
  8. #include <iostream>
  9. #include <sstream>
  10. #include <memory>
  11. #pragma comment(lib, "d3d9.lib")
  12. #pragma comment(lib, "d3dx9.lib")
  13. #pragma  comment(lib,"oshgui.lib")
  14. //---------------------------------------------------------------------------
  15. #include "OSHGui.hpp"
  16. #include "DrawingDirect3D9RendererDX9.hpp"
  17. #include "InputWindowsMessage.hpp"
  18. //#include "DrawingDirect3D9RendererDX9.cpp"
  19. //---------------------------------------------------------------------------
  20. using namespace OSHGui;
  21. //---------------------------------------------------------------------------
  22. LPDIRECT3D9 pD3D = nullptr;
  23. LPDIRECT3DDEVICE9 pDevice = nullptr;
  24. D3DPRESENT_PARAMETERS pp;
  25. Input::WindowsMessage input;
  26. class MainForm : public Form
  27. {
  28. private:
  29. LinkLabel *linkLabel;
  30. void InitializeComponent()
  31. {
  32. this->SetText("OldSchoolHack GUI by KN4CK3R");
  33. this->SetSize(Drawing::Size(218, 289));
  34. linkLabel = new LinkLabel();
  35. linkLabel->SetName("linkLabel");
  36. linkLabel->SetLocation(Drawing::Point(3, 9));
  37. linkLabel->SetText("visit www.oldschoolhack.me);
  38. linkLabel->GetClickEvent() += ClickEventHandler(std::bind(&MainForm::linkLabel_Click, this, std::placeholders::_1));
  39. this->AddControl(linkLabel);
  40. }
  41. public:
  42. MainForm() : Form()
  43. {
  44. InitializeComponent();
  45. }
  46. void linkLabel_Click(Control *control)
  47. {
  48. ShellExecute(0, "open", "www.oldschoolhack.de", NULL, NULL, SW_SHOWNORMAL);
  49. }
  50. };
  51. //---------------------------------------------------------------------------
  52. HRESULT D3DInit(HWND hwnd)
  53. {
  54. srand(GetTickCount());
  55. if (!(pD3D = Direct3DCreate9(D3D_SDK_VERSION)))
  56. {
  57. return E_FAIL;
  58. }
  59. RECT ClientRect;
  60. GetClientRect(hwnd, &ClientRect);
  61. ZeroMemory(&pp, sizeof(pp));
  62. pp.SwapEffect = D3DSWAPEFFECT_DISCARD;
  63. pp.BackBufferFormat = D3DFMT_X8R8G8B8;
  64. pp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
  65. pp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
  66. pp.Windowed = TRUE;
  67. pp.BackBufferWidth = ClientRect.right;
  68. pp.BackBufferHeight = ClientRect.bottom;
  69. if (FAILED(pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &pp, &pDevice)))
  70. {
  71. return E_FAIL;
  72. }
  73. ::ShowCursor(false);
  74. D3DXMATRIX Projection;
  75. D3DXMatrixPerspectiveFovLH(&Projection, D3DXToRadian(45.0f), 584.0f / 562.0f, 1.0f, 100.0f);
  76. pDevice->SetTransform(D3DTS_PROJECTION, &Projection);
  77. Application::Instance()->Create(new Drawing::RendererDX9(pDevice)); //create Application
  78. Application::Instance()->Run(std::shared_ptr<Form>(new MainForm())); //set our mainform
  79. Application::Instance()->Enable(); //enable GUI
  80. return S_OK;
  81. }
  82. //---------------------------------------------------------------------------
  83. void D3DRender()
  84. {
  85. if(!pDevice)
  86. {
  87. return;
  88. }
  89. pDevice->Clear(0, 0, D3DCLEAR_TARGET, 0xFF123456, 1.0f, 0);
  90. pDevice->BeginScene();
  91. Application::Instance()->GetRenderer()->Begin(); //begin rendering
  92. Application::Instance()->GetRenderer()->SetRenderRectangle(Drawing::Rectangle(0, 0, 700, 400)); //set the rendering size
  93.  
  94. //render stuff
  95. Application::Instance()->Render(); //render gui
  96. Application::Instance()->GetRenderer()->End(); //end rendering
  97. pDevice->EndScene();
  98. pDevice->Present(0,0,0,0);
  99. }
  100. //---------------------------------------------------------------------------
  101. int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
  102. {
  103. WNDCLASS wc;
  104. ZeroMemory(&wc, sizeof(wc));
  105. wc.style = CS_CLASSDC;
  106. wc.lpfnWndProc = DefWindowProc;
  107. wc.hInstance = GetModuleHandle(0);
  108. wc.lpszClassName = "OSHGui";
  109. wc.hCursor = LoadCursor(0, IDC_ARROW);
  110. RegisterClass(&wc);
  111. HWND hwnd = CreateWindowA("OSHGui", "OSHGui", WS_OVERLAPPEDWINDOW, 100, 100, 700, 400, GetDesktopWindow(), 0, wc.hInstance, 0);
  112. if (SUCCEEDED(D3DInit(hwnd)))
  113. {
  114. ShowWindow(hwnd, SW_SHOWDEFAULT );
  115. UpdateWindow(hwnd);
  116. MSG msg;
  117. ZeroMemory(&msg, sizeof(msg));
  118. while (true)
  119. {
  120. if (!IsWindowVisible(hwnd))
  121. break;
  122. if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
  123. {
  124. input.ProcessMessage(&msg);
  125. if (msg.message == WM_QUIT)
  126. break;
  127. TranslateMessage(&msg);
  128. DispatchMessage(&msg);
  129. }
  130. else
  131. {
  132. D3DRender();
  133. }
  134. }
  135. }
  136. if(pDevice)
  137. {
  138. pDevice->Release();
  139. }
  140. if(pD3D)
  141. {
  142. pD3D->Release();
  143. }
  144. UnregisterClass("OSHGui", wc.hInstance);
  145. return 0;
  146. }

I get this error...
how can i fix it??

icon #2

Anmeldungsdatum: Aug 2007

Beiträge: 8646

Benutzer-Bewertung:

199 positiv
33 negativ
you need to add the Direct3D9 *.cpp files to your project

__________________

Hallo
icon #3

Anmeldungsdatum: Sep 2013

Beiträge: 5

Benutzer-Bewertung:

1 positiv
0 negativ
Zitat von KN4CK3R
you need to add the Direct3D9 *.cpp files to your project
thanks admin.get it work now
#include "OSHGui.hpp"
#include "Drawing\Direct3D9\RendererDX9.hpp"
#include "Drawing\Direct3D9\FontDX9.hpp"
#include "Drawing\Direct3D9\TextureDX9.hpp"
#include "Drawing\Direct3D9\RendererDX9.cpp"
#include "Drawing\Direct3D9\FontDX9.cpp"
#include "Drawing\Direct3D9\TextureDX9.cpp"
#include "Input\WindowsMessage.hpp"


//---------------------------------------------------------------------------
using namespace OSHGui;
icon #4

Anmeldungsdatum: Aug 2007

Beiträge: 8646

Benutzer-Bewertung:

199 positiv
33 negativ
Please dont include CPP files. Add them to your project files in Visual Studio.

__________________

Hallo
icon #5

Anmeldungsdatum: Sep 2013

Beiträge: 5

Benutzer-Bewertung:

1 positiv
0 negativ
Zitat von
Please dont include CPP files. Add them to your project files in Visual Studio.
understand new question

TEXT Code:
  1. HRESULT APIENTRY myEndScene(LPDIRECT3DDEVICE9 pDevice)
  2. {
  3. if (Create)
  4. {
  5. D3DVIEWPORT9 viewP;
  6. pDevice->GetViewport(&viewP);
  7. POINT cpos;
  8. GetCursorPos(&cpos);
  9. ScreenToClient(GetForegroundWindow(), &cpos); // Coors Relative to Foreground Windows
  10.  
  11.  
  12. static bool initGui = true;
  13. if (initGui)
  14. {
  15. initGui = false;
  16. Application::Instance()->Create(new Drawing::RendererDX9(pDevice)); //create Application
  17. Application::Instance()->Run(std::shared_ptr<Form>(new MainForm())); //set our mainform
  18. Application::Instance()->Enable(); //enable GUI
  19. }
  20.  
  21. if (GetAsyncKeyState(VK_INSERT) & 1) {
  22. if (!MenuActive) {
  23. Application::Instance()->Enable();
  24. MenuActive = true;
  25. }
  26. else {
  27. Application::Instance()->Disable();
  28. MenuActive = false;
  29. }
  30. }
  31. HWND hwnd=FindWindow(0,"Warface");
  32.  
  33. ShowWindow(hwnd,SW_SHOWDEFAULT);
  34. UpdateWindow(hwnd);
  35. MSG msg;
  36. ZeroMemory(&msg, sizeof(msg));
  37. if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
  38. {
  39. input.ProcessMessage(&msg);
  40. if (msg.message == WM_QUIT)
  41. return pEndScene(pDevice);
  42. TranslateMessage(&msg);
  43. DispatchMessage(&msg);
  44. }
  45. else
  46. {
  47. Application::Instance()->GetRenderer()->Begin(); //begin rendering
  48. Application::Instance()->Render(); //render gui
  49. Application::Instance()->GetRenderer()->End(); //end rendering
  50. }
  51.  
  52.  
  53. }
  54. return pEndScene(pDevice);
  55. }
Here is the code,Can Draw the MENU now.
but i can move my mouse。。。。。
http://puu.sh/7w0UB.jpg
Zuletzt geändert von huangfengye (Sa 15. Mär 2014, 10:41)

Grund: kein Grund angegeben

icon #6

Anmeldungsdatum: Aug 2007

Beiträge: 8646

Benutzer-Bewertung:

199 positiv
33 negativ
you need to setup the input system

See here part 4
Um Links zu sehen, musst du dich registrieren
the hook part is what you need

__________________

Hallo
icon #7

Anmeldungsdatum: -

Beiträge: 0

Benutzer-Bewertung:

2 positiv
29 negativ
Zitat von KN4CK3R
you need to add the Direct3D9 *.cpp files to your project
hey ich hab eine frage and ich
wird ein neuer
OldSchoolHack Fusion 1.4.1   bzw 1.4.2 kommen?

Oder Kommt nix mehr
ich will die gameforge kapput hacken
ich hasse die gameforge bitte neuen
skill special force2 hack.
bitte
0 positiv
1 negativ
Dieser Beitrag wurde bewertet von:
SilverFire (So 16. Mär 2014, 13:07)