The code I'm using is below. If _bStop is true then the proc stops. It's not stopping.
Does the code below look like it should accurately return the -102 if the user closed the browser?
It does return the STOP code -101 with no problem.
- Code: Select all
if(!handleRtnCode(oIMacros, oIMacros.iimPlay(sCode, iWBTimeout))) return false;
public bool handleRtnCode(iMacros.App oIMacros, iMacros.Status stRtn)
{
string sErr = "";
int nRtn = (int) stRtn;
if(nRtn != 1)
{
sErr = oIMacros.iimGetLastError();
setWBStatus("BacklinkID: " + sBacklinkID + " - " + sErr); //delegate using INVOKE on the main thread
}
if(nRtn == -101 || nRtn == -102 ||oIMacros == null)
{
_bStop = true;
return false;
}
return true;
}