Showing tag results for History

Feb 26, 2004
Post comments count0
Post likes count1

Why do timestamps change when I copy files to a floppy?

Raymond Chen

Floppy disks use the FAT filesystem, as do DOS-based and Windows 95-based operating systems. On the other hand, Windows NT-based systems (Windows 2000, XP, 2003, ...) tend to use the NTFS filesystem. (Although you can format a drive as FAT on Windows NT-based systems, it is not the default option.) The NTFS and FAT filesystems store times...

HistoryTime
Feb 25, 2004
Post comments count0
Post likes count0

Why can't I put hotlinks in notification icon balloon tips?

Raymond Chen

The short answer: "Because there is no NIF_PARSELINKS flag." The long answer: When balloon tips were first developed, there was no ability to embed links. Consequently, programs were free to put insecure text in balloon tips, since there was no risk that they would become "live". So, for example, a virus scanner might say "The document 'XYZ' has...

History
Feb 19, 2004
Post comments count0
Post likes count1

No code is an island

Raymond Chen

Norman Diamond noted in a comment that on Windows 2003 Server, the Display Adapter Troubleshooting slider still lists "full acceleration" as the recommended setting even though the default for Server is "full minus one". This is one of those "Oh, that's an easy change" bugs. The discussion probably went like this: Some guy whose idea this was...

History
Feb 18, 2004
Post comments count0
Post likes count1

Why are RECTs endpoint-exclusive?

Raymond Chen

Endpoint-exclusive RECTs and lines are much easier to work with. For example, the width of a rectangle is , and its height is . If rectangles were endpoint-inclusive, then there would be annoying +1's everywhere. End-point exclusive rectangles also scale properly. For example, suppose you have two rectangles (0,0)-(100,100) and (100,100)-(200,20...

History
Feb 16, 2004
Post comments count0
Post likes count2

The arms race between programs and users

Raymond Chen

There is a constant struggle between people who write programs and the people who actually use them. For example, you often see questions like, "How do I make my program so the user can't kill it?" Now, imagine if there were a way to do this. Ask yourself, "What would the world be like if this were possible?" Well, then there would be some progra...

History
Feb 13, 2004
Post comments count0
Post likes count3

Bad version number checks

Raymond Chen

Version numbers. Very important. And so many people check them wrong. This is why Windows 95's GetVersion function returned 3.95 instead of 4.0. A lot of code checked the version number like this: Now consider what happens when the version number is reported as 4.0. The major version check passes, but the minor version check fails since 0 is l...

History
Feb 11, 2004
Post comments count0
Post likes count7

Sure, we do that

Raymond Chen

The DirectX video driver interface for Windows 95 had a method that each driver exposed called something like "DoesDriverSupport(REFGUID guidCapability)" where we handed it a capability GUID and it said whether or not that feature was supported. There were various capability GUIDs defined, things like GUID_CanStretchAlpha to ask the driver wh...

History
Feb 6, 2004
Post comments count0
Post likes count1

Adjustor thunks

Raymond Chen

Yesterday we learned about the layout of COM objects and I hinted at "adjustor thunks". If you find yourself debugging in disassembly, you'll sometimes find strange little functions called "adjustor thunks". Let's take another look at the object we laid out last time: In the diagram, p is the pointer returned when the IPersist interface is n...

History
Feb 5, 2004
Post comments count0
Post likes count2

The layout of a COM object

Raymond Chen

The Win32 COM calling convention specifies the layout of the virtual method table (vtable) of an object. If a language/compiler wants to support COM, it must lay out its object in the specified manner so other components can use it. It is no coincidence that the Win32 COM object layout matches closely the C++ object layout. Even though COM was o...

History