473,396 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

bug of VC6's _com_ptr_t might caused stack-overflow

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?
Jul 19 '05 #1
1 2968
On Wed, 5 Nov 2003 22:07:20 +0800, "Bruise" <br********@163.net> wrote
in comp.lang.c++:
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
news:microsoft.public.* 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
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: DRIZAII | last post by:
I am wondering if anyone has come across this problem. I have a huge VC6 project (C++ Win32 DLLs, .dsp, .dsw), and when I tried to open the project through Visual Studio .NET 2003, it offered to...
7
by: Brian | last post by:
Hi, I have been trying to tune my vc7 compiled applications to perform at the same or (preferably) better speed of the same vc6 application. Both versions of my code are compiled with...
2
by: James Clark | last post by:
We've been using VC6 for some time and are trying to port some specific code to VC7.1 (VC++ .Net 2003). But I've come across problems where __forceinline doesn't inline simple inline assembly that...
0
by: Dirk Evertz | last post by:
Hi all, I've experienced a problem when passing a smart-pointer (_com_ptr_t) by value to another function using managed extensions. This only seems to happen if the object is created via new....
0
by: Sushma | last post by:
Hi All I'm porting my application from VC6 to VC7. There is a COM exe that has successfully registered itself with system. But when I'm using its services in other Dll I get this error. ...
11
by: Devender Khari | last post by:
Hi Friends, I'm facing a situation as follows, need help on identifying possible issues. There is an MFC application developed in VC6.0, say ABCVC6.exe and another developed in VC.NET, say...
2
by: | last post by:
I try to build dll in VC .NET, In that project I use dlls that were built in VC6, and I get a lot of errors. (for example <iostream.h> instead of <iostream> etc.) I am not aloud to change anything...
7
by: YAZ | last post by:
Hello, I have a dll which do some number crunching. Performances (execution speed) are very important in my application. I use VC6 to compile the DLL. A friend of mine told me that in Visual...
4
by: lauch2 | last post by:
I have a project that contains a COM object running in the in-process configuration. The project was developed by VC6.0 with SP 3. The project has been put into production for long period of time...
3
by: lauch2 | last post by:
Can anyone talk me is there existed a "default" value for a un-initialized int variable in a release build in VC6 and VC7.1. (I know there is a compilation warning) For Example: main(){ int a;...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.