CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 3 of 3 FirstFirst 123
Results 31 to 35 of 35
  1. #31
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: MS Visual Studio 2010 and support for Windows 9x and 2000

    Quote Originally Posted by Paul McKenzie View Post
    There should be some sort of compatibility switch within Visual Studio 2010 to allow creating EXE's that are valid executables for these other 32-bit OS'es.
    No Paul, there is no switch at all.

    Windows 2000 support has been discontinued and VC++ 2010 cannot compile applications that will run on Win2K. It's that simple. If you need to support Win2K, use the VS2010 Multi Targetting feature to let VC++2010 use the VC++2008 compilers and libraries.

    See also the following Connect issue which is an official answer from Microsoft.

    Take a look at one of my earlier posts in this thread. The latest VC++2010 compiler is putting 5.01 as subsystem version in the PE headers. Windows 2K does not understand that. To keep it running on Win2K, the version in the PE headers should be 5.00.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  2. #32
    Join Date
    Oct 2009
    Posts
    577

    Cool Re: MS Visual Studio 2010 and support for Windows 9x and 2000

    Quote Originally Posted by ahmd View Post
    Paul, you must be using plain Win32 calls in your software without any of the MFC or ATL stuff or any extensions to the language at all. I normally opt to use MFC and some ATL and link them statically. So I ran my latest project though the Dependency Walker and it came up with almost a dozen of different DLLs. I know that most of that boils down to ntdll.dll, kernel.dll and user32.dll but still there are dependencies that are required to start an executable on the platform of interest and if only one of them is missing (or even an API call from an existing DLL) the program won't start.

    My IDE of choice was MS VS 2002 for a long time (mainly because of the intellisense that was changed since VS 2003), but for the last couple weeks I'm trying to migrate to VS 2010. I was also always like you and considered loading some of the APIs in my software dynamically to allow compatability with older OS's.

    I think I dedicated about several days to converting my projects to VS 2010, having liked some of the new features they introduced to the IDE, only to discover to my dismay that the code it makes is 1.5MB on average lager in size and doesn't run on Windows 2000 on top of it. (I'm not even venturing to try Win9x at this point.)


    Well, I thought so too... until I saw it with my own eyes. I'm not pulling your leg. If you want I can attach a Hello World executable here and you can try it for yourself. I think Marc's explanation has some merit:



    Well, you're up for a surprise if you do

    I'm also assuming that you don't have SP1 installed on your VS 2008, do you?
    Generally if you were using more than MFC and (pure) VC runtime, you are lost regarding W2k and W98 since at least VS2003 (VC7) you were dependent on .NET and newer dlls which simply were not available for W2K (let alone W98) and also were not available as static libraries (afaik).

    If I would need W2k or W98 compatibility I would use VC6 and make the portability on source code level.

    Regards, Alex

  3. #33
    Join Date
    Jun 2006
    Posts
    25

    Re: MS Visual Studio 2010 and support for Windows 9x and 2000

    Quote Originally Posted by ahmd View Post
    2. Then if I do pretty much the same, Win32 console app with MFC and use the following lines:
    Code:
    CString s;
    s.Format(_T("Hello world!\n"));
    _tprintf(s);
    The size of the Release Unicode x86 build (with statically linked MFC libraries) mushrooms to, get ready for this, 1.54MB!!! Just for those 3 lines of code and a sh*t ton of MFC stuff that will never be used in this project. And obviously it doesn't run on Win2K either.
    All that is BAD!
    To address the static MFC size issue problem (not the Win2K problem) if you haven't already seen this, I thought I'd mention it. It will shrink your static MFC app back down to more reasonable size. See:

    http://tedwvc.wordpress.com/2010/05/...visual-c-2010/

  4. #34
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Re: MS Visual Studio 2010 and support for Windows 9x and 2000

    Quote Originally Posted by Ted. View Post
    To address the static MFC size issue problem (not the Win2K problem) if you haven't already seen this, I thought I'd mention it.
    Yeah, thanks. But I made my decision already. VS2010 is not worth it (at this point in time). It's way overblown and doesn't add much vs. VS 2008 w/o SP1. So I decided to stick with the latter one and quite like it (no need to adjust every single MFC project I make). Maybe in a couple of years when Windows 2000 support and the size of code don't matter anymore, I'd go with a new version of VS. I think Microsoft made a big mistake by doing all this with the Visual Studio, they clearly needed a switch to leave out all that new stuff.
    Last edited by ahmd; August 5th, 2010 at 05:09 PM.

  5. #35
    Join Date
    Jun 2006
    Posts
    25

    Re: MS Visual Studio 2010 and support for Windows 9x and 2000

    I dealt with the spin-off question earlier (EXE size). Now back to the original question - Visual C++ 2010 on Windows 2000 - here is my solution:

    http://tedwvc.wordpress.com/2010/11/...-windows-2000/

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured