bug of VC6's _com_ptr_t might caused stack-overflow

B

Bruise

in VC6-SP5 with ProcessPack, \Include\comip.h, there's a serious bug might
cause overwrite:

HRESULT CreateInstance(LPCSTR clsidStringA, IUnknown* pOuter = NULL, DWORD
dwClsContext = CLSCTX_ALL) throw()

e.g, when we write code calling ADO like
pRstEmployee.CreateInstance("ADODB.Recordset"));
pRstEmployee->Open(....

Above code would lead to unexpected stack-overflow in release version

Very curiously, the comip.h seems had avoided this error in VC7 of VS2003 by
somehow.

Anybody know it's VC6SP5's bug or ProcessPack's bug?
 
J

Jack Klein

in VC6-SP5 with ProcessPack, \Include\comip.h, there's a serious bug might
cause overwrite:

There is no header named "comip.h" in standard C++, so this is
off-topic here.
HRESULT CreateInstance(LPCSTR clsidStringA, IUnknown* pOuter = NULL, DWORD
dwClsContext = CLSCTX_ALL) throw()

There is no C++ function named CreateInstance, the Windows API is just
as off-topic here as any other non-standard third party library.
e.g, when we write code calling ADO like
pRstEmployee.CreateInstance("ADODB.Recordset"));
pRstEmployee->Open(....

There is no such thing as ADO in C++, this is a Windows specific hack.
Above code would lead to unexpected stack-overflow in release version

Very curiously, the comip.h seems had avoided this error in VC7 of VS2003 by
somehow.

Anybody know it's VC6SP5's bug or ProcessPack's bug?

If you have problems with Microsoft's compiler or their libraries,
check the MSDN web site or their support groups in the
family. None of this has anything to do with
the C++ language.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top