News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Icons in 16 bit programs

Started by Magnum, July 27, 2013, 01:10:44 AM

Previous topic - Next topic

Magnum

Is the last sentence true ?


>If the program has an icon, it is not 16 bit, unless you associated
>an icon with the program.

How do you figure? What do you think we did before everything was
32-bit? Of course 16-bit Windows programs have built-in icons.
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Rockphorr

It is possible to change dos stub to your dos program and tune main win program to launch it.

Magnum

I think you don't understand what I was saying.

I am not aware of any way that 16 bit programs can have icons like 32 bit programs.

I don't think the technology was available back then.

I may be wrong.

I have downloaded other 16 bit programs and none of them show an icons in any 32 bit Windows O.S.

Have a great day,

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

sinsi

Depends on your definition of 16-bit, plenty of win311 programs were 16-bit with an icon (NE exe format).

jj2007

Quote from: Magnum on July 27, 2013, 05:03:20 PM
I am not aware of any way that 16 bit programs can have icons like 32 bit programs.

See attachment (won't run on 64-bit Windows).

Magnum

IDA says it is a packed program.

Mmmm..............

Guten nacht mein freund.

Andy

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

jj2007


Dubby

according to the original question, the answer is depend on what version of windows you have, is it 32 bit or 64 bit, and also, is it pre windows vista or starting from windows vista..
the ability of displaying the NE executable (the 16 bit executable) have been ceased in vista upwards, in both 32 bit and 64 bit. if you have windows pre vista then it should display correctly( I'm not sure about x64 XP).

P.S.:if you are using vista upwards (32 bit only) and have access to the windows XP SP0 you can copy over the progman.exe and grab the NT4 service pack 6 somewhere, you can views your NE icon correctly from your program manager.. use the exact steps from http://people.ee.ethz.ch/~davidsch/vistafm/ and rename the progman to winfile temporary..

Magnum

I wonder why this New Executable has this string in it. "Not a Dos Program in it" ?

Just for grins I tried to find some source code and what assembler made them.

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

MichaelW

Judging from the "GFA-compiled" it looks like GFA BASIC.
Well Microsoft, here's another nice mess you've gotten us into.

jj2007

Quote from: MichaelW on July 29, 2013, 01:16:50 PM
Judging from the "GFA-compiled" it looks like GFA BASIC.

Indeed :biggrin:

And the icon doesn't show in Windows 7, because our friends in Redmond want to force users to abandon their 16-bit code by making it look "old". Of course, they find some hilarious excuses:

Quote16-Bit Icons Are So Passé
Raymond Chen

As I noted in the February 2008 Windows Confidential column, features do disappear from Windows®. They typically do so slowly and largely imperceptibly, with a product team quietly celebrating the event each time it occurs. Another feature that vanished in Windows Vista® is the ability for 32-bit code to access icons stored in 16-bit modules—mostly 16-bit EXEs and 16-bit DLLs.

Before you get all worked up, bear in mind that 16-bit code can access icons stored in 16-bit modules just fine; that all happens inside the 16-bit emulation layer. What is gone is the ability to access those icons from 32-bit code, or more specifically the ability for 32-bit icon extraction functions like the ExtractIcon function to load those icons from your 16-bit DLL.

The 32-bit code that extracts icons from 16-bit modules doesn't have the luxury of using kernel functions such as FindResource to locate the icon in the file. Instead, the code must implement its own mini-loader that parses the 16-bit module header, seeks to the resource table, and then parses the resource table looking for the desired icon resource. Only after doing all that can the 32-bit code finally convert the pixels into an icon.

As you can imagine, the code that does this is very old and fragile. There are plenty of opportunities for error when parsing binaries that could be corrupted, either by mistake or with malicious intent. The performance team will ask for changes to the way the file is opened in order to improve the performance over networks, since different open and sharing modes have different consequences for network caching effects. And the reliability team may ask for the parsing code to be rewritten to avoid using memory-mapped files. Eventually, the cost of maintaining this kind of code starts to exceed the value it offered. I mean, really, who writes 16-bit programs anymore, right?

Can you imagine the product team, scared sh..less looking at code they don't understand, and trying desperately to find the 766 bytes of a dangerous 32x32 icon like the one attached? Which, by the way, opens just fine in the latest MS Paint, and poses no serious problems to Firefox when attached as a fake zip?? :greenclp: