View Full Version : how to add timers to hack c++ + dll?
pecopecoman
03-04-2008, 03:03 PM
read the titlesniperheadshot2
ganglyman21
03-04-2008, 06:13 PM
Provided u exported all your functions correctly, simply declare your timers as normal and in the On() code add;
void CDLG_NAME::OnTimer(UINT nIDEvent) //timer
{
switch(nIDEvent)
{
case TIMER_NAME_HERE:
{
EXPORTED_FUNCTION_NAME(); //function exported from DLL
}
break;
}
CDialog::OnTimer(nIDEvent);
}
void CDLG_NAME::OnButton() //button
SetTimer(TIMER_NAME_HERE, 1, NULL);
Should be about right.
pecopecoman
03-05-2008, 02:09 PM
void CDLG_NAME::OnTimer(UINT nIDEvent) //timer
{
switch(nIDEvent)
{
case TIMER_NAME_HERE:
{
EXPORTED_FUNCTION_NAME(); //function exported from DLL
}
break;
}
CDialog::OnTimer(nIDEvent);
}
void CDLG_NAME::OnButton() //button
SetTimer(TIMER_NAME_HERE, 1, NULL);
2 Error To Complile The Exe
C:Documents and Settings-Francesco-DesktopLH1337_srcLH1337EXELH1337EXEDlg.cpp(335) : error C2065: 'FIRSTTimer' : undeclared identifier
C:Documents and Settings-Francesco-DesktopLH1337_srcLH1337EXELH1337EXEDlg.cpp(335) : error C2051: case expression not constant
C:Documents and Settings-Francesco-DesktopLH1337_srcLH1337EXELH1337EXEDlg.cpp(340) : warning C4060: switch statement contains no 'case' or 'default'
Np I Complilated ty
ganglyman21
03-05-2008, 03:36 PM
You ok now got it sorted?
pecopecoman
03-05-2008, 03:58 PM
it work but how i add more timers?
ganglyman21
03-06-2008, 05:38 AM
void CDLG_NAME::OnTimer(UINT nIDEvent) //timer
{
switch(nIDEvent)
{
case FIRST_TIMER_NAME_HERE:
{
EXPORTED_FUNCTION_NAME(); //function exported from DLL
}
break;
}
case SECOND_TIMER_NAME_HERE:
{
EXPORTED_FUNCTION_NAME(); //function exported from DLL
}
break;
}
case THIRD_TIMER_NAME_HERE:
{
EXPORTED_FUNCTION_NAME(); //function exported from DLL
}
break;
}
CDialog::OnTimer(nIDEvent);
}
And so on ;D Just need to repeat the case TIMER_NAME: after u break from the previous timer.
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.