trekrider

We are interested in trialing a windows application that includes a toolkit consisting of API's in the form of DLL's that was written in Microsoft Visual C++ 7 .NET

My question is this..

Is it reasonable to assume that I will be able to write some 'concept test' code calling those API's using a later version of Microsoft Visual C++ or will I be forced to use 7

2nd question is akin (and dependant on) the first question. If the answer to the first question is 'yes'... could I possibly use MS Visual C++ 2005 Express Edition

thank you very much



Re: Visual C++ General compatibility of commercial package API's written with Visual C++ 7 .NET with more recent release of Vis C++

einaros

The first question really depends on the library. If it doesn't depend on any types from external libraries (such as the C Runtime or MFC), chances are that it may work. The problem with type dependencies is that the memory representation (and code behind) the types may have changed between library versions. Mixing those types will most certainly lead to problems, and quite possibly crashes.

Question two also depends quite a bit on the design of the library, and specifically whether it depends on libraries which aren't available in VC Express, such as the MFC.





Re: Visual C++ General compatibility of commercial package API's written with Visual C++ 7 .NET with more recent release of Vis C++

crescens2k

The best method of doing something like this is to define simple APIs which don't take any parameters which are complex types if you can help it. This will rule out classes and structures.

Problems in compatibility occur when you pass in a class or struct which has changed in the newer version. Because of this, the code for the DLL works with hardcoded memory addresses and can then overwrite the incorrect value, or if the type has shrunk, possibly protected memory.

In general you should try to have external APIs taking simplest types possible, this way you can reduce any possible breakage.






Re: Visual C++ General compatibility of commercial package API's written with Visual C++ 7 .NET with more recent release of Vis C++

einaros

crescens2k wrote:

The best method of doing something like this is to define simple APIs which don't take any parameters which are complex types if you can help it. This will rule out classes and structures.



If I understand the OP right, they are asking whether or not they will be able to use the libraries, not write them Smile