locked
how to create an event handler OnConnectionReceived for IStreamSocketListener in Grayscale MFT

    Question

  • I am modifying Grayscale MFT so I can create a SocketListener in the MFT.  So far I have done:

    HRESULT hr;

    HString hstrStreamSocketListener;
    hstrStreamSocketListener.Set(RuntimeClass_Windows_Networking_Sockets_StreamSocketListener);

    ComPtr<IActivationFactory> hstrStreamSocketListenerActivationFactory;
    hr = GetActivationFactory(hstrStreamSocketListener.Get(), &hstrStreamSocketListenerActivationFactory);
    if (FAILED(hr))
    {
        ::Microsoft::WRL::Details::RaiseException(hr);
    }

    Now I am trying to make an event handler for ConnectionReceived.  I don't know how to do the code for IStreamSocketListenerConnectionReceived.  How do you implement this in the DLL using the ABI:: namespace?

    Thanks in advance.

    Sanj

    Monday, July 23, 2012 11:34 PM

Answers