this post was submitted on 24 May 2025
562 points (98.6% liked)

Funny

9780 readers
865 users here now

General rules:

Exceptions may be made at the discretion of the mods.

founded 2 years ago
MODERATORS
562
2000s internet (lemmy.today)
submitted 1 week ago* (last edited 1 week ago) by DearMoogle to c/funny@sh.itjust.works
 

Happy 19th anniversary to freecupholder.exe

you are viewing a single comment's thread
view the rest of the comments
[–] jaybone@lemmy.zip 3 points 1 week ago (1 children)

Kind of surprised they didn’t have a batch file command for this. I’m guessing people had to build a whole MFC application just to call the eject API.

[–] scaramobo@lemmynsfw.com 2 points 1 week ago (1 children)

It was actually quite simple from what i remember. There was a plain winapi call to control multimedia devices, the mmc api. You could send a control string to the device, such as eject, play or seek. So in maybe 4 lines of C code, this could be written.

Disclaimer: All info from the top of my head based on knowledge from 20 years ago, so take it as it is.

[–] jaybone@lemmy.zip 1 points 1 week ago (1 children)

That sounds about right for 4 lines of code to make the call itself. But I remember using VC++ and since everything was a GUI you’d create a project which gave you a bunch of template generated code with all the MFC and WinAPI libs and frameworks…

[–] scaramobo@lemmynsfw.com 1 points 1 week ago

You had the option. You could create a fullblown mfc application (in a couple of variants such as single document, multiple document and dialog based), but also a barebones plain winapi one. And a for a DLL too. I miss those simpler times of winapi coding, i found it fun. I moved away from windows as an OS around the time .Net 2.0 was released. Now when I look at modern windows development, I recognise absolutely NOTHING lol. Does winapi even exist still under all those layers?