DeleteTag Example for C++ 5.0 and later
/* The following example will delete the PAGENUMBER tag from page 2 of a TIFF file: */
void TestDeleteTag(ILEADRasterIO * pRasterIO)
{
short nRet;
nRet = pRasterIO->ReadTag("test.tif", 2, 297);
if (nRet == 0)
{
nRet = pRasterIO->DeleteTag("test.tif", 2, 297, 0);
if (nRet != 0)
MessageBox(NULL, TEXT("DeleteTag failed!"), TEXT("Error!"), MB_OK);
else
MessageBox(NULL, TEXT("DeleteTag SUCCEEDED!"), TEXT("Notice"), MB_OK);
}
else
MessageBox(NULL, TEXT("Page 2 does not have a tag number 297!"), TEXT("Error!"), MB_OK);
}