WriteComment example for C++ 5.0 and later
void CTest4Dlg::OnSetComment()
{
ILEADRasterIO *pRasterIO=NULL;
ILEADRasterVariant * pltRasVar = NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL,
IID_ILEADRasterIO, (void**)&pRasterIO);
CoCreateInstance(CLSID_LEADRasterVariant, NULL, CLSCTX_ALL,
IID_ILEADRasterVariant, (void **)&pltRasVar);
pltRasVar->Type = VALUE_STRING;
pltRasVar->StringValue = "Me";
pRasterIO->PutComment(CMNT_SZARTIST, pltRasVar);
pRasterIO->WriteComment("d:\\temp\\Test.tif", 1);
pltRasVar = pRasterIO->ReadComment(m_LEADRasterView1.GetRaster(), "d:\\temp\\Test.tif",
1, CMNT_SZARTIST);
MessageBox(pltRasVar->StringValue);
pRasterIO->Release();
pltRasVar->Release ();
}