Heres the code my error is C1075 please fix it, also "return dwReturn" wont work so any hekp would be great! - #include "stdafx.h"
-
#include <Windows.h>
-
#include <TlHelp32.h>
-
-
HMODULE GetModuleHandle (char *,DWORD);
-
DWORD GetModuleBase(const char *,const DWORD);
-
static size_t WriteMemoryCallback(void *,size_t,size_t,void *);
-
-
// Structures
-
struct MemoryStruct {
-
char *memory;
-
size_t size;
-
};
-
-
int main() {
-
// Create the memory structure to store data in.
-
struct MemoryStruct MOTD;
-
-
// Create the memory needed for the MOTD.
-
MOTD.memory = (char *)malloc(1);
-
MOTD.size = 0;
-
-
printf("*****************************\n");
-
printf("****** External Bhop *******\n");
-
printf("******* by cLeansify ********\n");
-
printf("*****************************\n\n");
-
-
HANDLE hProcess;
-
HWND AppHWND;
-
DWORD AppPID;
-
-
DWORD GroundOffset;
-
DWORD WaterOffset;
-
DWORD UIOpen;
-
-
DWORD ClientDLL;
-
DWORD EngineDLL;
-
DWORD VGUIDLL;
-
-
printf("Waiting for Counter Strike Source\n");
-
-
AppHWND = NULL;
-
-
-
while(AppHWND==NULL) {
-
if(FindWindowA(NULL,"Counter-Strike Source") != 0) {
-
printf("\nGame: Counter-Strike Source\n");
-
AppHWND = FindWindowA(NULL,"Counter-Strike Source");
-
} else if(FindWindowA(NULL,"Team Fortress 2") != 0) {
-
printf("\nGame: Team Fortress 2\n");
-
AppHWND = FindWindowA(NULL,"Team Fortress 2)");
-
} else {
-
Sleep(1000);
-
}
-
}
-
-
GetWindowThreadProcessId(AppHWND,&AppPID);
-
-
do {
-
-
hProcess = OpenProcess (PROCESS_ALL_ACCESS, 0, AppPID);
-
// Client.dll adress
-
ClientDLL = GetModuleBase("client.dll",AppPID);
-
// Engine.dll adress
-
EngineDLL = GetModuleBase("engine.dll",AppPID);
-
// vguimatsurface adress
-
VGUIDLL = GetModuleBase("vguimatsurface.dll",AppPID);
-
-
// OnGround Offset
-
GroundOffset = ClientDLL + 0x782158;
-
// Chat/Console Offset
-
UIOpen = VGUIDLL + 0x1153B8;
-
// Water Offset
-
WaterOffset = ClientDLL + 0x77FE3C;
-
-
-
Sleep(20);
-
} while(!VGUIDLL);
-
-
printf("Client.dll: %p\n",ClientDLL);
-
printf("Engine.dll: %p\n",EngineDLL);
-
printf("VGUIMatSurface.dll: %p\n",VGUIDLL);
-
-
printf("On Ground Address: %p\n",GroundOffset);
-
printf("VGUI Address: %p\n",UIOpen);
-
printf("In Water Adress: %p\n",WaterOffset);
-
-
-
printf("\nHold down Space and have fun :D\n");
-
-
int BhopVal = 0;
-
-
-
while(1) {
-
-
ReadProcessMemory(hProcess, (LPCVOID)GroundOffset,&BhopVal,1,NULL);
-
if(GetAsyncKeyState(VK_SPACE)&0x80000000) {
-
if(BhopVal != 255) {
-
SendMessage(AppHWND, WM_KEYDOWN, VK_SPACE, 0x390000);
-
Sleep(10);
-
SendMessage(AppHWND, WM_KEYUP, VK_SPACE, 0x390000);
-
-
}
-
}
-
-
Sleep(5);
-
}
-
-
return 0;
-
}
-
-
static size_t WriteMemoryCallback(void *contents, size_t, size_t nmemb, void *userp) {
-
int size = 0;
-
size_t realsize = size * nmemb;
-
struct MemoryStruct *mem = (struct MemoryStruct *)userp;
-
-
mem->memory = (char *)realloc(mem->memory,mem->size + realsize + 1);
-
if (mem->memory == NULL) {
-
printf("not enough memory (realloc returned NULL\n");
-
exit(EXIT_FAILURE);
-
}
-
-
memcpy(&(mem->memory[mem->size]), contents, realsize);
-
mem->size += realsize;
-
mem->memory[mem->size] = 0;
-
-
return realsize;
-
}
-
-
HMODULE GetModuleBase( char *szModuleName, DWORD dwProcessId ) {
-
if( !szModuleName || !dwProcessId ) {
-
return NULL;
-
}
-
-
HANDLE hSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, dwProcessId );
-
-
if(hSnap == INVALID_HANDLE_VALUE ) {
-
return NULL;
-
}
-
-
MODULEENTRY32 me;
-
me.dwSize = sizeof( MODULEENTRY32 );
-
-
if(Module32First( hSnap, &me )) {
-
while(Module32Next(hSnap,&me )) {
-
if(!strcmp(reinterpret_cast<const char *>(me.szModule), szModuleName)) {
-
if(!strcmp(reinterpret_cast<const char *>(me.szModule), szModuleName)) {
-
CloseHandle(hSnap);
-
return me.hModule;
-
}
-
}
-
}
-
-
CloseHandle( hSnap );
-
return NULL;
-
}
-
-
DWORD GetModuleBase(const char *szModuleName,const DWORD dwProcessId); {
-
if ((dwProcessId) || (!szModuleName)) {
-
return 0;
-
}
-
-
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessId);
-
-
-
if (hSnap == INVALID_HANDLE_VALUE) {
-
return 0;
-
}
-
-
MODULEENTRY32 me;
-
me.dwSize = sizeof(MODULEENTRY32);
-
-
DWORD dwReturn = 0;
-
-
if(Module32First(hSnap, &me)) {
-
while (Module32Next(hSnap, &me)) {
-
if( !strcmp(reinterpret_cast<const char *>(me.szModule), szModuleName)) {
-
CloseHandle (hSnap);
-
dwReturn = (DWORD)me.modBaseAddr;
-
return dwReturn;
-
}
-
}
-
}
-
-
CloseHandle(hSnap);
-
return dwReturn;
-
}
1 3103 Banfa 9,065
Recognized Expert Moderator Expert
If you read the error code then you would see that you have an unmatch brace, bracket, square bracket or angle bracket.
It is then a simple exercise to scan you program and count your braces/brackets etc open and closed, most 1/2 decent editors help with this by highlighting bracket pairs and if you had bothered to do any of that you would have found (or rather not found I guess) a missing brace around line 150.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: geronimo_me |
last post by:
Hi,
I am trying to run an Excel macro from an Access module, however when I
run the code the macro runs but then I get an error in Access. The
error is: Run-time error "440", Automation error.
...
|
by: Doug Bell |
last post by:
Hi,
I have been debugging a new VB.Net Application and today, I have been
getting an error that I have not seen before
This error is now appearing on a line with the following code:
lnGUID =...
|
by: xian2 |
last post by:
Hi All,
I have been using this guide http://www.compasscomputing.co.uk/code/AcceesReportsToPDFandEmail.htm to create a command button that automatically saves and e-mails your report and have...
|
by: JewelsT |
last post by:
Hello,
I'm new to both RSS & XML and I am trying to create a ColdFusion RSS feed. I have my cfm file with all my code and at the end of the file I am writing that output to an XML file. At the top...
|
by: TSalm |
last post by:
Hi,
After sending a request, I would get the possible error message.
Not the code @@error, nor the exact content of sysmessages, but the
message like it could be in the log file.
TIA,
TSalm
| |
by: problem. |
last post by:
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int a, b;
float result = 0.0f;
char symbol = '\0';
int loop = 0;
|
by: yasoof0wnz |
last post by:
I tried a lot of things to fix this statement but every time i try fixing it, i get more errors, so i undo.
Heres the error:
fatal error C1075: end of file found before the left brace '{' at...
|
by: vagueante |
last post by:
Hi,
I have a windows service that i connecto to a iSeries Dataqueue, i can write and read from it.
The purpose of this service it's to keep reading the dataqueue and when it has some data i run...
|
by: Jerusha |
last post by:
This is what I've got in my program so far.
/*********************************************************************************/
#include <iostream> // include standard I/O library...
|
by: Dan Oren |
last post by:
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <conio.h>
void main ()
{
int month,year;
int days,weeks,left;
char x;
float a,b,c;
do
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |