Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart
by jandrese on Saturday June 29, 2019 @11:01PM
(#20316083)
Welp, this win the award for the ugliest hack of the week, and I'm not sure which part of the post to award it to. Windows scanning memory for strings, or the part where you make a batch file just to make that check pass.
[ Parent
| on HN ]
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart
by ncmncm on Saturday June 29, 2019 @11:42PM
(#20316203)
Back in the day, this was not even considered odd, in the Microsoft ecosystem. People collected lore like this because you had to know a great deal of it to get anything to work. Writing the code to do the actual work was 10% of the job. Compensating for stuff like this was the rest.
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart
by fapjacks on Sunday June 30, 2019 @02:19AM
(#20316676)
Right! This sort of "ugly hack lore" more generally is why it's extremely difficult for third-party word processing applications to handle old Microsoft Word .doc files, and in fact is why Microsoft put so much effort into backward compatibility for modern versions of Windows: Microsoft Office actually contains the document-rendering engines of old versions of Microsoft Word, in order to handle documents which are in the old formats.
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart
by exikyut on Monday July 01, 2019 @09:30PM
(#20331344)
And I understand that a significant proportion of Azure is running VMs with headless copies of Word hooked up to Office 365 so that those same old documents can straightforwardly be opened online, too.
Apologies I can't find the reference (of course I read this on here).
I'm very curious if a) the VM stays open the whole time, b) your document gets exported to some kind of perfect serialization format that can then be re-saved when you're done, c) if Word is using something like operational transformations to store keystrokes and edits and then ticker-taping that into a save routine, or d) something else.
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart
by userbinator on Saturday June 29, 2019 @11:09PM
(#20316108)
Even something like loading a file into a text editor containing the appropriate pattern would be sufficient; but what's more interesting to consider, is what happens if you happen to have that pattern in memory before starting Windows, but it's the incorrect size of SFT for the version of DOS --- I could imagine some pretty odd things happening... as well as KB article getting published if some important customer ran into it:
"Windows becomes unstable when started after you work with files containing 3 or more occurrences of 'CON' spaced between 16 and 256 bytes apart."
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart
by firethief on Sunday June 30, 2019 @02:36AM
(#20316719)
CON would be mentioned a lot in the KB article. They'd have to write it carefully.
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart
by darepublic on Sunday June 30, 2019 @01:24AM
(#20316504)
Definitely windows scanning memory for strings is uglier imo