InetReceiveData2 Example for C++ 5.0 and later

Note: This is not a complete example for handling events, some steps have been omitted. For a complete example of how to handle events, refer to the example Initializing a Computer as a Server and Accepting Connections.

void CRasterInetSink::OnInetReceiveData2(short iComputer, const _variant_t &pData, long lSize, short iType)
{
   TCHAR szText[80];
   // convert to a string
   wsprintf(szText, TEXT("Received %ld bytes from %d computer"), lSize, iComputer);
   AfxMessageBox(szText);
}