topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 1:07 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: To persist with Windows 2000 support?  (Read 11715 times)

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
To persist with Windows 2000 support?
« on: February 23, 2011, 01:36 PM »
I used to be happy to limit the target platform of my Windows applications to Win2k and higher. I figured it was pretty safe to give up on the Win9x family, particularly as I wanted to support Unicode yet the idea of messing with TCHAR's, etc, really didn't interest me (nor is it recommended anymore it seems).

I was happy with that decision, indeed I was quite proud to be able to support a 10+ year old OS.

Now however, MS have dropped support for Win2k and WinXP pre-SP2 in the Visual Studio 2010 runtime. There is some discussion regarding the troublesome missing functions, Encode/DecodePointer, over on StackOverflow, but even if the hacks suggested work, they are just hacks. Also, looking at dependencies, I noticed another export missing, one which would be much harder to get around.

Now admittedly you can actually use the VC++ 2008 toolset in Visual Studio 2010, but you don't get the newer C++0x features, such a lambdas or auto, which really make C++ programming so much nicer.

So this leaves me in a quandary, such I stick with older C++ just to maintain Win2k compatibility, or ditch it and embrace the newer, better, programming world?


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #1 on: February 23, 2011, 01:50 PM »
I'm in this conundrum as well.  I recently developed a private build of Trout that is Unicode capable.  However, this would cause support for Win2k and below to cease.  I really have no desire to keep two builds (Unicode/ANSI) concurrent either.   :huh:

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #2 on: February 23, 2011, 02:52 PM »
Eóin: as somebody :) posted at SO, it's possible to support pre-XPSP2 with VS2010, but it does require a bit mucking around... haven't looked deeply into it, but I guesstimate it's possible to have everything working, lambdas and all, without too much trouble.

I don't agree that getting around {En,De}codePointer is a hack - and again, fscking shame on MS for not giving developers a few options here. Link.exe even refuses to set older ImageVersion fields for NO FSCKING GOOD REASON. As I don't know if there's other modifications needed to get VS2010 EXEs running on 2k, I can't comment on the hackishness of those... but I suppose it's not too bad. And hey, you get the CRT source code along with VS2010, so it should be possible to develop less-hacky solutions.

skwire: win2k supports unicode just fine, all NT builds of Windows do - and Win9x even has limited support for it via unicows.

Personally, I don't really know. For fSekrit, I develop in VS2010, but build release versions with vc2003toolkit (shame on MS for taking that offline, and double shame on them for not offering "toolkit" versions of later compilers!) so that I have win9x support... but that's the last project where I'll support win9x.

For everything else, I'm considering whether I want to go through the hoops required for win2k support. For c++ dev, I definitely want to use the c++0x features, after having been developing in C# for a while it's just too painful not having lambdas and auto.
- carpe noctem

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #3 on: February 23, 2011, 03:01 PM »
skwire: win2k supports unicode just fine, all NT builds of Windows do - and Win9x even has limited support for it via unicows.

I know.  However, the unicode builds of AHK don't work on Win2k and below (at least in my tests).  No big deal, though.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #4 on: February 23, 2011, 03:04 PM »
Ah, lazy sods :)

I guess whether to support Win2k also depends a bit on your app, and the target audience. If it's a generic light-weight tool that can (and perhaps is designed to!) run on low-end hardware, supporting win2k seems like a rational thing to do. If it requires a higher-end machine, or has very limited target audience, it's probably not worth the effort.
- carpe noctem

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #5 on: February 23, 2011, 03:17 PM »
Ha, didn't know that was you f0dder, though seeing FASM mentioned did surprise me.

I was all ready to go with that solution, together with a possible LoadLibrary check to forward on to the existing functions if they are present, but then I saw in my test app that it was also referencing InterlockedPopEntrySList & the Push variant. I figure that would be a harder problem to get around.

A Google did turn up this thread suggesting to #define _WIN2K_COMPAT_SLIST_USAGE to avoid the use of those functions, but it doesn't seem to work. Annoyingly, one of two apps didn't link in those functions, but I've no idea which header or library, in the one that does, is the culprit.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #6 on: February 23, 2011, 03:19 PM »
Hm, do you use any new-fangled lockfree container types?
- carpe noctem

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #7 on: February 23, 2011, 03:32 PM »
it's increasingly hard to justify support for win2000.. if it's too much trouble i wouldn't stress over dropping support for it for most programs.

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #8 on: February 23, 2011, 03:39 PM »
f0dder - I didn't think I did, but a scan of the CRT sources show it crop up on 4 files, so I guess MS switched over to that function from the older ExInterlockedPushEntrySList & Pop functions when they dropped Win2k support. I must be referencing it indirectly somehow.

