The Old New Thing

CreateProcess does not wait for the process to start

The CreateProcess function creates a new process, but it doesn't wait for the process to get off the ground before returning. It just creates the process object and lets it go to do its thing. The Win32 process model is that each process initializes itself in context. When a process object is created, it is practically empty, save for ...
Comments are closed.0 0
Code

The importance of error code backwards compatibility

I remember a bug report that came on in an old MS-DOS program (from a company that is still in business so don't ask me to identify them) that attempted to open the file "". That's the file with no name. This returned error 2 (file not found). But the program didn't check the error code and though that 2 was the file handle. It then began ...

How did MS-DOS report error codes?

The old MS-DOS function calls (ah, int 21h), typically indicated error by returning with carry set and putting the error code in the AX register. These error codes will look awfully familiar today: They are the same error codes that Windows uses. All the small-valued error codes like ERROR_FILE_NOT_FOUND go back to MS-DOS (and possibly even ...

Cleaner, more elegant, and harder to recognize

It appears that some people interpreted the title of one of my rants from many months ago, "Cleaner, more elegant, and wrong", to be a reference to exceptions in general. (See bibliography reference [35]; observe that the citer even changed the title of my article for me!) The title of the article was a reference to a specific code ...

User interface design for interior door locks

How hard can it be to design the user interface of an interior door lock? Locking or unlocking the door from the inside is typically done with a latch that you turn. Often, the latch handle is in the shape of a bar that turns. Now, there are two possible ways you can set up your lock. One is that the a horizontal bar represents the locked ...

User interface design for vending machines – answer to puzzle

Last time, we ended a discussion of vending machine design with a short puzzle: What problems do you see with numbering the products from 1 to 99? I'm not saying that these are the only possible answers, but they are ones that came to mind when I thought about it. Ilya Birman was the first to point out the "bounce-effect" problem, ...

User interface design for vending machines

How hard can it be to design the user interface of a vending machine? You accept money, you have some buttons, the user pushes the button, they get their product and their change. At least in the United States, many vending machines arrange their product in rows and columns (close-up view). To select a product, you type the letter of the ...

Marriage as a cross-branding opportunity

Jennifer Aniston and Brad Pitt have decided to besmirch the institution of marriage by deciding that the "until death do us part" thing was neither legally nor morally binding. "Brad said that they spent the rest of the holiday working out how they would release the news of the split. They worked out together the reasons they would give and ...

Why doesn’t \ autocomplete to all the computers on the network?

Wes Haggard wishes that \ would autocomplete to all the computers on the network. [Link fixed 10am.] An early beta of Windows 95 actually did something similar to this, showing all the computers on the network when you opened the Network Neighborhood folder. And the feature was quickly killed. Why? Corporations with large ...

Feedback usabilla icon