AS
2004-01-28 01:31:14 UTC
Im using a 3rd party DCOM library and must initialise DCOM using
CoInitializeEx with the COINIT_MULTITHREADED flag as much of the code using
this library is carried out in threads.
Everything worked fine, until i started to use call shell functions. For
example, if i call ShellExecute I get the return value access denied - and
nothing happens. Also, if i create a CFileDialog window and navigate to My
Computer nothing is displayed! The reason for this is that i initialised COM
with the flag COINIT_MULTITHREADED.
To work around this problem i must call all shell related functions in
another thread! After searching unsuccessfully on google for a more
practical work around or even a fix - i was wondering if anyone from MS can
help me?!
Thanks
Andy S.
CoInitializeEx with the COINIT_MULTITHREADED flag as much of the code using
this library is carried out in threads.
Everything worked fine, until i started to use call shell functions. For
example, if i call ShellExecute I get the return value access denied - and
nothing happens. Also, if i create a CFileDialog window and navigate to My
Computer nothing is displayed! The reason for this is that i initialised COM
with the flag COINIT_MULTITHREADED.
To work around this problem i must call all shell related functions in
another thread! After searching unsuccessfully on google for a more
practical work around or even a fix - i was wondering if anyone from MS can
help me?!
Thanks
Andy S.