none
Thread considerations when calling IPortableDevice::Advise RRS feed

  • Question

  • I have trouble receiving notifications for device events when I call the Advise method from a windowless thread (simple std::thread) for which the COM was initialized - regardless of COM thread apartment configuration. 

    Suprisingly, the notifcations work, when the thread calling Advise has no ::CoInitialize() call before Advise. Is it a bug, or a feature i.e. can I safely rely on this behavior?

    Where can I find the documentation on the thread (+apartment) constraints on using the Advise function?

    Wednesday, December 19, 2018 12:38 PM