Windows XP and later versions of Windows provide optimized versions of the sequenced singly linked list functions that are not available in Windows 2000. If your driver uses these functions and also must run with Windows 2000, the driver must define the _WIN2K_COMPAT_SLIST_USAGE flag, as follows:

#define _WIN2K_COMPAT_SLIST_USAGE

For x86-based processors, this flag causes the compiler to use versions of the sequenced singly linked list functions that are compatible with Windows 2000.

That define doesn't seem to appear anywhere in the 2010 CRT sources/headers, so I guess that's why it has no effect.

Mouser - I am increasingly coming around to that conclusion, it just seems a pity though.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #9 on: February 23, 2011, 03:42 PM »
That page says driver, though, so it's probably NTDDK (or what it's called these days) related?
- carpe noctem

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #10 on: February 23, 2011, 03:59 PM »
True of course, but nonetheless the functions are used within in the CRT as best I can tell.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #11 on: February 23, 2011, 04:04 PM »
True of course, but nonetheless the functions are used within in the CRT as best I can tell.
Wouldn't be surprising to have code duplicated across kernel and user mode :)
- carpe noctem

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,645
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #12 on: February 23, 2011, 04:18 PM »
(shame on MS for taking that offline, and double shame on them for not offering "toolkit" versions of later compilers!)

I agree with this.

But, you can install VC++ Express and just ignore the IDE to get similar functionality (VC++ 2005 even had an option to install only the command line tools without the IDE).  However, VC++ Express doesn't include 64-bit compilers (see later) and VC++2005 is only available from a link that isn't on a Microsoft page.  You can still get VC++ Express 2008 via a published Microsoft webpage, but if I had to put money on it, I'd guess that at some point they'll drop it (so download the ISO now if you think you might want it in the future).

Also, the Windows SDK now includes the compilers (it's had 64-bit compilers since MS started supporting ia64, and now has the 32-bit x86 compiler - I think that started with the Vista SDK).

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #13 on: February 23, 2011, 04:37 PM »
Yeah the SDKs are great, they seem to give you everything except ATL and MFC, and the IDE of course.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #14 on: February 23, 2011, 05:22 PM »
Both the SDKs and the Express editions are nice things... and both are absolutely humongous compared to the 32meg VCToolkitSetup.exe. I'm sorta OK with MS not supporting toolkit versions of their recent compilers, even though I think it's a shame they don't.

But I'm still pissed off at them pulling the 2003 toolkit, since it's the last (gratis available - iirc there were no express versions before 2008?) compiler that supports building for 9x targets.
- carpe noctem

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,645
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #15 on: February 23, 2011, 05:54 PM »
I agree that it would be nice to have a small VC++ compiler package like vc2003toolkit.  But MS likes to keep everyone moving along to the latest.  I'm sure there are several reasons; not having to support old tool packages being one they'll mention.  I'm sure that encouraging developers to move to tools that don't support older systems is another that probably doesn't get mentioned in a FAQ.

There was a VC++ Express 2005 that preceded the Express 2008 edition - it's still legitimately downloadable from Microsoft, but they no longer provide a link on a webpage - you have to know it or search it out on someone's blog:

  - VC++ 2005: http://go.microsoft....fwlink/?linkid=57034  (from http://apdubey.blogs...io-2005-express.html)

The installer for VC++ Express 2005 lets you clear a checkbox to avoid installing the IDE.  The stated intent was that this would be a supported way to install the  VC++ compiler toolchain for build systems.  I think that was one of the rationales for vc2003toolkit, too.  I imagine they dropped that option from Express 2008 because the full compiler tool chain is in the SDK, and that should be used for build machines if you want an IDE-less install.

I'm still pissed off at them pulling the 2003 toolkit, since it's the last (gratis available - iirc there were no express versions before 2008?) compiler that supports building for 9x targets.

I don't recall if VC2005 supports 9x targets (I'd guess not) - did MS release any gratis compiler that supported 9x target before 2003 toolkit?

update:  according to Wikipedia, VC2005 will target 9x: http://en.wikipedia..../wiki/Visual_C%2B%2B

« Last Edit: February 23, 2011, 06:02 PM by mwb1100 »

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #16 on: February 23, 2011, 06:14 PM »
did MS release any gratis compiler that supported 9x target before 2003 toolkit?

