InetSendData Example for C++ 5.0 and later

void CNet::Method()
{
   TCHAR szText[]=TEXT("This is a test.");
   VARIANT var;
   SAFEARRAY FAR *psa;
   SAFEARRAYBOUND rgsabound[1];
   ILEADRasterVariant * pltRasVar = NULL;

   HRESULT hr = ::CoCreateInstance(CLSID_LEADRasterVariant, NULL, CLSCTX_ALL, IID_ILEADRasterVariant, (void **)&pltRasVar);


   pltRasVar->Type = VALUE_STRING;
   lstrcpy(pltRasVar->StringValue, szText);

   m_pRasterInet->InetSendData(pltRasVar, strlen(szText) + 1, INETDATA_USER2);

   pltRasVar->Release();
}