Hi all, my application uses callback function in DLL (Written in C),
The DLL sniff's the network card and then allocates new data dynamically
using malloc() function ,
Then the data (pointer) passed to the host application (MFC),
After I use the data and copying it, I'm trying to free the space using
Free()
But I get an Assertion error,
After running step by step inside MS code I see that free() function check's
if the new memory was allocated inside the current app (local) , if the
memory wasn't allocated inside then Assertion error occur .
How do I free memory from other application?
[DLL]
| |
| |
[App]
steps :
1.. Application init the DLL and run it, the DLL now runs separately from
the app .
2.. when ever the DLL find network data , it will allocate memory space
,and process incoming data
3.. Then it will notify the application using callback function, and pass
the application a pointer to the new allocated space.
4.. the application uses the memory
5.. Application try to free the memory using the free function - Assertion
Error !!!!!
Env : Vs.net IDE (NO DotNet involved , pure c/c++ code .)
Win xp
Thank you very much
Sharon.G