InetSendGetMagGlassDataCmd 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,
ILEADRasterVariant * vMaskPlane,
short nMaskPlaneStart,
short nMaskPlaneEnd)
{
   short nRet;
   CString csOut;

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

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

   return nRet;
}