Re: CByteBuffer implementation passed between modules
"Mihai N." <nmihai_year_2000@yahoo.com> wrote in message
news:Xns97FFE2A4BC62MihaiN@207.46.248.16...
Well duh, RTL stands for Run Time Library, doesn't it?
Nope. Stands for Right-To-Left :-)
CRT is usualy "C Runtime Library"
LOL, I thought CRT stood for "cathode ray tube". Guess we can reuse the
acronym now that we're all using LCD screens! ;)
Ok, after the cheep joke, something serious.
I would recomend making sure the crash is actually caused by the exe/dll
scenario.
Thanks for your thoughts. I'll especially check for the copy constructor.
To be honest, all I know is that there is a crash when deleting m_pBuf. It
is in the RTL (oops... CRT) code, and I don't know why. But, the crash went
away when we did what Joe said and put the class in a separate DLL that was
used by both the EXE and the DLL that the EXE passed the object to. (BTW,
we did this long before he made his suggestion). That's why I thought for
sure it was a problem with the CRT mismatch, that was fixed by using a
common DLL. But I will look for the common mistakes that you mention.
Incidentally, I guess this means we really can't pass CStrings between
modules, if MFC is statically linked. Ironically, in VC6, Microsoft
published an article telling how to use CString in non-MFC projects simply
by compiling in the CString source modules (like what I'm trying to do here
with CByteBuffer). I guess they didn't address this issue of passing them
between modules in this case either.
-- David