Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 14:44

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



C++ Debug problem [Bitte hilfe]

Discussion on C++ Debug problem [Bitte hilfe] within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2013
Posts: 103
Received Thanks: 30
Exclamation C++ Debug problem [Bitte hilfe]

bitte um hilfe ;/

myhack.cpp
Code:
// myhack.cpp : Definiert die exportierten Funktionen für die DLL-Anwendung.
//
#include "stdafx.h"
#include <windows.h>
#include <d3d9.h>

#pragma comment(lib, "d3d9.lib")

typedef HRESULT (WINAPI* CreateDevice_Prototype)        (LPDIRECT3D9, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE9*);
typedef HRESULT (WINAPI* Reset_Prototype)               (LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS*);
typedef HRESULT (WINAPI* EndScene_Prototype)            (LPDIRECT3DDEVICE9);
typedef HRESULT (WINAPI* DrawIndexedPrimitive_Prototype)(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, UINT, UINT, UINT, UINT);

CreateDevice_Prototype         CreateDevice_Pointer         = NULL;
Reset_Prototype                Reset_Pointer                = NULL;
EndScene_Prototype             EndScene_Pointer             = NULL;
DrawIndexedPrimitive_Prototype DrawIndexedPrimitive_Pointer = NULL;

HRESULT WINAPI Direct3DCreate9_VMTable    (VOID);
HRESULT WINAPI CreateDevice_Detour        (LPDIRECT3D9, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE9*);
HRESULT WINAPI Reset_Detour               (LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS*);
HRESULT WINAPI EndScene_Detour            (LPDIRECT3DDEVICE9);
HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, UINT, UINT, UINT, UINT);

PDWORD Direct3D_VMTable = NULL; 

BOOL WINAPI DllMain(HINSTANCE hinstModule, DWORD dwReason, LPVOID lpvReserved)
{
  if(dwReason == DLL_PROCESS_ATTACH)
  {
    DisableThreadLibraryCalls(hinstModule);

    if(Direct3DCreate9_VMTable() == D3D_OK)
    return TRUE;
  ;}

  return FALSE;
;}

HRESULT WINAPI Direct3DCreate9_VMTable(VOID)
{
  LPDIRECT3D9 Direct3D_Object = Direct3DCreate9(D3D_SDK_VERSION);

  if(Direct3D_Object == NULL)
  return D3DERR_INVALIDCALL;
  
  Direct3D_VMTable = (PDWORD)*(PDWORD)Direct3D_Object;
  Direct3D_Object->Release();

  DWORD dwProtect;

  if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
  {
    *(PDWORD)&CreateDevice_Pointer = Direct3D_VMTable[15];
    *(PDWORD)&Direct3D_VMTable[15] = (DWORD)CreateDevice_Detour;

    if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), dwProtect, &dwProtect) == 0)
    return D3DERR_INVALIDCALL;
  ;}
  else
  return D3DERR_INVALIDCALL;

  return D3D_OK;
;}