I think they might have offered 'standard' compilers. The 2003 toolkit was the first time you could get an optimizing compiler for free I believe.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #17 on: February 23, 2011, 06:28 PM »
mwb1100: yeah, 2005 was the last compiler with Win9x support, I had just forgotten that MS released an Express version of it - so it's the last gratis win9x compiler. And while it might be available via those links (I don't think there's any way to get 2003toolkit from MS?), it's probably going to expire within too long, just like the last .CHM PlatformSDK versions first disappeared through public pages, and then suddenly couldn't be reached by URL-guessing either. Shame.

did MS release any gratis compiler that supported 9x target before 2003 toolkit?
I think they might have offered 'standard' compilers. The 2003 toolkit was the first time you could get an optimizing compiler for free I believe.
Sounds right to me. Weren't the SDK-included compilers initially handicapped? Or was it just that only the x64 compilers were offered, initially?
- carpe noctem

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #18 on: February 23, 2011, 06:55 PM »
My memory of the early 64 bit compilers was that you got betas with the server 2003 sdk, though they seemed to work for the simple stuff I messed with back then. There were How-Tos online around the time on getting Visual Studio 2003 to use them so you could compile 64bit applications through the IDE.

I don't really know what the situation was with VS.net 2002 and earlier, I wasn't really into C++ then.

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #19 on: February 23, 2011, 06:58 PM »
(I don't think there's any way to get 2003toolkit from MS?)

Oh hell yeah, the MSDN goes all the way back to Visual C++ v1.52. Granted you need a subscription (not cheap) but they are still available.

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,645
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #20 on: February 23, 2011, 07:07 PM »
Weren't the SDK-included compilers initially handicapped? Or was it just that only the x64 compilers were offered, initially?

Here's my recollection (which might be faulty) of various things regarding free compilers from Microsoft:

Prior to VC 2003 Toolkit, there was no x86 compiler available gratis from Microsoft.

Starting with the Windows SDK for Vista (they might have still called it the "Platform SDK" then), MS provided compilers for all supported platforms (x86, x64 and ia64).  Before that, SDKs came with compilers for  supported 64-bit platforms (ia64 and x64 when supported).  I don't remember anything about how you'd get compilers for MIPS or Alpha from when those were supported (way too long ago...).  The compilers provided with the SDK were always optimizing compilers.  The SDK included MFC for 64-bit compilers (I don't know if they still do) since for a period of time, there was no other way to get a MS compiler for 64-bit platforms. I think that other than that, MFC has never been in a free compiler package.

At some point the DDK (now called the WDK; maybe they've updated the name again) started coming with compilers before the SDK did, but the WDK didn't become free until after the SDK started providing compilers (though it was only $10 or so for quite some time before becoming free).

As far as I know, the only time that MS provided a compiler toolchain package that didn't include an optimizing compiler was VS .NET 2002 Standard (update: VS 2003 Standard was also a non-optimizing compiler).  I believe that all other compiler packages (free or not) provided the optimizing compiler.

I don't think there's a legitimate way to get VC 2003 Toolkit anymore.  I'm pretty sure there's no MS download anymore (hidden or not), and if I recall correctly, while it was free the license didn't include rights to pass the download on to someone else.  It's not very hard to find in the search engines, though.
« Last Edit: February 23, 2011, 07:29 PM by mwb1100 »

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #21 on: February 23, 2011, 07:10 PM »
Oh yeah forgot about those d/ls. Here's the link to see what's available MSDN subscriber Downloads, not that you can actually get a d/l link without a subscriber acc.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #22 on: February 24, 2011, 02:11 AM »
(I don't think there's any way to get 2003toolkit from MS?)

Oh hell yeah, the MSDN goes all the way back to Visual C++ v1.52. Granted you need a subscription (not cheap) but they are still available.
You can get VS2003 from there, but can you get the VCToolkitSetup.exe for the VC2003 Toolkit package? I definitely can't find it on school's MSDNAA (which doesn't cover as much as a full MSDN subscription, I know). And even if it's on full MSDN, it doesn't help much since that's not gratis :)
- carpe noctem

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: To persist with Windows 2000 support?
« Reply #23 on: February 24, 2011, 06:56 AM »
You can get VS2003 from there, but can you get the VCToolkitSetup.exe for the VC2003 Toolkit package?

Nope, I missed that distinction earlier ... :-[ ... Only the full VS.NET 2003 is available.