WriteComment example for C++ 4.0 and later

void CTest4Dlg::OnSetComment() 
{
   m_Lead1.SetComment(CMNT_SZARTIST, COleVariant("Me"));
   m_Lead1.WriteComment("Test.tif", 1);

   VARIANT Comment = m_Lead1.ReadComment("Test.tif", 1, CMNT_SZARTIST);
   MessageBox(CString(V_BSTR(&Comment)));
}