IPB

Google Frontpage Forums Unattended CD/DVD Guide
2 Pages V   1 2 >  
Reply to this topicStart new topic
> Visual Studio 2008 and Windows 9x
RetroOS
post Feb 8 2008, 03:53 AM
Post #1


Advanced Member
***

Group: Members
Posts: 498
Joined: 26-June 07
Member No.: 144486
OS: 98SE
Country Flag


Microsoft Visual Studio 2008 was released late last year.
According to http://msdn2.microsoft.com/en-us/library/bb531344.aspx, Windows 9x is no longer a supported target platform:

The Windows 95, Windows 98, Windows ME, and Windows NT platforms are no longer supported. These operating systems have been removed from the list of targeted platforms.

The typical message upon running a VS2008 compiled application that uses 0x0500 in the WINVER macro is:
(For more information on WINVER macro see: http://msdn2.microsoft.com/en-us/library/aa383745.aspx)

Error Starting Program
The [full path of executable] file
expects a newer version of Windows.
Upgrade your Windows version.


Following this is:

[full path of executable]

A device attached to the system is not functioning.


This second information box would appear without the first if WINVER macro was still 0x0400 in a re-compiled source.
Either way, it no gonna run...

One person has determined that the Win32 API call GetSystemWindowsDirectoryW in KERNEL32.DLL was being referred to even with a simple application. See http://forums.microsoft.com/MSDN/ShowPost....93&SiteID=1

Maybe this is where a KernelEx solution could be useful.

This spells the end of new software for Windows 9x since most software developer for the Windows platform code in Microsoft C++ under Microsoft Visual Studio.
Windows APIs are taylored for C++ calling conventions and data types.
I personally code entirely using Microsoft Macro Assembler (MASM) which supports high level syntax and C++ conventions.
Contrary to popular belief, MASM is not just for writing modules to plug into C++.
It can be used to write an entire PE EXE, DLL, and so on. See here for more information: http://www.masm32.com
MASM version 8.00 that comes with Visual Studio 2005 still supports Windows 9x.

Has anyone looked into this problem?
Go to the top of the page
 
+Quote Post
BenoitRen
post Feb 10 2008, 10:16 AM
Post #2


Friend of MSFN
*****

Group: Members
Posts: 941
Joined: 21-October 06
Member No.: 113643
Country Flag


Visual Studio 2005 was already the end for targeting Windows 95, actually. Compiled programs would look for an unsupported API because of the runtime. You could recompile it to not do this, though.
Go to the top of the page
 
+Quote Post
RetroOS
post Feb 10 2008, 04:20 PM
Post #3


Advanced Member
***

Group: Members
Posts: 498
Joined: 26-June 07
Member No.: 144486
OS: 98SE
Country Flag


QUOTE (BenoitRen @ Feb 11 2008, 05:16 AM) *
Visual Studio 2005 was already the end for targeting Windows 95, actually. Compiled programs would look for an unsupported API because of the runtime. You could recompile it to not do this, though.

I had heard that.
The problem with VS2008 is that you cannot just change compile options to get it working...
It simply will not work in Windows 9x.
It would be good to get some heads together over this one with the purpose of finding some kind of workaround for VS2008 compiled software.
As mentioned previously, maybe some concept like the way KernelEx operates by expanding the Windows 9x API set.
Even if those API functions are 'simulated' with close 9x functions or simply returning a successful status if applicable.
Go to the top of the page
 
+Quote Post
BenoitRen
post Feb 10 2008, 06:17 PM
Post #4


Friend of MSFN
*****

Group: Members
Posts: 941
Joined: 21-October 06
Member No.: 113643
Country Flag


QUOTE
The problem with VS2008 is that you cannot just change compile options to get it working...

Neither could you with Visual Studio 2005. You had to recompile the actual C++ runtime!
Go to the top of the page
 
+Quote Post
RetroOS
post Feb 10 2008, 07:29 PM
Post #5


Advanced Member
***

Group: Members
Posts: 498
Joined: 26-June 07
Member No.: 144486
OS: 98SE
Country Flag


Maybe then, this topic should be called Visual Studio 2008 and Visual Studio 2005 and Windows 9x...
In that case, KernelEx may already solve some VS2005 problems...
If I had time, I would do some work with the KernelEx source...
Time, time, time, never enough!
Go to the top of the page
 
+Quote Post
Xeno86
post Feb 18 2008, 03:04 PM
Post #6


KernelEx Creator
**

Group: Members
Posts: 184
Joined: 26-March 06
Member No.: 91916
OS: 98SE
Country Flag


QUOTE
Has anyone looked into this problem?
Can anyone post source + output of some short program generated by VS2008 that is not working on 9x?
Go to the top of the page
 
+Quote Post
RetroOS
post Feb 18 2008, 07:04 PM
Post #7


Advanced Member
***

Group: Members
Posts: 498
Joined: 26-June 07
Member No.: 144486
OS: 98SE
Country Flag


Hey Xeno86,
It's great to see you around!
See Offler's topic here: http://www.msfn.org/board/Vcredist-x86-t112725.html
He has identified three post-9x API calls being made to KERNEL32.DLL from VS2008 library DLLs.
Also there is Windows version checking happening.
Go to the top of the page
 
+Quote Post
jerichar99
post Apr 7 2008, 03:45 PM
Post #8





Group: Members
Posts: 1
Joined: 7-April 08
Member No.: 185813
OS: 2003 x64
Country Flag


I ran into a similar problem. See my post at VS 2008 and NT 4.0 (if the link doesn't work, search Google groups for "VS 2008 and NT 4.0").

I'm not sure if that helps you, but it worked for me. Not an elegant solution, but it does the trick (since that post, I do a post build step and modify the exe directly).
Go to the top of the page
 
+Quote Post
dencorso
post Apr 7 2008, 07:01 PM
Post #9


Adiuvat plus qui nihil obstat
Group Icon

Group: Super Moderator
Posts: 1079
Joined: 7-April 07
Member No.: 134642
OS: 98SE
Country Flag


So, then, you've found another example of a downversion patch that works, this time on a PE file...
Awesome, jerichar99! thumbup.gif
And welcome to Win 9x/ME forum!
Go to the top of the page
 
+Quote Post
modicr
post Apr 8 2008, 11:38 AM
Post #10


Member
**

Group: Members
Posts: 124
Joined: 8-January 05
From: ljubljana, barje, slovenia
Member No.: 40272
OS: Vista Ultimate x64
Country Flag


Hello!

QUOTE (jerichar99 @ Apr 7 2008, 10:45 PM) *
I ran into a similar problem. See my post at VS 2008 and NT 4.0 (if the link doesn't work, search Google groups for "VS 2008 and NT 4.0").

I'm not sure if that helps you, but it worked for me. Not an elegant solution, but it does the trick (since that post, I do a post build step and modify the exe directly).


Thanks for great info. BTW, here is shorter link:

http://groups.google.com/group/Visual-Studio-NET-2005/browse_thread/thread/4fa74dafe3eb6ef5/

Regards, Roman
Go to the top of the page
 
+Quote Post
aLeXis
post Apr 8 2008, 02:08 PM
Post #11


Newbie


Group: Members
Posts: 46
Joined: 10-January 05
From: EU
Member No.: 40401
OS: 98SE
Country Flag


Would be nice if someone could make a patcher to "fix" files compiled in vc2008 to work on win98.
Go to the top of the page
 
+Quote Post
dencorso
post Apr 8 2008, 09:00 PM
Post #12


Adiuvat plus qui nihil obstat
Group Icon

Group: Super Moderator
Posts: 1079
Joined: 7-April 07
Member No.: 134642
OS: 98SE
Country Flag


QUOTE (modicr @ Apr 8 2008, 03:38 PM) *
Hello!

QUOTE (jerichar99 @ Apr 7 2008, 10:45 PM) *
I ran into a similar problem. See my post at VS 2008 and NT 4.0 (if the link doesn't work, search Google groups for "VS 2008 and NT 4.0").

I'm not sure if that helps you, but it worked for me. Not an elegant solution, but it does the trick (since that post, I do a post build step and modify the exe directly).


Thanks for great info. BTW, here is shorter link:

http://groups.google.com/group/Visual-Studio-NET-2005/browse_thread/thread/4fa74dafe3eb6ef5/

Regards, Roman

BTW, you can correct the checksum by using PEChksum, a small command-line app found as part of the freeware PESuite (info) (download link). HTH

This post has been edited by dencorso: Apr 8 2008, 09:04 PM
Go to the top of the page
 
+Quote Post
Offler
post Apr 24 2008, 03:54 AM
Post #13


Advanced Member
***

Group: Members
Posts: 475
Joined: 29-October 06
From: Bratislava
Member No.: 114267
OS: 98SE
Country Flag


i have to learn C++ for my next job so i tried to install VS C++ 2005 and 2008. no installation was sucessful but...

KEX 0.3.3e applied to passthought the "requires newer version of windows"
vcsetup.exe of v2008 extracted with winrar.

Setup.exe missing exports:

kernel32.dll > HeapSetInformation
shell32.dll > SHCreateDirectoryExW
ole32.dll > CoWaitForMultipleHandlers
apphelp.dll > file missing (i try to add it manually)
userenv.dll > ExpandEnvironmentStringForUserW
Shell32.dll > SHBindToParent
advapi32.dll > InitiateSystemShutdownExW
secur32.dll > GetComputerObjectNameW

i believe that packages created directly by MS will be good source of information for us when it comes to identification of problem with exports.

This post has been edited by Offler: Apr 24 2008, 03:57 AM
Go to the top of the page
 
+Quote Post
Mijzelf
post Apr 24 2008, 04:03 AM
Post #14


Advanced Member
***

Group: Members
Posts: 353
Joined: 11-April 07
Member No.: 135095
Country Flag


What about Dev-C++?
Go to the top of the page
 
+Quote Post
Offler
post Apr 24 2008, 04:11 AM
Post #15


Advanced Member
***

Group: Members
Posts: 475
Joined: 29-October 06
From: Bratislava
Member No.: 114267
OS: 98SE
Country Flag


thx. i will try it smile.gif but i just wanted to post some missing exports from visual studio installer. M$ has all the dlls bound together so they are using them more as other programs.
Go to the top of the page
 
+Quote Post
dencorso
post Apr 29 2008, 11:00 AM
Post #16


Adiuvat plus qui nihil obstat
Group Icon

Group: Super Moderator
Posts: 1079
Joined: 7-April 07
Member No.: 134642
OS: 98SE
Country Flag


QUOTE (Offler @ Apr 24 2008, 07:54 AM) *
i have to learn C++ for my next job so i tried to install VS C++ 2005 and 2008. no installation was sucessful but... [...]


Why not go back somewhat further and install Microsoft Visual Studio 6.0, which is known to work OK (I do use it) or even MS VS 2003, which some say does work? You'll learn C++ just the same, and won't have to worry about compatibility issues, 9x/ME- wise. newwink.gif
Go to the top of the page
 
+Quote Post
takeos
post Aug 25 2008, 06:21 PM
Post #17





Group: Members
Posts: 2
Joined: 25-August 08
Member No.: 206890
OS: Vista Ultimate x64
Country Flag


QUOTE (aLeXis @ Apr 8 2008, 02:08 PM) *
Would be nice if someone could make a patcher to "fix" files compiled in vc2008 to work on win98.

There are actually some patches, but here is what I think may be a better approach:

Legacy Extender for Visual Studio 2005/2008 (www.legacyextender.com)

Visual Studio references not only functions which do not exist in old Windows, but also some functions which exist, but which do not work (like Unicode functions in Windows 95). Legacy Extender includes a linkable library which takes care about all of these. The library approach also has the benefit of being compatible with code optimization. Post-build patches are not.

The second thing that Legacy Extender does is like EditVersion.exe (once provided by Microsoft): it has a command line tool to edit the subsystem version (Visual Studio writes 5.0, but you want it to be 4.0 to run on systems older than Windows 2000). Unlike some patches it also recalculates the checksum. It's not true that the checksum is not checked by Windows, it is necessary to be correct for some drivers and boot DLLs, and you never know if Microsoft or some antivirus software decide to be more strict against binaries with bad checksums in the future.
Go to the top of the page
 
+Quote Post
BenoitRen
post Aug 25 2008, 07:57 PM
Post #18


Friend of MSFN
*****

Group: Members
Posts: 941
Joined: 21-October 06
Member No.: 113643
Country Flag


It would be great if they could release the source code for the APIs that they have created replacements for.
Go to the top of the page
 
+Quote Post
CharlotteTheHarl...
post Aug 26 2008, 02:11 AM
Post #19


Member
**

Group: Members
Posts: 246
Joined: 24-September 07
From: Somewhere in Time
Member No.: 155939
OS: 98SE
Country Flag


Seeing that this thread has been revived, now is a good time to throw some information on the table ...

Some of the most important utilities for Win9x sadly went toe-up several months ago when the author began compiling with Visual Studio 2008. Those utilities of course are the excellent System Internals applications: Process Explorer, AutoRuns and no doubt everything that Mark Russinovich (System Internals / Microsoft) gets around to updating. mad.gif

Folks can look back to May 28, 2008 to follow events as they happened on this System Internals thread: Process Explorer v11.12 on Windows 9x/Me.

The discussion includes links which eventually get you to the next pertinent System Internals thread: EXEs created by VisualStudio2008 vs Win4.0. There, member steelbytes has reported some success in patching already compiled apps and also recompiling differently. He directs us to www.SteelBytes.com with specific code examples here.

The very latest development appears to be this LegacyExtender announced by the same member takeos that appears two posts above me here. While he/she sounds very confident in their approach, they seemed to have left out describing what if anything this will cost, and to whom? I would like to second the motion by BenoitRen as to what is getting replaced? It seems to me that *either* individual developers using VS2008 would be their 'customers' and manually tweak their installations (like we did back in the day with Curses, etc) or Microsoft itself would be their sole customer and incorporate this idea into VS2008 distributions, effectively restoring backwards compatibility defeating their obvious planned obsolescence. @takeos, can you shine some light on this? Please correct my mis-understandings. No flames intended, just asking!

If we consider the KernelEx developments (someone please ping them), we have three distinct avenues to keeping this Operating System alive and healthy at least for a while. Things do appear bleaker now, as I do not see folks like Mark Russinovich throwing out VS2008 for VS6 or later, and its doubtful he'd do us a favor by LegacyExtending his installation.

But I pray I am wrong!
Go to the top of the page
 
+Quote Post
takeos
post Aug 26 2008, 03:40 AM
Post #20





Group: Members
Posts: 2
Joined: 25-August 08
Member No.: 206890
OS: Vista Ultimate x64
Country Flag


QUOTE (CharlotteTheHarlot @ Aug 26 2008, 02:11 AM) *
While he/she sounds very confident in their approach, they seemed to have left out describing what if anything this will cost, and to whom?

Would something like $29.95 (individual developer license) be too much in your opinion? Some corporate developers might not even take it seriously at that price, while for others anything more than free would be too expensive. I exchanged ideas about the possible pricing. A small price would still give customers technical support and updates, i.e. if new functions emerge, they would likely be added to the library, etc.

Legacy Extender is not as vast as KernelEx. It focuses on what Visual Studio adds or breaks that the developer did not want in the first place. If the developer used some other XP-only functions on purpose, Legacy Extender will not help much. On the other hand, Legacy Extender is great if you already have a "legacy" project, and simply want to update the compiler, and you thought the only way was to run two different versions of Visual Studio.

I doubt that Microsoft would be interested (as a customer), because they have demonstrated that they do not care about legacy compatibility. To the contrary, it seemed to me that they introduced or at least supported incompatibility on purpose. Do you remember how Visual Studio 2005 became incompatible with Windows 95? At the time it did not really break much. It would not have taken more than a few hours of work for Microsoft to retain compatibility by just not using certain functions. Lots of programmers had proposed solutions, patches, etc. I proposed one to Microsoft myself after I filed a bug report (I thought it was a bug!), they filed the "bug" as something like "by design" and closed the case!

As for whether it works or not, it's currently being tested in public. Anyone can access it. You are free to decide for yourself, provide feedback, etc.

Just my two cents!
Go to the top of the page
 
+Quote Post

Google Frontpage Forums Unattended CD/DVD Guide

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 




Lo-Fi Version Time is now: 7th November 2009 - 04:33 PM
All trademarks mentioned on this page are the property of their respective owners
MSFN is not affiliated with Microsoft
Copyright © 2001-2009 msfn.org
Privacy Policy