473,320 Members | 1,802 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,320 software developers and data experts.

how to call vc6 dll from vc2005

Thanks in advance. I have a vc6 dll that is currently called by a vc6 exe
and want to call it from a vc2005 dll. The vc6 exe using the following header

[DllImport("cMath.lib")]
extern "C" __declspec(dllimport) int Estimate (int Task2Do,...);

Can someone please point me in the right direction for calling this function
from vc2005? Also, is it possible to expose the vc6 class and use that
directly?
Nov 17 '05 #1
2 1882
....using this in the vc2005 dll
__declspec( dllimport ) int Estimate (
int Task2Do, int EstimateID, char dsn[], char UID[], char PWD[],
float pIn, float pOut, int iPrint, int DosWindow,
int m1, int d1, int y1, int m2,int d2, int y2,
char dteTS[], float AOV[],
float Actual[], float Predicted[], float Residual[]);
I get this error:
Linking...
Estimator_BLL.obj : error LNK2020: unresolved token (0A000009)
"int __cdecl Estimate(int,int,char * const,char * const,
char*const,float,float,int,int,int,int,int,int,int ,int,char *
const,float * const,
float* const,float * const,float * const)"
(?Estimate@@$$FYAHHHQAD00MMHHHHHHHH0QAM111@Z)
Estimator_BLL.obj : error LNK2001: unresolved external symbol
"int __cdecl Estimate(int,int,char * const,char * const,
char * const,float,float,int,int,int,int,int,int,int,int,
char * const,float * const,float * const,float * const,float * const)"
(?Estimate@@$$FYAHHHQAD00MMHHHHHHHH0QAM111@Z)
C:\Code\Estimator\Estimator_GUI\Debug\Estimator_BL L.dll :
fatal error LNK1120: 2 unresolved externals
I have cMath.lib and cMath.dll in c:\windows\System32
"indiana" wrote:
Thanks in advance. I have a vc6 dll that is currently called by a vc6 exe
and want to call it from a vc2005 dll. The vc6 exe using the following header

[DllImport("cMath.lib")]
extern "C" __declspec(dllimport) int Estimate (int Task2Do,...);

Can someone please point me in the right direction for calling this function
from vc2005? Also, is it possible to expose the vc6 class and use that
directly?

Nov 17 '05 #2
.... some additional information on the problem.
It seems that vc2005
1) will not read a simple __cdecl export and
2) is adding to the mangled name under a __stdcall export

from DumpBin on cMath.lib
?Estimate@@YGJJJQAD00MMJJJJJJJJ0QAM111@Z (long __stdcall Estimate (...
?LiZhou1@@YGHXZ (int __stdcall LiZhou1(void))

from C++2005 Error
(?Estimate@@$$J280YGHHHQAD00MMHHHHHHHH0QAM111@Z)
(?LiZhou1@@$$J10YGHXZ)

"indiana" wrote:
Thanks in advance. I have a vc6 dll that is currently called by a vc6 exe
and want to call it from a vc2005 dll. The vc6 exe using the following header

[DllImport("cMath.lib")]
extern "C" __declspec(dllimport) int Estimate (int Task2Do,...);

Can someone please point me in the right direction for calling this function
from vc2005? Also, is it possible to expose the vc6 class and use that
directly?

Nov 17 '05 #3

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

Similar topics

2
by: adebaene | last post by:
Hello all, I just checked that the following did compile with VC2005 b2, and I think it shouldn't: template <typename T> struct A { typedef int Foo; };
2
by: ClydeL | last post by:
Compling a legacy VC6.0 program with the VC2005 compiler used mfc80 dlls. Do these get installed with the .NET runtime or do they need to be installed separately.
2
by: adebaene | last post by:
Hello group, There seems to be a bug int the interop layer in VC2005 when dealing with certain pointer types (or values?) Here is a repro case using Boost version 1.32 and C++/CLI : using...
7
by: Yuanfei | last post by:
Hi There, I just found that there is a problem in vc2005 regarding to time_t and localtime. See code snippets belows. Using this code segment, I found that when ut is 86200, the corresponding...
2
by: Boki | last post by:
Hi All, How to make VC2005 Express can develop MFC? Or should I turn to use CLR? Best regards, Boki.
2
by: kittymaguire | last post by:
When I tried to use the IAxWinHostWindow interface in a MFC project I get the following An assert in CComTypeInfoHolder::GetTI(LCID lcid) at ATLASSUME(!InlineIsEqualGUID(*m_plibid, GUID_NULL)...
0
by: =?GB2312?B?zPC5zw==?= | last post by:
Howdy, This problem have puzzled me for a long time. I usually use python2.5 in Windows, while VC2005 is installed. However python25.lib is compiled by VC2003. When I use disutil to build some C...
0
by: Christian Heimes | last post by:
甜瓜 schrieb: It's possible but ill-advised. The free mingw32 compiler can build Python extensions just fine. I'm using it all the time to build Python 2.5 extensions for Windows. In the...
1
by: Yoavo | last post by:
Hi, I have the following code: class AA { public int Width { get; set; } } this compiles ok on VC2008 but fails in VC2005. What is the reason and how can I build it ok in VC2005 ?
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.