Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Memory Question

Date: Wed, 25 Feb 2009 20:36:09 +0000
I'm not sure if this sent because my email is being weird, so sorry if this is a duplicate. 

>and also, how would i go about freeing the memory? 
>Depending on how you're allocating the const BYTE* 
I have no idea. short of doing const BYTE* target; i dont know how to allocate 
or free. Maybe you could give me an example of how to allocate const BYTE* target, and then free it?
 
>How are you "sending" the data to your DLL? Are you linking this DLL to 
wireshark? 
i have linked the library using LoadLibrary() in my custom dissector plugin. I 
will be sending the data as a parameter in a wrapper function within my proxy 
dll to send it to the lib. 
 
Greg 
 
 
____________________________ 
On Wed, Feb 25, 2009 at 15:16, <gogrady@xxxxxxxxx> wrote: 
 
Hi Sebastien, 
 
I will be taking the data and sending it to a dll that i am using as a proxy. 
the proxy will send the data to a lib that will create a msg type object to be 
sent back to the proxy dll, then it will be decoded by another lib that has 
functions to return parts of the message. 
 
 
hmmm, well, I guess you know what you're doing :) 
 
the msg type object takes a const BYTE* as a parameter along with the size of 
the buffer. so i guess i want target to be a const BYTE* then eh? 
That sounds reasonable! 
 
is that a type thats possible for this? 
Yes 
 
and also, how would i go about freeing the memory? 
Depending on how you're allocating the const BYTE* 
 
or if its possible to send just part of the tvbuff then i could use that as a 
parameter, though i dont know a function to do that. 
 
 
How are you "sending" the data to your DLL? Are you linking this DLL to 
wireshark? 
 
 
 
 
 
 
Regards, 
Sebastien Tandel