zhi lee
2008-10-26 12:42:31 UTC
Hi,
I'm trying to download a file from a remote point using object.out() as a
parameter.
When I used it in a Win32 Console program it works well, but failed using
with MFC.
The problem is as the subject indicates:
it failed when the function out() is being called whether the object release
memory or reallocate memory using free() .
In free() it failed when execute the "delete _ptr" expression and displays
assert error in dbgheap.c (_ASSERTE(_pFirstBlock == pHead))
TVarVar<T>::free()
{
if( _ptr )
delete _ptr;
_ptr = NULL;
}
I used .out() as follows:
fv_var->LoadFile( remotepathname, remotefilename, numofoctets,
micoobject.out());
Why the error occured?
Thanks!
I'm trying to download a file from a remote point using object.out() as a
parameter.
When I used it in a Win32 Console program it works well, but failed using
with MFC.
The problem is as the subject indicates:
it failed when the function out() is being called whether the object release
memory or reallocate memory using free() .
In free() it failed when execute the "delete _ptr" expression and displays
assert error in dbgheap.c (_ASSERTE(_pFirstBlock == pHead))
TVarVar<T>::free()
{
if( _ptr )
delete _ptr;
_ptr = NULL;
}
I used .out() as follows:
fv_var->LoadFile( remotepathname, remotefilename, numofoctets,
micoobject.out());
Why the error occured?
Thanks!