InetSendGetMagGlassDataCmd2 Example for C++ 5.0 and later

long nCommandID;




// … Assume that the following function will be called from inside the MagGlassExt event that
// belongs to LEAD RasterView control
short GetMagGlassData(long nBitmapID,
const VARIANT FAR& vMaskPlane,
short nMaskPlaneStart,
short nMaskPlaneEnd)
{
   short nRet;
   CString csOut;

   nRet = m_pRasterInet->InetSendGetMagGlassDataCmd2(nCommandID++, nBitmapID, vMaskPlane, nMaskPlaneStart, nMaskPlaneEnd);

   if((nRet != 0) && (nRet != ERROR_DATA_QUEUED))
   {
      csOut.Format(TEXT("ERROR %d calling InetSendGetMagGlassDataCmd2."), nRet);
      AfxMessageBox(csOut);
   }
   else
      AfxMessageBox(TEXT("InetSendGetMagGlassDataCmd2 executed."));

   return nRet;
}