Accessing IMbnDeviceServicesEvents interface from C++ RRS feed

  • Question

  • I have some C++ code that sets up a sink for registering IMbnDeviceServicesEvents notifications as described here:


    The following procedure describes how to register for notifications.

    1. Get an IConnectionPoint interface by calling QueryInterface on an IMbnDeviceServicesManager object.
    2. Call FindConnectionPoint on the returned interface and pass IID_IMbnDeviceServicesEvents to RIID.
    3. Call Advise on the returned connection point and pass a pointer to an IUnknown interface on an object that implements IMbnDeviceServicesEvents to PUNK.

    The code works fine on Win8 x86 with desktop app, but none of the notifications (e.g. OnOpenCommandSessionComplete) are called for the metro app. I was unable to get ::CoInitializeEx( 0, COINIT_MULTITHREADED ) to work for the metro app, until I created a create_async function and had everything called from there. However, it still fails. Any ideas/sample code on how to do this from C++?


    Thursday, May 17, 2012 10:47 PM

All replies

  • Clarence,

    Could you paste a portion of your failing code here and point to what exactly fails?



    Friday, May 18, 2012 1:55 AM