Using StreamWebSocket in c++ windows Store app RRS feed

  • Question

  • I am trying to read data from a web page using StreamWebSocket class. But I am getting unhandled exception as below:

    "Unhandled exception at 0x60FA8AE3 (msvcr110d.dll) in Task.exe: An invalid parameter was passed to a function that considers invalid parameters fatal.( it appears in file invarg.c )"

    Here is the code I am trying:

    // s is class member of type StreamWebSocket. s = ref new StreamWebSocket(); Uri^ u = ref new Uri( "wss://http://msdn.microsoft.com/en-us/library/hh438388(v=vs.85).aspx" ); task<void>(s->ConnectAsync( u )).then([this]( task<void> p) { try { OutputDebugString( L"complete" );

    // get the input stream and read data } catch( ...) { } });

    What could be wring with this? My intention is to read the contents of the web page.

    Thursday, September 27, 2012 8:27 PM


All replies