473,408 Members | 2,832 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,408 software developers and data experts.

STL String (VC++ 6.0) native code issue

I have a native (legacy) library created with Visual Studio 6.0. It utilizes
STL for its string operation. In addition, most of public members of the
classes in this library return or use STL string as parameters. The
implementation for STL seems to change so I fail to using the IJW approach.
Is there a workaround?
Nov 16 '05 #1
2 1536
Sai Kit Tong wrote:
I have a native (legacy) library created with Visual Studio 6.0. It utilizes
STL for its string operation. In addition, most of public members of the
classes in this library return or use STL string as parameters. The
implementation for STL seems to change so I fail to using the IJW approach.
Is there a workaround?


Not that I know of. The VC6 and VC.NET implementations of std::string are
not binary compatible. This is a versioning issue, not an IJW shortcoming.

--
Doug Harrison
Microsoft MVP - Visual C++
Nov 16 '05 #2
Sai Kit Tong wrote:
I have a native (legacy) library created with Visual Studio 6.0. It
utilizes STL for its string operation. In addition, most of public
members of the classes in this library return or use STL string as
parameters. The implementation for STL seems to change so I fail to
using the IJW approach. Is there a workaround?


As Doug mentioned, this is a versioning/binary compatibility issue, not an
IJW issue.

One workaround I can think of:

In VC6, implement a library which wraps your legacy library in a plain 'C'
API. Compile this wrapper and your legacy library into a DLL using VC6.

In VC7{.1}, implement a library which wraps the C API in a new C++ wrapper
that exposes VC7{.1} STL classes. Compile this library with VC7 and link it
with your program.

Ugly, but it could be workable, depending on how wide the API to your legacy
library is.

-cd
Nov 16 '05 #3

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

Similar topics

4
by: ultranet | last post by:
I have cruised around http://msdn.microsoft.com/visualc/ and the rest of the site, and i am not able to find a single C++ or VC++ certification exam that will be available after June 30, 2004. I...
7
by: ultranet | last post by:
I have cruised around http://msdn.microsoft.com/visualc/ and the rest of the site, and i am not able to find a single C++ or VC++ certification exam that will be available after June 30, 2004. I...
8
by: The unProfessional | last post by:
To the VC .Net'ers out there... I noticed alot of strange behavior in the way VC .Net apps behave in the IDE. It's a bit odd, so maybe people have workarounds. I'm worried to devote my project...
5
by: Lonewolf | last post by:
Hi, I'm not sure if this has been asked before so please pardon me if this is a repeated question. Basically I have some performance critical directshow codes which is implemented in native,...
1
by: Greg | last post by:
Perhaps many have heard of the famous C3767 "Candidate functions...." I found that by not using a native type (struct ptr) in a constructor signature, the problem went away. The problem only...
3
by: doubts | last post by:
Hi all, I am trying to convert my bulk of code from VC++ 6.0 to VC++.Net. when using std::string type variable, the application causes exception at one instance and does not cause an exception at...
7
by: Amu | last post by:
Hi i am stuck up in a part of project where i have to inherit the VC++ template classes into C#.net. Please provide me the solution for this .
14
by: =?Utf-8?B?Sm9hY2hpbQ==?= | last post by:
I have seen the following function to convert from a System::String^ to a const wchar_t*. I would like to get a LPCTSTR and AFAIK LPCTSTR is equal to const wchar_t*. Then it should all work right?...
7
by: Ashutosh Bhawasinka | last post by:
Hi, I have a C# .Net application which needs to use some feature which can be only developed in Visual C++ (its extended MAPI). The C# exe will be supplied to users without a setup. What kind...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.