HRESULT WINAPI CreateDevice_Detour(LPDIRECT3D9 Direct3D_Object, UINT Adapter, D3DDEVTYPE DeviceType, HWND FocusWindow, 
					DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* PresentationParameters, 
					LPDIRECT3DDEVICE9* Returned_Device_Interface)
{
  HRESULT Returned_Result = CreateDevice_Pointer(Direct3D_Object, Adapter, DeviceType, FocusWindow, BehaviorFlags, 
	                                          PresentationParameters, Returned_Device_Interface);

  DWORD dwProtect;

  if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
  {
    *(PDWORD)&Direct3D_VMTable[15] = *(PDWORD)&CreateDevice_Pointer;
    CreateDevice_Pointer           = NULL;

    if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), dwProtect, &dwProtect) == 0)
    return D3DERR_INVALIDCALL;
  ;}
  else
  return D3DERR_INVALIDCALL;

  if(Returned_Result == D3D_OK)
  {
    Direct3D_VMTable = (PDWORD)*(PDWORD)*Returned_Device_Interface;

    *(PDWORD)&Reset_Pointer                = (DWORD)Direct3D_VMTable[14];
    *(PDWORD)&EndScene_Pointer             = (DWORD)Direct3D_VMTable[35];
    *(PDWORD)&DrawIndexedPrimitive_Pointer = (DWORD)Direct3D_VMTable[71];

    *(PDWORD)&Direct3D_VMTable[14] = (DWORD)Reset_Detour;
    *(PDWORD)&Direct3D_VMTable[35] = (DWORD)EndScene_Detour;
    *(PDWORD)&Direct3D_VMTable[71] = (DWORD)DrawIndexedPrimitive_Detour;
  
    
  return Returned_Result;


HRESULT WINAPI Reset_Detour(LPDIRECT3DDEVICE9 Device_Interface, D3DPRESENT_PARAMETERS* PresentationParameters)

  ;return Reset_Pointer (DeviceInterface, PresentationParameters);
 

HRESULT WINAPI EndScene_Detour(LPDIRECT3DDEVICE9 Device_Interface)
{
  return EndScene_Pointer(Device_Interface);

HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE9 Device_Interface, D3DPRIMITIVETYPE Type, 
                                           UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
{
  LPDIRECT3DVERTEXBUFFER9 Stream_Data;
  UINT Stride = 0;

  if(Device_Interface->GetStreamSource(0, &Stream_Data, &Stride) == D3D_OK)
  Stream_Data->Release();
  //code
  return DrawIndexedPrimitive_Pointer(Device_Interface, Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
;}
HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE9 Device_Interface, D3DPRIMITIVETYPE Type, 
                                           UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
{
  LPDIRECT3DVERTEXBUFFER9 Stream_Data;
  UINT Stride;

  if (Device_Interface->GetStreamSource(0, &Stream_Data, &Stride) == D3D_OK)
  Stream_Data->Release();
  //code
  return DrawIndexedPrimitive_Pointer(Device_Interface, Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);

;}


//code



bool wallhack;
if (Stride == 40 && wallhack || Stride == 44 && wallhack)


   Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
 //

if ((GetAsyncKeyState(VK_NUMPAD1)&1) == 1) //Numpad 1
     wallhack = !wallhack;//Start Wallhack

		{
	{

{

Probleme:

1>c:\users\fixxed\desktop\ownedproject\myhack\myha ck\myhack.cpp(104): error C2065: 'DeviceInterface': nichtdeklarierter Bezeichner
1>c:\users\fixxed\desktop\ownedproject\myhack\myha ck\myhack.cpp(108): error C2601: 'EndScene_Detour': Lokale Funktionsdefinitionen sind unzulässig
1> c:\users\fixxed\desktop\ownedproject\myhack\myhack \myhack.cpp(87): Diese Zeile enthält eine '{', die keine Entsprechung hat
1>c:\users\fixxed\desktop\ownedproject\myhack\myha ck\myhack.cpp(154): fatal error C1075: Dateiende erreicht, bevor das zugehörige Element für das linke Element Klammer "{" in "c:\users\fixxed\desktop\ownedproject\myhack\myhac k\myhack.cpp(153)" gefunden wurde
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========
uY_1337 is offline  
Old 04/19/2013, 12:57   #2
 
.NoThx's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 3,146
Received Thanks: 583
1> c:\users\fixxed\desktop\ownedproject\myhack\myhack \myhack.cpp(87): Diese Zeile enthält eine '{', die keine Entsprechung hat

Du hast irgendwo eine } vergessen.
.NoThx is offline  
Thanks
1 User
Old 04/19/2013, 13:02   #3
 
elite*gold: 0
Join Date: Apr 2013
Posts: 103
Received Thanks: 30
& wo genau sollte die sein?

hast du evtl skype? wenn ja add mich ma pls chris.borntodie
uY_1337 is offline  
Old 04/19/2013, 13:17   #4
 
elite*gold: 1000
Join Date: Apr 2012
Posts: 1,003
Received Thanks: 208
Der Code ist voller Syntaxfehler. Lern erstmal die Sprache, bevor du dich mit sowas befasst (gut gemeinter Tipp).
qkuh is offline  
Old 04/19/2013, 13:44   #5
 
.NoThx's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 3,146
Received Thanks: 583
Quote:
Originally Posted by uY_1337 View Post
& wo genau sollte die sein?

hast du evtl skype? wenn ja add mich ma pls chris.borntodie
Das musst du herausfinden, wir sind nicht Dr. Behebt meine Fehler ^^

Für jede { muss auch eine } da sein, genauso wie bei ( ) und [ ]
.NoThx is offline  
Old 04/20/2013, 13:25   #6

 
Delinquenz's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,160
Received Thanks: 232
Wieso machst du vor jeder schließenden gescheiften Klammer ein Null Statement? Kann meinen Vorpostern nur zustimmen - lern erstmal die Sprache.
Delinquenz is offline  
Reply


Similar Threads Similar Threads
Combat Arms Debug activity Hilfe bitte
11/13/2012 - Combat Arms - 10 Replies
Also da ich das Problem mit dem error code 2 1006 in den griff bekommen habe, habe ich nun ein neues Problem... und zwar meldet CA mit sobald er Antihack geladen hat das er eine Debugger aktivität gefunden hat... diese soll ich halt ausschalten..Naja nun ist das Problem ich wüsste nicht das ich ein Debugg Programm auf meinem PC am laufen habe. An was für Programme könnte es sonst so liegen? Falls es was bringt kann euch auf anfrage gerne schreiben was im Task Manager so am laufen ist. ...
[PROBLEM] Crank Charakter Anzeige Problem bitte hilfe !!
09/09/2011 - Metin2 Private Server - 1 Replies
Hallo ich habe ein problem irgendwie ist mein client verbuggt, er zeigt keine zeichen mehr an kann mir jemand... http://img705.imageshack.us/img705/6816/fabiani.j pg Uploaded with ImageShack.us
Problem mit Honorbuddy Bitte hilfe bitte is sehr wichtig
09/08/2011 - WoW Bots - 3 Replies
Hallo leute ich habe mir heute mal Honorbuddy zugelegt ich habe mal aus spaß dan einen neuen lvl 1er char gemacht (Allianz Hexenmeister) und den hochleveln lassen die erste zeit hat es gut geklappt er hat gut gelevelt is nirgendwo gesuckt doch dan auf lvl 5 gab es ein rieeesiges problem ab dem der einfach nichmehr weitermacht und zwar er läuft in goldhain zu einem flugmeister und will irgendwo hinfliegen aber da ich ja die flugroute noch nich hab macht er nich mehr weiter so ist es bei meinen...
Server Problem bitte helft Leute bitte brauche eure hilfe sauu dringen
07/18/2011 - Metin2 Private Server - 20 Replies
Hi leute wenn man seinen server ya on bringt (ned das erste mal das ich ihn on bring) dann kommt am ende ya immer das operation timed out 7 mal aber jez steht da Operation reciefet 1000 mal der server startet so einfach ned was kann ich da maachen
Problem mit Jit-Debug
10/05/2009 - S4 League - 1 Replies
Wenn ich einen Trainer von Crypto90 anmache und eine Taste drücke kommt immer diese Meldung : Informationen über das Aufrufen von JIT-Debuggen anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung. ************** Ausnahmetext ************** System.ComponentModel.Win32Exception: Zugriff verweigert bei System.Diagnostics.ProcessManager.OpenProcess(Int3 2 processId, Int32 access, Boolean throwIfExited) bei System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean...



All times are GMT +1. The time now is 14:46.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.