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

Possible to call old DLL with CString argument?

Just check that I got this right.

I have an old DLL made in VC6 (no sources). Some of the methods have a
CString as argument.
No problem when using this from my VC6 application.

I migrated my VC6 application --> VC7 (VS 2003) and then I get an error at
link time saying something like
error LNK2001: unresolved external symbol "public: int __thiscall
CGMCAlarms::SetAlarm(class ATL::CStringT<char,class
StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > &,class
ATL::CTime,int,int,int,int,int,class ATL::CStringT<char,class
StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > >)"

I've been digging around in various documents for aspects of migrating and
come to the conclusion that this is the way it is due to the redesign of
CString.

One solution for this might be to make a new wrapper DLL in VC6 with
identical methods but with CString changed to something else maybe BSTR,
char*, convert it to CString in the DLL and then call the original DLL.

Am I right or is the a better and much simpler solution ?

rdgs,
Bo

Nov 16 '05 #1
1 2285
>One solution for this might be to make a new wrapper DLL in VC6 with
identical methods but with CString changed to something else maybe BSTR,
char*, convert it to CString in the DLL and then call the original DLL.

Am I right or is the a better and much simpler solution ?


That seems a reasonable approach.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 16 '05 #2

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

Similar topics

3
by: Morten Overgaard | last post by:
Hi How do I convert a managed System::String to a CString. I need to handle unicode characters ( Japan and Chinese ) as well as "normal" ANSI characters. I have tried the following char* p...
2
by: Hai Ly Hoang [MT00KSTN] | last post by:
CString.FormatMessage and CString.Format has the same parameters and they seems to have to outcome. However, they coexist !. There must be some subtle different between they. Can you tell me the...
3
by: Taptu¶ | last post by:
Hi I have a problem. I have a function : void for3::drzewo() { m_lista.DeleteAllItems(); m_li.GetImageList();
11
by: vbgunz | last post by:
Hello all, I am just learning Python and have come across something I feel might be a bug. Please enlightenment me... The following code presents a challenge. How in the world do you provide an...
5
by: Martin Jørgensen | last post by:
Hello again, Sorry to bother but I guess my C++ book isn't very good since it obviously contains errors so the program code doesn't work with g++. However I don't understand what the problem...
4
by: huguogang | last post by:
Just curious, any one know what the 3 part parameter "class CString filename" would mean. The code: int TestFunc(class CString filename) { fopen(filename, "w"); } Compile using Visaul C++,...
7
by: MeAgin | last post by:
Hi all, I want to call a classic ASP page from my vb.net code. How this can be done? Normally I would create an object from MSXML2.XMLHTTP and then call the Get method and the ResponseText wiuld...
3
by: Josemi | last post by:
Hi!, I've got a great problem, and I don't have any idea how can I to solve it. I hope that there is a solution to solve it :-). Well. I've got an App UNICODE that call a routine in a dll MBCS:...
9
by: Donos | last post by:
I have a CString with 100 characters. Now i want to make that to 2 lines. For example, CString str = "This is just a test to find out how to break a cstring"; I want this CString in the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.