void ProcessForm::ProcessData(WPARAM wp) { DispatchData* data = (DispatchData*)wp; control_header* header = data->recvData.header; unsigned short cmd = header->command; unsigned short resp = header->response; int dataLen = header->dataLen; int seq = header->seq; void* body = data->recvData.body; if(cmd == CONTROL_ENUM_PROCS) { if(resp != 0) OnOperationFailed(cmd, resp); else InsertData(body, dataLen, seq); } else if(resp != 0) OnOperationFailed(cmd, resp); }
void IIOCPEntry::OperationFailed (void) // OperationFailed // // Operation has failed. { if (m_bDeleteOnCompletion) { delete this; return; } // We need to reset the status because we might get called back // (on another thread) before we return from OnOperationComplete. EOperations iOp = m_iCurrentOp; m_iCurrentOp = opNone; // Let our subclass handle this. OnOperationFailed(iOp); }