Can I use the newer versions of Visual Studio to do "old" things?

247 views Asked by At

I have several ATL/COM-based DLLs that I've been using Visual C++ 6.0 on. I require a couple of "old" things out of the generated DLLs:

(1) They must be compatible with projects developed in Visual Basic 6.0 (the old VB6, emphatically not VB.Net).

(2) They must be compatible with old operating systems - minimum Windows 98 SE. To be clear, I mean they must run on such OSes, not that I would have to be able to develop them on a machine running such an OS.

I am sick of Visual Studio 6.0. Converting to Dot Net (or any other major change like that) is out of the question at the current time, so I must continue to use VB6. But can I switch to the newer Visual Studio's C++, with a minimum of effort (i.e. little if any required recoding)?

If so, are there any "gotchas" I should watch out for?

Thanks.

2

There are 2 answers

3
Charles Boyung On

The various versions of VS.Net can open up older .Net projects to an extent, but none of them can open up anything pre-.Net, which includes 6.0 of either language.

You should be able to create a new C++ project in one of the .Net VS applications and rebuild your C++ project there, and it should work because unmanaged C++ code doesn't require the .Net runtime (and it still compiles to native machine code), but I haven't done much C++ in a long time, so I don't know for sure 100% that it will work.

0
pestilence669 On

Yes, but it's mildly painful. This is why most shops stick with VC6. I admit I haven't tested COM DLLs on Windows 98, but as far back as NT 4.0 w/ Visual Studio 2005.

I'd like to emphasize that there is no minimal effort. Depending on how your code is written, the conversion can be quite painful. In one project, search & replace fixed 9 out of 10 problems. YMMV. You may need to rewrite some of the low-level COM plumbing.