LOATHE |
Their developers are smoking advanced experimental prototype monkey crack again. |
LOATHE |
Their developers are smoking advanced experimental prototype monkey crack again. |
The specific rules to follow here are unclear, but as with most things in NT, if you do it wrong the system will fall apart at some future time.This is in a technical article written by the folks at Open Systems Resources, not the actual Microsoft writers... but it’s going out as official Microsoft material.
REVILE |
They obviously can’t be bothered to write useful documentation. |
Somehow, I suspect that I will be required to redact this comment before we ship a script containing it:
# $when is in yyyymmdd.hhmmss format. It is, of course, invalid as input # to "-since", because that would be presenting a consistent interface, # which would doubtless violate some engineer's Dark Pact and cause their # soul to be claimed immediately.
(Update: changed from “fenestric” to “fenestral” when a bit of searching showed that the latter is actually in the dictionary.)
REVILE |
They obviously can’t be bothered to write useful documentation. |
Today’s technical learning experience: the SuspendThread() call in Windows can return before the thread involved is actually suspended. On a fast multiprocessor machine, the “suspended” thread can actually crank out a few hundred instructions before it grinds to a halt. MSDN doesn’t tell you anything about this one way or the other.
Fortunately, I am going on vacation, and will not need to return to work until January 3, so as soon as I walk out of here tonight:
IGNORE |
I can pretend it’s not there. |
Documentation on Windows drivers is so bad that I had to get out the fastfat sources and do cargo cult coding until the blue screen bug went away.— Max Kaehn, 2005
REVILE |
They obviously can’t be bothered to write useful documentation. |
At the driver level, you receive perfectly reasonable-looking requests with codes like IRP_MJ_QUERY_EA and IRP_MJ_SET_EA to manipulate them, or get them passed in at file creation time. Update: The kernel does have NtQueryEaFile() and NtSetEaFile() as undocumented APIs.
At the user level, if you want to write a reliable, runs-everywhere application, you get at them through the backup API. If you’re on a sufficiently advanced version of Windows and you know that the file system implements EAs as “streams” (a special feature of NTFS), you can use the new stream control API to manipulate EAs. But nowhere is there a straightforward way to manipulate these things the way they’re designed to be used. It’s like a filing cabinet where you have to remove the entire drawer in order to use it, even though you know perfectly well you should be able to grab the individual folders.
LOATHE |
Their developers are smoking advanced experimental prototype monkey crack again. |
obsessivewoman, you’ll be proud of me: I did not vent virtual bile at the Microsoft recruiter who was foolish enough to send me E-mail this afternoon.
On the plus side, it’s probably good practice for reverse engineering technology from crashed flying saucers.
Microsoft is in the habit of providing equivalents of UNIX system calls for its C developers, often with slight annoying differences in the name (like tacking on a leading underscore). This is something that I can cope with. But I really hate it when MSDN’s page on “Time Management” in the Run-Time Library Reference lists clock() under “Return elapsed CPU time for process”, then the actual page for clock() says “calculates the wall-clock time used by the calling process” and turns out to be using GetSystemTimeAsFileTime() under the covers. That’s just plain incompetent.
On the plus side, I finally put together a multi-machine juggling act that will automatically generate documentation from the source code every night. I can’t force people to write documentation, but I can certainly make it so easy that people should be embarrassed when I say “so why didn’t you document it?”
I think the whole Dark Side of the Force thing is underrated. You should always try the carrot first, but if you need the stick, go get the stick. Sometimes you just gotta rule through fear to get the job done.