Microsoft DirectX 8.1 (C++)

Using the Guide Store in Multithreaded Applications (C++)

This topic applies to Windows XP Home Edition and Windows XP Professional only.

The Guide Store is an in-process COM server that must execute in a single-threaded apartment.

A multithreaded application can use the Guide Store because the CLSIDs used in the Guide Store have all been registered as apartment-threaded. When the application calls CoCreateInstanceEx using the CLSID of the Guide Store, COM obtains the threading model from the CLSID in the registry. When it finds the threading model to be different from the threading model used when COM was initialized by CoInitializeEx, it silently installs the Guide Store in its own single-threaded apartment. COM then automatically serializes all calls to the Guide Store. Because marshaling occurs between the user application's multithreaded apartment and the Guide Store's single-threaded apartment, performance suffers drastically.

See Also