Code:
#include "dll.h"
#include <windows.h>
#include <string.h>
Looks fine - you should also be pasting what is in "dll.h" though.
Code:
DllClass::DllClass()
{
}
DllClass::~DllClass ()
{
}
Pointless to have these two classes, as they're doing nothing.
Code:
BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
DWORD reason /* Reason this function is being called. */ ,
LPVOID reserved /* Not used. */ )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
/* Returns TRUE on success, FALSE on failure */
return TRUE;
}
You didn't initialize anything, so if this were to compile successfully and be called by a process, nothing would happen.
Code:
ChatCmd_AdminBanPlayer (void __cdecl ChatCmd_AdminBanPlayer(char const *,int,char * * const))
ZPostChannelChat (void __cdecl ZPostChannelChat(struct MUID const &,struct MUID const &,char *))
Push* ChatCmd_AdminBanPlayer = (Push*)0x004243E0;
BYTE* AdminBan(){
return (BYTE*)(*AdminBan + 0x18);
}
Looks fine to me..
Code:
void MainLoop()
{
While(1)
{
GetZPostChannelChat = "/admin_ban" + zchar;
if "/admin_ban" + zchar = true;
{
UGradeID = 253;
}
else
{
UGradeID = 0;
}
Sleep(1000);
}
Sleep(1);
}
}
Where are GetZPostChannelChat, zchar, and UGradeID declared? If they're supposed to be in dll.h, please post said file.
Code:
bool APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved){
if(dwReason == DLL_PROCESS_ATTACH){
DisableThreadLibraryCalls(hModule);
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)MainLoop,NULL,0,NULL);
return true;
}
return true;
}
Why are there two returns? The second return would be reached, assuming the if conditional statement is true or not.