Hacker News new | ask | show | jobs
by MisterTea 1655 days ago
> you could view reports on which obscure apps hooked into this or that internal code of cmd.exe or Notepad and would break

Wait what, external software calls into notepad?

5 comments

Yep - read some of the awesome / horrific horror stories from having too large an API surface area from Raymond Chen here: https://ptgmedia.pearsoncmg.com/images/9780321440303/samplec...

Patching other people's binaries, turning off features if the app making the request is "problematic-app", re-introducing bugs, fixing should-be-impossible-to-happen calls from programs that were written by hand, it's all there!

> one useful shim is known as HeapPadAllocation; it is applied to programs that have heap buffer overrun bugs. The shim intercepts calls to the HeapAllocate function and adds a specified amount to the requested size. That way, when the program overruns a buffer, it merely corrupts the padding rather than corrupting the next heap block.

Oh good grief.

Wow, amazing how they bent over backwards to keep customers up and running. I wish they cared that deeply about their users today.

(Not saying the approach should be the same, just wish the attitude and motivation were as intense and that Win 10+ were less user-hostile.)

It was different when your typical application came on ten floppy disks. Not being able to use it on the next version of Windows might hinder the adoption of Windows.
Going to have to buy this book now. Enjoyed this extract. I wonder what font was used? whatthefont thinks it might be Adobe Jenson Display, and I don't currently have any PDF tools to inspect the document. The 'y' looks so pretty, with it's rightward curve.
Calvin: This is so cool!

Hobbes: This is so stupid.

https://www.gocomics.com/calvinandhobbes/1995/01/01

> Wait what, external software calls into notepad?

External software calls into everything. Welcome to Windows development.

It's extremely difficult to implement even "obvious" changes like a dark-mode Notepad when it could potentially break customers who have been depending on specific behavior for decades.

This is why they've had to write shim-specific code for certain vendors. The desire to move forward versus the awful prospect of having to keep those shims in place.

Surprisingly I actually deal with a fairly hefty integration that does some horrible win32 shit I don’t understand after opening notepad to integrate it into their app. There’s so much of that out there it’s unreal.
Microsoft's win32 moat is looking more like an anchor.
There's some fun projects that launch a notepad.exe and dump win32 messages into its wndProc to use it as a console logger