OLEDropFile example for C++ 5.0 and later

void CMFCTestDlg::OnOleDropFileLeadrasterview1(LPCTSTR pszName) 
{
   ILEADRasterIO *pRasterIO=NULL;
   CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL,
                    IID_ILEADRasterIO, (void**)&pRasterIO);
    
   // when a file is dropped, bring up a dialog box and ask the user
   // whether to load the file or not
   if(MessageBox(pszName, TEXT(""), MB_YESNO) == IDYES)
      pRasterIO->Load(m_LEADRasterView1.GetRaster(),
                      pszName, 0, 1, 1);
   else
      MessageBox(TEXT("File Not Loaded!"), TEXT(""));
pRasterIO->Release();
}