I created a simple activeX control which consists of a single method which will do Base64 encoding of a an item 4 times. See the below code:

void CTstCtrlCtrl::ImageReceived()
{
// TODO: Add your dispatch handler code here

CString sFrtImage, sRearImage, strMicrText;
CString buf[4];

for (int i = 0; i < 4; i++)
{
strFrontImage = EncodeBase64("C:\\img.tiff");
strRearImage = EncodeBase64("C:\\img_back.tiff");
strMicrText = "00012100323C232323D9898";

buf[i] = "FRONT Image:" + sFrtImage
+"BACK IMAGE:" + sRearImage
+ "MICR TEXT:" + strMicrText;
}
FireImageReceived(buf[0],buf[1],buf[2],buf[3]); //this is the event Defined in ActiveX control.
}

and i'm calling the active X control function inside a webpage using VB Script.
If I run the loop for 4 times as shown in the above code, then IE crashes i.e there is some problem with FireEvent.
ActiveX control works fine for 2 iterations of the Base64 encoding inside ImageReceived() of the ActiveX.
Folks, Any help will be really really appreciated . If Any body really interested to test...i will send the tiff images also