rem: info->msg->lParam = (long)c->queued_leaves;
add: { if (!c->queued_leaves->saferef) { void *sr; sr = WRAP_SAFEREF(c->queued_leaves); c->queued_leaves->saferef = sr; } } info->msg->lParam = (long)c->queued_leaves->saferef;
context: static BOOL CALLBACK CheckWindow(HWND wnd, LPARAM param){  CheckInfo *info = (CheckInfo *)param;  MrEdContext *c;  c = GetContext(wnd);  if ((!info->c && (!c || c->ready)) || (info->c == c)) {    if (c && c->queued_leaves) {      if (info->remove) {	if (!WM_MRED_LEAVE)	  WM_MRED_LEAVE = RegisterWindowMessage("MrEd_Leave_" MRED_GUID);	info->wnd = wnd;	info->c_return = c;	info->msg->message = WM_MRED_LEAVE;	info->msg->lParam = (long)c->queued_leaves;	c->queued_leaves = c->queued_leaves->next;      }      return FALSE;    }    if (PeekMessage(info->msg, wnd, NULL, NULL,                    info->remove ? PM_REMOVE : PM_NOREMOVE)) {      info->wnd = wnd;      info->c_return = c;      found_nothing = 0;      return FALSE;    }  }  return TRUE;}