Coinitializeex () with cfiledialog, etc.

xiaoxiao2021-03-06  14

If the following statement is initialized, the free thread unit is initialized ::: CoinitializeEx (0, Coinit_MultithReaded);

The application will never use the CFiledialog class, while other classes can be applied normally

Q287087

Summary

.

More information

A call to CoInitializeEx (COINIT_MULTITHREADED) allows calls to objects created on the calling thread to be run on any thread. When accessing objects that use the apartment threading model from a multithreaded apartment, COM will synchronize access to the object. In order for this synchronization to occur, COM must marshal calls to the object. Because the shell currently does not provide the necessary information, either through a type library or proxy / stub code, for its objects to be marshaled, attempts to access shell objects from a multithreaded apartment fail ... ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Users can navigate to namespace extension folders such as "My Documents" through the Open and Save As dialog boxes. However, these folders can not be browsed to because the browser can not create the required interfaces, such as IShellFolder.

Shellexecute / ShellexecuteEx

ShellExecute hooks can be written to extend the functionality of ShellExecute / ShellExecuteEx by implementing the IShellExecuteHook interface. When ShellExecute / ShellExecuteEx is called, registered ShellExecute hooks can not be loaded.

转载请注明原文地址:https://www.9cbs.com/read-48101.html

New Post(0)