Posts by this author

Oct 14, 2005
Post comments count0
Post likes count0

Thread affinity of user interface objects, part 5: Object clean-up

The window manager and GDI objects as a general rule will automatically destroy objects created by a process when that process terminates. (The window manager also destroys windows when their owner threads exit.) Note, however, that this is a safety net and not an excuse for you to leak resources in your own program with the attitude of "Oh, it do...

Code
Oct 13, 2005
Post comments count0
Post likes count0

Thread affinity of user interface objects, part 4: GDI objects and other notes on affinity

GDI objects are much simpler. As a general rule, they all have process affinity: They can be used by any thread in the process that created them. If you use a GDI object from multiple threads, it is your responsibility to coordinate the object's use. Note that the window manager and GDI as a general rule keep their respective objects thread-safe....

Code
Oct 12, 2005
Post comments count0
Post likes count0

Newark Liberty International Airport Terminal A travel tips

The line for going through the security checkpoint at Terminal A of Newark Liberty International Airport splits into three lines after you get through the ID check. When you get to the decision point, they all look the same, but don't be fooled. ID / 3 ----------------------------------X >>>-----------|-- 2 --...

Non-Computer
Oct 12, 2005
Post comments count0
Post likes count0

Thread affinity of user interface objects, part 3: Menus, icons, cursors, and accelerator tables

The remaining user interface objects in common use are menus, icons, cursors, and accelerator tables. Menus do not have thread affinity. Any thread can use a menu. However, if two threads use a menu, it is the responsibility of those threads to coordinate among themselves how that menu will be used, so that one thread doesn't modify a menu while ...

Code
Oct 11, 2005
Post comments count0
Post likes count0

New blog on integrating Groove with Office

Andrew Wharton from Groove has started writing about integrating the team and its product with Office. His opening salvo sets the stage and hooked me in for what looks to be an interesting glimpse into life in another division at Microsoft. (Something that is as mysterious to me as it is to you.) In the early days of the Windows division, there...

Other
Oct 11, 2005
Post comments count0
Post likes count0

Thread affinity of user interface objects, part 2: Device contexts

Last time, we discussed briefly the thread affinity rules that govern window handles. Device contexts (DCs) also have a certain degree of thread affinity. The thread that calls functions such as must also be the one that calls , but as with window handles, during the lifetime of the DC, any thread can use it. If you choose to use a DC in a mul...

Code
Oct 10, 2005
Post comments count0
Post likes count0

The difficult balancing act between customization and supportability

My colleague Kam VedBrat (from who I shamelessly stole the pictures of thse high-DPI displays in my PDC talk) discusses the difficult balancing act between customization and supportability. (Part II.) Note that decisions on this subject also also impact compatibility: Windows Vista greatly expands the palette of objects covered by the visua...

Other
Oct 10, 2005
Post comments count0
Post likes count0

Thread affinity of user interface objects, part 1: Window handles

Different objects have different thread affinity rules, but the underlying principles come from 16-bit Windows. The most important user interface element is of course the window. Window objects have thread affinity. The thread that creates a window is the one with which the window has an inseparable relationship. Informally, one says that the th...

Code
Oct 7, 2005
Post comments count0
Post likes count0

On the dangers of sharing your apartment

My colleague Marc Miller wrote up a brief essay on the subject of dealing with a neutral apartment that has been injected into your single-threaded apartment: COMmunism: Sharing your Apartment. Highly recommended.

Code