samedi 25 août 2018

Storing a char pointer into a container

i'm trying to store a char* that getting updated regularly.

i need to store the data it points to to a container in c++

i tried to use char* vector but all the elements points to the last updated char*.

Here's my code :

std::vector<const char*>Packets;
char* Packet;
void __declspec (naked) RecvCaller()
{
    __asm mov ecx, [ebp + 0x08]
    __asm mov Packet, ecx
    Packets.push_back(Packet);
    __asm jmp dwJmpBack
}

How could i achieve this?

Aucun commentaire:

Enregistrer un commentaire