headedtomexico
New member
- Joined
- Dec 9, 2008
- RedCents
- 0¢
dealing with onsendpacket, and i want to display the Packet data. I'm pretty unfamiliar with C++, but I did do some my research before I turned to you guys =)
From what I understand PVOID is just a pointer to an address of an undetermined structure. I want to output the packet data to the EQ screen in HEX. I get how to recast the PVOID as an int or char or whatever i want to use. And I get how to load a value out of the address with something like value = *Packet. I don't get what kind of structure I would jam the data in since it can be upwards of several hundred character in the event of it being a chat command.
BOOL OnSendPacket(DWORD Type, PVOID Packet, DWORD Size)
{
blahblah pktTemp;
CHAR fmtTemp[MAX_STRING] = {0};
blah
blah
blah
sprintf(fmtTemp, "Data: %0*X", Size, pktTemp);
WriteChatColor(fmtTemp,4,0);
From what I understand PVOID is just a pointer to an address of an undetermined structure. I want to output the packet data to the EQ screen in HEX. I get how to recast the PVOID as an int or char or whatever i want to use. And I get how to load a value out of the address with something like value = *Packet. I don't get what kind of structure I would jam the data in since it can be upwards of several hundred character in the event of it being a chat command.
BOOL OnSendPacket(DWORD Type, PVOID Packet, DWORD Size)
{
blahblah pktTemp;
CHAR fmtTemp[MAX_STRING] = {0};
blah
blah
blah
sprintf(fmtTemp, "Data: %0*X", Size, pktTemp);
WriteChatColor(fmtTemp,4,0);


