Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: necesito ayuda de un programador para añadir mas plugin al GetMainInfo  (Visto 751 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline JavixFer Posteado: March 16, 2020, 07:40:30 PM | Modificado: March 17, 2020, 05:16:23 AM by javierf2

  • +1 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 476
  • Gracias recibida: 4029
  • bo
trate de agregar plugins al main info para que pueda agregar varias dll mediante source de main.dll y tambien getmain-info pero solo me reconoce la plugin default hasta lo acomode pero me sigue sin reconcer la segunda plugin que trato de agregar. me debe faltar algun paso por favor me echan una manito

GetMainInfo.ccp
Code: [Select]
struct MAIN_FILE_INFO// busque esto y agregue el nuevo plugin

char PluginName1[32];

DWORD Plugin1CRC32;


int _tmain(int argc,_TCHAR* argv[]) //luego busque este otro y agregue nueva mente copiando del que ya existia y lo puse al final 1


GetPrivateProfileString("MainInfo","PluginName1","",info.PluginName1,sizeof(info.PluginName1),".\\MainInfo.ini");




       //nuevo plugin
if(CRC32.FileCRC(info.PluginName1,&info.Plugin1CRC32,1024) == 0)
{
info.Plugin1CRC32 = 0;
}

protect.h
Code: [Select]
char PluginName1[32];
DWORD Plugin1CRC32;

protect.ccp
Code: [Select]
void CProtect::CheckPluginFile1() // OK
{
if(this->m_MainInfo.Plugin1CRC32 == 0)
{
return;
}

CCRC32 CRC32;

DWORD Plugin1CRC32;

if(CRC32.FileCRC(this->m_MainInfo.PluginName1,&Plugin1CRC32,1024) == 0)
{
MessageBox(0,"Plugin CRC error!","Error",MB_OK | MB_ICONERROR);
ExitProcess(0);
}

if(this->m_MainInfo.Plugin1CRC32 != Plugin1CRC32)
{
MessageBox(0,"Plugin CRC error!","Error",MB_OK | MB_ICONERROR);
ExitProcess(0);
}

HMODULE module = LoadLibrary(this->m_MainInfo.PluginName1);

if(module == 0)
{
MessageBox(0,"Plugin CRC error!","Error",MB_OK | MB_ICONERROR);
ExitProcess(0);
}

void (*EntryProc)() = (void(*)())GetProcAddress(module,"EntryProc");

if(EntryProc != 0)
{
EntryProc();
}
}

main.ccp
Code: [Select]
extern "C" _declspec(dllexport) void EntryProc() // OK busque donde estaban los pluging y puse el nuevo plugin

gProtect.CheckPluginFile1();


Offline JavixFer #1 Posteado: March 17, 2020, 09:23:44 AM

  • +1 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 476
  • Gracias recibida: 4029
  • bo

Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
7 Replies
1653 Views
Last post July 12, 2017, 03:22:02 PM
by gianoaa
3 Replies
849 Views
Last post March 30, 2019, 02:43:17 AM
by GX_KYO
4 Replies
1065 Views
Last post March 28, 2020, 07:12:04 PM
by NasLy
0 Replies
442 Views
Last post July 13, 2020, 12:59:30 AM
by Byro
1 Replies
490 Views
Last post February 18, 2021, 08:31:54 PM
by bollanog