Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Cabal Online
You last visited: Today at 17:39

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

Advertisement



c++ dll help

Discussion on c++ dll help within the Cabal Online forum part of the MMORPGs category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
c++ dll help

PHP Code:
#include "stdafx.h"
#include "windows.h"
#define    ADDR_GM        0xE82198
#define    ADDR_AOE    0xEC549C
void Start();
int aoecheck 1;
void Start(){
    while (
1){
        if(
GetKeyState(VK_F12) < 0){
            
//enable
            
if(aoecheck == 0){
                *(
DWORD*)ADDR_GM 2;
                *(
DWORD*)ADDR_AOE 100;
                
aoecheck 1;
            
//disable
            
}else if(aoecheck == 1){
                *(
DWORD*)ADDR_GM 0;
                *(
DWORD*)ADDR_AOE 0;
                
aoecheck 0;
            }
        }
        
Sleep(1);
    }

im trying to go back to basics but i still cant get this to work. any suggestions?
syndrah is offline  
Old 08/27/2012, 11:12   #2
 
mi5pogi's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 249
Received Thanks: 1,007
try this:

PHP Code:
#include "stdafx.h"
#include "windows.h"
#define    ADDR_GM        0xE82198
#define    ADDR_AOE    0xEC549C 
int aoecheck 1;
void Start(){
    while (
1){
        if(
GetKeyState(VK_F12) < 0){
            
//enable
            
if(aoecheck == 0){
                *(
DWORD*)ADDR_GM 2;
                *(
DWORD*)ADDR_AOE 100;
                
aoecheck 1;
            
//disable
            
}else if(aoecheck == 1){
                *(
DWORD*)ADDR_GM 0;
                *(
DWORD*)ADDR_AOE 0;
                
aoecheck 0;
            }
        }
        
Sleep(1);
    }
}  

BOOL APIENTRY DllMain(HMODULE hModuleDWORD ulReasonLPVOID lpReserved)
{
    if (
ulReason == DLL_PROCESS_ATTACH)
    {
        
CreateThread(00, (LPTHREAD_START_ROUTINE)Start000);
    }

    return 
TRUE;

mi5pogi is offline  
Old 08/27/2012, 12:53   #3
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
finally someone responds.

1>Win32Project2.obj : error LNK2005: _DllMain@12 already defined in dllmain.obj
1>C:\Users\Syn\Documents\Visual Studio 2012\Projects\Win32Project2\Debug\Win32Project2.dl l : fatal error LNK1169: one or more multiply defined symbols found
syndrah is offline  
Old 08/27/2012, 16:45   #4
 
кev's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 130
Received Thanks: 184
Quote:
Originally Posted by syndrah View Post
finally someone responds.

1>Win32Project2.obj : error LNK2005: _DllMain@12 already defined in dllmain.obj
1>C:\Users\Syn\Documents\Visual Studio 2012\Projects\Win32Project2\Debug\Win32Project2.dl l : fatal error LNK1169: one or more multiply defined symbols found
I'm guessing you created a dll project with wizard instead of empty one, right? In that case you're redeclaring DllMain (the entry point) which is already in dllmain.cpp - just move the posted entry with createthread in there.

Or just delete dllmain.cpp. :P
кev is offline  
Old 08/27/2012, 17:44   #5
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
still getting nothing, ill make a video showing exactly what im doing.
syndrah is offline  
Old 08/27/2012, 23:49   #6
 
кev's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 130
Received Thanks: 184
Quote:
Originally Posted by syndrah View Post
still getting nothing, ill make a video showing exactly what im doing.
Also, sleep interval is milliseconds so in other words you're checking for F12 input and thus trying to toggle the value(s) 1000 times in a second - which is probably not what you want.
кev is offline  
Old 08/28/2012, 17:47   #7
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
so for the sleep interval to make sure i understand right should be changed to a second? rather then a millesecond.

ok, ill change it to 1000 for sleep.

also could the directx interfere with the keystroke with f12?
syndrah is offline  
Old 08/29/2012, 14:00   #8
 
кev's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 130
Received Thanks: 184
Quote:
Originally Posted by syndrah View Post
so for the sleep interval to make sure i understand right should be changed to a second? rather then a millesecond.

ok, ill change it to 1000 for sleep.

also could the directx interfere with the keystroke with f12?
Well I've usually use 100ms interval since I'm using the same loop for freezing the memory values - 1000ms too high.

Are you absolutely sure that the injection succeeds in the first place? As in checking that the dll is loaded in the process memory and the entry point is executed?

And no, DX can't interfere with the input.
кev is offline  
Old 08/29/2012, 16:10   #9
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
thanks alot kev.

how can i verify that it has been injected properly. the injector says its injected but other then that i dont know for sure. ill change sleep to 100.
syndrah is offline  
Old 08/29/2012, 16:24   #10
 
elite*gold: 0
Join Date: Aug 2012
Posts: 14
Received Thanks: 0
what injector do you use?? hmm... some injector doesn't work anymore even though it says the dll is injected.

if your having problem with your injector i would suggest you use additedfouryou injector
cheatcarrot is offline  
Old 08/29/2012, 16:51   #11
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
im using perx. i also got addictedforyou also but it didnt change anything.
syndrah is offline  
Old 08/29/2012, 16:59   #12
 
mi5pogi's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 249
Received Thanks: 1,007
add messagebox in injection,then youll know if its injected.and also in IF condition when F12 is triggered.
this code works without any problem.
PHP Code:
#include "stdafx.h"
#include "windows.h"
#define    ADDR_GM      0xE82198
#define    ADDR_AOE    0xEC549C 
int aoecheck 1;
void Start(){
    while (
1){
        if(
GetKeyState(VK_F12) < 0){
            
//enable
            
if(aoecheck == 0){
                *(
DWORD*)ADDR_GM 2;
                *(
DWORD*)ADDR_AOE 100;
                
aoecheck 1;
MessageBoxA(NULL"AOE enabled""Mikez"MB_OK);
            
//disable
            
}else if(aoecheck == 1){
                *(
DWORD*)ADDR_GM 0;
                *(
DWORD*)ADDR_AOE 0;
                
aoecheck 0;
MessageBoxA(NULL"AOE disabled""Mikez"MB_OK);
            }
        }
        
Sleep(1);//it will cause you lag if you make it so high,value 1 works best
    
}
}  

BOOL APIENTRY DllMain(HMODULE hModuleDWORD ulReasonLPVOID lpReserved)
{
    if (
ulReason == DLL_PROCESS_ATTACH)
    {
     
MessageBoxA(NULL"DLL successfully Injected""Mikez"MB_OK);
        
CreateThread(00, (LPTHREAD_START_ROUTINE)Start000);
    }

    return 
TRUE;

mi5pogi is offline  
Thanks
3 Users
Old 08/29/2012, 18:29   #13
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
thanks mike, i tried the code and recommendations you set forth, unfortunately with addicted injector and perx did not work and i got nothing. i will make a quick video on what im doing and ill up it within an hour.

ok apparently my recording software isnt working atm, but rest assured its not working.

the dll isnt showing any messages at all so it seems like its not even injected at all.

i have to leave for about 10 hours hopefully i can have some more information from your generous help to get me to fix this issue.
syndrah is offline  
Old 08/29/2012, 20:17   #14
 
кev's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 130
Received Thanks: 184
Quote:
Originally Posted by mi5pogi View Post
PHP Code:
Sleep(1);//it will cause you lag if you make it so high,value 1 works best 
Not quite, 1ms only gives other threads some room to do work as well but it still means that the thread in question hogs all the cpu time it can have. So it's unnecessarily low for both, input checking and freezing memory values.

Not that it'd matter though as CABAL rapes your CPU as well. But still.

Quote:
Originally Posted by syndrah View Post
thanks mike, i tried the code and recommendations you set forth, unfortunately with addicted injector and perx did not work and i got nothing. i will make a quick video on what im doing and ill up it within an hour.

ok apparently my recording software isnt working atm, but rest assured its not working.

the dll isnt showing any messages at all so it seems like its not even injected at all.

i have to leave for about 10 hours hopefully i can have some more information from your generous help to get me to fix this issue.
I've had trouble with getting both of those injectors to work properly under 7 x64 (idk if those 2 don't set up debug privileges or just fail). There's quite few available in release section though, haven't tested them all.
кev is offline  
Old 08/30/2012, 01:56   #15
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
hi kevin.

thanks for your input. yes cabal does hog alot of power and it does have stunning graphics even for how old the game is.

i have tried about 15 different injectors and with no luck. im at a buddies place and just so happen to be available.

i tried crckd dll he released and the perx injector and i did get a message box from it. so i know it must be my dll.

hopefully we can resolve this so i can move to the next step of education and really kick it to high gear.

Again please continue to work together to get this done.
syndrah is offline  
Closed Thread




All times are GMT +1. The time now is 17:39.


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.