Working with VS6 dlls?

Hi everyone,

Let me first say that I'm a relative novice using VC++. I was given a project to write the UI for a piece of software using C++. So I've been writing a Windows application using Visual Studio Express C++. Today, I was given a dll file from another team, but I found out that they've been using VS 6.0. The sample program they gave me doesn't seem to compile (There are 30odd compile errors..).
Now I don't know quite what to do. Is there a way to get standard C++ to compile on VSE
In particular, the errors that I'm getting all sorta look like the following three:

error C2470: 'CMixer' : looks like a function definition, but there is no parameter list; skipping apparent body

...
class AFX_EXT_CLASS CMixer
{
public:
CMixer();
virtual ~CMixer();
....

error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2143: syntax error : missing ',' before '&'
...
static double GetFileDuration(const CString &strFileName);
...

error C3861: '_T': identifier not found
error C3861: '_T': identifier not found

...
static const TCHAR *devIdArray[] =
{
_T("USB\\Vid_0d8c&Pid_000C"), // BIG_CANNON
_T("USB\\Vid_138c&Pid_0001"), // SMALL_CANNON
};
...


Any help would be greatly greatly appreciated.
Chris


Answer this question

Working with VS6 dlls?

  • angel180

    For the first error I would preprocess the file - it might be that the compiler cannot understand AFX_EXT_CLASS - if it can't then that would explain the error.

    For the second error I suspect that the reason is that the compiler cannot find a definition for CString - this is not surprising as it has "moved" header files between Visual C++ 6.0 and Visual C++ 2005 - you should ensure that you include the correct header file - atlstr.h I believe.

    For the last error you need to #include tchar.h.



  • sgarlad

    Hi Jonathan,

    Thank you for your quick response. For the 1st and 3rd errors, your suggestions got rid of the errors. However, when I try to include atlstr.h, it says that there is no such file or directory.

    Is this an issue with the Express edition I remember reading on the FAQs that MFC and ATL aren't supported. If I upgrade to the Standard edition, will that solve the problem
    Or is there a better way to attack this problem, given that I have VSE 2005 and VS6.0

  • Working with VS6 dlls?