Date: | July 21, 2011 / year-entry #176 |
Tags: | history |
Orig Link: | https://blogs.msdn.microsoft.com/oldnewthing/20110721-00/?p=10093 |
Comments: | 22 |
Summary: | Many years ago, in a discussion of why you shouldn't name your DLL "security.dll", I dug a bit into the history behind the DLL. Here are some other useless tidbits about that file. Originally, there were two DLLs called security.dll. One was the 32-bit version and one was the 16-bit version. They could coexist because... |
Many years ago, in a discussion of why you shouldn't name your DLL "security.dll", I dug a bit into the history behind the DLL. Here are some other useless tidbits about that file. Originally, there were two DLLs called And then Windows 95 showed up and screwed up everything. Windows 95 did not have separate Okay, so why Nobody knows for sure any more; the person who chose the name left Microsoft a long time ago. Perhaps because |
Comments (22)
Comments are closed. |
Maybe due to the security.dll clash?
"You want your app's 32bit security DLL to be called secure32.dll? Fine, We'll sit out of its way."
As a guess.
Securit3.dll. Claim it's l33t French.
Reminds me of the "creat" and "umount" fiascos in Unix-land.
Maybe because secure32.dll would give the wrong impression – hint that it's a "secure" DLL rather than a DLL related to the security provider?
Maybe he thought 128 bit OS's would come before long filename support and planned ahead?
Another alternative:
32-bit version: security.dll
16-bit version: security.16
Why are you assuming it was a he? Women make mistakes too, just don't tell my wife I said that. ;)
Maybe he was leet? The 3 is an E?
Why were games in Windows 9x never 32-bit binaries? Even after Windows NT was shipping with 32-bit binaries, Charmap, Clipbrd, Dialer, Defrag, Scandskw and the games always remained 16-bit even in Windows Me.
@Troll: because in Win9x, 16 bit was in fact king and if you were going to do low-level junk you had an easier time being 16 bit.
In particular I name Scandskw and Defrag as needing to be 16 bit because 16 bit can do direct disk IO while 32 bit can't.
Also, on Win9x, a 16 bit app can suspend the multitasking environment. I think this is the reason for the special Ctrl-alt-del handler in Win9x that overrode thread priority (or maybe it simply used it).
In Windows 9x, ScanDskw.exe is just a wrapper for shell functions. Some guy even created a 32-bit ScanDskw which can replace 16-bit Scandskw and runs just fine.
"32-bit version: security.dll, 16-bit version: security.16
[And that would show up in the import table how? -Raymond]"
As security.dll and security.16? Just like some PEs have WINSPOOL.DRV referenced in the import table? :)
letter "i" is sometimes mis-read as number "1" or letter "l" in a small monitor. This is the reason why license plate does not allow letter "i" and "l" to avoid confusion.
"(which necessarily did not support long file names, since long file names on FAT didn't exist until Windows 95)"
Actually it was NT 3.5 that first supported LFNs on FAT.
"In particular I name Scandskw and Defrag as needing to be 16 bit because 16 bit can do direct disk IO while 32 bit can't."
Well, I think VWIN32 had a documented DeviceIoControl interface to call the necessary DOS calls for disk IO.
"Also, on Win9x, a 16 bit app can suspend the multitasking environment."
Yep, I know, the infamous Win16Mutex.
@JK: That's probably determined on a state-by-state basis. There's a car with NH plates II1I11 (or maybe it was I11II1, I can't remember exactly) that I often walk by. I'm betting that the owner intentionally chose the combination of I's and 1's that was most likely to be written down incorrectly by a policeman (or anyone else in the chain) in order to maximize the chance of avoiding a ticket.
I'm going to bite here – so why didn't they just have separate system/system32 directories in Win9x like they did in earlier and later versions of Windows, if it caused this problem, and presumably quite a few more problems?
"[News flash: 16-bit apps aren't PE format. -Raymond]"
My bad, had momentarily forgotten about NE; thanks for the history reminder :)
I can't be bothered looking up the reference nor a 16-bit capable OS, but my hunch is it imports by module name without extension.
So, it *should* have been possible to do "security.dll" for 16-bit Windows, "security.32" for 32-bit. Whether it would have been a good idea is another discussion entirely :)
A 16 bit app can only suspend all 16 bit processes, including the GDI/USER stuff.
Consequently, an application doing 32 bits stuff (e.g. CreateFile/WriteFile) but no GUI interaction, won't be stopped by a 16 bits application.
Are the 64-bit security dll called secur32.dll or security.dll?
Other things 16-bit apps could do (more) easily:
Read the free system resources. Someone had this app which happened to display the free system resources for some reason. Obviously the 16-bit version displayed bogus results on NT, but nobody cared about that. When he wanted to port his app to 32-bit he wanted to link to RSRC32.DLL so that he could continue to display the free system resources on Windows 9x, it being more popular than NT4. So I wrote him a version of RSRC32.DLL to install on Windows NT so that their 32-bit app could link to it and get the same bogus results as the old 16-bit version of the app used to get.
Play sounds on the internal beeper. So for instance Minesweeper could play its little scale when you won.
"A 16 bit app can only suspend all 16 bit processes, including the GDI/USER stuff. Consequently, an application doing 32 bits stuff (e.g. CreateFile/WriteFile) but no GUI interaction, won't be stopped by a 16 bits application."
How will it get scheduled?