Wip_write returns WIP_CERR_RESOURCES (-992)

Hi all,

I am trying to use wip_write to put data on a ftp server. If the data is long i get a WIP_CERR_RESOURCES error from the wip_write function.

case WIP_CEV_WRITE:
			 while(countToSend > 0)
			 {
				temp = wip_write(myFTPUploadData, pFTPU, countToSend);
				countToSend -= temp;
				wm_itoa(temp, buff);
				adl_fcmSendData(hFCM, buff, wm_strlen(buff));
				if(countToSend <= 0) break;
				pFTPU += temp;
			 }
			break;

Can anyone see a problem or have any advice for how to solve the error?

Mark